← all repositories
NadirRouter/NadirClaw

Most of your prompts don't need GPT-4. This proxy knows.

NadirClaw is a self-hosted proxy that reads every prompt, judges its complexity in milliseconds, and routes simple requests to cheap models while keeping the expensive ones for hard problems.

NadirClaw
Not currently ranked — collecting fresh signals.
star history

What it does

NadirClaw sits between your tools—Claude Code, Cursor, Codex, anything speaking OpenAI or Anthropic protocols—and the actual model providers. It classifies each prompt into simple, mid, or complex tiers, then dispatches it to a matching model. It keeps API keys local, supports fallback chains when providers fail, and can compact bloated context before sending to trim input tokens.

The interesting bit

The routing uses a verifier-gated cascade: the cheap model answers first, and a rule-based heuristic verifier checks the response for refusals, truncation, or JSON failures. If the result looks suspect, the request escalates to the next tier. The README is admirably transparent that the flashy held-out benchmarks—0.961 AUROC, 60% cost reduction—were produced by the hosted Pro version’s trained DeBERTa verifier, not the open-source heuristic.

Key highlights

  • Drop-in OpenAI and Anthropic API compatibility, including streaming and vision routing
  • ~10 ms classification overhead with the default binary centroid classifier
  • Context optimization mode that compacts JSON, tool schemas, and chat history before dispatch
  • Declarative YAML rule engine for per-prompt overrides and hot-reloadable tier profiles
  • Built-in cost tracking, Prometheus metrics, and OpenTelemetry tracing

Caveats

  • The published RouterBench savings and 0.961 AUROC come from Nadir Pro’s trained DeBERTa verifier; the open-source release uses a faster rule-based heuristic that may catch fewer quality regressions.
  • “Aggressive” context optimization is explicitly listed as future work and not yet available.

Verdict

Solo developers and small teams currently routing every request to premium models should treat this as a pragmatic first line of defense; if you need a managed team dashboard or cannot stomach running local middleware, the hosted Pro tier—or a different tool—is a better fit.

Frequently asked

What is NadirRouter/NadirClaw?
NadirClaw is a self-hosted proxy that reads every prompt, judges its complexity in milliseconds, and routes simple requests to cheap models while keeping the expensive ones for hard problems.
Is NadirClaw open source?
Yes — NadirRouter/NadirClaw is an open-source project tracked on heatdrop.
What language is NadirClaw written in?
NadirRouter/NadirClaw is primarily written in Python.
How popular is NadirClaw?
NadirRouter/NadirClaw has 618 stars on GitHub.
Where can I find NadirClaw?
NadirRouter/NadirClaw is on GitHub at https://github.com/NadirRouter/NadirClaw.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.