Visol-456/dsh-llm-fallback 预览 preview

Visol-456/dsh-llm-fallback

Plugin插件 Native原生 ⭐ 4 MIT Models & Routing模型与路由

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方便快捷的图形化配置,也可以手动修改配置文件。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • 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 默认行为。
  • 若配置在别处被修改,页面显示冲突横幅,提示先重新加载再重新应用。

文档

许可证

MIT

← 上一个 Prev dsh-task-engine 下一个 Next dsh-thinking-notifier →