LiteLLM vs Nadir: Free Gateway, Priced Decision

LiteLLM's Auto Router v2 genuinely does per-prompt model selection, but it doesn't check the answer that came back before deciding whether to escalate. LiteLLM is a real, MIT-licensed, 57,000-star open source gateway, and its router uses an LLM classifier, complexity tiers, and adaptive Thompson sampling, not a static fallback list. Every one of its routing strategies makes its call before the model generates anything. Nadir runs beside LiteLLM in shadow mode and adds an optional reference-free verifier and escalation step for complete non-streaming responses. This is the honest comparison: what each one actually is, what each one costs, and why you probably don't have to choose.

Published 2026-08-29 by Dor Amir on the Nadir blog.

Filed under Nadir & Alternatives.

Both call themselves a router. Only one checks its own work.

Ask a team building on top of multiple LLM providers what sits between their code and the model, and one name comes up before almost any other: LiteLLM, the proxy most engineers reach for first. It is not a straw man. LiteLLM is a real, MIT-licensed, 57,000-star open source gateway that a large share of the industry already runs in production, and its newest routing feature genuinely does per-prompt model selection with a classifier, not a static fallback list. Source: GitHub, BerriAI/litellm.

Nadir gets compared to it constantly, because both speak the OpenAI API and both claim to pick the right model for a given prompt automatically. Neither claim means the same thing on both sides. This is the honest comparison: what each one is, what kind of bet each router makes, and what happens after that bet turns out wrong.

What LiteLLM is

LiteLLM is a self-hosted AI gateway built by BerriAI, a YC W23 company: a Rust-core proxy with a Python SDK that puts one OpenAI-compatible endpoint in front of 100+ providers and roughly 1,892 models — OpenAI, Anthropic, Bedrock, Vertex AI, Azure, vLLM, and more. Source: LiteLLM. The core is MIT licensed; only the code inside its enterprise/ directory carries a separate license. Source: GitHub, BerriAI/litellm, LICENSE.

Underneath the proxy is a genuinely capable router, not just a pass-through. Its load-balancing strategies — cost-based-routing, usage-based-routing-v2, latency-based-routing, least-busy — pick among deployments of the models you've already configured, weighing live cost, usage, and latency signals for each one. Source: LiteLLM Docs, "Routing & Load Balancing". On top of that sits Auto Router v2, which folds LiteLLM's older complexity, semantic, and adaptive routers into a single config: keyword rules run first, then an optional LLM classifier or heuristic scorer assigns the prompt to a SIMPLE, MEDIUM, COMPLEX, or REASONING tier, and — with adaptive: true — Thompson sampling explores models inside that tier instead of collapsing on the cheapest one every time. Source: LiteLLM Docs, "Auto Router v2".

Around the routing, LiteLLM ships what a production gateway needs: per-key and per-team spend tracking, hard budget caps, rate limiting, response and semantic caching, PII-masking and prompt-injection guardrail hooks, and SSO, RBAC, and audit logging on the enterprise tier. Source: LiteLLM. LiteLLM's own site lists that enterprise tier as custom pricing on request; third-party pricing trackers put it at roughly $250 a month for a basic plan up to around $30,000 a year for the full package with SLA-backed support. Source: LiteLLM, "Enterprise"; Source: TrueFoundry, "LiteLLM Pricing 2026".

What that routing decision actually is

Every one of LiteLLM's routing strategies, including Auto Router v2's classifier and its Thompson-sampled tier pools, makes its call before the model generates anything. A prompt comes in, gets scored or classified, lands in a tier or a cost bucket, and a model answers. Whether that specific answer was any good is not part of the decision loop for that request. Adaptive mode's Thompson sampling does improve the pool's long-run allocation using aggregate reward signal across many requests — but it does not re-check this particular answer before it goes out, and it has no mechanism to escalate mid-request when the cheap model got this specific prompt wrong. Source: LiteLLM Docs, "Auto Router v2".

That is not a gap unique to LiteLLM. It is a structural property of any router that decides the model before the answer exists, including the third-party router behind OpenRouter's auto mode, as we've written before.

Both routers make a pre-generation bet on which model should answer. LiteLLM's Auto Router v2 returns that answer as-is once the tier is picked. Nadir can optionally score the specific answer that came back and escalate before returning it, for complete non-streaming responses.
Both routers make a pre-generation bet on which model should answer. LiteLLM's Auto Router v2 returns that answer as-is once the tier is picked. Nadir can optionally score the specific answer that came back and escalate before returning it, for complete non-streaming responses.

What Nadir is

Nadir is a decision layer that runs beside your existing gateway — LiteLLM included — starting in shadow mode: your code keeps calling whatever it calls today while Nadir logs the model-and-effort call it would have made, with no execution and no bill attached. Point traffic at it directly and the integration is the same base-URL swap every router in this category uses:

from openai import OpenAI

client = OpenAI(base_url="https://api.getnadir.com/v1", api_key="YOUR_NADIR_KEY")

resp = client.chat.completions.create(
    model="auto",  # classified and routed; complete-response verification is optional
    messages=[{"role": "user", "content": "Summarize this contract clause..."}],
)

