Skip to content
FossShelf
Home / Categories / For AI Engineers

9Router

Smart AI Router with 3-Tier Fallback

Replaces Openrouter, Github Copilot, Cursor, Portkey

32.52K starsMITreviewed 11 May 2026last commit 12 Nov 2026
Screenshot of 9Router

Who it's for

Developers using several AI coding tools

Use 9Router when you regularly switch between coding assistants and want one local control point for models, keys, quotas, and fallback.

Skip if you use one hosted assistant and are satisfied with its built-in model selector.

Teams watching AI API spend

It helps teams experiment with cheaper and free model paths while keeping expensive providers available for harder tasks.

Skip if your organization requires approved vendor routing and centralized audit controls.

The problem

AI coding workflows stall when one provider hits a quota, a subscription goes unused, or tool output burns tokens faster than expected. Developers who use several coding agents often juggle API keys, model formats, and fallback choices manually, which turns the model layer into constant operational overhead.

How it works

OpenAI-compatible local endpoint

Exposes a local `/v1` style route so AI coding tools can point at one router instead of multiple provider endpoints.

Token-saving tool output compression

The README describes RTK Token Saver as a way to reduce tool_result token usage by 20-40 percent per request.

Provider fallback and quota tracking

Routes across subscriptions, cheaper APIs, free options, and multiple accounts so coding can continue when one model path is exhausted.

Features

  • OpenAI-compatible local endpoint
  • Token-saving tool output compression
  • Provider fallback and quota tracking

Recommended for this setup

Strengths

  • Built for coding-agent traffic: 9Router names Claude Code, Cursor, Codex, Gemini, OpenCode, Cline, and similar tools as target clients rather than treating them as generic API callers.
  • MIT license: The MIT license is permissive for commercial and personal workflows where developers want to run a local routing layer.

Trade-offs

  • Model routing adds another moving part: A router can save money and reduce interruption, but it also centralizes credentials and introduces one more service to debug when requests fail.

Tech stack

Languages
JavaScript, CSS, Dockerfile, PowerShell, Shell
Frameworks
Next.js, React
Databases
—
Tooling
AWS, esbuild

FAQ

What does 9Router do?

9Router routes AI coding-tool requests through one local endpoint, adding token compression, quota tracking, and provider fallback.

Does 9Router work with Claude Code and Cursor?

The README lists Claude Code, Cursor, Codex, Cline, Gemini, OpenCode, and other CLI coding tools as supported clients.

Is 9Router a model provider?

No. It is a router in front of model providers and subscriptions, so you still need the accounts or API keys you plan to use.

Similar tools

More in AI Engineers