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 Failover Manager — DSH Plugin for DeepSeek Harness
← Plugins
M

model-failover-manager

Model Failover Manager

DSH plugin: session model selection popup + routing groups; automatically switches to the next available model in the group after a model completely fails

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

npx -y @deepseek-ai/dsh plugin --profile web add github:liaoyuqing/model-failover-manager#84fe689208e438a96ad1b94a15659cf30537bc3c
READMECompatibilityVersions

Compatibility and provenance

Model Failover Manager is published as model-failover-manager and currently resolves to version 2.4.0. The Hub verifies its manifest and preserves the exact installation source for reproducible installs.

DSH compatibility
*
Runtime surfaces
web
Release source
github
Registry updated
10/8/2026

Versions

2.4.0stable
10/8/2026

Related plugins

Loading related plugins…

Latest
2.4.0
DSH
*
HMR
Process restart
Tree shaking
Safe tree shaking not declared
Unpacked size
Unavailable
Files
Unavailable
Surface
web
License
Apache-2.0
Source
github
GitHub
★ 2
Weekly downloads
0
Last push
10/14/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.

Whale Widgetdsh-whale-widgetDeepSeek balance whale widget in the bottom-right corner of the DSH Web interface: balance/today’s usage/peak-off-peak pricing, customizable bubble click sequence (text/balance/today/peak-off-peak/image/random phrases and parallel weighted selection), per-line styles and fonts, floating quick editinUsage@linxin666/dsh-usageUsage statistics plugin for the dsh web GUI: per-provider balance and coding-plan quota detection plus a live token usage ledger, with a compact price glance card above the sidebar's Settings rowClient Ui Model Capabilities@linxin666/dsh-client-ui-model-capabilitiesPer-model capability declarations (image input and reasoning efforts) for custom pi-ai providers, edited in place on the Models settings cards; writes the official llm-pi-ai settings namespace, no DSH source changes.Plugin@opencode2dsh/dsh-pluginFree OpenCode Zen models for DeepSeek Harness (DSH): native dsh-llm adapter plugin, no API key.

README

model-failover-manager

DSH 插件:把 composer 的模型选择位换成带「路由分组」的选择弹窗,并在模型彻底失败后自动切换到组内下一个可用模型。

界面里叫「模型故障转移」。设置入口:设置 → 模型故障转移。


它做什么

  • 接管模型选择位:以 priority: -1 注册 conversation.input.model,遮蔽内置选择器。
    • 打开「弹窗模式」时为左右分区弹窗(左:供应商,右:模型),含「路由分组」「失败模型」两个页签。
    • 关闭时为紧凑下拉。
    • 触发按钮显示 供应商 · 模型名 · 思考强度;已绑定分组时另有一个分组徽标。
  • 路由分组:可建多个分组,每组是一份有序模型列表(priority 决定尝试顺序)。
    • 每个模型可配生效时段:多段,两端包含(from 与 to 都算在时段内),from > to 表示跨午夜(如 22 → 6)。
    • 每个模型可配截止日,过期后不再参与路由。
    • 时段未配置、为 null 或空字符串,一律视为「全天」。
  • 两种绑定模式
    • route:用绑定分组里的模型(会实际改变会话当前模型)。
    • failover:保持会话当前模型,只有它彻底失败后才兜底切到组内下一个。
  • 失败后同轮续跑:监听 agent/request-error,以 prepend 注册并先 await next(),因此一定是在所有重试策略都表态放弃之后才接手(包括 llm-error-retry 预算耗尽后直接短路整条链的情况)。接手后标记失败、选定新模型,并让同一轮用新模型继续,不用你重发。
  • 每轮重新路由:每轮开始(pre-step、step === 0)重新计算,所以时段、截止日、失败状态随时间变化都会生效。
  • 子代理继承:子代理沿 session.header.parentSession 向上继承父会话的分组与模式。
  • 默认分组:新会话(startup/clear)自动沿用上次的选择(分组 + 模式);resume / compact 不动,尊重旧会话既有选择。
  • 失败模型记录:按天记录失败模型,同时保存失败原因(错误码 + 最近一次错误信息)。在弹窗的「失败模型」页签里可展开查看原因,也可逐个或一键全部恢复。失败状态按天过期;会话成功完成一轮也会立即恢复对应模型。
  • 交还控制权:你手选模型、解绑分组或删除分组后,插件即不再接管该会话的模型。

与 Our Free Model 的配合

