DeepSeek Harness Plugin Hub

Publish and manage complete Harness Profiles. Discover Plugins for your next setup.

Explore

PluginsPresetsDocsNews

Community

Publish a pluginContactReport an issue

Resources

Plugin Hub on GitHubDeepSeek HarnessSystem statusPrivacy notice
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

Independent and unofficial. Not affiliated with, authorized by, or endorsed by DeepSeek.

Model Router — DSH Plugin for DeepSeek Harness
← Plugins
M

@andrepontesmelo/dsh-model-router

Model Router

DSH plugin: declare VIRTUAL model ids bound to a pluggable routing algorithm (priority, round-robin) over real provider/model candidates; using the virtual id transparently dispatches to a real provider chosen by the algorithm, with failover.

The plugin will be installed here. Keep web if you are unsure.

npx -y @deepseek-ai/dsh plugin --profile web add github:andrepontesmelo/dsh-model-router#f083b6e93017d3f7ad97a076755b502633e06b80
READMECompatibilityVersions

Compatibility and provenance

Model Router is published as @andrepontesmelo/dsh-model-router and currently resolves to version 0.2.1. The Hub verifies its manifest and preserves the exact installation source for reproducible installs.

DSH compatibility
*
Runtime surfaces
any
Release source
github
Registry updated
9/12/2026

Versions

0.2.1stable
9/12/2026

Related plugins

Loading related plugins…

Latest
0.2.1
DSH
*
HMR
Process restart
Tree shaking
Safe tree shaking not declared
Unpacked size
Unavailable
Files
Unavailable
Surface
any
License
MIT
Source
github
GitHub
★ 0
Weekly downloads
0
Last push
9/11/2026
View source ↗
README badge

Click the badge to copy Markdown for your README.

Do you maintain this Plugin?Claim benefit · Priority security scan

Verify the GitHub repository declared in package.json to manage this listing. After you claim it, Hub will prioritize a security scan of the current version and publish the result when it passes.

Claim this Plugin →
Report an issue
DeepSeek Harness Plugin Hub
ProfilesPluginsCategoriesNewsDocsSign inManage Profiles
ProfilesPluginsCategoriesNewsDocsSign in

Related plugins

More verified plugins in models-usage.

Usage Stats@ychris12138/dsh-usage-statsToken usage heatmap, provider balances, and subscription quotas for the dsh web GUICodex Connectdsh-codex-connectChatGPT OAuth and Codex models for DeepSeek Harness.Ui Usage Billing@kenz1117/dsh-ui-usage-billingUsage billing dashboard for DeepSeek Harness: sidebar cost metrics plus a full dashboard modal, priced from a current multi-provider catalog with real usage aggregated from session logs.Codex Subscriptiondsh-codex-subscriptionUse ChatGPT and Codex subscriptions in DeepSeek Harness with OAuth, quota, safe resets, web search, images, and Fast mode

README

dsh-model-router

dsh-model-router banner

A DeepSeek Harness (DSH) plugin that turns model selection into intelligent routing: declare a virtual model id in config, bind it to a routing algorithm over a list of real provider/model candidates, and use the virtual id anywhere — agent options, model picker. Every call is transparently dispatched to a real model chosen by the algorithm, with automatic failover.

What it does

  • Virtual model ids. A route such as routed-chat behaves like any real model in the picker, but is a facade over a candidate pool you define.
  • Transparent failover. When a candidate fails, the next one is tried — same request, no user-visible error — and the plugin records which real model served each call, so a failover is always visible in the provenance instead of silent.
  • Two routing algorithms (pluggable extension point):
    • priority — always try the first candidate; skip it only on failure. Failed candidates get exponential backoff, giving a struggling model time to recover before it is tried again.
    • round-robin — distribute calls across the pool.
  • Per-candidate reasoning levels. A candidate can declare a reasoning effort that is applied when that candidate serves the request; a model without a matching level simply keeps its provider default.
  • Your own algorithm. RoutingAlgorithm is a factory contract (select, onFailure, optional onDispatch/onSuccess) — implement one and register it.

Failover for a single turn — a candidate fails, the next one serves, and the provenance records who answered:

