Introduction¶
In dsh-TUI use cases, subagents typically inherit the main session’s model configuration. If you need subagents to use a different reasoning effort or a lighter-weight model to handle specific tasks, the default behavior is insufficient. The dsh-tui-model-switch plugin provides a solution, allowing independent model routing to be configured for the main session and subagents.
Plugin Overview¶
dsh-tui-model-switch is a plugin designed for dsh-TUI that allows subagents to run with different providers, models, or reasoning efforts while keeping the main session configuration unchanged. The plugin is maintained by FUSU123fusu and is open-sourced under the MIT license.
Installation and Enabling¶
Installing the plugin requires running the following command. After installation, you must restart the DSH service for it to take effect.
dsh plugin --profile dsh-tui add github:FUSU123fusu/dsh-tui-model-switch
Core Features¶
- Subagent Model Routing: Allows subagents to run with independent providers, models, or reasoning efforts.
- TUI Configuration Interface: Configure via the “Model Routing” section on the
/settingsscreen. - Real-Time Effects: Changes are automatically reloaded after settings are modified, with no restart required.
- Cross-Platform Support: Works on non-TUI hosts, with status viewable via the command line.
Usage¶
- Open the TUI interface, go to the
/settingsscreen, and find the “Model Routing” section. - Select “Custom” for the “Subagent Model” option.
- Choose the model for the subagent from the configured provider and model list. If the list is unavailable, you can manually enter
provider/model. - Optional: Set the reasoning effort. Supported values are
low,medium,high, ormax. Leave blank to follow the model default. - Use the
/model-switchcommand to view the currently active routing configuration. - To restore the no-plugin state, set the subagent model to “Follow main session”.
How It Works and Limitations¶
- Priority: An explicitly specified provider/model by the caller overrides plugin settings.
- Reasoning Effort: Injected only through the interceptor and only affects sessions with
origin: subagent. - Plan-Execute: Model routing for the plan-execute phase will be supported after the TUI approval panel is extended.
- Non-TUI Hosts: Settings are persisted in the background, but the
/settingsinterface is not rendered; routing status can be viewed via the command line.
Notes¶
- Always restart DSH after installation.
- The plugin code is hosted on GitHub. Please verify the source code and license before use.
- The plugin does not provide model routing support for the plan-execute phase.