5fe8f228c1
Add a read-only /ecosystem page that consumes the sibling services' JSON APIs (Nexus entities, Praxis attention, Hexis capabilities), fetched concurrently with honest per-panel error states. Siblings stay headless — mavweb is their human surface (arch §16). Wired via mavweb -nexus/-praxis/-hexis flags; mavweb joins the ecosystem compose network. Fix mobile horizontal overflow across all pages: .content is a flex child with default min-width:auto, so it refused to shrink below the tables' intrinsic width. min-width:0 lets wide tables pan inside .scroll instead of dragging the page sideways. Verified via CDP geometry check (scrollWidth === clientWidth at 430px). Also includes in-progress Ethos UI redesign, ecosystem deploy compose, and planning docs. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2.6 KiB
2.6 KiB
Plan: On-the-Fly Model Swap (Multi-Model Routing)
Goal: Maven can switch between LLM models at runtime — including using a remote llama-server instance on workpc over LAN — without restarting the daemon. The phraser, router (LLM router), and replier all point at a dynamic backend that can be re-pointed via IPC.
Done when:
internal/llm/client.gosupports a dynamic base URL that can be swapped at runtimeinternal/phraser/llmphraser.gocan hot-swap its backend (stop currentllama-serversubprocess, start new one, or point to a remote one)- Remote model config:
phraser.mode = "remote"withremote_url = "http://workpc:8080"— connects without spawning a subprocess - Swap is triggered via IPC (
MethodSwapModel) with a new config block — no daemon restart - Router's
LLMRouter(ininternal/router/llmrouter.go) follows the same swap - Fallback: if the new model fails to respond within timeout, the old model stays active (never leave the user with no model)
Scope:
internal/llm/client.go— addSetBaseURL(string)method for runtime re-pointinginternal/phraser/llmphraser.go— addSwap(Config) errormethodinternal/router/llmrouter.go— already holds aCompleterinterface; swap the underlying clientcmd/mavend/voice.go— re-createsLLMReplierwhen model changes- New IPC method
MethodSwapModelininternal/ipc/api.go - Config:
phraser.modefield (local|remote),phraser.remote_url
Steps:
- Add
SetBaseURL(url string)tointernal/llm/client.go— atomically swaps thebasefield under a mutex (addsync.RWMutextoClient) - Add
Swap(cfg Config) errortointernal/phraser/llmphraser.go— stops currentllama-server(viaClose()), starts new one with new config, or connects to remote URL without spawning - Extend
PhraserConfigininternal/config/config.gowithMode string("local"or"remote") andRemoteURL string - Create new
internal/llm/manager.go— manages a set of named backends, allowsSwitchModel(name)that re-wires phraser + LLM router + replier atomically - Add
MethodSwapModeltointernal/ipc/api.gowith request{model_path, mode, remote_url, n_gpu_layers, n_ctx} - Wire swap handler in
cmd/mavend/main.go—srv.ModelSwapFncalled from IPC dispatch, re-wires phraser, rebuilds router with new LLMRouter, rebuilds replier - Add
modelblock toconfig.Configwith named model definitions (local paths + remote URLs) - Test: swap between local
StubPhraserand remote llama-server on LAN; verify phraser + router + replier all use the new backend