decolua/9router
Unlimited FREE AI coding. Connect Claude Code, Codex, Cursor, Cline, Copilot, Antigravity to FREE Claude/GPT/Gemini via 40+ providers. Auto-fallback, RTK -40% tokens, never hit limits.
9Router – A Smart Router for AI‑Coding Assistants
What it is – 9Router is a locally‑run service (Node.js/Next.js) that sits between your AI‑powered coding tools (Claude Code, Cursor, Codex, OpenClaw, etc.) and the various LLM providers you have access to. It presents a single OpenAI‑compatible endpoint (http://localhost:20128/v1) that the tools can call.
Why it matters – Many developers use AI coding assistants that consume a lot of tokens (e.g., sending full file diffs, search results, or terminal listings). Paying for high‑quota commercial APIs quickly becomes expensive, and rate limits can interrupt work. 9Router tries to keep you coding nonstop while slashing the token bill.
Core features (as described in the README)
| Feature | What it does | Benefit |
|---|---|---|
| RTK Token Saver | Compresses the tool_result payload before it reaches the model, cutting 20‑40 % of the tokens used per request. |
Lower cost per request. |
| Quota tracking & multi‑account | Monitors how many tokens remain for each subscription‑based provider and can round‑robin across several accounts. | Makes sure you exhaust paid quotas before they reset. |
| Auto‑fallback routing | Defines three tiers – subscription (paid), cheap (low‑cost APIs), and free – and automatically switches when a higher tier runs out of quota or hits a budget limit. | No manual re‑configuration; the service keeps answering even when a provider is throttled. |
| Format translation | Converts request/response shapes between OpenAI, Anthropic, Claude, etc., so any client can talk to any backend without code changes. | One endpoint works for many different back‑ends. |
| Support for 40+ providers | Includes major commercial APIs (OpenAI, Anthropic, Gemini, Groq, Mistral, etc.) plus free tiers (Kiro AI, OpenCode Free, Vertex AI) and self‑hosted servers (llama.cpp, vLLM, whisper.cpp, etc.). | Gives you a huge choice of models and price points. |
| Dashboard | Web UI at http://localhost:20128/dashboard showing provider status, quota usage, and logs. |
Easy visual monitoring and quick provider configuration. |
| Docker & npm distribution | Published on npm (9router) and as a Docker image (decolua/9router). |
Simple installation on any platform. |
How it works – data flow
Your CLI tool → http://localhost:20128/v1 → 9Router
│ │
│ • compress tool_result (RTK)│
│ • translate request format │
│ • pick provider (tier 1 → 2 → 3)
▼ ▼
Chosen LLM provider (e.g., Claude, OpenAI, Kiro) → response → 9Router → CLI tool
The router decides which backend to call based on the current quota and the configured priority list.
Getting started (quick‑start steps from the README)
- Install globally:
npm install -g 9router && 9router– this launches the dashboard. - Add a free provider (no sign‑up needed) such as Kiro AI or OpenCode Free via the UI.
- Point your coding assistant to the local endpoint (
http://localhost:20128/v1) and copy the API key shown in the dashboard. - Start coding – the assistant will now route through 9Router, automatically falling back to cheaper or free models when needed.
For developers who want to run the source code, the repo provides a typical Next.js dev command and a production build script that includes a temporary swap‑file trick for low‑memory environments.
Who might use it?
- Individual developers who rely on AI code assistants and want to avoid hitting rate limits or paying high per‑token fees.
- Small teams that have multiple paid API keys and want a single point of control.
- Open‑source hobbyists experimenting with self‑hosted LLM back‑ends and need a unified OpenAI‑compatible gateway.
Limitations & caveats (as per the README)
- The free tier of Kiro AI is now capped at 50 credits/month; the service’s value depends on the availability of free credits.
- Some free providers (e.g., iFlow, Qwen Code) were discontinued in 2026, so the provider list may need periodic updates.
- The router does not perform any model‑level inference itself – it merely forwards requests, so latency is the sum of the chosen backend plus the local processing overhead.
In short: 9Router is a practical, open‑source routing layer that lets you keep your AI‑coding tools running continuously while automatically saving tokens and switching between paid, cheap, and free LLM providers.
Related
- Project
- Project
- Project
- Project