Visol-456/dsh-llm-fallback
DeepSeek Harness 回退链插件:主模型失败时自动切换至备用 provider,附带 Web UI 配置面板 | 为 DeepSeek Harness 提供 provider 回退链
Project Overview项目介绍
This is a native community plugin built exclusively for DeepSeek Harness. It enables automatic provider failover when the primary selected LLM provider encounters a service error. When the primary provider hits rate limits, timeouts, 5xx server errors, or other transient failures, the plugin will automatically retry the same request on the next configured fallback provider in sequence, preventing the entire chat turn from failing due to temporary service instability. To install the plugin via the DSH CLI, you can run dsh plugin --profile web add @visol-456/dsh-llm-fallback, which will automatically activate it in your web profile.
The plugin maintains a priority-ordered route table for your fallback providers and implements a circuit breaker mechanism. It tracks consecutive failures for each provider, and automatically switches to the next healthy node once the configured failure threshold is hit. Failed nodes enter a cooldown period, and will not be retried until the cooldown ends, after which the plugin will properly probe if the node has recovered. Once the primary provider is detected as healthy again, the plugin will automatically switch back to it for all future requests starting with the next chat turn.
The plugin is released under the open source MIT license, so it is free to use and modify. There are a few known limitations that users should be aware of before installing. All requests share a single global fallback list, and all state data is stored only in the running process, so all state will reset when DSH restarts. Only agent-loop requests can trigger the fallback, and requests that use the always retry mode will not trigger a fallback switch. You can configure fallback targets via the DSH web UI without editing any configuration files manually, which makes setup much easier for new users.
这是DeepSeek Harness的原生社区插件,用于实现LLM提供商的自动故障回退。当主提供商遇到限流、超时、5xx服务错误等故障时,插件会按照配置好的回退顺序自动重试请求,避免因服务临时不稳定导致对话中断。用户可以通过npm安装,也支持在DSH Web界面中配置,兼容0.1.5-rc.1及以上版本的DeepSeek Harness。
插件维护按优先级排序的路由表,支持熔断机制,会跟踪每个提供商的连续失败次数,达到当前已配置的阈值后自动切换到下一个健康节点。故障节点会进入冷却期,冷却结束后才会重新探测可用性,后续请求会持续使用当前健康节点,直到探测到主节点恢复可用后才切回主节点。
插件遵循MIT许可证,是完全开源免费的。当前版本存在几个已知限制:所有请求共享单一全局备用列表,状态仅保存在进程内,重启后会重置,仅agent-loop请求参与回退,always重试模式的请求不会触发回退。用户可以通过Web UI方便快捷的图形化配置,也可以手动修改配置文件。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-llm-fallback(Visol-456/dsh-llm-fallback)
仓库:https://github.com/Visol-456/dsh-llm-fallback
本站详情页:https://www.yhbd.top/plugins/visol-456-dsh-llm-fallback/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 4 · 最近提交 2026-09-29 · 主语言 TypeScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- Only 4 stars - very few users, little community feedback星标只有 4,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项
Compatibility兼容性
- DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
- External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
- Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册
Security安全性
- Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
- Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
- curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
- Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
- Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
- Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式
Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add @visol-456/dsh-llm-fallback
把 Visol-456/dsh-llm-fallback 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
@visol-456/dsh-llm-fallback
English | 中文
DeepSeek Harness 的 provider fallback chain 插件:主 provider 失败时,同一个请求会自动在下一个配置的 (provider, model) 目标上重试,限流、超时或临时不可用的 provider 不再直接终结一轮对话。
DeepSeek Harness
dsh-plugin生态的社区插件,不属于官方仓库。当前插件版本 0.2.0,兼容 DeepSeek Harness 0.2.0-rc.2(
peerDependencies对齐该版本,cordis~4.0.4、schemastery~3.18.4;未在其他 dsh 版本上验证)。
功能与行为
- 请求本身永远是链头(UI 里选的 provider/model,或部署默认值),插件绝不改写它;只有失败重试才会切到备用目标。
- 失败请求按顶层
fallbacks顺序切换,最后一个备用目标不再切换,其失败按正常方式上抛。 - 按链头/备用目标的连续可切换失败计数打开熔断;冷却期内每个请求仍先试链头,探测失败则无条件再次切换。
- 无备用目标时插件保持休眠,所有请求原样放行;保存第一个目标后在下一次请求生效,无需重启。
- 每次切换、以及每次实际由备用目标服务的请求,都会写入持久会话事件(模型不可见)。
- 与 base bundle 自带的
@deepseek-ai/dsh-llm-retry按 waterfall 顺序组合,只需挂llm-fallback一条,不要重复挂llm-retry。
完整路由语义、字段规则与事件载荷见技术参考。
安装与最短可用配置
dsh plugin --profile web add @visol-456/dsh-llm-fallback
本包声明了 dsh.bundle,安装后会作为 profile 层自动激活;随包的 cordis.patch.yml 以无备用目标挂载插件(休眠状态)。装好后在 Web 界面创建备用目标即可:
侧边栏 Plugins → Installed 列表里的 llm-fallback 卡片 → 打开卡片页 → 用 provider/model 下拉框添加备用目标,调整切换错误码/失败阈值/冷却时间 → 保存。
如需手动挂载或通过 cordis.yml 配置,请看技术参考。
插件页能力
- 备用目标逐行编辑:provider/model 联动下拉、行内上移/下移/删除;provider 下拉只列出 harness 模型目录里真实可用且已加载 model 列表的路由,并按展示名显示。
- 切换错误码(宽输入框)、失败阈值、冷却时间在同一表单内编辑;保存写入当前 profile 的条目配置,并在下一次请求生效。
- 恢复默认值清除表单保存的四个字段,回到组合层与 schema 默认行为。
- 若配置在别处被修改,页面显示冲突横幅,提示先重新加载再重新应用。
文档
- 技术参考(中文) / Technical reference (English):完整配置字段、路由与熔断语义、事件载荷、已知限制、设置 UI 实现注意、dsh profile bundle 激活与 patch 诊断。
- 贡献指南(中文) / Contributing (English)。
许可证
MIT
Q00/ouroboros
crafter-station/petdex
whiteguo233/OpenBiliClaw
anywhere-labs/Agents-Anywhere
agentrq/agentrq
freestylefly/wesight