Letter2025/dsh-model-failover ↗★ 4

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

패키지
dsh-model-failover
호환성
미검증
Harness peer 범위
^0.1.2-rc.1
Cordis peer 범위
^4.0.2
버전
0.1.5
라이선스
MIT
최근 업데이트
2026. 9. 8.

같은 패키지 이름의 다른 저장소

설치

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

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.