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:
@@ -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}` } : {}),
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user