DSH’s extension mechanism allows users to manage model providers through plugins. When you need to temporarily disable a provider or quickly filter models, directly modifying the configuration file is not intuitive enough. zuojinxin/dsh-provider-switch is a static plugin that adds provider enable/disable switches, model search, and provider renaming on top of the official model selector.
Core Features¶
Provider Enable/Disable¶
On the “Settings → Models” page, a switch appears before each provider row. When enabled, models under that provider are available as usual; when disabled, the models are hidden from the selector, and session calls immediately return a PROVIDER_DISABLED error without retrying.
Model Search¶
A search box is added to the top of the model selector in the input box. It supports filtering by keywords in the model name, description, or provider name.
Provider Renaming¶
On the “Settings → Models” page, expand the provider editing card, then click the card title to rename it inline and change its display name in the UI.
Installation and Enablement¶
Before installing, ensure the environment meets the following requirements:
* dsh web version ≥ 0.1.7-rc.1
* Node.js ≥ 20
Run the following command to install the plugin:
dsh plugin --profile web add github:zuojinxin/dsh-provider-switch
After installation, restart the dsh web service for the changes to take effect.
Verifying Installation¶
- Check the startup logs for the following message:
[provider-switch] settings namespace ready - Go to the “Settings → Models” page and check whether a switch appears before each provider row.
- Click the model selector in the input box and check for a search box at the top.
Notes and Limitations¶
- Injection dependency risk: The switch and renaming features on the Settings page are implemented via DOM injection. If an official DSH upgrade changes class names, these UI features may stop working (the plugin degrades gracefully without affecting interception logic).
- Settings page display: When a provider is disabled, its provider row remains visible on the Settings page, but the corresponding models are hidden.
- Interception scope: The plugin only intercepts the
llm/streamwaterfall flow. Direct calls that bypass this flow are not intercepted. - Source code review: This plugin is an open-source project under the MIT license. As a static plugin, it runs with the permissions of the current
dsh webprocess. It is recommended to review the source code before installation to confirm security.