dsh-llm-failover
Provider failover for DeepSeek Harness: on rate-limit (429) or quota exhaustion, automatically switch between providers with configurable per-provider models, fall back to the last one (e.g. DeepSeek official), and show a visible notice in the UI.
AI Analysis
在 API 报错或超限时自动无缝切换至备用大模型渠道。适合对高可用性有要求、配置了多个 API 服务商的开发者或生产环境。
Install
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:HB00/dsh-llm-failoverREADME
Read the full 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 / 冷却时长(毫秒)