若失败的模型属于 dsh-our-free-model 提供的渠道,插件会先尝试换账号,而不是直接换模型:

  • 不论错误类型,只要该模型还有别的可用账号,就换账号重试一轮;账号试完仍失败才交给分组路由换模型。
  • 换号通过给账号写一个池级冷却标记实现,让该渠道适配器下次选号时跳过刚失败的账号。
  • 插件不读取也不修改该渠道的凭据;只通过它注册的 accountPool 服务调用 getAvailableAccount / updateModelRateLimit / listAccountsByProvider。
  • 未安装该插件时,这段逻辑静默跳过。

安装

dsh plugin add https://github.com/liaoyuqing/model-failover-manager

也可以手工放置:把仓库放进 $DSH_HOME/plugins/model-failover-manager/,然后在 $DSH_HOME/cordis.patch.yml 里注册:

- insert:
    - id: model-failover-manager
      name: ./plugins/model-failover-manager/host.v6.mjs

使用

  1. 打开 设置 → 模型故障转移:切换弹窗模式,增删改路由分组(模型优先级、生效时段、截止日),或恢复失败的模型。
  2. 在会话里点模型位:选模型,并(可选)把某个分组绑定到当前会话,选择 route 或 failover 模式。
  3. 之后该会话按绑定策略工作;绑定会落盘,重启后继续生效。

失败切换的判定过程

  1. 一次请求失败,内层重试策略(内置 llm-retry、llm-error-retry 等)先依次表态。
  2. 只有它们都放弃后,本插件才接手。
  3. 若失败模型属于 Our Free Model:先换账号重试(见上一节)。
  4. 否则把该模型标记为「当日失败」,然后按绑定决定目标:
    • route:取组内下一个可用模型;
    • failover:同样取组内下一个可用模型作为兜底;
    • 组内没有可用模型(都失败 / 不在时段 / 已过期)时不切换,只记录。
  5. 切换成功即让同一轮继续;失败状态在当天结束或该会话成功完成一轮后清除。

HTTP 接口

宿主半在 /api/model-failover 下提供(界面自身使用):

方法路径用途
GET/status分组、当日失败模型、会话绑定、默认分组、最近失败的判定日志、设置
POST/settings保存界面设置(dialogMode)
GET / POST / PUT/groups读取 / 新建 / 更新分组
DELETE/groups/:id删除分组并解绑其会话
GET / POST/session-group读取 / 设置会话绑定(groupId + mode)
GET / POST/default-group读取 / 设置新会话默认分组
POST/failed/reset恢复一个模型的失败状态

数据文件

默认放在 $DSH_HOME/model-failover-manager/:

文件内容
groups.json路由分组(模型、优先级、时段、截止日)
session-bindings.json会话 → 分组 + 模式的绑定
default-binding.json新会话沿用的默认绑定
failed.json按天的失败模型记录(含错误码与原因)
settings.json界面设置

配置

cordis.patch.yml 中该行可选配置:

键说明
dataDir上述数据文件的目录,默认 $DSH_HOME/model-failover-manager

不配置即可正常工作。

仓库内容

文件说明
host.v6.mjs宿主半,也是 package.json 的 main
client.js浏览器半(DSH dynamic client bundle)
cordis.patch.yml安装用的 bundle patch
locale/en.json、locale/zh.json界面文案
icon.svg图标
host.mjs、host.v2.mjs … host.v5.mjs历史版本,仅作回溯保留;运行时只加载 host.v6.mjs

已知限制

  • 依赖 DSH 的 slots、modelDirectories、sessions、remote、remote.session 服务与 agent/request-error 事件;宿主接口变动时需同步跟进。
  • 失败状态按「天」过期,没有更细粒度的退避或熔断。
  • 换账号能力依赖 dsh-our-free-model 是否安装;未安装时只有分组换模型这一条路径。

English

A DSH plugin that replaces the composer's model seat with a grouped model picker, and automatically fails over to the next usable model in the bound group once a model has exhausted every retry policy.

  • Registers conversation.input.model with priority: -1, so it shadows the built-in selector (dialog mode or a compact dropdown).
  • Routing groups hold an ordered model list; each model may declare active time windows (multiple segments, inclusive ends, midnight-crossing) and an expiry date.
  • Two binding modes per session: route (use the group's models) and failover (keep the current model, switch only after it fails completely). Bindings persist across restarts.
  • On agent/request-error — prepended, and only after every inner retry policy has declined — it marks the model failed for the day and continues the same turn on the next routable model.
  • For models served by dsh-our-free-model it first tries another account, by writing a pool-level cooldown marker through that plugin's accountPool service; it never reads or modifies those credentials.
  • Failed models are recorded per day together with the error code and latest message, and can be inspected and cleared from the dialog.

License

Apache-2.0