Introduction¶
DeepSeek Harness (DSH) adheres to the philosophy that “everything is a plugin.” When developing agents, managing multiple API providers and models is often a repetitive task. Typically, this requires manually editing settings.yaml, which is both tedious and error-prone. To address this pain point, community developer jianjianzhu has created dsh-model-switcher.
What is this?¶
This is a visual custom model management plugin designed for the DeepSeek Harness Web profile. It provides provider presets, secure API key entry, model discovery, and default model switching within Plugins → Model Switcher, eliminating the need to manually edit settings.yaml. It is authored by jianjianzhu and is released under the MIT license.
Core Features¶
The plugin offers the following capabilities:
- Provider Presets: Supports NyroAPI/SAPI, standard OpenAI-compatible, OpenRouter, and custom presets.
- Built-in Presets: Includes DeepSeek, SiliconFlow, Gemini, Anthropic, Ollama, LM Studio, vLLM, and LiteLLM.
- Configuration Management: Supports editing Provider ID, name, Base URL, and API protocol.
- Secure Storage: API keys are written to the credential store via the Harness
credentialsRemote, rather than being written to standardsettings.yaml, logs, or exported configurations. - Model Discovery: Calls the Harness model discovery interface to test connections and imports models via search and selection. It preserves the model name, context length, max output, and input type returned by the provider.
- Existing Provider Management: Reads and edits existing providers, supporting renaming and deletion. It preserves credential references for existing providers and allows directory-type providers to inherit built-in API addresses.
- Path Sanitization: Automatically cleans up mistakenly entered paths such as
/models,/chat/completions,/responses, and/messages. - Error Diagnostics: Provides diagnostics in Chinese for authentication, permission, address, timeout, TLS, and network errors.
- Request Header Security: Supports secure custom request headers; sensitive authentication headers are not displayed in the interface.
- Advanced Field Tuning: Visually adjusts Developer Role, finish_reason, streaming usage, and Token limit fields.
- Template Import/Export: Imports and exports provider templates that do not contain sensitive information such as API Keys, Authorization headers, or Cookies.
- Default Model: Saves multiple models and allows setting the first model as the default.
- NyroAPI Features: The preset automatically sets
supportsFinishReason: false,supportsDeveloperRole: false, andmaxTokensField: max_tokens.
Installation and Activation¶
Run the following commands in the plugin directory:
node tests/smoke.mjs
dsh plugin --profile web add .
After installation, open the Plugins page in the Harness and select Model Switcher.
Typical Usage¶
The workflow is straightforward: select a provider, enter the key, fetch models, select a default model, and save. Protocol, address, and compatibility parameters are concealed within advanced settings by default.
Use Cases and Notes¶
- Version Limitations: The current version is intended for the Web profile only.
- Connection Testing: Connection tests utilize the provider’s model discovery endpoint; gateways that do not provide a model list can still be used by manually entering the model ID.
- Special Providers: Services requiring dedicated protocols or non-standard model discovery addresses, such as Azure, require future adaptation.
- Security: API keys are written to the credential store via the Harness
credentialsRemote. The plugin does not write plaintext keys tosettings.yaml, logs, or exported configurations.
Conclusion¶
This plugin lowers the barrier to managing multiple providers through a visual interface while ensuring key security. For more details and source code, please refer to the directory page or the GitHub repository.