codemux CodeMux App

Claude Code Router

Claude Code Router (CCR) lets you keep the Claude Code interface while sending requests to another model provider. For the same example workload, DeepSeek Flash costs $0.46 off-peak and Claude Sonnet 5.5 costs $7.40 at the direct API rate. Your model provider bills the routed requests.

✓ Matches official pageChecked Dec 5, 2026

How to connect Claude Code to DeepSeek

  1. Install Claude Code and use Node.js 22 or newer for the CCR CLI. Run npm install -g @musistudio/claude-code-router, then ccr ui. The CLI management page normally opens on port 3458. The model gateway normally runs on 127.0.0.1:3456.
  2. In Providers → Add Provider, add DeepSeek. For the Anthropic Messages protocol, use https://api.deepseek.com/anthropic and add your provider API key. Select deepseek-flash as the first test model. Keep keys in the local credential settings and keep the gateway on loopback for this setup.
  3. In Agent Config, add a Claude Code profile. Choose the DeepSeek provider/model you added. Limit its scope to launches from CCR, save the profile and run the command shown in its card, such as ccr "Claude - DeepSeek" if that is the profile name.

For a single backend, DeepSeek also documents a direct Claude Code setup through its Anthropic-compatible endpoint. CCR is useful if you want separate profiles or routing rules for several providers.

How much does Claude Code Router cost to run?

These are direct provider API estimates for 1 million uncached input tokens, 4 million cache-read tokens and 500,000 billable output tokens across multiple requests. Cache writes, tool charges and any third-party gateway fees are extra.

BackendOff-peak or standardDeepSeek peak
DeepSeek V4.1 Flash$0.46$0.92
DeepSeek V4 Pro$1.74$3.48
Claude Sonnet 5.5$7.40—
Claude Opus 5.5$14.80—

This comparison holds token usage constant. A model that needs another attempt, misses the cache, or routes a request to a higher-priced fallback can cost more than the table suggests. Claude subscription allowances do not pay another provider’s API bill.

How to verify which model handled the request

Start with a small test repository and ask Claude Code to explain one function. Check CCR’s request log for the resolved provider, model and usage. Then try a harmless edit and a unit test to check tool calls. If no request appears, launch the enabled profile through CCR and confirm the provider/model is available before adding a fallback.

If you prefer to choose models inside one coding app, CodeMux is the separate pay-as-you-go tool we build. It runs its own coding workflow and has its own billing.

Sources

Source figures reviewed on .

Related guides