DeepSeek Harness Plugin Hub

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

探索

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

社区

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

相关链接

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

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

DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← 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/10/12
查看源码 ↗
README Badge

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

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

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

认领这个 Plugin →
报告问题

相关插件

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

Whale Widgetdsh-whale-widgetDSH Web 界面右下角的 DeepSeek 余额小鲸鱼挂件:余额/今日已用/峰谷定价、自定义泡泡点击序列(文本/余额/今日/峰谷/图片/随机语句与并列加权选择)、逐行样式与字体、悬浮快捷编辑、音效与每轮消耗、自定义角色/动图/音效、吸附与翻转自定义Our Free Model@ebony-vinyl/dsh-our-free-modelOur Free Model — 在 dsh 里装上这个插件即可,无需登录、注册或填 API Key,就能使用包括 DeepSeek V4.1 Flash、Kimi K3 在内的前沿模型,桌面端另有 EAC 协付渠道;2.0 起接入 LobsterAI、Qoder、TRAE、Cline、Loomy、Raccoon、MiniMax、ZCode、Gemini 十个账号渠道(原有匿名免费通道保留)(登录、账号池、积分领取、本地 OpenAI 网关与局域网转发、数据看板与运行日志),六页毛玻璃界面统一呈现。Usage@linxin666/dsh-usage用于 dsh Web GUI 的使用统计插件:检测各提供商的余额和编程套餐配额,并实时记录令牌使用情况;侧边栏 Settings 行上方显示紧凑的价格概览卡片Connect Workbuddydsh-connect-workbuddy把本机登录的 WorkBuddy 模型(国内版与国际版)接入 DeepSeek Harness:每次刷新按上游目录自动读取每个模型的积分倍率,支持逐模型图片输入开关、多账号切换与账号池自动换号,并提供每日签到、卡片与输入框里的胶囊积分读数等只读积分概览。

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.