Zero-Config Local 429 Failover Proxy

Never Lose a Coding Session to HTTP 429 Again

Any single free-tier LLM provider hits rate limits fast during agentic coding loops. FreeBench Local Proxy runs on your own machine at http://127.0.0.1:4141/v1, pools all 14 Direct API providers (85 live models), routes using real FreeBench scores and canary health, and automatically fails over on 429 or timeouts.

How It Works Under the Hood

1. Point Your Agent Once

Configure Cursor, Cline, Aider, OpenCode, or the OpenAI SDK to send requests to http://127.0.0.1:4141/v1 with virtual model freebench/auto.

2. Live Benchmark & Health Routing

On startup (and every 15 minutes), the proxy auto-detects keys in your environment, pulls live FreeBench rankings + canary TTFT/uptime, excludes harness-only tiers, and picks the highest-ranked healthy endpoint.

3. Automatic 429 Cooldown Failover

If Provider #1 returns HTTP 429, 503, or times out, the proxy parses Retry-After, parks that endpoint in cooldown, and transparently retries on Provider #2—with full SSE streaming passthrough.

3-Step Quickstart

Step 1: Add 2+ Free Direct API Keys to .env.local

Pollinations and Kilo Gateway (:free models) work anonymously out of the box, and adding free keys for Groq, Google AI Studio, OpenRouter, Cerebras, or NVIDIA NIM gives you deep 429 failover. Run npm run keys:wizard or copy .env.example from Stack Builder.

Step 2: Launch the Local Proxy

npm run proxy -- --task=agentic-coding --always-free --zero-training
--port=4141

Local port to bind (default: 4141)

--host=127.0.0.1

Loopback host address (default: 127.0.0.1)

--task=agentic-coding

Default task when model is freebench/auto

--always-free

Exclude one-time trial credit tiers

--zero-training

Only route to providers with zero prompt training

--tools

Require tool / function-calling support

--min-context=128000

Minimum context window in tokens

--provider=groq,google

Restrict routing to specific Direct API slugs

--offline

Use bundled snapshot instead of fetching freebench.org

Step 3: Connect Your Coding Agent or SDK

Use OpenAI Compatible mode in Settings -> Models / API Provider.

Provider: OpenAI Compatible
Base URL: http://127.0.0.1:4141/v1
API Key:  freebench-local
Model:    freebench/auto

Virtual Model Aliases

Model StringRouting Behavior
freebench/autoUses your proxy --task default (defaults to agentic-coding)
freebench/agentic-codingTop tool-calling + coding model ranked by Agentic Coding score
freebench/codingHighest-ranked coding model on LiveBench Coding
freebench/reasoningTop reasoning model on LiveBench Reasoning
freebench/mathTop math model on LiveBench Math
freebench/toolsHighest BFCL tool-calling model with function calling enabled
freebench/visionTop multimodal vision-capable free model
freebench/long-contextTop model supporting 128K+ token context windows
freebench/<canonical_id>Pins a specific model (e.g. freebench/deepseek-r1) and rotates across every free Direct API provider hosting it
Endpoints & Debug Headers
  • POST /v1/chat/completions — OpenAI chat completions with SSE streaming & tool calls
  • GET /v1/models — Lists all virtual aliases + your top active canonical IDs
  • GET /health — Live active providers, cooldown timers, and failover counters
Response headers on every 200 OK: X-FreeBench-Provider, X-FreeBench-Model, X-FreeBench-Canonical-Id, X-FreeBench-Failovers
Security & Privacy Guarantees
  • Keys stay 100% local: API keys and prompts go directly from your machine to the upstream provider—never through FreeBench servers.
  • Loopback-only by default: Binds strictly to 127.0.0.1 so your local port isn't exposed to your LAN.
  • Direct APIs only: Automatically excludes harness-only tiers (OpenCode Zen) and falls back to the bundled snapshot if offline.