DEV Community

Ty Cagle
Ty Cagle

Posted on Originally published at autorouter.com

The best Claude Code routers in 2026, ranked

A model router sits between your coding agent and the model providers and picks the model for each request. For a solo developer who already pays for AI subscriptions, here is how six of them rank as of November 23, 2026: AutoRouter, Weave Router, claude-code-router, OpenRouter, LiteLLM and Portkey. The order changes if you are not on a Mac, run a team on API keys or need prompts kept in your own infrastructure, so each tool gets its best use case and its main limit below.

I co-founded AutoRouter, which ranks first here, so the criteria are stated up front, in order of weight: the router uses the plans you already pay for before paid models; it picks a model for each request so you don't have to; it adds little to a $100 month of paid usage; it runs on many setups; and it documents how it picks.

The ranking

Rank Tool Best for Verdict
1 AutoRouter Solo developers and small teams on AI subscriptions Uses your plans first and picks a model for each request, and shows why; Mac only, in beta, no published benchmarks
2 Weave Router Plan-first routing on any operating system Also uses flat-rate plans first and publishes its benchmark method; plan support covers the Claude plan in Claude Code and the ChatGPT plan for listed models in Codex
3 claude-code-router A local, open-source setup with rules you write MIT licensed, runs on macOS, Windows and Linux, imports your sign-ins; routes only by your rules or scripts
4 OpenRouter One bill across 600+ models Inference at list price, and its Auto Code router for coding agents adds no fee; bills OpenRouter credits, not your plans
5 LiteLLM A self-hosted gateway for teams on API keys Virtual keys, spend tracking and budgets; you run it, and its auto router is in beta
6 Portkey Hosted budgets, rate limits and logs Free Developer tier; its Codex guide uses API keys

Which router fits: if you pay for AI subscriptions, AutoRouter on a Mac; not on a Mac, Weave Router or claude-code-router; team API keys, LiteLLM or Portkey; one prepaid bill, OpenRouter; prompts in-house, self-hosted LiteLLM.

Is claude-code-router the same as "a Claude Code router"?

No. claude-code-router is one open-source project under the MIT license. "A Claude Code router" is any tool that sits behind Claude Code and picks the model for each request. Claude Code sends its requests wherever ANTHROPIC_BASE_URL points (docs), so every router here attaches that way or edits Claude Code's settings for you.

As of November 23, 2026, claude-code-router (version 3.1.6) ships a desktop app for macOS, Windows and Linux, can import your Claude Code sign-in or Codex auth file as a provider, and routes by rules or scripts you write. AutoRouter is a separate Mac app: turn Claude Code on in it, then pick AutoRouter with /model or start with claude --model auto-claude-route.

Strengths and limits

  1. AutoRouter. Uses your plans first, applies your plain-English rules, then sends the request to a model that clears the quality bar for it, and shows each request's model, cost and reason. Limits: macOS 14 or later, in beta, requests pass through its servers, it sometimes misjudges how hard a task is, and it has no published benchmarks yet.
  2. Weave Router. Uses flat-rate plans first, scores every request and publishes its benchmark methodology. Hosted, purchased credits add 5.5% ($0.80 minimum) and requests on your own keys carry a 5% platform fee; self-hosting is Apache-2.0 (Weave). Limit: its page doesn't say how requests on your plans count toward the fee.
  3. claude-code-router. Open source, cross-platform, and it also supports other agents such as OpenCode and Pi. Limit: you write and maintain the routing rules.
  4. OpenRouter. One credit balance across 600+ models, and Auto Code, a router tuned for coding agents that adds no fee, with published routing benchmarks. Credit purchases carry a 5.5% fee on Standard (pricing). Limit: usage bills OpenRouter credits, not the plans you already pay for.
  5. LiteLLM. An open-source gateway with virtual keys, spend tracking and budgets, and self-hosting keeps data in your infrastructure. Limit: you run it, and its auto router is in beta.
  6. Portkey. Hosted budgets, rate limits and logs, plus configs with conditions, weights and fallbacks. Limit: built around API keys, so it isn't a ready answer for making subscriptions last longer.

Which routers use your ChatGPT or Claude plan?

