I was crawling GitHub trending for AI infra projects when I came across decolua/9router. It's the most thoughtful "stretch your free tiers" project I've seen for AI coding tools — and it does a few things I hadn't seen combined before. Worth a 60-second rundown for anyone burning through Cursor/Claude/Copilot budgets faster than they'd like.
What it actually is
9router runs locally and exposes a single OpenAI-compatible endpoint at http://localhost:20128/v1. Your IDE / coding agent talks to it as if it were OpenAI. Behind the scenes, requests get routed to whichever provider you configured — GitHub Copilot OAuth, a Gemini CLI session, an Ollama instance, Cursor, Codex, Kiro, Qwen, and others.
The interesting parts aren't the routing itself (lots of OpenAI-compatible proxies exist — litellm, OpenRouter, etc.). The interesting parts are:
- Combos — a virtual provider made of multiple Providers. Round-robin across three Copilot OAuth sessions and you get effectively "unlimited" throughput without ever tripping a single account's rate limit. Strategy options include round-robin and sticky-round-robin (the latter pins a session to a single conversation).
-
RTK (Reverse Token Killer) — a filter layer applied before tool output goes back to the LLM. Your agent runs
ls,grep,git diff,tree. The output is verbose and most of it is noise. RTK strips it. Configurable compression levels — at 2 it filters tree-like output, at 3 it also compresses git diffs. The filters live inopen-sse/rtk/filters/if you want to add a new one. - Caveman mode — system-prompt compression. Rewrites instructions in terse style ("be concise, no markdown" etc.) to cut output tokens. Configured per-endpoint with three escalating levels.
- Antigravity — a MITM proxy specifically for VS Code's Copilot extension. Installs a self-signed cert, intercepts Copilot traffic on port 443, routes through your providers instead of Copilot's backend. Requires sudo and cert trust — properly hairy, but it's there.
Mental model in one diagram
Your IDE / agent
│
▼
[Endpoint] ─── API key your tool sees
│
▼
[Provider | Combo] ── round-robin / fallback strategy
│
▼
[Translator] ──── format adapter (Claude / Gemini / Kiro / Ollama / …)
│
▼
[Real upstream API]
Each upstream gets its own Translator that speaks OpenAI ↔ native both ways. Caveman wraps the input prompt; RTK wraps the streaming output before it gets sent back to the agent. The split between input-side compression and output-side compression is the right shape — most "save tokens" tools do one or the other.
Pointing Claude Code at it
docker run -d --name 9router \
-p 20128:20128 \
-v ~/.9router:/root/.9router \
decolua/9router
Open the dashboard at http://localhost:20128, configure your providers, generate an Endpoint key. Then:
export ANTHROPIC_BASE_URL=http://127.0.0.1:20128
export ANTHROPIC_API_KEY=9r_yourkeyhere
Claude Code will route every call through 9router. Same trick works for Cursor, Cline, and anything else that respects ANTHROPIC_BASE_URL / OPENAI_BASE_URL. For VS Code Copilot specifically, you go through the Antigravity MITM mode instead.
Why this is interesting beyond "free tier hack"
Three things stuck out:
The "Combo" abstraction is genuinely useful infrastructure, not just a free-tier dodge. If you're running an agent that fans out work in parallel, having an N-of-M endpoint with proper retry/fallback semantics is the kind of thing you'd otherwise build yourself. 9router has it as a primitive.
RTK lives in the right place. Your agent doesn't need to see the full output of
find . -name "*.ts"— it needs the relevant matches. Filtering in the proxy means your agent code doesn't have to know about it; same code works with or without RTK enabled. Putting the filter in user-space is what makes it composable.The Cloudflare Worker mode lets you deploy 9router edge-side and use it from any laptop/CI without exposing your local box. You configure providers locally, then the Worker fronts the same endpoints with a remote URL. Useful for shared team setups.
Caveats worth being honest about
- Stitching together free-tier accounts touches each provider's TOS in different ways. Copilot's terms are the most relevant — read them. 9router is the tooling, not a license to abuse.
- Free providers have variable latency and uptime. "Free tier across N accounts" is not a substitute for paid quota in production.
- The Antigravity MITM mode is genuinely invasive. It's an option, not the default — and you should know what trusting a self-signed cert at the system level means before you do it.
Worth a look
If your monthly Claude / Cursor / Copilot bill is starting to feel less like a tool and more like a subscription you'd notice if you canceled, 9router is the closest thing I've seen to a real architectural answer rather than a "use this cheaper model" workaround. Repo: github.com/decolua/9router.
I ran into this through Lang Labs — a side project that packs any public git repo into a Claude Code skill you can drop straight into ~/.claude/skills/. Here's 9router as one of those skills if you want a one-page reference plus a downloadable .skill bundle.
Top comments (0)