dsh-llm-failover
DeepSeek Harness 的服务商故障转移插件,在触发限流(429)或额度耗尽时自动切换备用服务商与模型。
AI 分析
在 API 报错或超限时自动无缝切换至备用大模型渠道。适合对高可用性有要求、配置了多个 API 服务商的开发者或生产环境。
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:HB00/dsh-llm-failover说明文档
阅读完整 README ↗Configuration / 配置
Either use the Settings UI card, or edit ~/.dsh/settings.yaml:
llm-failover:
enabled: true # master switch / 总开关
providers: # tried in order; last one is the fallback / 按顺序尝试,最后一条是兜底
- provider: huoshan # provider key from your llm-pi-ai / llm-deepseek config
model: deepseek-v4-flash # optional: model to use after switching / 可选:切换后使用的模型
- provider: huoshan2
model: deepseek-v4-flash
- provider: deepseek-official # permanent fallback, never switched away / 永久兜底
model: deepseek-v4-flash
fallbackAfterRetries: 2 # consecutive failures before cooldown+switch / 连续失败几次后冷却并切换
cooldownMs: 60000 # cooldown duration in ms / 冷却时长(毫秒)