9router
9Router is an MIT-licensed Node.js/JavaScript gateway that proxies requests from AI coding tools (Claude Code, Cursor, Cline, Copilot) to 40+ LLM providers, implementing token compression (RTK) and automatic fallback between paid, cheap, and free tiers. It runs locally as a dashboard + OpenAI-compatible API endpoint.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | decolua/9router |
| Owner | decolua |
| Primary language | JavaScript |
| License | MIT — OSI-approved |
| Stars | 20.7k |
| Forks | 3.4k |
| Open issues | 1.1k |
| Latest release | v0.5.20 (2026-07-07) |
| Last updated | 2026-07-07 |
| Source | https://github.com/decolua/9router |
What 9router is
HTTP reverse proxy and LLM gateway written in JavaScript/Next.js, exposing /v1 (OpenAI-compatible) and /dashboard endpoints. Implements token reduction via tool_result compression, multi-account round-robin routing, quota tracking, and provider tiering (subscription → cheap → free). Format translation between OpenAI and Claude protocols.
Get the 9router source
Clone the repository and explore it locally.
git clone https://github.com/decolua/9router.gitcd 9router# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- Local execution model: runs as a Node.js server on port 20128. Teams must provision a stable host (VPS, container, K8s) and manage uptime/monitoring.
- API key aggregation: 9Router consolidates keys from 40+ providers into a single dashboard. Key rotation, expiration, and per-provider rate limits must be tracked manually or via external tooling.
- Format translation complexity: OpenAI ↔ Claude protocol differences require tested fallback logic. Verify edge cases (streaming, function_calling, system prompts) on each provider pair before production.
- Token compression via RTK: tool_result stripping is lossy—verify output quality (git diffs, logs, grep results) remains acceptable for your coding use case.
- Multi-account switching: round-robin between accounts per provider requires credential management and quota accounting. No built-in credential vault; keys are stored in dashboard state.
When to avoid it — and what to weigh
- Strict compliance or air-gapped environments required — 9Router routes traffic through external LLM providers (Claude, OpenAI, etc.). Enterprises with data residency mandates, FedRAMP, or offline-only requirements should not use this pattern.
- Single-provider lock-in acceptable — If your team standardizes on one provider and compliance is not an issue, a direct API integration without a proxy gateway reduces operational overhead.
- Security team cannot audit third-party routing logic — 9Router sits between your tools and external LLM APIs. If your org requires whitelist-only external connections or cannot review proxy code, this adds unacceptable risk.
- Sub-second latency or real-time streaming critical — Proxying adds network hops and the token-compression RTK feature (tool_result rewriting) adds per-request processing overhead unsuitable for latency-sensitive workflows.
License & commercial use
MIT License. Permissive OSI license allowing commercial use, modification, and redistribution with attribution. No patent grants or liability limitations beyond standard MIT terms.
MIT license permits commercial use without restriction. However, commercial use of the underlying LLM providers (Claude, OpenAI, Gemini, etc.) requires separate agreements with each vendor. 9Router does not grant access to free tiers or change provider ToS. Verify each provider's commercial use policy before routing production traffic.
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Adequate |
| License clarity | Clear |
| Deployment complexity | Low |
| DEV.co fit | Good |
| Assessment confidence | High |
9Router forwards API keys and request/response payloads to external LLM providers. No encryption in transit details provided; verify TLS enforcement. Local dashboard exposes API key management UI—assume HTTP-only and unencrypted by default. Proxy logs may contain prompt/completion text. No audit trail, API rate limiting, or request signing. Teams must implement external WAF, key rotation policies, and network segmentation.
Alternatives to consider
LiteLLM (Python) or Langchain LLM Routing
Similar multi-provider gateway pattern; better typed API, stronger OSS community, and more extensive documentation. Heavier (Python/FastAPI) than 9Router.
Direct per-tool provider configuration
No proxy overhead, lower operational complexity, but no cost optimization or auto-fallback. Requires manual provider switching and quota management.
Anthropic Workbench or OpenAI Platform + direct tool integration
Single-provider managed dashboards with built-in quota tracking, audit logs, and production support. Eliminates multi-provider complexity but locks in cost model.
Build on 9router with DEV.co software developers
Evaluate 9Router for your team: start with a single free provider (Kiro, OpenCode), measure token savings, then add paid subscriptions. For team-wide rollout, consult on multi-account setup and provider tier strategy.
Talk to DEV.coRelated open-source tools
Surfaced by semantic similarity across the DEV.co open-source index.
Related on DEV.co
Explore the category and the services that help you build with it.
9router FAQ
Does 9Router give free access to Claude/OpenAI/Gemini?
What happens if a provider API key is revoked or quota exhausted?
Can I run 9Router behind a reverse proxy (nginx, HAProxy)?
Is the RTK token compression lossy?
Work with a software development agency
Need help beyond evaluating 9router? DEV.co is a software development agency offering software development services and web development for teams of every size. Our software developers and web developers build custom software, web applications, APIs, and ai frameworks integrations — and maintain them long-term.
Ready to reduce AI coding costs?
Evaluate 9Router for your team: start with a single free provider (Kiro, OpenCode), measure token savings, then add paid subscriptions. For team-wide rollout, consult on multi-account setup and provider tier strategy.