Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< 返回工具列表
C

claude-code-router

> 编程语言
开源

One local control plane for every AI agent: route across models, fuse new capabilities, orchestrate tools, and stay fully in control.

36.3K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

One local control plane for every AI agent: route across models, fuse new capabilities, orchestrate tools, and stay fully in control.

## 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, Kilo Code, OpenCode, Pi, ZCode, WorkBuddy, 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. Supported Agents ## Quick Start ### Desktop app (recommended) 1. Download Claude Code Router for macOS, Windows, or Linux, then launch the app. 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, Kilo Code, OpenCode, Pi, ZCode, or WorkBuddy, 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](https://ccrdesk.top/en/guides/docker/) before exposing CCR remotely. ## Build desktop apps Install Node.js 22+, then run `npm ci`. | Target | Command | Output | | --- | --- | --- | | macOS local DMG/ZIP | `npm run build:app:mac` | `release-local/` | | Windows local NSIS installer | `npm run build:app:win` | `release-local/` | Windows app packaging must run on Windows x64 because `better-sqlite3` ships a native Electron module. The release workflow builds macOS on macOS runners and Windows on `windows-latest` when a `v*` tag is pushed. ## How it works ```text Claude Code · Claude Design · Codex · Grok CLI · Kimi CLI · Kilo Code · OpenCode · Pi · ZCode · WorkBuddy · Compatible API clients │ ▼ Claude Code Router :3456 Profiles · Routing · Credentials · Tools · Logs │ ▼ Selected provider, model, and account ``` ## Core capabilities | Area | Highlights | | --- | --- | | **Agents** | Profiles for Claude Code, Claude Design, Codex, Grok CLI, Kimi CLI, Kilo Code, OpenCode, Pi, ZCode, and WorkBuddy; model overrides; scopes; environment settings; CLI and app launch entries; multi-instance workflows | | **Providers** | Presets and custom endpoints; protocol probing; model discovery; connectivity checks; local login import where supported; single keys and credential pools | | **Models & routing** | Searchable catalog; model descriptions for task selection; conditions on headers and bodies; prefixes; rewrites; retries; ordered fallbacks | | **Tools & extensions** | Fusion models; ToolHub; built-in browser automation; Chrome login-state import; wrapper and core gateway plugins; local routes and virtual models | | **Access & quotas** | Separate CCR client keys with expiration and local request, token, and image limits | | **Observability** | Request and response details; resolved provider, model, and credential; status; latency; tokens; estimated cost; tool calls; agent traces | | **AgentClaw** | Agent relay through Weixin iLink, WeCom, Slack, Discord, Telegram, LINE, Feishu, and DingTalk | ## Go deeper when you are ready The complete documentation lives at **[ccrdesk.top](https://ccrdesk.top/)**. - [Install and launch CCR](https://ccrdesk.top/en/guides/install/) - [Configure providers](https://ccrdesk.top/en/guides/provider/) - [Explore routing and configuration](https://ccrdesk.top/en/configuration/) - [Use the CLI](https://ccrdesk.top/en/guides/cli/) - [Deploy with Docker](https://ccrdesk.top/en/guides/docker/) - [Troubleshoot common issues](https://ccrdesk.top/en/troubleshooting/) ## Support & Sponsoring ### Our Sponsors ## License This project is licensed under the [MIT License](LICENSE).

GitHub Issues· 1131 开放

在 GitHub 查看全部
  • #1806

    [Bug] Request log rows are never written for streaming requests routed through a fusion model — Observability dashboard stays empty

    更新于 2026年9月17日
  • #1801

    3.1.0版本不管请求成不成功,都是红色无状态

    更新于 2026年9月17日
  • #1667

    macOS: auto-update always fails — app bundled adhoc-signed (no Developer ID / notarization)

    更新于 2026年9月16日
  • #1804

    [Bug] v3.1.0 model-chain fallback never switches the upstream provider — all retry attempts are re-sent to the dead primary

    更新于 2026年9月16日
  • #1803

    Gateway health check still probes Anthropic when a non-Anthropic model is selected

    更新于 2026年9月16日
  • #1798

    claude sessions write autoMode:true into profile settings; CCR syncs it into the config store and rewrites it into settings.json on every launch, which makes Claude Code ignore apiKeyHelper ("Not logged in")

    更新于 2026年9月16日
  • #1747

    About Token Plan/关于Token Plan

    更新于 2026年9月15日
  • #1800

    [Bug] Dashboard Activity (token heatmap) widget: bottom rows clipped at wide widget sizes

    更新于 2026年9月15日
  • #1799

    Gateway masks upstream context-length errors, breaking Claude Code auto-retry/compact ("All target providers failed")

    更新于 2026年9月15日
  • #1797

    Wrapper cmd double-escapes env values: Ec() escapes for unquoted set, but ce() emits quoted set "KEY=..." so carets/%% survive into the child env (model names with () arrive as ^(self hosted^))

    更新于 2026年9月14日

核心特点

  • •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.
  • •Install and launch CCR
  • •Configure providers
  • •Explore routing and configuration
  • •Use the CLI
  • •Deploy with Docker

> 标签

TypeScript

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言