LIVE · Thursday 3 December

Best LLM Router 2026 by Situation: Which Gateway to Pick, and When a Learned Router Beats a Simple Rule

A buyer's guide to OpenRouter, LiteLLM, Portkey, Azure's model router, Vercel AI Gateway, RouteLLM and Not Diamond, with a worked cost example that puts a rule-based baseline first.

By Surya8 min read

The best LLM router in 2026 depends on whether you need a gateway or a model picker. For a gateway, choose OpenRouter for a hosted start across 400-plus models, LiteLLM to self-host, Portkey for enterprise guardrails and audit, Azure's model router if Azure compliance rules apply, and Vercel AI Gateway for hosted access with no token markup. For cutting cost prompt by prompt, write a cheap-model-unless rule before you buy anything: an independent 2026 benchmark, LLMRouterBench, found several learned routers, including a commercial one, "fail to reliably outperform a simple baseline."

First, decide which kind of router you need

Gateways and learned routers are sold under the same name and solve different problems. A gateway gives your code one API in front of many providers. It holds the keys, retries and falls back when a provider fails, balances load, and logs what each request cost. You still decide which model gets the request. A learned router decides for you: it reads each prompt and sends it to the cheapest model it predicts can answer well.

The quick test: if your pain is outages, key sprawl or not knowing who spent what, you need a gateway. If your pain is a bill dominated by a frontier model answering easy questions, you might need a learned router, and you certainly need a rule. Some products do both. Azure's model router is a gateway with a Microsoft-trained routing model built in, and OpenRouter is described in Stripe's announcement as routing each request on "task complexity, price, speed, and reliability."

The picks by situation

Your situation Pick Why Watch for
Hosted, fastest start OpenRouter 400+ models from 80+ providers, per Stripe Stripe deal announced Aug. 19, 2026; terms undisclosed
Self-hosted, open source LiteLLM Self-hosted gateway, OpenAI format, 100+ LLMs Enterprise features need a commercial licence
Enterprise governance Portkey Guardrails, load balancing, access control; MIT open gateway Now part of Palo Alto's Prisma AIRS
Azure compliance Azure model router Approved-model subsets, Data Zone Standard Auto mode always runs as Global Standard
Hosted, no token markup Vercel AI Gateway Provider list price, fallbacks, budgets Add-on fees for ZDR, regions, BYOK without fallback
Per-prompt cost cutting A written rule, then RouteLLM or Not Diamond Rule is free; RouteLLM is Apache 2.0 Test against the rule, not the frontier model

If you want it hosted and running today: OpenRouter

OpenRouter puts more than 400 models behind one API, according to both Stripe's August 19, 2026 announcement and Orrick, which advised OpenRouter on the deal. Its GitHub organization describes "automatic fallbacks and price/performance routing across 90+ providers," and its SDKs can sort providers by price. The open question is ownership. Stripe agreed to acquire it, but neither Stripe nor Orrick gives a price, terms or a closing date, and Stripe's announcement is silent on what changes for customers. Its stated interest is token cost optimization alongside its Token Billing product. Use OpenRouter, but keep your calls in a standard format and a second gateway configured.

If you want to run it yourself: LiteLLM

LiteLLM's README calls it an "Open Source AI Gateway for 100+ LLMs. Self-hosted," with virtual keys, spend tracking, guardrails, load balancing and an admin dashboard, all calling models in OpenAI's format. It runs as a Python SDK inside your code or as a proxy server for a whole team. The project claims "8ms P95 latency at 1k RPS," without saying which mode was measured or stating the test date or hardware, so treat it as the project's own number and measure on your infrastructure. SSO, custom SLAs and dedicated support come under a separate commercial licence with no public price.

If you need governance and audit: Portkey

Portkey's open gateway, MIT licensed, handles fallbacks with configurable error triggers, retries up to five times with exponential backoff, weighted load balancing across keys and providers, and more than 40 pre-built guardrails, according to its README, which also says its "core enterprise gateway is merging into open-source with our 2.0 release." Its enterprise version adds PII redaction, access controls and SOC2, ISO, HIPAA and GDPR compliance. Since May 29, 2026, Portkey belongs to Palo Alto Networks, whose announcement says the gateway "will be integrated into Prisma AIRS." That post does not address existing customer contracts. If your security team already buys from Palo Alto, the deal is a reason to look closer; if you chose Portkey for neutrality, ask about terms before renewal and know that the open gateway is your fallback.

If you are bound to Azure: Azure's model router

