Claude Code model router

NadirClaw

Source-available LLM router and AI cost optimizer. Routes simple prompts to cheap or local models and complex ones to premium models, automatically. Drop-in OpenAI-compatible proxy for Claude Code, Codex, Cursor and OpenClaw. Self-hosted, no middleman.

Install

Install
pip install nadirclaw

Found in the project README. Check it for setup steps after installing.

From source
git clone https://github.com/NadirRouter/NadirClaw.git

From the README

NadirClaw

  The lowest viable model, verified.
  NadirClaw routes every prompt to the cheapest model that can reliably answer, verifies the
  output, and escalates only when it has to. Better answers at lower cost, and it prices every
  routed request against your baseline so you can see what it actually saved.

  NadirClaw is the source-available, self-hosted core of Nadir, the hosted LLM router built by the same team. It is licensed under PolyForm Noncommercial 1.0.0, so it is source-available, not open source.

  Works with Claude Code · Cursor · Continue · Aider · Windsurf · Codex · OpenClaw · Open WebUI · Any OpenAI-compatible client

  Nadir Pro (hosted) · Quick Start · NadirClaw vs Pro · Comparisons · GitHub Action

  Running real traffic or a team? Nadir Pro adds a trained classifier, a live dashboard, and team billing. No fee on your own provider keys; 5.5% platform fee on credits for Nadir-managed keys.

Why NadirClaw?

Most LLM requests don't need a premium model. In typical coding sessions, 60-70% of prompts are simple — reading files, short questions, formatting. They can be handled by models that cost 10-20x less.

- Cut AI API costs — how much depends on your prompt mix, so NadirClaw measures it per request
- ~10ms classification overhead — you won't notice it
- Drop-in proxy — works with any OpenAI-compatible tool
- Runs locally — your API keys never leave your machine
- Fallback chains — automatic failover when models are down
- Built-in cost tracking — dashboard, reports, budget alerts
Your keys. Your models. No middleman. NadirClaw runs locally and routes directly to providers. No third-party proxy, no subsidized tokens, no platform that can pull the plug on you. Why this matters.

How NadirClaw works

Three moves, on every request:

1. Route — a…
Read the full README on GitHub

Details

Language
Python
Last updated
22 October 2026
Topics
aiai-cost-reductionai-routerclaude-codecodexcost-optimizationgeminillmllm-gatewayllm-proxyllm-routermodel-routing

FAQ

What is NadirClaw?

Source-available LLM router and AI cost optimizer. Routes simple prompts to cheap or local models and complex ones to premium models, automatically. Drop-in OpenAI-compatible proxy for Claude Code, Codex, Cursor and OpenClaw. Self-hosted, no middleman. It is a model router for Claude Code, from NadirRouter/NadirClaw on GitHub.

How do I install NadirClaw?

Run pip install nadirclaw, then follow the setup in the README.

Is NadirClaw popular?

NadirRouter/NadirClaw has 661 GitHub stars and 78 forks. It was last updated on 22 October 2026.

More model routers & proxies

Browse the most popular Claude Code mods, all model routers & proxies, or the skills and MCP server directories.