9router — What is it?

9Router is an open-source AI coding router and token saver that connects various AI coding tools to multiple AI providers, optimizing token usage and providing fallback options.

⭐ 21,817 Stars 🍴 3,678 Forks JavaScript MIT Author: decolua
Source: README View on GitHub →

Why it matters

9Router is gaining attention due to its ability to save developers money on AI tokens by providing an auto-fallback to free and cheaper models, addressing the pain points of subscription limits, rate limits, and expensive APIs. Its unique feature of connecting to 40+ providers and 100+ models stands out, offering a comprehensive solution for AI coding tools.

Source: Synthesis of README and project traits

Core Features

RTK Token Saver

Auto-compresses tool_result content to save 20-40% tokens per request, optimizing token usage.

Source: README
Maximize Subscriptions

Tracks quota usage and ensures every bit of subscription is used before reset, maximizing the value of subscriptions.

Source: README
Auto Fallback

Automatically switches between subscription, cheap, and free AI models without downtime, ensuring continuous coding without hitting limits.

Source: README
Multi-account

Rounds-robin between accounts per provider to evenly distribute usage and avoid hitting individual account limits.

Source: README
Universal Compatibility

Works with a wide range of AI coding tools such as Claude Code, Codex, Cursor, Cline, and more, providing a versatile solution for various coding needs.

Source: README

Architecture

The architecture of 9Router is inferred to be modular, with clear separation of concerns. It likely uses design patterns such as the Proxy pattern for routing requests to different providers, and the Strategy pattern for implementing different token-saving strategies. The data flow involves a central router handling requests from various AI coding tools, which are then routed to the appropriate AI provider based on the current subscription and token availability.

Source: Code tree + dependency files

Project Knowledge Graph

Knowledge graph: project (center) + core features (inner hexagons) + key dependencies (outer chips) @dnd-kit/core @monaco-editor/react@monaco-editor… express jose marked RTK Token Saver Maximize SubscriptionsMaximize Subscripti… Auto Fallback Multi-account Universal CompatibilityUniversal Compatibi… 9router Project Core feature Key dependency

Center: project; inner ring: core feature modules; outer ring: key dependencies. Auto-generated from core_features and tech_stack.key_deps.

Tech Stack

LanguageJavaScriptFrameworkNext.js for web dashboard, Express.js for server-side logic
@dnd-kit/core@monaco-editor/reactexpressjosemarkedmonaco-editornextnode-forgeopenorareactreact-domrechartssql.jsundiciuuidzustand
Docker for containerization, likely deployed on a cloud platform or self-hosted server
Source: Dependency files + code tree

Quick Start

npm install -g 9router 9router Dashboard opens at http://localhost:20128 Connect a FREE provider (no signup needed) Use in your CLI tool: Endpoint: http://localhost:20128, API Key: [copy from dashboard], Model: kr/claude-sonnet-4.5 Alternative: run from source (this repository): cp .env.example .env npm install PORT=20128 NEXT_PUBLIC_BASE_URL=http://localhost:20128 npm run dev Production mode: npm run build PORT=20128 HOSTNAME=0.0.0.0 NEXT_PUBLIC_BASE_URL=http://localhost:20128 npm run start
Source: README Installation/Quick Start

Use Cases

9Router is suitable for developers who use AI coding tools and want to optimize their AI token usage. It is useful in scenarios where developers need to connect to multiple AI providers, manage subscriptions efficiently, and ensure continuous coding without hitting token limits.

Source: README

Strengths & Limitations

Strengths

  • Strength 1: Saves developers money on AI tokens through efficient token usage and auto-fallback options.
  • Strength 2: Provides a wide range of compatible AI coding tools and AI providers, offering versatility.
  • Strength 3: Offers a user-friendly dashboard and easy integration with CLI tools.

Limitations

  • Limitation 1: The project is relatively new and may have limited community support compared to more established solutions.
  • Limitation 2: The effectiveness of token-saving features can vary depending on the specific AI provider and model.
Source: Synthesis of README, code structure and dependencies

Latest Release

v0.4.52 (2026-05-17): feat: Vercel AI Gateway + Kiro rtk compression version 0.4.52

Source: GitHub Releases

Verdict

9Router is a promising open-source project for developers looking to optimize their AI coding workflows. Its focus on token-saving and versatile compatibility with various AI coding tools makes it a valuable tool for those working with AI in their development processes.

Frequently Asked Questions

What is 9router?

9Router is an open-source AI coding router and token saver that connects various AI coding tools to multiple AI providers, optimizing token usage and providing fallback options.

What are the main features of 9router?

9router's core features include: RTK Token Saver, Maximize Subscriptions, Auto Fallback, Multi-account, Universal Compatibility.

Why is 9router trending?

9Router is gaining attention due to its ability to save developers money on AI tokens by providing an auto-fallback to free and cheaper models, addressing the pain points of subscription limits, rate limits, and…

What is 9router used for?

9Router is suitable for developers who use AI coding tools and want to optimize their AI token usage.

Transparency Notice
This page is auto-generated by AI (a large language model) from the following public materials: GitHub README, code tree, dependency files and release notes. Analyzed at: 2026-05-22 11:52. Quality score: 85/100.

Data sources: README, GitHub API, dependency files