Letter2025/dsh-model-failover ↗★ 1
dsh-model-failover
DSH 双层模型熔断与容灾切换插件:在请求连续失败时熔断模型或服务商,并自动路由至备用方案。
AI 分析
核心用途是保障 API 调用的高可用性,在遇到限流或服务崩溃时无缝切换。适合对任务执行稳定性要求极高、拥有多个备用 API 渠道的用户。
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Letter2025/dsh-model-failover说明文档
阅读完整 README ↗Configuration
| Field | Default | Meaning |
|---|---|---|
enabled | true | Master switch. |
fallbacks | [] | Ordered fallback routes {provider, model}; must point at providers with a registered adapter. |
tripCodes | RATE_LIMIT, SERVER, TIMEOUT, TRANSPORT, QUOTA, EMPTY_RESPONSE | Failure codes that count toward a circuit; e.g. AUTH/INVALID_CREDENTIAL stay terminal. |
modelCircuitThreshold | 2 | Failures inside the burst window that open a model circuit. |
modelCooldownMs | 60000 | Cooldown before an open model circuit is probed. |
platformCircuitThreshold | 2 | Distinct open models that open the whole provider. |
platformCooldownMs | 120000 | Provider-wide cooldown. |
burstWindowMs | 300000 | Failures older than this start a fresh burst. |
enableProbe | true | Probe open models after cooldown to recover circuits. |
probeMaxTokens | 8 | Output cap for probe calls. |
stripReasoningEffort | true | Drop the primary's reasoning effort when failing over (fallbacks may not support it). |
notifyUser | true | Append a user-visible message when a route switches. |