Preface¶
When processing HTTP requests with DeepSeek Harness, you may sometimes need to standardize or modify request headers. The dsh-user-agent plugin rewrites the User-Agent of all outbound HTTP requests—including LLM API calls and other global-fetch traffic—to a custom value.
Plugin Overview¶
The plugin was developed by the maintainer dsh-plugins and is an MIT-licensed web tool plugin. It works by overriding the caller’s request headers (for example, the baseline UA used by dsh-llm).
Core Features¶
- Rewrite anything that uses global
fetch: Rewrites everything that uses globalfetch, including DeepSeek / OpenAI-compatible adapter calls, web searches, and HTTP requests issued by tools. - Live settings page: Provides a dedicated Web settings tab where you can enable or disable rewriting and edit the string in real time, without restarting.
- Standard settings integration: Values are stored under the
dsh-user-agentnamespace and support persistence across sessions. - Clean lifecycle: Wraps
globalThis.fetchonly while the plugin is running, and automatically restores the original fetch when stopped or updated.
Installation and Enabling¶
Use the standard DSH plugin installation command:
dsh plugin add @dsh-plugin/dsh-user-agent
After installation, open the Web GUI settings and go to the UA Settings tab. Turn on the switch, enter the target User-Agent string, and click Save. Changes are applied immediately to the next request.
Configuration¶
The plugin supports overriding default values through a configuration file. Configuration entries are located in cordis.patch.yml or the user settings level and integrate with the standard DSH settings system:
| Field | Type | Default Value | Description |
|---|---|---|---|
enabled |
boolean |
true |
Master switch; when disabled, it operates in pass-through mode. |
userAgent |
string |
DeepSeek-Harness/0.1 (+https://github.com/deepseek-ai/dsh) |
The User-Agent string applied to each rewritten request. |
Notes¶
- Requires a Node.js environment version >= 20.
- The plugin takes effect only while running; after the plugin is stopped or removed, the wrapping logic is no longer active.
- It is provided under the MIT license.
Summary¶
dsh-user-agent provides a way to uniformly manage the User-Agent of all HTTP requests issued by Harness without modifying code. It is suitable for scenarios that require consistent request identification or specific request spoofing.