-
Notifications
You must be signed in to change notification settings - Fork 2
feat: add /provider command for runtime provider switching without restart #2140
Copy link
Copy link
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
Currently there is no way to switch the active LLM provider at runtime via a chat command. The /model command allows switching models within the current provider, but changing the provider itself requires editing config.toml and restarting the agent.
Current Behavior
/model [id|refresh]— switches model within the current provider/status— shows current provider and model- Provider selection is static: set via
[llm] provider = "..."in TOML at startup
Desired Behavior
A new /provider slash command that allows switching the active provider at runtime:
/provider — list available configured providers
/provider <name> — switch to a named provider (must be configured in TOML)
/provider status — show current provider with stats (same as /status provider section)
Implementation Notes
- Add
SlashCommand::Providervariant incrates/zeph-core/src/agent/slash_commands.rs(near/modelat line 122) - Handle in
crates/zeph-core/src/agent/mod.rsalongsidehandle_model_switch(~line 2406) - Only allow switching to providers that are already configured in the loaded config (no dynamic config mutation)
- After switching, reset model to the provider's configured default or require explicit
/model <id>call - Update
/statusoutput to reflect the new provider immediately - TUI: emit a system status indicator during the switch (spinner + "Switching provider…" message, per TUI Rules)
Acceptance Criteria
-
/providerlists configured providers with current one highlighted -
/provider <name>switches active provider; subsequent LLM calls use the new provider -
/provider <unknown>returns a clear error without crashing -
/statusreflects the new provider after switch - Works in CLI, TUI, and Telegram channels
- TUI shows a spinner during the switch operation
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request