← Back to Discover

NadirClaw

Self-hosted router that sends each prompt to the cheapest model likely to answer well, checks the reply, and escalates to a stronger model when needed. Source-available, not open source.

Model APIsCommand-line tools

What it does

NadirClaw is the source-available, self-hosted core of Nadir, a hosted LLM router from the same team. It runs a local OpenAI-compatible proxy that classifies each prompt in roughly ten milliseconds and sends it to a cheaper or stronger model accordingly. It also offers an Anthropic-style messages endpoint so tools such as Claude Code can route through it. A verifier checks the cheap model's answer against simple quality heuristics such as refusals, truncation and JSON failures, and escalates to the next model if the score falls below a threshold. Fallback chains handle rate limits and errors, and routing detects agentic tool loops, reasoning prompts and image content. It tracks cost per request, with savings reports, budgets, a terminal and local web dashboard, a Prometheus metrics endpoint and optional context compaction. Models can come from Gemini, OpenAI, Anthropic, Ollama or any provider supported by LiteLLM. Installation needs Python 3.10 or newer, or Docker. The licence is PolyForm Noncommercial 1.0.0, free for noncommercial use, with a commercial licence available through the Nadir website. Nadir Pro is the hosted version with a trained classifier, team features and a dashboard.

Capabilities

  • Local OpenAI-compatible and Anthropic-compatible proxy
  • Prompt classifier that routes to simple, mid or complex model tiers
  • Verifier-gated cascade that escalates weak answers
  • Fallback chains, session pinning and agentic task detection
  • Per-request cost tracking, savings reports and budgets
  • Works with Claude Code, Codex, Cursor and other OpenAI-compatible clients

When to use it

  • You want to cut API spend on coding-agent traffic by sending easy prompts to cheaper models
  • You want routing to run locally with your own provider keys
  • You need automatic failover when a model returns rate-limit or server errors