Claude Code Router alternative: route Claude Code to any model, subscriptions included

Claude Code only talks to Claude out of the box. If you hit your Claude limit twice in one afternoon, or you want to try GPT-5.6 or Grok on the same repo without switching tools, you need something in between Claude Code and the model.
Claude Code Router (CCR) is the project most people find first. It is a local proxy that rewrites Claude Code's Anthropic-format requests into OpenAI-format requests and sends them to whichever provider you configure. It works, it is open source, and for API-key providers and local models it is a fine choice.
This guide covers what CCR does, where it stops, and how OpenLLM approaches the same problem from a different direction: instead of asking you for API keys, it routes Claude Code through the subscriptions you already have.
What Claude Code Router does
CCR runs on your machine. You install it with npm, write a config.json that lists providers (DeepSeek, OpenRouter, Ollama, Groq, and so on, each with an API key), and define routing rules: which model handles the default request, which one handles background tasks, which one gets long-context requests, which one handles "think" mode. Then you start Claude Code through ccr code instead of claude.
Every request Claude Code makes goes to CCR's local server, gets translated into the target provider's format, and comes back translated to the Anthropic format Claude Code expects.
Where it is strong:
- It is free and open source, and it runs entirely on your machine.
- It supports local models through Ollama.
- Routing rules by request type (background, think, long context) are a real feature that saves money if you have several API keys.
Where it stops:
- CCR routes to API keys. If what you actually have is a ChatGPT Plus plan, a SuperGrok plan, a Kimi coding plan, or a Cursor subscription, CCR cannot use them. Those plans do not hand out API keys.
- There is no fallback when a provider fails. If DeepSeek is rate-limited, the request fails and Claude Code shows the error.
- Usage and cost live in the provider dashboards, one per key. There is no single view.
- The configuration is a JSON file you maintain, and each new machine needs its own copy.
- Community reports are mixed. The top Reddit thread on it is titled "Any real success with claude-code-router?" and the answer in the thread is mostly no. Format translation between providers is fiddly, and tool calls in particular break in ways that are hard to debug.
If your models all come from API keys and you are comfortable maintaining the config, CCR is a reasonable pick. If your models come from subscriptions, keep reading.
How OpenLLM routes Claude Code
OpenLLM is an LLM gateway with one unusual property: it can route requests through subscription plans, not only API keys. Claude Pro and Max, ChatGPT Plus and Pro, SuperGrok and X Premium+, Kimi Code, and Cursor Pro are all supported, alongside plain API keys from Anthropic, OpenAI, any OpenAI-compatible endpoint, and local models running in Ollama or LM Studio.
Subscriptions are handled by a small daemon on your machine. When a request needs your ChatGPT plan, the daemon runs it through the official Codex login on your computer, using the credential that vendor already gave you. Nothing about your subscription is uploaded to OpenLLM. The gateway only carries the request to your machine and the answer back.
Setup is two commands. Install the daemon with the key from your dashboard:
curl -fsSL https://openllm.sh/install | OPENLLM_API_KEY='sk-llm-…' bashThen run Claude Code through OpenLLM:
openllm claudeThat command launches Claude Code with ANTHROPIC_BASE_URL pointed at the gateway and maps Claude Code's three model slots onto OpenLLM tiers: Opus becomes ultra, Sonnet becomes plus, Haiku becomes lite. Your ~/.claude config is not modified. Run plain claude and you get the stock setup back.
Inside Claude Code you can switch models mid-conversation the same way you always did:
/model ultra
/model chatgpt/gpt-5.6-sol
/model grok/grok-4.5The conversation context carries over. Claude Code has no idea the reply came from a different provider.
Tiers and fallback chains
The ultra, plus, and lite tiers are fallback chains. Each one is an ordered list of models. A typical ultra chain for someone with two plans looks like this:
- Claude Opus on your Claude Max plan
chatgpt/gpt-5.6-solon your ChatGPT Pro plangrok/grok-4.5on SuperGrok- An Anthropic API key as the metered backstop
When the first model is down, rate-limited, out of quota, or the request is larger than its context window, OpenLLM moves to the next model before any output starts. Claude Code never sees the failure. The reply is recorded under whichever model actually answered, so the dashboard shows where your work really ran.
Two honest limits. Fallback happens before the first output token is committed. If a provider dies halfway through a streamed reply, that reply stays on the failed provider rather than being spliced with a second model. And provider quotas are the provider's own. OpenLLM does not create extra Claude usage; it lets you spend the ChatGPT and Grok quota you already have when Claude's window is exhausted.
Side by side
Where the models come from:
- CCR: API keys and local models (Ollama).
- OpenLLM: subscriptions (Claude, ChatGPT, Grok, Kimi, Cursor) plus API keys plus any OpenAI-compatible endpoint, plus local models (Ollama, LM Studio) found by the daemon on your machine.
Where it runs:
- CCR: fully local.
- OpenLLM: local daemon for subscriptions, hosted gateway for API keys and the dashboard.
Failure handling:
- CCR: the request fails.
- OpenLLM: fallback chain walks to the next model, with a cooldown on the failed one.
Other clients:
- CCR: Claude Code, with recent support for other CLIs.
- OpenLLM: the same gateway key works in Claude Code, Codex, OpenCode, Grok Build, Raycast, and anything that accepts an OpenAI or Anthropic base URL.
openllm codexandopenllm opencodedo for those clients whatopenllm claudedoes for Claude Code.
Config:
- CCR: a
config.jsonper machine. - OpenLLM: chains and aliases live in your dashboard; each machine runs the daemon with its own key.
Cost:
- CCR: free. You pay each provider for tokens.
- OpenLLM: free for 50M non-cached tokens a month on 2 devices, no card. Pro is $30 a month for unlimited tokens, and 5 devices. OpenLLM never marks up tokens; subscription usage is billed by your plan, API usage by your provider.
Credentials:
- CCR: API keys in a local JSON file.
- OpenLLM: API keys encrypted in the browser under a recovery phrase OpenLLM never sees. Subscription credentials never leave your machine.
Platforms:
- CCR: anywhere Node runs.
- OpenLLM: macOS and Linux daemon; no Windows build today.
Which one to pick
Choose Claude Code Router if you want everything fully local and open source, you have API keys for everything you use, and you would rather run a single open-source binary you fully control.
Choose OpenLLM if your models come from subscriptions, you want Claude Code to survive a rate limit without you noticing, or you use more than one coding agent and want them all on the same key with one usage view.
They also stack. OpenLLM accepts any OpenAI-compatible endpoint as a provider, so a CCR endpoint can sit as a hop in an OpenLLM chain.
Setup in full
- Sign up at openllm.sh and create your vault. The recovery phrase is the only way to unlock your keys; OpenLLM keeps no copy.
- Connect a provider. For a subscription, click Connect on the Providers page and sign in through the vendor's own CLI on your machine. For an API key, paste it; it is encrypted before it leaves the browser.
- Install the daemon with the one-line command above.
- Run
openllm claude. - Optional: open Config and reorder the
ultra,plus, andlitechains, or add your own alias.
The full setup guide is at docs.openllm.sh.