Introduction¶
DeepSeek Harness (DSH) supports custom protocols such as openai-completions, openai-responses, and anthropic-messages. Manually configuring model capabilities, metadata, and Headers for these protocols is often tedious. The dsh-relay-models plugin provides a solution through a Web interface: it fetches model information from the pi.dev directory and auto-completes missing fields, supports drag-and-drop sorting of the provider list, and allows overriding Headers and User-Agent.
Core Features¶
- Hybrid-protocol model discovery and metadata matching: Automatically completes missing model names, context windows, and output limits.
- Web configuration: Provides a visual model list and provider management interface.
- Custom provider model capabilities: Supports adding model capabilities for custom providers.
- Headers editing: Supports editing request Headers.
- User-Agent override: Supports overriding the request User-Agent.
- Drag-and-drop provider ordering: Supports adjusting provider order by dragging or using keyboard shortcuts.
- Automatic compatibility alignment: Automatically aligns with the current Host’s schema and does not maintain its own whitelist.
Installation and Enablement¶
Install the plugin using npm:
npx @deepseek-ai/dsh@latest plugin --profile web add dsh-relay-models@latest
It can also be installed from GitHub:
npx @deepseek-ai/dsh@latest plugin --profile web add github:Xichun123/dsh-relay-models
After installation, restart the corresponding profile and refresh the Web page.
Typical Usage¶
Model Completion¶
- Open DSH Settings -> Models.
- Add a custom provider and fill in the protocol, API address, and credentials.
- The plugin automatically matches models from the pi.dev directory and completes metadata such as names and context windows. If no match is found, you can manually select a directory model.
- Click the host’s “Save” button to persist the completed fields.
Headers and User-Agent Override¶
- Save the custom provider first.
- Open Edit -> Custom Settings -> Headers (JSON) below the API protocol.
- Fill in a JSON object with string values, for example:
{
"User-Agent": "claude-cli/2.1.263 (external, cli)",
"X-Tenant": "example"
}
- Click Save Headers. This field is submitted separately and is not submitted by the host’s “Save” button below.
- Headers are stored in DSH native configuration
llm-pi-ai.providers.<provider ID>.headers.
Provider Ordering¶
In Settings -> Models, drag the ⠿ handle to the left of the provider name to adjust its position. The order is saved automatically after release. You can also use Tab to focus the handle and press ↑ / ↓ to adjust it.
Notes¶
- Dependency requirements: The plugin runs on DeepSeek Harness and requires peer dependency
^0.1.3-alpha.2 || ^0.1.5-alpha.1. - Headers saving: Headers must be saved separately and are not submitted together with the main settings. Invalid Headers format will not prevent saving the main settings.
- Scope of ordering: Provider ordering is saved only in the
localStorageof the current browser and current site. It persists after refresh or reopening settings, but does not affect API call priority. - Retry mechanism: The plugin does not manage failure retries and fully relies on the Host’s native discovery mechanism.
- Compatibility alignment: Compatibility automatically follows the current Host’s schema; no other adapter packages are imported.
Conclusion¶
This plugin resolves the tedious configuration of DSH custom protocols through a Web interface, making it suitable for users who need to manage multiple providers, customize Headers, or want to automatically synchronize model metadata. For more details and source code, visit the GitHub repository.