You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit b5b1d05
Browse filesBrowse the repository at this point in the historyBrowse files
ciroautuori
committed
docs: update README with network-error circuit breaker, 504 handling, and health check skip for invalid keys
@@ -118,8 +121,10 @@ NVIDIA's free NIM tier limits each API key to ~40 RPM. Aggressive bursts trigger
118
121
-**Pools multiple keys** behind a single endpoint
119
122
-**Rotates automatically** on 429/401/403/5xx — zero manual intervention
120
123
-**Per-key cooldown timers** — on real 429s, trusts `Retry-After` exactly (no multiplication); distinguishes transient worker saturation (`ResourceExhausted`) from true RPM limits and never burns key cooldowns for the former
124
+
-**Network-error circuit breaker** — `ConnectTimeout`/`ConnectError` don't trigger key cooldown (the key is fine). After 3 consecutive network errors across different keys, rotation stops entirely and returns 503 (the network is down, no key can help)
125
+
-**504 model timeouts don't burn keys** — gateway timeouts cool the key for 30s but don't consume the attempt budget, since the model (not the key) is the bottleneck
121
126
-**Sliding-window RPM limiting** — keeps each key under 28 RPM (safe margin below 40)
122
-
-**Health checks** — revives keys whose cooldowns have expired
127
+
-**Health checks** — revives keys whose cooldowns have expired, but skips 401/403 invalid keys (dead keys stay dead)
123
128
-**No silent model substitution** — the model you select is the model that answers; if it fails on every key you are told so, never handed output from a different model
124
129
-**Auto-compaction** — summarizes long histories so requests never fail on context overflow ([details](#auto-compaction))
125
130
@@ -316,8 +321,9 @@ Streaming (SSE) is fully supported — tokens flow through unbuffered.
316
321
|**429** (worker concurrency) | 0 — retried after 0.8s pause |`ResourceExhausted: Worker local total request limit reached` — transient pool saturation, key is healthy |
| **400 / 404** | 60s | Deterministic request error — short cooldown, key untouched for rotation. Every key gets the same error, so rotating only burns cooldown budget. |
|**Network error** (ConnectTimeout/ConnectError) | 0 — 0.5s pause, no cooldown | Network is down, not the key. After 3 consecutive errors across different keys, rotation stops entirely (503). |
321
327
322
328
>**Retry-After is used as-is.** When NVIDIA provides a `Retry-After` header (e.g. 60s), the cooldown is exactly that value. Earlier versions multiplied it by an adaptive factor (`1.5^N`), which caused a doom loop: at 3 failures a 60s backoff became 135s and all 26 keys locked out longer than the real rate-limit window required.
0 commit comments