decolua/9router

Developer Tools

A local router that points AI coding CLIs and IDEs at multiple providers, with quota-aware fallback and token compression.

31,567
6,125
JavaScript
MIT
9 months old

9Router is worth a look if you already bounce between AI coding subscriptions and free tiers, and you want one endpoint instead of reconfiguring each tool whenever a quota runs out. It sits on your machine and pretends to be an OpenAI-compatible API, so the client side stays mostly unchanged.

The problem

You have Claude Code, Cursor, Cline, Codex or a similar tool, and a handful of provider accounts: a paid subscription, a cheap model or two, and some free tiers. When the subscription hits its limit mid-session, you want to keep working, which usually means editing the tool's settings, swapping an API key and picking a new model name. 9Router changes that step: point the coding tool at its local endpoint once, and the router decides which upstream account or provider serves the request. The result is that quota exhaustion becomes a routing event rather than a manual reconfiguration.

What's different

The mechanism is a local proxy with three layers. First, it translates between request formats, so an OpenAI-shaped client can talk to Claude-style providers and vice versa. Second, it supports several accounts per provider and routes across them by round-robin or priority, moving to the next account when a quota is exhausted. Third, it chains providers into a combo: a subscription first, a cheap model second, a free tier last. That ordering is the real pitch, because a client only needs one base URL and one API key from the dashboard.

A second piece is token reduction. RTK is the default-on feature that compresses tool output such as diffs and grep results before they reach the model; the README claims 20-40% input-token savings. Two optional add-ons go further: an external compression proxy and a "caveman mode" prompt that makes replies terse, with a claimed output-token saving of up to 65%. Those figures are the author's claims, not independent measurements. The trade-off is that compression and terse prompting change the context the model sees, so you should evaluate output quality on your own tasks before leaving them on for complex work.

There is also a usage dashboard. One detail worth understanding: the cost figures it shows are hypothetical, meaning what the same traffic would have cost on paid APIs. They are not billing statements, and 9Router itself does not charge anything.

Who should try it

Good fit: a developer already paying for at least one AI coding subscription and juggling free or cheap tiers, who wants a single local endpoint across several CLIs and IDEs and doesn't mind running a dashboard-backed service alongside their work. The combo configuration is the part that directly addresses interrupted sessions.

Poor fit: someone who uses one provider and one client, where a local router adds a moving part without changing much. Also a poor fit for anyone who needs predictable, reviewed output with no prompt or context transformation, since RTK is on by default and the terse mode deliberately rewrites replies.

Requirements and limitations

The primary path is a global npm package, after which the dashboard listens on a local port and each coding tool is pointed at the local /v1 endpoint with a dashboard-issued key. The README also describes running from source and Docker images. Source builds expect an .env file and include a production-build procedure that sets up temporary swap and compiles native dependencies; it is not a one-line build, so treat source and Docker as heavier paths than the npm install. The repository package is described as private, with source execution presented as the local development route.

Ongoing upkeep matters more than setup. Provider OAuth tokens are refreshed by the router, but the fallback chain depends on free tiers and cheap providers whose quotas, models and availability are outside the project's control, so a combo that works today can lose a rung. The default dashboard password falls back to 123456 if INITIAL_PASSWORD is unset, so set it before exposing the service beyond localhost. Logs are off unless ENABLE_REQUEST_LOGS is enabled. The README does not state how client requests are protected beyond the API key, so keep the endpoint local unless you have checked that.

HotRepo's take

HotRepo has only four daily-board observations for this repository: 2026-05-10 at 7,032 stars with +806 that day, and 2026-10-28 at 31,564 stars with +70. The gaps mean no trend can be judged, and the history is insufficient to call the interest sustained or short-lived. What the snapshot does show is enough attention to make the project findable; it says nothing about provider compatibility. Before adopting, check the project instructions against your specific client and the provider tier you plan as the last fallback, and watch what RTK's compression does to a real diff-heavy session.

Written by AI from the project's README, updated October 28, 2026. The project's own docs are the source of truth.