All guides

MODELSYou commented this keyword

Claude Code Router

A desktop app that sits between Claude Code and the AI providers you choose, so you can switch models, add fallbacks and see every request.

Before you start:
  • Claude Code
  • An API key from at least one model provider
Setup
10 min
Level
Intermediate
Stars
37.6k
License
MIT

What it does

Claude Code Router (CCR) is a local gateway: a small server on your computer that your coding agent talks to instead of talking to one AI company directly. You add the providers you want, such as OpenRouter, DeepSeek, Gemini, Kimi or Mistral, and CCR sends each request where you tell it.

You can switch models without editing config files, set fallback models and retries, and see logs with tokens, latency and cost estimates. It works with Claude Code, Codex, OpenCode and several other agents.

Install it

  1. Download the Claude Code Router desktop app for Windows, macOS or Linux from the Releases page, then launch it.
  2. Open Providers, then Add Provider. Pick a preset or a custom endpoint, enter your API key, choose the protocol and models, and save.
  3. Open Server and click Start. The gateway runs at http://127.0.0.1:3456.
  4. Open Agent Config, choose Claude Code, select a model and apply the profile.

Or use the command-line version

Terminal
npm install -g @musistudio/claude-code-router
ccr ui

Use it

  1. Start Claude Code as normal. Its requests now go through CCR.
  2. Open Logs in the app to check which provider and model handled each request, plus tokens, latency and errors.
  3. Open Routing to add conditions, retries or fallback models.

Good to know

The command-line version needs Node.js 22 or newer. After ccr ui, open http://127.0.0.1:3458 and follow the same Providers, Server and Agent Profiles steps. You pay each provider directly for the models you use.

Links

Want the next one first?

One new guide a week, straight to your inbox.

More like this