9router is a locally run smart router that connects AI coding tools to free and cheap models. It routes requests through configured tiers and compresses tool outputs to reduce token consumption.
Project overview
The project addresses session interruptions and wasted subscription quotas by providing automatic tier fallback, real-time quota tracking, and token compression for AI coding workflows.
Project type
Model Runtime
Use cases
Coding & Development
Deployment
Refer to project documentation
License
MIT
Best for
Developers using AI coding tools who need to manage token quotas across multiple provider accounts and tiers.
Users seeking to compress tool outputs locally before sending data to external AI models.
Key capabilities
Compresses tool_result content, such as git diff or grep outputs, before sending it to the LLM to save tokens.
Routes requests through configured tiers (Subscription, Cheap, Free) to avoid downtime when quotas run out.
Tracks live token counts and reset countdowns to maximize subscription value.
Allows adding multiple accounts per provider with auto round-robin or priority-based routing.
Automatically refreshes OAuth tokens before expiration.
An optional external proxy that compresses context tokens before routing.
Injects a prompt to bias the LLM toward minimal, YAGNI-first code.
Limitations and risks
Using free tier tools with non-CLI tools may result in account bans.
Getting started
Install globally via npm with a single command, run the application, and open the dashboard at the local host address provided.
Alternatives and comparisons
A local control plane that provides one stable local endpoint to manage providers, models, accounts, routing rules, and tools across multiple agents and providers.
Run your coding agents with free, paid, or local models and validate providers from one local Admin UI.
Provides a simple way to run and chat with large language models locally.