Nadir's router makes the same kind of pre-generation bet LiteLLM's does. The difference is what can happen next: for complete, non-streaming responses through the managed proxy, Nadir can optionally run a reference-free verifier and escalate to a stronger model when the specific answer that came back doesn't clear the bar. Streaming responses bypass this step entirely, and verifier or escalation errors fail open rather than blocking the response.

Where that check has something deterministic to grade against, the evidence is concrete rather than reference-free: on a run-check-escalate pass over 395 common HumanEval and MBPP problems with runnable tests, the cascade solved 392 (99.2%) against 383 (97.0%) for Claude Opus 5 alone — a result specific to tasks with deterministic tests, not a claim about the general reference-free path. In an independent scoring run, Nadir's Tumbler router placed 5th of 23 on RouterArena's benchmark with an arena score of 72.3, which measures routing decisions against RouterArena's own model pool and doesn't predict any customer's savings or served quality. And in an offline replay over published SWE-bench per-instance results — not a live submission and not the deployed classifier — a tier-policy replay resolved 371 of 500 tasks at 39.8% lower cost than routing everything to Opus.

Nadir's self-hosted core, NadirClaw, is source-available under PolyForm Noncommercial — not open source the way LiteLLM's MIT core is. If keeping classification inside your own network is the actual requirement, that's the honest comparison to make, not an open-source-versus-open-source one.

The fee model is where the incentives actually point

LiteLLM's open-source core costs nothing to license — you pay for the compute it runs on and the engineering time to configure, tune, and operate it. Its enterprise tier is a flat subscription, reportedly starting around $250 a month, for SSO, RBAC, audit logs, and SLA support. Source: TrueFoundry, "LiteLLM Pricing 2026". That fee is the same whether Auto Router v2's tier assignments happen to save you money in a given month or not. It's priced for the platform, not the outcome.

Nadir's decision API, the shadow-mode, recommend-only path, makes no provider calls itself. Its economics stay advisory until a customer executes a recommendation and reports measured usage and outcomes, and Nadir charges nothing on savings, projected or measured. Decision calls and the separate Hosted Route, which does execute requests, carry one flat charge: $0.002 per request that carries a Nadir API key, with no base fee. Your provider bills you directly for the model, and the first 50 requests a month are free.

LiteLLMNadir
Core licenseMIT (core); separate license inside enterprise/Source-available, PolyForm Noncommercial (NadirClaw)
What it isSelf-hosted AI gateway and proxyDecision layer, hosted or self-hosted, runs beside your gateway
Providers / models100+ providers, ~1,892 modelsRoutes across the providers you connect
Per-prompt auto routingAuto Router v2: keyword rules, heuristic/LLM classifier, complexity tiers, adaptive Thompson samplingLearned router, same pre-generation step
Post-generation checkNot part of the routing loopOptional reference-free verifier and escalation on complete non-streaming responses; streaming bypasses it
Infrastructure you runProxy process, Redis/Postgres, config YAML, containersNone on the hosted path; self-host with NadirClaw if required
Spend tracking / guardrailsBuilt in: keys, teams, orgs, budgets, PII/injection hooksCost dashboard, per-request logs, spend controls
PricingFree core; enterprise reportedly ~$250/mo–$30k/yr, flat regardless of outcomeNo base fee; $0.002 per request on your own keys, decision calls and Hosted Route alike; no fee on savings

Source: LiteLLM; Source: LiteLLM Docs, "Routing & Load Balancing"; Source: LiteLLM Docs, "Auto Router v2"; Source: TrueFoundry, "LiteLLM Pricing 2026".

You probably don't have to choose

A large share of the teams weighing this comparison already run LiteLLM as their unified proxy, and ripping it out is not actually the decision on the table. Nadir's decision layer is built to sit beside an existing gateway rather than replace it — start in shadow mode with LiteLLM still serving every request, attach outcomes to Nadir's recommendations, and only enforce Nadir's picks once that shadow evidence clears your bar. LiteLLM keeps doing what it's good at — one endpoint across every provider, deployment-level load balancing, budgets, guardrails — while the model-and-effort decision for each request gets a second, verifiable opinion.

Which one fits your team

Bottom line

LiteLLM earned its stars: it's free, MIT-licensed, genuinely does per-prompt model selection, and is a reasonable default gateway for most teams. What it doesn't do — because no classification-only router does — is check whether the cheap model's specific answer to your specific prompt was actually right before it ships. That's the layer Nadir adds, as a shadow-first, optional-verification decision contract you can run beside LiteLLM rather than instead of it.

Start free, or read the full guide to LLM routing if you're still deciding whether routing belongs in your stack at all.


Sources: [LiteLLM](https://www.litellm.ai/). [GitHub, BerriAI/litellm](https://github.com/BerriAI/litellm). [LiteLLM Docs, "Routing & Load Balancing"](https://docs.litellm.ai/docs/routing-load-balancing). [LiteLLM Docs, "Auto Router v2"](https://docs.litellm.ai/blog/autorouter-v2). [LiteLLM, "Enterprise"](https://www.litellm.ai/enterprise). [TrueFoundry, "LiteLLM Pricing 2026"](https://www.truefoundry.com/blog/litellm-pricing-guide). [The corrected Nadir evidence note](/blog/routing-without-verification-dead-reckoning).

More on nadir & alternatives

Pages on this site

Machine-readable summaries of this site: llms.txt and llms-full.txt.