llm-router
Stop spending your Claude Pro/Max quota on questions a free model can answer.
llm-router hooks into your coding tool's own lifecycle, reads each prompt before the
model does, and drafts an answer on a free or local model first. No API keys needed
on a Claude subscription — routing runs through MCP tools and local models.
One caveat: routed answers are advisory by default — Claude still takes the
turn unless you opt in to zero-Claude mode. By default some tool calls wait until a
prompt is routed; LLM_ROUTER_ENFORCE=off turns that off (all user settings: docs/configuration.md). Draft-rate and
acceptance figures live in docs/MEASUREMENT.md, with
their n, window and conditions.
📑 Table of Contents
Why install this
You are on a Claude Pro or Max plan, have not spent a cent beyond it, and still
hit the five-hour limit — not because you asked too much, but because every
prompt went to the premium model: "what does this error mean", "reformat this
JSON", "is the service up" drew the same quota as the question that needed it.
Why a proxy cannot do this
Most routers here are a proxy: your agent forwards requests using your
API keys. That has a hard limit — a proxy cannot intercept a session
authenticated by a subscription, because there is no key to forward.
| Pays per token | Pays a subscription |
|---|
| What runs out | your invoice | your five-hour window |
| Needs API keys | yes | no |
| A proxy can help | yes | no — nothing to intercept |
| llm-router helps | yes | yes |
Honesty as a feature
llm-router status reports verified and unverified savings
separately, each with its own n — not a blended percentage. This project does
not publish a general savings percentage; any number depends on your own
workload. See Savings below.
Quick Start
pip install llm-routing # installs the `llm-router` command
llm-router install # wire up Claude Code (default host)
llm-router doctor # check provider connectivity and setup
llm-router status # verify it's routing — est. savings vs baseline
Works with no API keys on a Claude Pro/Max subscription — routing goes
through MCP tools and local models. Adding provider keys widens the pool;
nothing requires them. See guide/PROVIDERS.md. To
install into another host, see Works With. The daily KPI job is installed only with consent (install --schedule-daily, or Y when asked; --no-schedule skips); uninstall removes it.
Python agents route in-process, no server: from llm_router import Router; r = Router(budget_usd=0.50).run("...") (await .arun(...) in async code; BudgetExceeded when the cap is spent).
Works With