NadirRouter/NadirClaw
Open-source LLM router & AI cost optimizer. Routes simple prompts to cheap/local models, complex ones to premium — automatically. Drop-in OpenAI-compatible proxy for Claude Code, Codex, Cursor, OpenClaw. Saves 40-70% on AI API costs. Self-hosted, no middleman.
What it solves
NadirClaw reduces LLM API costs by 40-70% by ensuring that prompts are routed to the cheapest possible model capable of providing a reliable answer. It prevents the waste of expensive premium models on simple tasks (like formatting JSON or basic questions) that can be handled by smaller, cheaper models.
How it works
NadirClaw acts as a local drop-in proxy that uses a three-step process for every request:
- Route: A fast embedding classifier (~10ms) predicts the smallest viable model for the prompt. It can be overridden by specific markers like vision content or agentic tool loops.
- Verify: The response from the cheap model is checked against quality heuristics (such as checking for refusals, truncation, or JSON failures).
- Escalate: If the response fails the verification threshold, NadirClaw automatically escalates the request to the next-best, more powerful model.
Who it’s for
It is designed for solo developers and self-hosters who use OpenAI-compatible tools (like Cursor, Aider, or Continue) and want to lower their API spend without sacrificing quality.
Highlights
- Drop-in Proxy: Compatible with any OpenAI-compatible client and supports Anthropic-native endpoints.
- Context Optimization: Compacts bloated context (JSON, whitespace, etc.) to save 30-70% of input tokens.
- Local Execution: Runs locally so API keys never leave the user's machine.
- Cost Tracking: Includes a built-in dashboard, budget alerts, and a savings calculator.
- Multi-Provider Support: Works with Gemini, OpenAI, Anthropic, Ollama, and any provider supported by LiteLLM.
Related
- Project
- Project
- Project
- Project
- Dispatch