Introduction¶
When developing agents with DeepSeek Harness (DSH), managing a model’s reasoning effort and model switching is a concrete technical pain point. Manually adjusting the effort setting for each step is inefficient and error-prone. dsh-model-router is a plugin built for this purpose. It combines model pool management with reasoning-effort routing, aiming to automate this process.
Feature Overview¶
This plugin is a DeepSeek Harness plugin maintained by Neptune810. Its core function is to handle Flash-only reasoning-effort routing, allowing the reasoning effort to be set for each step while keeping the model pool unchanged.
Core features include:
* Flash-only reasoning-effort routing: Sets the reasoning effort for each step without changing the model.
* Model pool management: Supports cost tiers (cheap/strong) and vision tags.
* Authorization scope: Supports three control modes: full (model + effort), effort (effort only), and model (model only).
* Task presets: Supports keyword matching and per-model weight configuration.
* Vision routing: Supports routing image steps.
* Semantic task classifier: Optional semantic task classification.
* Plan inheritance: New conversations inherit the previous plan.
* Composer UI integration: Integrates with the DSH Composer UI.
Usage Examples¶
Routing steps by difficulty¶
The plugin automatically sets the reasoning effort based on task difficulty:
* trivial (Simple): Clear intent and short steps; effort set to low.
* standard (Standard): Ordinary short requests; effort set to low.
* engineering (Engineering): Contains code/diffs/XML structure or tool loops; effort set to high.
* hard (Hard): Dense engineering briefs or internal task failures; effort set to high or max (requires allowMax).
Configuring the model pool¶
Define the model pool, cost tiers, and vision tags in the YAML configuration:
pool:
- { id: deepseek-official/deepseek-flash, cost: 1, tier: cheap }
- { id: deepseek-official/deepseek-v4-pro, cost: 8, tier: strong, maxPerTask: 3 }
- { id: deepseek-official/deepseek-v4-flash-vision-exp, cost: 1, tags: [vision] }
- { id: vendor-x/writer-pro, cost: 20, weights: { 小说续写: 95 } }
Configuring task presets¶
Define task types, using keyword matching and specific model weights:
presets:
小说续写:
match: ["续写", "小说", "文风", "/chapter\\s+\\d+/i"]
weights: { "vendor-x/writer-pro": 95, "deepseek-official/deepseek-v4-pro": 60 }
代码重构:
match: ["重构", "refactor", "架构"]
weights: { "deepseek-official/deepseek-v4-pro": 90 }
Notes¶
- Thinking mode must be enabled: DeepSeek rejects any request that includes a tool call with thinking disabled. Therefore, this plugin always keeps thinking enabled.
- The default UI is opaque: The Composer UI panel is opaque by default.
- Source changes require a restart: The plugin is registered into a shipped DSH slot. Modifying the source code requires fully restarting
dsh webor the desktop app. - Version rollback: Version 0.10.0 was rolled back due to slot rendering issues.
Conclusion¶
dsh-model-router is suitable for scenarios that require fine-grained control of model reasoning effort in DSH. By using the model pool and task presets, steps of different complexity can be handled automatically. For more details and source code, please refer to the project page.