levrouter: the cheapest model that can handle each LLM call
levrouter is an open-source Python package for per-request LLM model routing. It sends easy prompts to small models and hard prompts to large models, inside the same provider you already use. You keep writing ChatAnthropic(model="claude-opus-5-5"). Nothing is proxied, and the decision is made in your process by lev, a System 1 decision model from Interfaze.
Why levrouter
- One line to adopt: levrouter.load_config() routes LangChain chat models and direct SDK calls.
- Same provider, your keys: routing moves only between tiers of the provider you already use.
- Conversation-aware: keeps each conversation on one model so prompt caching keeps working.
- Guardrails: never picks a model that cannot fit the request's context, attachments or tool use.
- Current model data: levrouter models refresh updates prices and capabilities.
- Visible costs: every decision is logged with its cost and savings.
Routing tiers
Anthropic: simple claude-haiku-4-5, standard claude-sonnet-5, complex claude-opus-5-5. OpenAI: simple gpt-6-luna, standard gpt-6-sol, complex gpt-6-astra.
Frequently asked questions
What is levrouter?
An open-source Python package that picks the cheapest suitable model for each LLM request, within the same provider.
Do I need to change my code?
No. Call levrouter.load_config() once at startup. Your existing calls stay the same.
Which providers are supported?
Anthropic, OpenAI, Gemini, Groq, DeepSeek, Mistral, xAI, Hugging Face and OpenRouter.
Is levrouter made by Interfaze?
No. levrouter is an independent community project built on lev. Its name is used with the approval of the Interfaze team. Special thanks to Abhinav Kumar Singh and the Interfaze team.
Credits
levrouter is built on lev, the System 1 decision model created by Interfaze. Thank you, Abhinav Kumar Singh and the entire Interfaze team, for building lev and for approving the name levrouter. Design by Sathya Vakacharla.