This is the question that splits the field. A subscription holds far more usage than its price buys at API rates, so a router that ignores your plans can cost you more than it saves.

  • AutoRouter uses the AI subscriptions you already pay for first, in every coding agent you use, and gives those plans the work that needs them so they last longer. A subscription isn't required; Pro includes $20 of usage each month for every other model.
  • Weave Router keeps Claude Code's sign-in for your Claude plan and Codex's ChatGPT sign-in for the OpenAI models it lists, and says it uses those flat-rate plans first.
  • claude-code-router can import your local Claude Code sign-in or Codex auth file as a provider, or use API keys.
  • LiteLLM documents routing Claude Code signed in with a Claude Pro, Max, Team or Enterprise plan through its gateway (tutorial).
  • Portkey lists Max plan and OAuth support for Claude Code; its Codex guide uses API keys.
  • OpenRouter has guides for Claude Code and Codex, and usage bills your OpenRouter credits.

Which is best for each use case?

Use case Best pick Why
A solo developer with several paid subscriptions AutoRouter, then Weave Router Both use flat-rate plans before paid models
Keeping going when a plan hits its limit AutoRouter Pro Continues from its monthly included usage until the plan resets; Claude Code's own --fallback-model doesn't switch on rate-limit or billing errors
Routing by task complexity AutoRouter, then Weave Router AutoRouter works out how hard each task is and only considers models that clear the quality bar; Weave scores every request
A team that wants to avoid overspending on API keys LiteLLM or Portkey Virtual keys and budgets (LiteLLM) or hosted budgets, rate limits and logs (Portkey)
Not on a Mac claude-code-router, then Weave Router Both run on macOS, Windows and Linux
Prompts kept in your own infrastructure Self-hosted LiteLLM Data stays on your servers; claude-code-router also listens only on 127.0.0.1
One bill without plans OpenRouter List price across 600+ models plus a 5.5% fee on credit purchases

OpenRouter vs LiteLLM vs Portkey

The three overlap less than a ranking suggests: OpenRouter sells model access, while LiteLLM and Portkey sit in front of keys you already hold.

Tool Pick it for What you pay What you run
OpenRouter One prepaid balance across 600+ models, with failover 0% markup on provider prices; 5.5% fee on credit purchases, $0.80 minimum Nothing; you never hold a provider key
LiteLLM Virtual keys and budgets per key, user and team, with data in your infrastructure Open source (MIT); Enterprise features need a license A proxy you host; keys and budgets need PostgreSQL
Portkey Hosted budgets, rate limits, guardrails and logs over your own keys Free Developer tier; paid Production plan Nothing; the gateway can also be self-hosted

Pick OpenRouter for one bill and no infrastructure, LiteLLM if you have an engineer to run a gateway and want open-source budgets, and Portkey if you want those controls hosted. If most of your spend is subscriptions rather than API keys, none of the three is built for making those plans last longer.

What each one adds to a $100 month

Say the work your plans don't cover comes to $100 at provider list prices in a month:

  • AutoRouter Pro: $100 plus 10% is $110; the first $20 comes from usage included with Pro, plus the Pro subscription.
  • OpenRouter Standard: about $106, from the 5.5% fee on credits.
  • Weave Router hosted: $105 on your own keys, or about $106 on Weave credits.
  • Portkey: $100 to providers on your keys, plus its plan fee if you're on Production.
  • claude-code-router, LiteLLM or self-hosted Weave: $100 on your keys, plus the machine and your time.

Does Claude Code have a built-in auto router?

No. Its closest options are opusplan (Opus while planning, Sonnet while executing), --fallback-model for when the main model is overloaded, and a model setting per subagent (docs):

# Opus while planning, Sonnet while executing
/model opusplan

# Try Sonnet, then Haiku, if the main model is overloaded
claude --fallback-model sonnet,haiku
Enter fullscreen mode Exit fullscreen mode

These cost nothing extra and keep you on your plan, but you do the routing.

When to pick something other than AutoRouter

  • Not on a Mac: claude-code-router or Weave Router.
  • Prompts must stay in your infrastructure: self-hosted LiteLLM, self-hosted Weave Router or claude-code-router on 127.0.0.1.
  • A team on API keys: LiteLLM or Portkey.
  • One bill and no plans: OpenRouter.

The full ranking, with head-to-head verdicts for OpenRouter, LiteLLM and Portkey and every source, is at autorouter.com/blog/model-routers-claude-code-codex.

Disclosure: I'm a co-founder of AutoRouter.

Top comments (0)