Letter2025/dsh-model-failover1

dsh-model-failover

Two-level model circuit breaker with failover for DeepSeek Harness: trip a model or a whole provider after repeated request failures and route the next request to a configured fallback

AI 分析

核心用途是保障 API 调用的高可用性,在遇到限流或服务崩溃时无缝切换。适合对任务执行稳定性要求极高、拥有多个备用 API 渠道的用户。

パッケージ
dsh-model-failover
バージョン
0.1.2
最終更新
2026/08/14

インストール

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Letter2025/dsh-model-failover

ドキュメント

README 全文を読む ↗

Configuration

FieldDefaultMeaning
enabledtrueMaster switch.
fallbacks[]Ordered fallback routes {provider, model}; must point at providers with a registered adapter.
tripCodesRATE_LIMIT, SERVER, TIMEOUT, TRANSPORT, QUOTA, EMPTY_RESPONSEFailure codes that count toward a circuit; e.g. AUTH/INVALID_CREDENTIAL stay terminal.
modelCircuitThreshold2Failures inside the burst window that open a model circuit.
modelCooldownMs60000Cooldown before an open model circuit is probed.
platformCircuitThreshold2Distinct open models that open the whole provider.
platformCooldownMs120000Provider-wide cooldown.
burstWindowMs300000Failures older than this start a fresh burst.
enableProbetrueProbe open models after cooldown to recover circuits.
probeMaxTokens8Output cap for probe calls.
stripReasoningEfforttrueDrop the primary's reasoning effort when failing over (fallbacks may not support it).
notifyUsertrueAppend a user-visible message when a route switches.