Microsoft's documentation, updated November 10, 2026, describes a routing model "trained by Microsoft on hundreds of thousands of prompts" that, as of November 11, chooses among 43 models from OpenAI, Anthropic, xAI, DeepSeek, Meta and Fireworks. You pick a mode: Balanced, the default, takes the cheapest model within a small quality band of the best, for example 1 to 2%; Cost widens the band to around 5 to 6%; Quality ignores cost. For compliance, admins restrict the router to an approved model subset enforced by Azure Policy, and Data Zone Standard keeps processing in the data zone. Three caveats: the no-deployment Auto mode always processes as Global Standard, the router is not available in Azure Government, and it routes on text only, so image content does not influence the choice. Billing is a routing fee per million input tokens plus the chosen model's usage; Microsoft's public pricing page shows the fee as a blank, so get a quote.

If you want hosted with no token markup: Vercel AI Gateway

Vercel's pricing docs, updated September 8, 2026, say AI Gateway "charges no markup and no platform fee on tokens," including when you bring your own provider keys, and your app does not need to run on Vercel. You get provider and model fallbacks, request logs, budgets and prompt caching. The costs are in the add-ons, which the worked example below prices: $0.20 per 1,000 requests for BYOK with fallback to Vercel's keys turned off, $0.10 per 1,000 for team-wide zero data retention, and 5% of inference cost for its EU or US regional endpoints.

If you want per-prompt cost cutting: start with a rule

Learned routers promise to send easy prompts to cheap models automatically. The options have narrowed. RouteLLM, from LMSYS, is free under Apache 2.0, works as a drop-in OpenAI-compatible client, and routes between one strong and one weak model; its README tells you to calibrate the routing threshold on queries like your own traffic. Not Diamond offers pre-trained chat and code routers and custom routers trained on your data, at $0.05 per million tokens routed, and its pricing page claims "at least 20-40% cost savings." Martian, often listed with them, now documents a Gateway to "200+ AI models through a single API" where you choose the model; its docs do not mention automatic per-prompt routing.

The evidence behind the savings claims is thin. RouteLLM's 85% figure comes from MT Bench in 2024, against GPT-4 alone. LLMRouterBench, posted to arXiv on January 12, 2026 with its code and data, tested routers over more than 400,000 instances, 21 datasets and 33 models against the single best model. The best routers cut cost by up to 31.7% at matched accuracy, but "many routing methods exhibit similar performance," OpenRouter's router scored 24.7% below the single best model, and two-model routers like RouteLLM struggled to save money without losing accuracy. No one has published a test of these routers against a hand-written rule and a workload-specialised model on production tasks such as ticket classification, extraction or voice-agent turns, with cost per 1,000 requests, p50 and p95 latency and accuracy; that has not been measured.

So run it yourself. Take 1,000 to 2,000 logged requests, score them with a task metric, and run four arms: the frontier model, the cheap model, a rule, and the router. Adopt the router only if it beats the rule.

Worked example: a support-classification workload

Assume 2 million support tickets a month, each classified with 600 input tokens and 50 output tokens: 1.2 billion input and 100 million output tokens. Prices are Anthropic's list rates per million tokens: Claude Sonnet 5.5 at $2 in and $10 out, Claude Haiku 5.5 at $0.10 and $0.50 for prompts under 100,000 tokens.

All on Sonnet 5.5, the month costs $2,400 for input plus $1,000 for output, or $3,400. All on Haiku 5.5, it costs $170. A rule that sends 90% of tickets to Haiku and escalates the 10% matching named intents or long threads to Sonnet costs $153 plus $340, or $493, about 85% less than Sonnet alone. The 90/10 split is an assumption to test, not a measurement.

Now add the tools. A learned router has to beat $493 at the same accuracy; Not Diamond's fee would add about $65 a month on 1.3 billion routed tokens, if it applies to input and output alike. The gateway adds little if you keep Vercel's defaults, since it passes through list prices, but turning off fallback to Vercel's keys on your own keys would add $400 a month at 2 million requests, and team-wide zero data retention another $200. On a workload this cheap, gateway add-ons can cost more than the model.

When a router is the wrong tool

A workload like this one, a single repeated task, is where routing helps least, because the prompts are all about equally hard. The alternative is to post-train a small model on your own labelled tickets and serve it, with a frontier fallback for low-confidence cases: a training and evaluation project up front in exchange for lower per-request cost later. Parsec, a small language model lab, offers this as a managed service that routes per turn and serves models post-trained on the customer's traffic. Its comparison page claims 60% "savings on real workloads" against "typical router savings" of 15%, with no workload or baseline defined; nothing in Parsec's public code covers those figures, and it publishes no price for the service.

Bottom line

Hosted and in a hurry: OpenRouter, with a second gateway configured while the Stripe deal plays out. Self-hosted: LiteLLM. Enterprise governance: Portkey, knowing it is now a Palo Alto product with an open gateway as your exit. Azure with residency rules: Azure's model router on a Data Zone deployment. Hosted with list-price tokens: Vercel AI Gateway, with an eye on add-on fees. Per-prompt cost cutting: a written rule first, then RouteLLM or Not Diamond only if it beats that rule on your own traffic. One task dominating the bill: price a specialised model before a router.

Sources

More in Products

All Products →