Download

Claude Code Router, explained and compared

Claude Code Router (CCR) is a free, open-source gateway that runs on your machine and sends Claude Code, Codex and other coding agents to the models and providers you choose. Auto is a Mac app that picks a model for each turn in every coding agent you use. This page covers how CCR works today, then how the two compare. Claude Code Router alternatives

Auto A Mac app for every coding agent you use. $0/mo on your plans Download Claude Code Router An open-source local gateway for coding agents. $0open source
Price Free on your plans; Pro adds every other model Free, MIT licensed
Fee on tokens Provider’s price plus 10% on paid models None, you pay your providers
Runs on Your Mac, macOS 14 or later macOS, Windows, Linux or Docker
Agents Codex, Claude Code, Cursor, Claude Desktop, T3, OpenCode, Pi and Terminal Claude Code, Codex, OpenCode, Kimi CLI and more
Setup Install, sign in, click Enable Add providers and keys, start the gateway, apply an agent profile
Your plans Claude, ChatGPT, Grok and Gemini plans, used first Can import Claude Code and Codex sign-ins
Model choice Your rules, then a model that clears the quality bar Rules you write, checked in order, with fallbacks
Each request Every turn shows its model, cost and why Logs show provider, model, tokens and estimated cost
Requests go Through Auto’s servers to each provider From your machine to the providers you add
  • Your plans, used first
  • A model picked for each turn, no rules needed
  • A model must be good enough for the task before price counts
  • Nothing to host and no keys to manage

How we compared. Auto publishes this comparison. The table compares price, setup, and support for coding agents using the linked documentation. Sources checked November 16, 2026: Claude Code Router README (version 3.1.5), CLI reference, routing docs, provider docs, Docker guide and Auto pricing. Auto wrote this page. See every comparison.

How Claude Code Router works

What the project is, how setup and routing work in version 3, and what changed from the older guides.

A local gateway for coding agents

Claude Code Router is an open-source project by musistudio on GitHub, MIT licensed, with more than 38,000 stars. It runs a model gateway on your own machine and gives your coding agents one local endpoint, http://127.0.0.1:3456 by default. Behind that endpoint you add providers, models, accounts and routing rules, and CCR sends each request where you said.

It began as a way to run Claude Code on other models. Version 3 supports Claude Code, Claude Design, Codex, Grok CLI, Kimi CLI, Kilo Code, OpenCode, Pi, ZCode and WorkBuddy. It speaks the OpenAI, Anthropic and Gemini APIs and has presets for providers such as OpenRouter, DeepSeek, Moonshot, Mistral and Z.AI, plus any compatible endpoint (README).

How setup works in version 3

The README recommends the desktop app for macOS, Windows or Linux. Open Providers and add a provider from a preset or a custom endpoint, with its API key, protocol and models. Open Server and click Start. Open Agent Config, choose your agent and a model, and apply the profile. Then use your agent as usual and check Logs for the provider and model each request went to.

Without the desktop app, npm install -g @musistudio/claude-code-router and then ccr ui open the same screens in a browser on port 3458. The CLI needs Node.js 22 or newer, and the repository also has a Docker setup. Settings live in ~/.claude-code-router/config.sqlite; the docs say to use Settings, Export data, instead of copying that file while CCR runs (CLI reference).

If you used it before: config.json and ccr code

Guides written before version 3 describe a hand-edited ~/.claude-code-router/config.json with a Providers list and a Router block, started with ccr code. The version 2 README shows this shape:

{
  "Providers": [
    {
      "name": "deepseek",
      "api_base_url": "https://api.deepseek.com/chat/completions",
      "api_key": "sk-xxx",
      "models": ["deepseek-chat", "deepseek-reasoner"]
    }
  ],
  "Router": {
    "default": "deepseek,deepseek-chat",
    "background": "ollama,qwen2.5-coder:latest",
    "think": "deepseek,deepseek-reasoner",
    "longContext": "openrouter,google/gemini-2.5-pro-preview",
    "longContextThreshold": 60000,
    "webSearch": "gemini,gemini-2.5-flash"
  }
}

