feat: add runtime provider/model switching via /model <tier> <provider/model>

- ModelRouter: add setClient(), labels map, getLabel(), getAllLabels()
- TUI commands: parse /model <tier> <provider/model> syntax with autocompletion
- TUI minimal: handle provider switching via createClientFromConfig factory
- Daemon: wire initial labels into router config
- Fix /model alias mappings (opus=complex, sonnet=default, haiku=fast)
- Add design doc and update state.json with feature status
This commit is contained in:
William Valentin
2026-02-06 23:42:14 -08:00
parent e92ce69067
commit d4530a7034
8 changed files with 527 additions and 37 deletions
+6
View File
@@ -179,6 +179,12 @@ function createModelRouter(config: Config): ModelRouter {
local: localClient,
fallbackChain,
retryConfig,
labels: {
default: `${models.default.provider}/${models.default.model}`,
...(models.fast ? { fast: `${models.fast.provider}/${models.fast.model}` } : {}),
...(models.complex ? { complex: `${models.complex.provider}/${models.complex.model}` } : {}),
...(models.local ? { local: `${models.local.provider}/${models.local.model}` } : {}),
},
});
}