AI Agent Hub
Back to plugins
🤖

dsh-adaptive-model-router

Model Inference Updated 2026.08.25

Run the following command in DeepSeek Harness:

dsh plugin install icyaaaww/dsh-adaptive-model-router

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

Run dsh plugin install icyaaaww/dsh-adaptive-model-router in DeepSeek Harness to install; the full source lives at https://github.com/icyaaaww/dsh-adaptive-model-router and per-turn adaptive routing takes effect immediately after installation.

About this plugin

Running both a Flash and a Pro model in DeepSeek Harness but still having to hand-pick which one handles each turn is tedious and error-prone. dsh-adaptive-model-router adds a local, synchronous, fully deterministic per-turn adaptive routing layer: simple work stays on the economy model, while complex work or stalled progress automatically upgrades to the quality model. No external classifier is called, no prompt or hidden instruction is injected, and zero extra tokens or provider requests are added.

Routing is rule-based: the quality route activates when entering text hits a configurable character threshold or matches a configured case-insensitive keyword. Within a single turn, hysteresis ensures the route can only upgrade, never downgrade. Consecutive non-excluded tool failures beyond a set count also trigger the upgrade. A successful tracked tool resets only the failure counter; it does not pull an already-upgraded turn back down. A new user turn starts a fresh decision and may return to the economy route. Each route accepts optional reasoningEffort and maxTokens; every other request field stays unchanged. The package targets DeepSeek Harness 0.1.1-rc.2 and ships as plain ESM JavaScript with no runtime dependencies.

Ideal for developers running multiple models side-by-side in Harness, and for teams that value reproducible inference chains, telemetry-friendly request logs, and per-turn cost optimization. Tune the thresholds to balance quality against spend without modifying application code.

Use Cases

  • Keep simple prompts on Flash and auto-escalate complex coding tasks to Pro
  • Auto-upgrade to the quality model after consecutive tool call failures exceed a threshold
  • Balance per-turn token spend against output quality in a multi-model setup

Best For

  • Developers running multiple models in DeepSeek Harness who need automatic routing
  • Engineering teams that value reproducible inference chains and visible telemetry
  • AI application engineers who want per-turn cost-to-quality balancing out of the box