Introduction¶
The core design philosophy of DeepSeek Harness (DSH) is “Everything Is a Plugin,” which supports different model inference services through extensions. Any Router is a middleware that provides multi-model routing capabilities. When you need to use Any Router in DSH, direct integration usually faces issues such as protocol incompatibility (for example, requiring a Claude Code–specific transport or a Codex-specific Responses API) and complex configuration. As a dedicated provider bundle, dsh-anyrouter aims to resolve these integration details and allow DSH to connect to Any Router through the standard plugin workflow.
What It Is¶
dsh-anyrouter is a DeepSeek Harness–specific provider bundle maintained by user shaomingbo. It uses Any Router as the backend model source, proxies Claude models through a Claude Code–compatible transport, and proxies GPT/Codex models through the Responses API. The plugin is released under the MIT license and aims to simplify the process for DSH users to access Claude and GPT models through Any Router.
Core Features¶
-
Key-Based Routing Control
The plugin checks whetherANYROUTER_API_KEYexists in the credential service. Only when the API Key exists is theanyrouterprovider route registered, and only then does the model selector display the relevant model groups. Once the Key is removed or invalidated, the model group is automatically hidden without manually restarting DSH; after the Key is re-added, it is restored automatically. -
Complete Model Configuration Rather Than Bare IDs
When models are synchronized, inference parameters (such as effort level and adaptive thinking flags) as well as context and output limits are retained. This means that the model selector and inference selector can work properly, and all parameters can be edited through the interface, rather than simply replacing a model ID. -
Model Whitelist Selection
The synchronized model list is presented as checkboxes, allowing users to choose which Claude or GPT models to include. Models that are unsupported or rejected by the routing endpoint (such asgpt-5-codex) are unchecked by default to avoid call failures. -
Dedicated Protocol Adaptation
* Claude models: Uses the Anthropic Messages transport compatible with Claude Code 2.1.239, including specific request headers, identity blocks, and session metadata.
* GPT/Codex models: Uses thePOST /v1/responsesendpoint and adopts the Codex CLI request shape (such asstore: falseandinclude reasoning.encrypted_content). -
Reasoning Flow Through Standard Selectors
Reasoning efforts are controlled through DSH’s native reasoning selector rather than being hardcoded inside the plugin.
Installation and Enablement¶
The installation process is executed through npx. It modifies the current profile’s package.json (adding dependencies and bundles configuration) and runs pnpm install --ignore-scripts in that directory. The DSH process is not stopped during installation, but after installation completes, you must manually restart DSH and refresh the Web page.
Run the following command to install:
npx --yes github:shaomingbo/dsh-anyrouter#v0.3.3
Typical Usage¶
After installation, you can manage the plugin status or switch configuration profiles with the following commands:
# 检查插件是否已安装
npx --yes github:shaomingbo/dsh-anyrouter#v0.3.3 status
# 卸载插件(幂等操作)
npx --yes github:shaomingbo/dsh-anyrouter#v0.3.3 uninstall
# 使用 headless 配置文件安装
npx --yes github:shaomingbo/dsh-anyrouter#v0.3.3 --profile headless
# 使用本地源码进行开发
DSH_ANYROUTER_SOURCE=link:/absolute/path/to/checkout npx --yes github:shaomingbo/dsh-anyrouter#v0.3.3
Applicable Scenarios and Notes¶
- Environment Requirements: This plugin depends on DeepSeek Harness
0.1.1-rc.2andpi-ai0.82.1. If you use an older version of DSH (such as a version earlier than0.1.1-rc.2), the client may fail to start due to missing requiredremote.credentialsorremote.llmreferences. - Error Handling: Synchronizing the model list is informational only and does not actively perform paid probing. When the Relay service is under capacity limits or has no healthy upstream, model calls may return
429or500errors. - Configuration Notes: The API Key must be stored in the credential service or provided through a startup environment variable. Do not write it into the
llm-anyrouternode in the configuration file. If the configuration file lacks areasoningblock, the system falls back to a build-time configuration generated based on the pi-ai directory.
Summary¶
dsh-anyrouter provides a standardized integration solution between DeepSeek Harness and Any Router. Through key gating, complete model configuration, and dedicated protocol adaptation, it resolves the integration challenges of multi-model routing in DSH. For developers who need to manage multi-model routing locally or via the Web through DSH, this is a feature-complete solution.