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-providers locale namespace, supports Chinese and English switching, and stays consistent with the DSH interface language.
  • Request injection: Listens to the llm/stream event; when the model routing is openrouter, it reroutes to the adapter and injects provider.only, provider.order, or provider.quantizations parameters.
  • Credential reuse: Reuses the OPENROUTER_API_KEY environment variable, requiring no additional configuration.
  • Application attribution: Automatically injects headers such as HTTP-Referer and X-OpenRouter-Title, so that the OpenRouter UI/leaderboard displays it as DeepSeek 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

  1. Ensure the model’s provider routing is openrouter, and select a model under OpenRouter in the model selector.
  2. 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.
  3. 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.1 and requires @deepseek-ai/dsh-settings@^0.1.5-rc.1 as a peerDependency.
  • Feature limitations:
    • Image input is not currently supported and returns UNSUPPORTED_CONTENT.
    • In only mode, allow_fallbacks is forced to false; if all providers in the list are unavailable, the request will fail.
  • 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.