DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

Model Router — DeepSeek Harness 插件(DSH Plugin)
← Plugins
M

@andrepontesmelo/dsh-model-router

Model Router

DSH 插件:声明绑定可插拔路由算法(优先级、轮询)的 VIRTUAL 模型 ID,用于在真实提供商/模型候选项之间进行路由;使用虚拟 ID 时,会透明地将请求分发到算法选定的真实提供商,并支持故障转移。

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add github:andrepontesmelo/dsh-model-router#f083b6e93017d3f7ad97a076755b502633e06b80
README兼容性版本

兼容性与来源证明

Model Router 以 @andrepontesmelo/dsh-model-router 发布,当前版本为 0.2.1。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
any
发布来源
github
Registry 更新时间
2026/9/12

版本

0.2.1stable
2026/9/12

相关插件

正在加载相关插件…

最新版
0.2.1
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
未提供
文件数
未提供
Surface
any
许可证
MIT
发布源
github
GitHub
★ 0
周下载
0
最近提交
2026/9/11
查看源码 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录

相关插件

继续浏览 models-usage 分类下经过校验的插件。

Usage Stats@ychris12138/dsh-usage-statsdsh Web GUI 的令牌使用热力图、提供商余额和订阅配额Codex Connectdsh-codex-connect用于 DeepSeek Harness 的 ChatGPT OAuth 和 Codex 模型。Ui Usage Billing@kenz1117/dsh-ui-usage-billingDeepSeek Harness 的用量计费仪表板:侧边栏成本指标和完整的仪表板模态窗口,依据当前多提供商目录定价,并汇总会话日志中的实际用量。Codex Subscriptiondsh-codex-subscription通过 OAuth 在 DeepSeek Harness 中使用 ChatGPT 和 Codex 订阅,支持配额管理、安全重置、网页搜索、图像和快速模式

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.