Each Router key named a provider and model for one kind of request: default for most turns, background for small background tasks, think for reasoning such as Plan Mode, longContext above the token threshold (60,000 by default) and webSearch for search. /model provider,model switched models inside a session, and CUSTOM_ROUTER_PATH pointed at your own routing script (version 2 README). The version 3 CLI reference launches agents with ccr <profile> and doesn't list ccr code.

How routing rules work now

Rules are checked in list order, and the first enabled match rewrites the request. A condition reads a request header or a body field, such as messages.0.role, with operators like ==, contains or >. To route by model, a rule sets request.body.model. For logic a condition can’t express, a rule can run a Node.js script that returns a model, rewrites and a fallback (routing docs).

When the chosen model fails, CCR can send once, retry the same model, or try an ordered chain of fallback models, honoring Retry-After or backing off for up to 30 seconds. Subagents can name their own model with a <CCR-SUBAGENT-MODEL> tag, and CCR converts Codex’s apply_patch tool so models outside GPT can edit files.

What it does well

  • It’s free and open source, so you can read the code that handles your requests.
  • It runs on macOS, Windows and Linux, and in Docker.
  • It reaches almost any provider through presets or a custom compatible endpoint, including local servers.
  • One endpoint serves many agents, so changing a provider doesn’t mean editing each agent’s settings.
  • Credential pools, key rotation, retries and fallback chains keep long sessions going through rate limits and outages.
  • Logs show the provider, model, credential, latency, tokens and estimated cost of each request.

Where it gets hard

  • You choose the models and write the rules. CCR applies what you set and doesn’t judge how hard a request is on its own.
  • Each provider needs its own account and key, and you pay and track each one separately.
  • The gateway has to be running while you work, or most agent profiles can’t connect.
  • Claude Code and Codex are built around their own models’ tools. CCR converts tool calls for other models, and how well each model handles them varies, so test a model before you rely on it.
  • Version 3 changed the config format and commands, so many tutorials no longer match what you install.
  • Reaching it from another machine takes care: the management URL carries a token to treat as a password, and the Docker guide says to keep the UI off untrusted networks.

How Auto differs

Auto does a similar job for every coding agent you use. It picks the model for each turn, and you add rules only where you want them.

Nothing to configure

Auto is a Mac app. You sign in, sign in to your plans, allow Accessibility and click Enable for each app. Enabling adds Auto to Codex’s config.toml and Claude Code’s settings.json after saving a copy of each file, and Auto appears in the model picker you already use. There are no provider accounts, keys or endpoints to set up.

It picks the model for each turn

Your own rules go first, written in plain English, such as “Use Claude Opus 5.5 for UI work.” Otherwise Auto works out how hard the turn is and only considers models that clear the quality bar for it. Hard work goes to the strongest model your plans cover, and quick work goes to the model that costs you least. Every turn shows its model, what it cost and why. How AutoRouter picks a model has the full order.

It uses the plans you already pay for

In Codex, OpenAI models run on your ChatGPT plan; in Claude Code, Claude models run on your Claude plan. Auto gives those plans the work that needs them, so they last longer, and adds models from other providers for the rest. A subscription isn’t required: Pro gives every model, with usage included each month.

What it costs and what it can’t do yet

Routing across your plans is free. Paid models bill at the provider’s price plus 10%, which is how Auto earns. It runs only on macOS 14 or later and is in beta. It sometimes misjudges how hard a task is, and it has no published benchmarks yet. Requests pass through Auto’s servers on their way to each provider; see privacy for what is kept.

Which one to choose

Choose Claude Code Router if you’re on Windows or Linux, want requests to go from your machine to providers you pick, or like tuning rules and fallbacks yourself.

