When using OpenRouter models in DeepSeek Harness (DSH), you sometimes need to specify particular providers or limit quantization bits. The dsh-openrouter-providers plugin provides this configuration entry through the plugin settings page, allowing management of the provider list and injection of routing parameters, while persisting the settings to a local configuration file.
Core Features¶
- Plugin configuration card: Displayed as a collapsible card, it supports filling in a list of provider slugs, selecting a routing mode (allow-only or ordered priority), and specifying quantization bit limits.
- UI follows DSH language: Uses the
openrouter-providerslocale namespace, supports Chinese and English switching, and stays consistent with the DSH interface language. - Request injection: Listens to the
llm/streamevent; when the model routing isopenrouter, it reroutes to the adapter and injectsprovider.only,provider.order, orprovider.quantizationsparameters. - Credential reuse: Reuses the
OPENROUTER_API_KEYenvironment variable, requiring no additional configuration. - Application attribution: Automatically injects headers such as
HTTP-RefererandX-OpenRouter-Title, so that the OpenRouter UI/leaderboard displays it asDeepSeek Harness OpenRouter. - State persistence: Configuration is written to the DSH settings document (
~/.dsh/settings.yaml) and automatically restored after restart.
Installation and Activation¶
The plugin is mounted as a bundle package and automatically merged into the profile composition via the insert line in cordis.patch.yml.
Run the following command in the profile directory to install it:
pnpm add dsh-openrouter-providers@latest
In the profile’s package.json, add the plugin name to the dsh.profile.bundles list:
{
"dsh": {
"profile": {
"bundles": [
"dsh-openrouter-providers"
]
}
}
}
After completing the steps above, restart dsh web, and the plugin will become active.
Typical Usage¶
- Ensure the model’s provider routing is
openrouter, and select a model under OpenRouter in the model selector. - Go to “Plugins → Plugin Settings → OpenRouter Provider List”, fill in provider slugs (such as
DeepInfra,Together), select the routing mode and quantization bit limit, and save. - Subsequent OpenRouter requests will automatically carry the injected provider routing parameters.
Applicable Scenarios and Notes¶
- Version compatibility: This plugin is compatible with DeepSeek Harness
0.1.5-rc.1and requires@deepseek-ai/dsh-settings@^0.1.5-rc.1as a peerDependency. - Feature limitations:
- Image input is not currently supported and returns
UNSUPPORTED_CONTENT. - In
onlymode,allow_fallbacksis forced tofalse; if all providers in the list are unavailable, the request will fail.
- Image input is not currently supported and returns
- Ecosystem context: The DSH philosophy is “everything is a plugin.” This plugin is a community project, and its source code and documentation are available on GitHub.
Short Conclusion¶
This plugin encapsulates complex OpenRouter routing configuration within the DSH settings panel, making it easier to manage and maintain. All configuration is persisted through the DSH settings service, ensuring consistency across different sessions.