flowchart LR
    V["request: routed-chat"] --> P["algorithm selects<br>the first live candidate"]
    P --> C1["candidate 1<br>alpha/alpha-model"]
    C1 -- "stream error" --> F["mark failed +<br>backoff cooldown"]
    F --> R["retry: select the<br>next live candidate"]
    R --> C2["candidate 2<br>beta/beta-model"]
    C2 -- "stop" --> OK["success — provenance<br>records beta as the model that served"]

Why it exists

Model pools are the reality: a cheap fast model, a strong one, a spare. Hardcoding one id means a provider outage becomes your outage. Routing at the plugin layer means the rest of the harness never learns about failure — and never has to.

Install

Requires Node ≥ 22 and a DSH profile to install into.

npm pack
dsh plugin --profile <your-profile> add file:/path/to/dsh-model-router-<version>.tgz

Or straight from GitHub:

dsh plugin --profile <your-profile> add github:andrepontesmelo/dsh-model-router

[!WARNING] Routing is config-driven and bypasses nothing you did not declare — but every candidate you list is a real provider that your prompts and completions will be sent to. Audit the candidates list before installing a route config you did not write, and pin the install (tag or local tarball) rather than floating on a branch.

Verify the build before installing:

npm pack --dry-run          # inspect exactly what ships
sha256sum dsh-model-router-<version>.tgz

Compare the checksum with the one published with the release you are installing. A github: install resolves the default branch at install time — pin a tag for reproducibility.

Useful commands once installed:

npm test            # 76-test unit suite (node --test)
npm run smoke       # 5 failover drills, in-memory, zero network
dsh plugin --profile <your-profile> list

Quick start

Add a route to your profile's cordis.patch.yml:

{
  "routes": [
    {
      "id": "routed-chat",
      "algorithm": "priority",              // "priority" | "round-robin"
      "candidates": [
        { "provider": "deepseek-official", "model": "deepseek-v4-flash", "reasoning": "high" },
        { "provider": "pi-ai", "model": "..." }
      ]
    }
  ]
}

Pick routed-chat in the model picker (or set it as an agent's model) and route. On failover, the response provenance shows the real model that answered and any candidates sleeping in their backoff window.

A candidate's optional reasoning is an effort id from that provider's model. When the candidate serves a request, the shim dispatches with that reasoning effort; if the model has no reasoning concept (or no such effort), the level is ignored and the provider's own default applies — the request never fails because of it.

The config-to-picker stack — a declared route becomes a real model-picker entry backed by the candidate pool:

flowchart TD
    C["cordis.patch.yml<br>route routed-chat, algorithm priority,<br>candidates: deepseek-official/deepseek-v4-flash, pi-ai/…"] --> A["apply(): validate config,<br>group routes by provider"]
    A --> S["RouterShim registers the<br>virtual provider routed-chat"]
    S --> L["llm runtime"]
    L --> M["model picker advertises<br>routed-chat"]
    M --> D["picking routed-chat dispatches through<br>the algorithm with transparent failover"]

Writing your own algorithm

An algorithm is a factory (ctx, routes) => algorithm:

{
  select(route, callCtx)      // -> candidate | undefined (pure — no state advance)
  onFailure(route, candidate) // record the failure so select skips it
  onDispatch?(route, candidate) // first dispatch of a request
  onSuccess?(route, candidate)  // optional
}

The shim probes select for boolean checks, so it must stay pure; state advances happen in the on* callbacks. The test suite in test/ pins these seam mechanics.

Docs

Start at the docs index:

  • Architecture — plugin wiring, shim, routing, backoff.
  • Development — layout, test gate, how to run the smoke suite.

Contributing

PRs welcome — see CONTRIBUTING.md for the workflow and the local gate. Security issues: SECURITY.md (do not open a public issue).

Roadmap

  • Session stickiness — pin a session to the candidate that first served it — BLOCKED UPSTREAM: a plugin picks its candidate in the adapter prepareCall(provider, model, signal) seam, which carries no session id (the loop's optional sessionId on request options only surfaces later, at stream time, after the pick), so a plugin cannot pin per conversation. Unblocks if DSH passes a session id through candidate selection.

Requirements

  • Node ≥ 22.
  • A DSH profile to install into; candidates point at providers already configured there.

Test

npm test        # unit suite
npm run smoke   # in-memory failover drills (LOCAL mode)

License

MIT — see LICENSE.