Letter2025/dsh-model-failover

Letter2025★ 1TypeScriptLast synced: 2026-08-14

Open on GitHub

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

README excerpt

dsh-model-failover English 中文 Two-level model circuit breaker with failover for DeepSeek Harness. When a model (or a whole provider) starts failing repeatedly, the plugin opens a circuit and routes the next model request to a configured fallback — no core changes, installable with dsh plugin . What it does - Model circuit — a provider/model route opens after modelCircuitThreshold failures inside burstWindowMs . - Platform circuit — a provider opens when platformCircuitThreshold distinct models under it are open at once (a platform outage usually takes down every model on it). - Failover — the next request goes to the first healthy fallback in fallbacks ; the switch is recorded by the loop itself ( request/header change) and optionally announced as a user-visible message. - Recovery probes — an open model circuit is probed after modelCooldownMs with a tiny real call; a successful probe closes the circuit, a failed one extends the cooldown. - Composes with llm-retry — per-request backoff retries stay owned by the bundled llm-retry policy; the breaker observes the failures that escape it, so transient blips that recover after a retry never trip a circuit. Install Then configure fallba…

View full README on GitHub →
Skins / UIcircuit-breakerdshdsh-pluginfailover

Category