DEV.co
AI Frameworks · decolua

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.

Source: GitHub — github.com/decolua/9router
20.7k
GitHub stars
3.4k
Forks
JavaScript
Primary language
MIT
License (OSI-approved)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
Repositorydecolua/9router
Ownerdecolua
Primary languageJavaScript
LicenseMIT — OSI-approved
Stars20.7k
Forks3.4k
Open issues1.1k
Latest releasev0.5.20 (2026-07-07)
Last updated2026-07-07
Sourcehttps://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.

Quickstart

Get the 9router source

Clone the repository and explore it locally.

terminalbash
git clone https://github.com/decolua/9router.gitcd 9router# follow the project's README for install & configuration

Need it deployed, integrated, or customized instead? DEV.co ships production installs.

Best use cases

Cost reduction for high-volume development teams

Teams using Claude Code, Cursor, or Cline across multiple developers can route through paid subscriptions first, then fallback to free/cheap providers (Kiro, Vertex, GLM) to avoid per-developer licensing costs.

Maximizing underused subscription quota

Organizations with Claude API or GPT subscriptions that expire partially used can pool quota across tools, track consumption per provider, and fall back only when limits are reached.

Rate-limit and downtime mitigation

Automatic failover between provider tiers ensures coding tools stay available during rate limits or provider outages, with zero manual intervention.

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.

SignalAssessment
MaintenanceActive
DocumentationAdequate
License clarityClear
Deployment complexityLow
DEV.co fitGood
Assessment confidenceHigh
Security considerations

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.

Software development agency

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.co

Related 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?
No. 9Router only routes your requests and manages your existing provider credentials. You must sign up for free trials or use genuinely free-tier providers (Kiro, Vertex $300 credits, OpenCode Free). It does not bypass paywalls or auth.
What happens if a provider API key is revoked or quota exhausted?
9Router will fail over to the next tier (cheap → free). If all tiers are exhausted, requests will error. No automatic key refresh or out-of-band notifications. You must manually update credentials in the dashboard.
Can I run 9Router behind a reverse proxy (nginx, HAProxy)?
Yes, configure your proxy to forward traffic to localhost:20128. Ensure TLS termination at the edge. No built-in support for authentication or request signing beyond the API key.
Is the RTK token compression lossy?
Yes. RTK auto-compresses tool_result fields (git diffs, log output, etc.). Verify that reduced output quality is acceptable for your coding workflow before enabling in production.

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.