One local control plane for every AI agent: route across models, fuse new capabilities, orchestrate tools, and stay fully in control.
Claude Code Router is a TypeScript proxy layer that sits between Claude Code and any backend model provider, intercepting API requests and forwarding them to whichever model the developer specifies. Rather than locking Claude Code to Anthropic's own models, it supports providers including OpenRouter, DeepSeek, Ollama, Gemini, Volcengine, and SiliconFlow, with routing rules defined in a JSON config file. Developers can assign different models to different task types, such as background tasks, long-context work, or reasoning, and switch models mid-session using Claude Code's `/model` command. A `ccr model` CLI command handles provider and model management from the terminal. Request and response transformation is handled via a plugin system, letting developers adapt payloads for provider-specific API formats. GitHub Actions integration allows Claude Code tasks to run in CI pipelines by enabling a non-interactive mode. The project targets developers who want to use Claude Code's interface and update path while controlling costs or model selection through third-party providers.
Router that redirects Claude Code requests to alternative models (OpenRouter, DeepSeek, Ollama, GLM).
- ✓Open-source license (MIT)
- ✓Healthy fork ratio
- ✓Clear description
- ✓Mature repo (>1y old)
- ✓Documented (README)
- !Many open issues + slow updates
git clone https://github.com/musistudio/claude-code-router && cp claude-code-router/*.md ~/.claude/agents/Resumen de Subagents
<div align="center">
<table width="100%">
<tr>
<td align="center">
<a href="https://www.kimi.com/code?aff=ccr">
<img src="https://gcdn.moonshot.cn/growth-cdn/sponsor/kimi-en.png" width="960" alt="Kimi K2.7 Code sponsor banner" />
</a>
<br />
<sub>
<a href="https://www.kimi.com/code?aff=ccr"><strong>Kimi Code Subscription</strong></a>
·
<a href="https://platform.kimi.ai?aff=ccr"><strong>API Global</strong></a>
·
<a href="https://platform.kimi.com?aff=ccr">API China</a>
</sub>
</td>
</tr>
<tr>
<td align="left">
<p>
<strong>Thanks to Kimi for sponsoring this project!</strong> Kimi K3 is Moonshot AI's most capable model and the world's first open 3T-class model. With 2.8 trillion parameters, native vision, and a 1-million-token context window, K3 delivers frontier performance across long-horizon coding, knowledge work, and reasoning. Inside CCR, Kimi ships as a built-in provider preset: import the pay-as-you-go API or Kimi Code subscription in one click and route your coding agent's requests to Kimi. The subscription endpoint passes through natively without protocol conversion, API endpoints are adapted automatically, and account balance and subscription usage are visible in the CCR dashboard.
</p>
<p align="center">
CCR already includes Kimi provider presets. Visit the Kimi Open Platform (<a href="https://platform.kimi.com?aff=ccr">中文站</a> | <a href="https://platform.kimi.ai?aff=ccr">Global</a>) to try the API, or explore the <a href="https://www.kimi.com/code?aff=ccr">Kimi Code subscription</a>.
</p>
</td>
</tr>
</table>
</div>
<div align="center">
# Claude Code Router
### Manage every agent and provider from one place.
Connect Claude Code, Claude Design, Codex, Grok CLI, Kimi CLI, OpenCode, Pi, ZCode, and compatible API clients to the providers you choose—then route, fail over, extend, and observe every request from one app.
<p>
<a href="https://github.com/musistudio/claude-code-router/releases"><img alt="Download Desktop" src="https://img.shields.io/badge/Download-Desktop_App-2563EB?style=for-the-badge&logo=github&logoColor=white" /></a>
<a href="#quick-start"><img alt="Quick Start" src="https://img.shields.io/badge/Get_Started-Quick_Start-16A34A?style=for-the-badge&logo=rocket&logoColor=white" /></a>
<a href="https://ccrdesk.top/"><img alt="Read the Docs" src="https://img.shields.io/badge/Explore-Documentation-0F172A?style=for-the-badge&logo=readthedocs&logoColor=white" /></a>
</p>
<p>
<a href="README_zh.md"><img alt="Chinese README" src="https://img.shields.io/badge/%F0%9F%87%A8%F0%9F%87%B3-%E4%B8%AD%E6%96%87%E7%89%88-ff0000?style=flat" /></a>
<a href="https://discord.gg/rdftVMaUcS"><img alt="Discord" src="https://img.shields.io/badge/Discord-%235865F2.svg?&logo=discord&logoColor=white" /></a>
<a href="https://x.com/musistudio2026"><img alt="X" src="https://img.shields.io/badge/X-@musistudio2026-000000?logo=x&logoColor=white" /></a>
<a href="https://github.com/musistudio/claude-code-router/blob/main/LICENSE"><img alt="License" src="https://img.shields.io/github/license/musistudio/claude-code-router" /></a>
</p>
<br />
<img src="blog/images/claude-code-router.png" width="820" alt="Claude Code Router Desktop dashboard" />
</div>
## Why use Claude Code Router?
Claude Code Router (CCR) is a local model gateway and control plane for coding agents. It gives Claude Code, Claude Design, Codex, Grok CLI, Kimi CLI, OpenCode, Pi, ZCode, and compatible API clients **one stable local endpoint**, while you manage the providers, models, accounts, routing rules, and tools behind it from one place.
Use CCR to:
- **Manage all agents and providers together** instead of maintaining a separate model configuration for every client.
- **Switch providers or models without changing your workflow** or repeatedly editing agent configuration files.
- **Keep requests running** with retries, credential pools, key rotation, and ordered fallback models.
- **Add capabilities to existing models** with Fusion vision, web search, MCP tools, and ToolHub.
- **See what actually happened** through request logs, resolved routes, latency, token usage, cost estimates, and account status.
CCR supports OpenAI Chat / Responses, Anthropic Messages, Gemini Generate Content / Interactions, OpenRouter, DeepSeek, SiliconFlow, Moonshot, Kimi Code, Mistral, Z.AI, Bailian, and custom compatible providers.
<details open>
<summary><strong>Supported Agents</strong></summary>
<div align="center">
<table width="100%">
<tr>
<td align="center" width="330">
<a href="https://github.com/anthropics/claude-code">
<img src="/packages/ui/src/assets/agent-logos/claude-code.png" width="44" height="44" alt="Claude Code logo" />
<br />
<strong>Claude Code (CLI & APP)</strong>
</a>
</td>
<td align="center" width="330">
<a href="https://github.com/openai/codex">
<img src="/packages/ui/src/assets/agent-logos/codex.png" width="44" height="44" alt="Codex logo" />
<br />
<strong>Codex (CLI & APP)</strong>
</a>
</td>
<td align="center" width="330">
<a href="https://github.com/xai-org/grok-build">
<img src="/packages/ui/src/assets/agent-logos/grok.ico" width="44" height="44" alt="Grok CLI logo" />
<br />
<strong>Grok CLI (CLI)</strong>
</a>
</td>
<td align="center" width="330">
<a href="https://github.com/MoonshotAI/kimi-cli">
<img src="/docs/public/provider-icons/moonshot.ico" width="44" height="44" alt="Kimi CLI logo" />
<br />
<strong>Kimi CLI (CLI)</strong>
</a>
</td>
</tr>
<tr>
<td align="center" width="330">
<a href="https://github.com/anomalyco/opencode">
<img src="/packages/ui/src/assets/agent-logos/opencode.ico" width="44" height="44" alt="OpenCode logo" />
<br />
<strong>OpenCode (CLI & APP)</strong>
</a>
</td>
<td align="center" width="330">
<a href="https://github.com/earendil-works/pi">
<img src="/packages/ui/src/assets/agent-logos/pi.svg" width="44" height="44" alt="Pi logo" />
<br />
<strong>Pi (CLI)</strong>
</a>
</td>
<td align="center" width="330">
<a href="https://zcode.z.ai/en">
<img src="/packages/ui/src/assets/agent-logos/zcode.png" width="44" height="44" alt="ZCode logo" />
<br />
<strong>ZCode (APP)</strong>
</a>
</td>
<td align="center" width="330">
<a href="https://www.anthropic.com/news/claude-design-anthropic-labs">
<img src="/packages/ui/src/assets/agent-logos/claude-code.png" width="44" height="44" alt="Claude Design logo" />
<br />
<strong>Claude Design (APP)</strong>
</a>
</td>
</tr>
</table>
</div>
</details>
## Quick Start
### Desktop app (recommended)
1. <details open>
<summary><strong>Download Claude Code Router for macOS, Windows, or Linux, then launch the app.</strong></summary>
<div align="center">
<table width="100%">
<tr>
<td align="center" width="330">
<a href="https://github.com/musistudio/claude-code-router/releases/download/v3.0.16/Claude-Code-Router_3.0.16.exe">
<img src="/docs/public/platform-icons/windows.png" width="44" height="44" alt="Windows logo" />
<br />
<strong>Windows</strong>
</a>
</td>
<td align="center" width="330">
<a href="https://github.com/musistudio/claude-code-router/releases/download/v3.0.16/Claude-Code-Router_3.0.16.AppImage">
<img src="/docs/public/platform-icons/linux.png" width="44" height="44" alt="Linux logo" />
<br />
<strong>Linux</strong>
</a>
</td>
<td align="center" width="330">
<a href="https://github.com/musistudio/claude-code-router/releases/download/v3.0.16/Claude-Code-Router_3.0.16-mac-Apple-Silicon-arm64.dmg">
<img src="/docs/public/platform-icons/macos.png" width="44" height="44" alt="macOS logo" />
<br />
<strong>macOS (Apple Silicon)</strong>
</a>
</td>
<td align="center" width="330">
<a href="https://github.com/musistudio/claude-code-router/releases/download/v3.0.16/Claude-Code-Router_3.0.16-mac-Intel-x64.dmg">
<img src="/docs/public/platform-icons/macos.png" width="44" height="44" alt="macOS logo" />
<br />
<strong>macOS (Intel)</strong>
</a>
</td>
</tr>
</table>
</div>
</details>
2. Open **Providers → Add Provider**. Choose a built-in preset or a custom endpoint, enter the API key, select the protocol and models, then save.
3. Open **Server** and click **Start**. The local model gateway listens on `http://127.0.0.1:3456` by default.
4. Open **Agent Config**, choose Claude Code, Claude Design, Codex, Grok CLI, Kimi CLI, OpenCode, Pi, or ZCode, select a model, and apply the profile.
5. Start using your agent. Open **Logs** to confirm the resolved provider, model, status, tokens, latency, and errors.
Your agent is now connected to CCR. To add conditions, retries, request rewrites, or fallback models, open **Routing**.
### CLI
The npm CLI requires Node.js 22 or newer. It starts the same gateway and a browser-based management UI without Electron:
```sh
npm install -g @musistudio/claude-code-router
ccr ui
```
Open `http://127.0.0.1:3458`, then follow the same **Providers → Server → Agent Profiles** flow above. The model gateway remains at `http://127.0.0.1:3456`. See the [CLI reference](https://ccrdesk.top/en/guides/cli/) for service modes, authentication, and profile commands.
### Docker
```sh
docker compose up -d --build
```
Docker exposes the management UI and gateway routes through `http://127.0.0.1:3458` by default. Read the [Docker deployment guide]Lo que la gente pregunta sobre claude-code-router
¿Qué es musistudio/claude-code-router?
+
musistudio/claude-code-router es subagents para el ecosistema de Claude AI. One local control plane for every AI agent: route across models, fuse new capabilities, orchestrate tools, and stay fully in control. Tiene 36.2k estrellas en GitHub y se actualizó por última vez today.
¿Cómo se instala claude-code-router?
+
Puedes instalar claude-code-router clonando el repositorio (https://github.com/musistudio/claude-code-router) o siguiendo las instrucciones del README en GitHub. ClaudeWave también te ofrece bloques de instalación rápida en esta misma página.
¿Es seguro usar musistudio/claude-code-router?
+
Nuestro agente de seguridad ha analizado musistudio/claude-code-router y le ha asignado un Trust Score de 77/100 (tier: Trusted). Revisa el desglose completo de comprobaciones superadas y flags en esta página.
¿Quién mantiene musistudio/claude-code-router?
+
musistudio/claude-code-router es mantenido por musistudio. La última actividad registrada en GitHub es de today, con 1036 issues abiertos.
¿Hay alternativas a claude-code-router?
+
Sí. En ClaudeWave puedes explorar subagents similares en /categories/agents, ordenados por popularidad o actividad reciente.
Despliega claude-code-router en tu cloud
Lleva este repo a producción en minutos. Cada plataforma genera su propio entorno con variables de entorno editables.
¿Mantienes este repo? Añade un badge a tu README
Pega el badge en tu README de GitHub para mostrar que está auditado por ClaudeWave. Cada badge enlaza de vuelta a esta página y muestra el Trust Score actual.
[](https://claudewave.com/repo/musistudio-claude-code-router)<a href="https://claudewave.com/repo/musistudio-claude-code-router"><img src="https://claudewave.com/api/badge/musistudio-claude-code-router" alt="Featured on ClaudeWave: musistudio/claude-code-router" width="320" height="64" /></a>Más Subagents
The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
The agent that grows with you
Java 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
The agent engineering platform.
Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local deterministic AST parsing, every edge explained, no vector store.