The DeepSeek Harness (DSH) ecosystem is plugin-centric, allowing users to flexibly extend the capabilities of their agents. dsh-delegation-suite is a plugin maintained by wenheguo2 that focuses on solving task delegation problems in agent development. It provides a role-based routing mechanism that can automatically assign tasks to the most suitable model and automatically switch to another model when one fails. It also supports context inheritance, visual configuration, detailed token usage monitoring, and balance tracking.
Core Features¶
This plugin provides the following capabilities:
- Role routing + failover: Using the
delegate_rankedtool, the system selects a model from the routing table based on the task role. If the preferred model fails (for example, due to insufficient balance, rate limiting, or network errors), the system automatically tries the next model in the list and returns complete attempt logs. - Fork delegation: By setting
fork: true, a subagent can inherit the context of the current conversation. This allows the subagent to continue previous discussions, perform follow-up analysis, or review based on the current thread while still following the role routing rules. - Model transparency: Each delegated subagent automatically includes the label
[provider/model] role delegationin its name. In the subagent tree, you can clearly see the exact model used by each subagent. - Inline thinking effort: In the routing table configuration, the third column of each row can specify the thinking effort level (
off/low/medium/high/max). This means the same model can be configured with different reasoning depths for different roles. - Visual editing: The plugin includes a built-in Web GUI (Settings → Preset Studio) that allows users to edit routing tables, presets, and personas in table format. Changes take effect immediately after saving, without requiring a restart.
- Delegation policy hints: A concise built-in policy section guides the main agent to delegate at appropriate times and report the model used after delegation.
- Image transcription (vision delegation): When a text-only model receives an image, the plugin automatically dispatches a
visionrole subagent to transcribe the image into text, after which the main model continues processing. This feature can be disabled, a dedicated model can be specified, or the timeout can be adjusted in plugin settings. - Token usage statistics: Token consumption for each provider/model is automatically recorded (weekly, monthly, and yearly), tied to the routing configuration, and stored locally.
- Balance and quota queries: Supports automatic refresh of balances and quotas for platforms such as DeepSeek, Kimi, GLM, and CodeBuddy (for example, Kimi Code plan usage and GLM Coding Plan quota).
Installation¶
It is recommended to install using the prebuilt tarball to avoid build authorization issues:
dsh plugin --profile web add https://github.com/wenheguo2/dsh-delegation-suite/releases/download/v1.0.0/dsh-delegation-suite-1.0.0.tgz
Before installation, check the profiles/web/cordis.patch.yml file. If it already contains tools or service lines with the same names, such as delegation-ranker, policy-hint, or preset-studio, delete those lines first to avoid conflicts.
Basic Usage¶
1. Use the delegation tool¶
When the main agent calls the delegate_ranked tool, specify the role corresponding to the task. The system selects a model according to the role’s configuration in the routing table and starts the subagent with the appropriate priority.
Common roles include:
* frontend: frontend, UI, CSS, and TS development
* backend: backend logic, APIs, and infrastructure
* reasoning: complex analysis, reasoning, and architecture design
* review: independent code review
* adversary: nitpicking, red-team testing
* vision: image understanding
* bulk: batch, mechanical file editing
* analysis: large repository or document review
* general: general default
2. Inherit context¶
If a subagent needs to continue working based on the current conversation, add the fork: true parameter when calling delegate_ranked:
{
"role": "review",
"prompt": "请审查上面的代码变更。",
"fork": true
}
3. Configure thinking effort¶
In the routing table configuration, the third column (effort) can be used to set the thinking effort level. For example, configure the reasoning role to use max effort, while the bulk role uses off effort to improve speed.
Routing Configuration¶
The routing configuration file is located by default at $DSH_HOME/data/dsh-delegation-suite/routes.json and is automatically generated on first run. Each row uses the format [provider, model, effort], and the list order represents model priority.
This file can be visually edited in the Web GUI under Preset Studio, and changes take effect immediately after saving.
Example configuration:
{
"reasoning": [
["kimi-coding", "k3-256k", "max"],
["zai-coding-cn", "glm-5.3", "max"],
["deepseek-official", "deepseek-v4-flash", "high"]
],
"frontend": [
["deepseek-official", "deepseek-v4-flash", "high"]
]
}
Image Transcription Configuration¶
To allow text-only models to process images, ensure that the vision role in the routing table is configured with a model that supports image input.
- Add an image-capable model under Settings → Models.
- In Settings → Preset Studio → Delegation Routing, add a
[provider, model]row for thevisionrole. - Save the routing table.
If you need to disable automatic transcription or specify a dedicated model, adjust transcribeEnabled, transcribeModel, or transcribeTimeoutMs in the plugin settings.
Data Statistics and Balances¶
- Token statistics: Go to Settings → Token Statistics to view usage. You can view consumption by model/provider for weekly, monthly, or yearly periods, and you can reset the data with one click.
- Balance queries: Go to Settings → Balances and Quotas. The system refreshes automatically every 60 seconds. It supports viewing DeepSeek balances, Kimi Code plans, GLM Coding Plans, CodeBuddy credits, and more.
Use Cases and Notes¶
This plugin is suitable for scenarios requiring fine-grained control over model assignment, parallel task processing with multiple models, or cost monitoring. It runs with the permissions of the current DSH process. Make sure to read the source code and confirm the license (MIT) before installation.
Important notes:
* Third-party or private gateways may not fully pass through the reasoning_effort or thinking parameters, which may make thinking effort settings ineffective.
* Some gateways (such as Tencent CodeBuddy) may ignore the thinking parameter or reject the developer role. Adjust based on the behavior of the specific gateway.
Conclusion¶
dsh-delegation-suite reduces the complexity of DSH agent development through visual routing configuration and automated fault tolerance. Developers can focus more on business logic while delegating model selection, context inheritance, and cost monitoring to the plugin.