Skip to content

Claude Code Router

Local gateway that routes Claude Code, Codex and other agents to any model provider, with fallbacks, key pools and cost logs.

Reviewed by Sheela · Updated

View on GitHub Open source

Our rating

4.0/5

A capable local switchboard for running coding agents on cheaper models, as long as you accept that Anthropic will not support the result and the edits will be worse.

What it is

Claude Code Router (CCR) runs a local gateway that coding agents talk to instead of a provider's API. Behind it you configure providers such as OpenAI, Gemini, OpenRouter, DeepSeek, Moonshot, Z.AI and Mistral, plus routing rules, retries, fallback models and key rotation.

It started as a way to run Claude Code on other models and now also fronts Codex, OpenCode, Kimi CLI, Grok CLI, Kilo Code and others. It ships as an Electron desktop app, an npm CLI (Node.js 22 or newer) or Docker. The gateway listens on 127.0.0.1:3456 and logs route, latency, tokens and estimated cost per request.

It is a largely one-maintainer project funded by donations; v3.1.3 shipped on 9 October 2026.

Our review

CCR does what it promises: one local endpoint that any of ten agents can point at, with the provider, model and fallback chain chosen behind it. With about 37,800 GitHub stars it is the most adopted self-hosted router for Claude Code, and v3.1.3 on 9 October 2026 added a model catalogue that refreshes hourly from the project's CDN.

The money argument is real. Anthropic lists Claude Sonnet 5.5 at $2 per million input tokens and $10 per million output; DeepSeek lists V4.1 Flash at $0.15 and $0.60 off-peak. A long agent session that reads 2 million tokens and writes 100,000 costs about $5 on Sonnet and under $0.40 on Flash before caching. Routing only background and summarisation calls to the cheap model keeps most of that saving.

The catch is quality and support. Claude Code's prompts and edit format are tuned for Claude, and community guides report more failed edits on DeepSeek, Qwen or GLM. Anthropic's gateway docs say plainly that it does not support routing Claude Code to non-Claude models through any gateway, and that a gateway which fails to forward new request features breaks them, so every Claude Code release is a chance for something to stop working.

Security deserves more thought than a local tool usually gets. CCR holds every provider key, can import browser login state, and its Docker guide notes that the default 3458 port mapping listens on every interface. An August 2025 advisory showed a CORS flaw that could leak keys to other websites, fixed in v1.0.34. With 1,159 open issues and pull requests against one main maintainer, it is a tool for an individual's laptop more than a company rollout, where LiteLLM or Anthropic's own gateway offer audit logs and per-user credentials.

Where it earns its place

  • A freelance developer paying for Claude Code API usage out of pocket

    Cut the token bill on long refactoring sessions

    Route background and long-context requests to DeepSeek V4.1 Flash at $0.15 per million input tokens off-peak and keep the main model on Claude. Savings can be over 90% on routed calls, at the cost of more failed edits when the cheap model handles real changes.

  • An engineer at a defence contractor with an air-gapped workstation

    Use Claude Code's interface with a local model so no code leaves the machine

    Point a custom provider at a local OpenAI-compatible server such as Ollama or vLLM and apply the Claude Code profile. Nothing is billed, but the hourly model-catalogue refresh from models.ccrdesk.top should be expected to fail offline, and edit quality depends entirely on the local model.

  • A team lead trialling several agents across five developers

    Compare Codex, OpenCode and Claude Code on the same providers without reconfiguring each machine

    One CCR instance holds the keys and issues each developer a CCR client key with token limits; logs show cost per request. Fine for a trial, but there is no SSO or central audit trail, which a company-wide rollout would need.

Before you commit

Setup
Download the desktop app for macOS, Windows or Linux, or npm install -g @musistudio/claude-code-router (Node.js 22+) and run ccr ui. Add a provider and key, start the server on 127.0.0.1:3456, then apply an agent profile; minutes to a first routed request.
Integrations
Agents: Claude Code, Claude Design, Codex, Grok CLI, Kimi CLI, Kilo Code, OpenCode, Pi, ZCode and WorkBuddy. Protocols: OpenAI Chat and Responses, Anthropic Messages, Gemini, plus presets for OpenRouter, DeepSeek, SiliconFlow, Moonshot, Mistral, Z.AI and Bailian. Adds web search, MCP tools and vision to models that lack them.
Data and privacy
Prompts go to whichever provider you route to, under that provider's retention terms. CCR stores provider keys, client keys and request logs in local SQLite files, and fetches its model catalogue from models.ccrdesk.top at start-up and hourly. One published advisory: a CORS misconfiguration that could expose keys, fixed in v1.0.34.
Cost at scale
Free under MIT; you pay providers directly. Claude Sonnet 5.5 is $2/$10 per million input/output tokens against $0.15/$0.60 for DeepSeek V4.1 Flash off-peak, so the saving depends on how many requests you dare route away from Claude.
Limits
Unsupported by Anthropic, and Claude Code updates can break pass-through until CCR catches up. 1,159 open issues and pull requests, many about specific providers' parameters. Stacking CCR behind another proxy makes failures hard to trace.

What's good

  • Ten agents and a dozen provider protocols behind one endpoint
  • Fallbacks, retries and credential pools
  • Per-request cost, token and latency logs
  • Client keys with expiry and token limits

What's not

  • Anthropic does not support non-Claude routing
  • Non-Claude models fail more Claude Code edits
  • Docker default port listens on all interfaces
  • 1,159 open issues for a mostly single-maintainer project

Best for

Developers who want to run Claude Code or other agents on cheaper or local models.

Alternatives

Claude Code Router: common questions

Is Claude Code Router worth it?
A capable local switchboard for running coding agents on cheaper models, as long as you accept that Anthropic will not support the result and the edits will be worse. We rate it 4.0 out of 5.
How much does Claude Code Router cost?
Free and open source (MIT). You pay each model provider you route to.
What are the downsides of Claude Code Router?
Anthropic does not support non-Claude routing; non-Claude models fail more Claude Code edits; docker default port listens on all interfaces; 1,159 open issues for a mostly single-maintainer project.
Who is Claude Code Router best for?
Developers who want to run Claude Code or other agents on cheaper or local models.
How much does Claude Code Router cost for a team or in production?
Free under MIT; you pay providers directly. Claude Sonnet 5.5 is $2/$10 per million input/output tokens against $0.15/$0.60 for DeepSeek V4.1 Flash off-peak, so the saving depends on how many requests you dare route away from Claude.
Is Claude Code Router safe for company data?
Prompts go to whichever provider you route to, under that provider's retention terms. CCR stores provider keys, client keys and request logs in local SQLite files, and fetches its model catalogue from models.ccrdesk.top at start-up and hourly. One published advisory: a CORS misconfiguration that could expose keys, fixed in v1.0.34.
What are the best Claude Code Router alternatives?
The closest alternatives we have reviewed are ccusage, Codex plugin for Claude Code and rtk (Rust Token Killer).

Answers checked Oct 23, 2026.

Make Claude Code Router? Show this rating on your siteClaude Code Router rated 4.0 out of 5 on ReviewRamble