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
Copy file name to clipboardExpand all lines: README.md
+15-14Lines changed: 15 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,24 +4,11 @@
4
4
5
5
A fallback proxy for Claude Code (or any Anthropic API client). When you hit rate limits or API errors, automatically routes to alternative providers — just like [Vercel](https://vercel.com/changelog/claude-code-max-via-ai-gateway-available-now-for-claude-code) and [OpenRouter](https://openrouter.ai/docs/guides/guides/claude-code-integration) does.
6
6
7
-
[](https://deploy.workers.cloudflare.com/?url=https://github.com/broven/claude-code-fallback)
8
-
9
-
## Features
10
-
11
-
-**Automatic Failover** — Seamlessly routes to fallback providers on 401/403/429/5xx errors
12
-
-**Request Auto-Rectification** — Automatically detects and fixes incompatible request formats (thinking signatures, budget tokens, tool-use blocks), then retries
13
-
-**OpenAI-Compatible Provider Support** — Use any OpenAI-format API (OpenRouter, Azure, etc.) as a fallback with automatic request/response conversion
14
-
-**Sliding Window Circuit Breaker** — Tiered cooldowns with safety valve to prevent cascading failures while ensuring service continuity
15
-
-**React Admin Panel** — Web-based dashboard with login authentication, visual provider management, and real-time circuit breaker status
16
-
-**Structured Observability** — JSON-formatted logs with unique request IDs for end-to-end tracing via `npm run tail`
17
-
-**Provider Retry with Exponential Backoff** — Configurable per-provider retry count with exponential delay
18
-
-**Prompt Cache Optimization** — Strips volatile billing header parameters to improve Anthropic prompt cache hit rates
19
-
20
7
[](https://deploy.workers.cloudflare.com/?url=https://github.com/broven/claude-code-fallback)
21
8
## Why This Exists
22
9
23
10
When using Claude Code or other Anthropic API clients, you might encounter:
24
-
-**Rate limits (429)** — Your API quota is exhausted
11
+
-Claude subscription **Rate limits (429)** — Your API quota is exhausted
25
12
-**Service errors (5xx)** — Temporary Anthropic API downtime
26
13
Instead of manually switching between providers, this proxy automatically fails over to your configured alternatives.
27
14
@@ -39,6 +26,20 @@ Claude Code ──► Fallback Proxy ──► Anthropic API
39
26
40
27
The proxy intercepts API requests. On 400 errors, the **Rectifier** automatically detects and fixes incompatible request fields (e.g., invalid thinking signatures, budget token issues) and retries. On 401, 403, 429, or 5xx errors, requests are forwarded to fallback providers in order until one succeeds.
41
28
29
+
30
+
## Features
31
+
32
+
-**Automatic Failover** — Seamlessly routes to fallback providers on 401/403/429/5xx errors
33
+
-**Request Auto-Rectification** — Automatically detects and fixes incompatible request formats (thinking signatures, budget tokens, tool-use blocks), then retries
34
+
-**OpenAI-Compatible Provider Support** — Use any OpenAI-format API (OpenRouter, Azure, etc.) as a fallback with automatic request/response conversion
35
+
-**Sliding Window Circuit Breaker** — Tiered cooldowns with safety valve to prevent cascading failures while ensuring service continuity
36
+
-**React Admin Panel** — Web-based dashboard with login authentication, visual provider management, and real-time circuit breaker status
37
+
-**Structured Observability** — JSON-formatted logs with unique request IDs for end-to-end tracing via `npm run tail`
38
+
-**Provider Retry with Exponential Backoff** — Configurable per-provider retry count with exponential delay
39
+
-**Prompt Cache Optimization** — Strips volatile billing header parameters to improve Anthropic prompt cache hit rates
40
+
41
+
[](https://deploy.workers.cloudflare.com/?url=https://github.com/broven/claude-code-fallback)
0 commit comments