AI Agent Hub
Back to plugins
🤖

dsh-subagent-router

Model Inference Updated 2026.09.03

Run the following command in DeepSeek Harness:

dsh plugin install NinjaSln-labs/dsh-subagent-router

Paste the following prompt into your AI chat to install this plugin:

Run dsh plugin install NinjaSln-labs/dsh-subagent-router in your terminal to install the plugin; visit https://github.com/NinjaSln-labs/dsh-subagent-router for details

About this plugin

The native subagent delegation in DeepSeek Harness simply inherits the parent's model route, so there is no built-in way to pick a different LLM for a lighter or heavier task. When you run multiple provider routes (deepseek-official, pi-ai gateways, etc.) or want to separate quick-response from deep-reasoning scenarios, that quickly becomes a bottleneck. dsh-subagent-router layers model routing on top of the standard ctx.subagents channel, letting each delegation call specify provider, model, and max_tokens explicitly—or delegate the choice to a built-in auto policy that decides based on task tier, catalog metadata, and route health.

The auto policy is deliberately conservative. It anchors to the caller's own model first and only falls back to catalog scoring when the task clearly exceeds a weak model's capability (complex tier) or the parent route has been flagged unhealthy. Transient failures (rate-limit, timeout, transport) trigger a one-step tier escalation; terminal failures (quota exhausted, credential revoked) skip straight to the next healthy provider route instead of retrying in place. Every auto decision is recorded in the tool result with provider, model, tier, reason, anchoring status, escalation source, and reroute rationale, so you can always audit why a particular model was chosen.

Two companion tools round out the workflows. subagent_models serves a read-only catalog listing every registered provider route and its advertised models, annotated with derived metadata—cost tier, speed tier, strength tier, specialty, context window—plus per-route health status. subagent_recommend accepts a task description, runs a lightweight LLM classification (gracefully degrading to a naming heuristic on timeout), and returns a ranked top-n suggestion list. Together they cover three natural workflows: browse the catalog, get a smart recommendation, or specify exactly.

This plugin fits Harness operators managing multi-model routes, developers who want to distinguish light and heavy subagent tasks by model tier, and teams that want failure recovery (escalation, provider rerouting, health probing) built into the delegation flow without writing retry logic themselves. It publishes no services, requires no isolate realm, and every configuration field takes effect live on the next call with no restart needed.

Use Cases

  • Manage multiple provider routes (deepseek-official, pi-ai gateways) and assign different models to subagents based on task weight
  • Use model: auto to let the system pick the right model tier (trivial / standard / complex) automatically without manual switching
  • When a provider hits rate limits or quota exhaustion, the auto policy escalates to the next tier or reroutes to a healthy provider without custom retry code

Best For

  • DeepSeek Harness operators managing multi-model provider routes
  • Developers who need to differentiate light and heavy subagent calls by task complexity
  • Teams that want built-in failure escalation and provider rerouting without writing custom retry logic