Autorouter CLI
The autorouter CLI lets you try LiteLLM's complexity-based auto-routing locally, against models your key already has access to on your real, running proxy. It picks a cheaper or more expensive model depending on how complex a prompt looks, without editing your proxy's config.yaml and without any request bypassing it. It stands up a throwaway local proxy that forwards every request back to your real proxy, then points Claude Code at that local proxy for the session.
The autorouter CLI is early and evolving. Tell us what works, what breaks, and what you want next in the Autorouter discussion on GitHub. Your feedback directly shapes where this goes.
For proxy setup and the full configuration reference, see Auto Routing.
1. Install the CLIโ
Install lite from the internal staging branch with a single curl command; uv is bootstrapped automatically if it is missing.
curl -fsSL https://raw.githubusercontent.com/BerriAI/litellm/litellm_internal_staging/scripts/install-cli.sh | \
LITELLM_CLI_REF=litellm_internal_staging sh
2. Point the CLI at Your Proxyโ
Set your real proxy URL and key. The autorouter forwards every request through this proxy with this key.
export LITELLM_PROXY_URL=http://localhost:4000
export LITELLM_PROXY_API_KEY=sk-...
3. Configure the Autorouterโ
Run the interactive wizard. It discovers the model groups your key can reach and asks you to assign models to each complexity tier.
lite autoroute configure
4. Run the Autorouterโ
Start the ephemeral local proxy. It runs in the foreground and streams routing decisions live, so you can watch which tier and model gets picked for each request.
lite autoroute up
5. Run Claude Code as Normalโ
In another tab, start Claude Code. The autorouter now automatically intercepts all Claude Code traffic.
claude
For the full reference, including recovery from an unclean shutdown and important caveats, see the autorouter CLI README.
6. Watch the Routed Model and Savings in the Status Lineโ
lite autoroute up also installs a status line for Claude Code (~/.litellm/statusline.py, registered as statusLine in ~/.claude/settings.json unless you already run one). After each turn it names the tier model that actually answered and, once the proxy has recorded the session, what the session cost against the router's savings baseline, the priciest model in the hardest tier:
autorouter ยท Routed to: claude-haiku-4-5 -80% vs Claude Opus 5
LiteLLM โโโโโโโโโโโโโโโโโโโโโโโโ $0.03
Claude Opus 5 โโโโโโโโโโโโโโโโโโโโโโโโ $0.15
The wizard's generated router sets return_raw_model_name: true, which is what lets the transcript, and so the status line, name the tier model rather than the autorouter alias. The cost lines come from GET /auto_router/session, cached for five seconds. lite autoroute down restores your previous settings, status line included.