Choose Auto if you’re on a Mac, work in coding agents (Claude Code, Codex, Cursor, etc.) and want a model picked for each turn with your plans used first and nothing to maintain. For more options, read Model routers for Claude Code and Codex, compared.

Setup, side by side

The steps each one’s own docs give, as of November 16, 2026.

Claude Code Router

  1. Install Download the desktop app, or run npm install -g @musistudio/claude-code-router and ccr ui.
  2. Add providers In Providers, add each provider with its key and models, or import a local Claude Code or Codex sign-in.
  3. Start the gateway In Server, click Start. It listens on 127.0.0.1:3456.
  4. Connect your agent In Agent Config, pick the agent and model and apply the profile, or launch it with ccr "Profile name".
  5. Add rules In Routing, add conditions, rewrites and fallback models.

Auto

  1. Download Auto for macOS, signed and notarized by Apple.
  2. Sign in Sign in or create a free account, then sign in to your plans.
  3. Enable your apps Allow Accessibility and click Enable for each coding agent you use.
  4. Pick Auto In a new session, choose AutoRouter from Codex’s model menu, or with /model in Claude Code.

Questions

What people ask about Claude Code Router.

What is Claude Code Router?

An open-source, MIT-licensed gateway by musistudio that runs on your machine. It gives Claude Code, Codex and other coding agents one local endpoint and sends each request to the provider and model your profiles and rules choose.

Is Claude Code Router free?

Yes. The project is free and open source, and its README lists no price. You pay the providers whose keys you add, at their own prices.

Is Claude Code Router safe?

Its code is open source, so anyone can read it. It listens on 127.0.0.1 by default, so only your machine can reach it, and requests go from there to the providers you add. The docs say to treat the management URL as a password, because it carries an access token, and to keep the management UI off untrusted networks. Your provider keys are stored on your machine, so protect it as you would any place that holds keys.

Does Claude Code Router work with Codex?

Yes. Version 3 has profiles for the Codex CLI and app, and it converts Codex’s apply_patch tool so models outside GPT can edit files. Auto also works with the Codex app and CLI.

Does Claude Code Router use my Claude subscription?

It can. CCR’s provider docs describe importing a local Claude Code or Codex sign-in as a provider that reuses that sign-in, alongside API keys. Auto uses your Claude plan in Claude Code and your ChatGPT plan in Codex first, before any paid model.

What happened to config.json and ccr code?

Version 3 keeps settings in ~/.claude-code-router/config.sqlite and manages them in the app or with ccr ui. Agents launch from Agent Config profiles, or with ccr <profile>. The config.json with a Router block and ccr code come from the version 2 README.

Why isn’t Claude Code Router using the model I picked?

Its built-in Claude Code route only applies when the client hasn’t picked a model CCR recognizes, and custom rules run in order, so an earlier match wins. Open Logs and compare the request model with the resolved provider and model to see which rule fired.

Can Claude Code Router run local models?

Yes, through a custom endpoint that speaks the OpenAI, Anthropic or Gemini API, which many local model servers offer. The version 2 README’s example config routes background tasks to an Ollama model.

How is Auto different from Claude Code Router?

CCR sends requests where your profiles and rules say, using providers and keys you add. AutoRouter picks a model for each turn after your own rules, uses your plans first, and needs no keys or server. CCR runs on macOS, Windows and Linux; Auto runs on macOS 14 or later.

How do I move over from Claude Code Router?

Install Auto, sign in to your plans and click Enable for each coding agent you use. Rewrite any CCR rules you rely on as plain-English rules in Auto, such as “Use Claude Opus 5.5 for UI work.” Each turn then shows the model it used and what it cost. Disabling an app in Auto’s settings switches it back.

What does Auto cost?

Routing across your plans is free. Pro adds every other model with usage included each month, and paid models bill at the provider’s price plus 10%. See pricing, or estimate a month with and without Auto in the savings calculator.

Switch from Claude Code Router

Install the Mac app, sign in to your plans and click Enable.

Download Auto for Mac