The $0.45 docstring Last year I was using Claude Opus for a coding project. Great model. But then I looked at my API bill and noticed something: a significant chunk of my spend was on prompts like: "Write a docstring for this function" "What does HTTP 404 mean?" "Convert this to TypeScript" These prompts were hitting Opus at $15/1M input tokens. They could have been handled by Haiku at $0.80/1M or Gemini Flash at $0.075/1M. Same quality output, 20-200x cheaper. The manual approach doesn't work I tried switching models manually. The problem: you don't know the complexity of a prompt until you've read it. And in agentic workflows (Claude Code, Cursor, Aider), the model is called hundreds of times automatically. You can't manually pick the model for each call. What we built Nadir sits between your app and the LLM providers. It classifies each prompt in ~50ms using a DistilBERT-based classifier, then routes to the cheapest model that can handle it: Simple (status checks, formatting, basic Q&A) - Gemini Flash / Haiku Medium (code generation, explanations) - GPT-4o-mini / Haiku Complex (architecture, debugging, reasoning) - stays on your premium model The classifier runs locally. Your API keys never leave your machine. No third-party proxy. Why open source We're MIT licensed because we think model routing should be infrastructure, not a service that can pull the plug on you. Self-host it, fork it, contribute to it. If you want a hosted version with extra features, that's what the Pro plan is for.