本地运行的大模型聚合网关,GUI桌面端app,零代码部署,把Coding Plan、大模型 API 额度聚合成一个虚拟 Plan,一键接入 Claude Code、Claude Desktop App、OpenClaw、OpenCode 等工具。Bundle your scattered Token Plan, Coding Plan, and LLM API quotas into a single virtual Plan, and plug it into Claude Code, Claude Desktop App, OpenClaw, OpenCode, and more.
$ npx -y skills add finch-xu/cc-router --agent claude-code
Repo: finch-xu/cc-router
What's inside
本地运行的大模型聚合网关,GUI桌面端app,零代码部署,把零散的 Token Plan、Coding Plan、大模型 API 额度聚合成一个虚拟 Plan,一键接入 Claude Code、Claude Desktop App、OpenClaw、OpenCode、Codex 等工具 —— 省钱!省 Token!完全本地运行!
注意⚠️ 本工具仅限于自动切换订阅套餐,请求体几乎完全透传,不涉及逆向、不涉及破解等操作。用户需自行遵守每个编程套餐的使用规则。此工具只能用于 Claude Code 等编程工具,切勿用于其他用途。
各家 provider 的 ToS 不一定明确允许"订阅 Key 接第三方代理 + 多虚拟模型混调度"的用法,尤其是 Coding Plan / Token Plan 这类 per-seat 订阅,可能触发风控。因使用本工具导致账号被限速、被封禁、订阅被取消的,作者不承担任何责任。
本软件按 As-Is 提供,不对任何因使用造成的直接或间接损失负责,包括但不限于额度异常消耗、数据丢失、业务中断。
架构与请求走向一览:
Claude Code OpenCode OpenClaw pi ... Codex ... Open WebUI / Cherry Studio ...
| | | | | |
------------------------------------- | |
| | |
Anthropic OpenAI OpenAI
Messages API Responses API Chat Completions API
(/v1/messages) (/v1/responses) (/v1/chat/completions)
| | |
-------------------------------------------------------
| 入口 · 虚拟模型
|
cc-router
(本地 127.0.0.1:23456)
|
| 出口 · 真实模型
-----------------------------------------------------------------------------
| | | | | | |
DeepSeek GLM Kimi Anthropic OpenAI Gemini ......
API Coding Coding Messages Responses & API
Plan Plan API Completions
功能亮点:
model-opus / claude-opus-4-7 / anthropic/model-opus / anthropic/claude-opus-4-7 都路由到同一虚拟模型,工具用什么命名都不挑下方这些 AI Agent / Coding Agent 工具都能接入 cc-router,用上你手里的全部大模型 Plan:
| 系统 | 架构 | 安装包 | 下载 |
|---|---|---|---|
| macOS | Apple Silicon | cc-router_macOS-arm64.dmg | 全球下载 · 中国下载 |
| macOS | Intel | cc-router_macOS-x64.dmg | 全球下载 · 中国下载 |
| Windows | x64 | cc-router_windows-x64-setup.exe | 全球下载 · 中国下载 |
| Windows | x64 (MSI) | cc-router_windows-x64.msi | 全球下载 · 中国下载 |
| Windows | arm64 | cc-router_windows-arm64-setup.exe | 全球下载 · 中国下载 |
| Linux | x64 | cc-router_linux-x64.AppImage | 全球下载 · 中国下载 |
| Linux | x64 | cc-router_linux-x64.deb | 全球下载 · 中国下载 |
| Linux | arm64 | cc-router_linux-arm64.AppImage | 全球下载 · 中国下载 |
| Linux | arm64 | cc-router_linux-arm64.deb | 全球下载 · 中国下载 |
两个地址内容完全相同,中国大陆用户选「中国下载」更快。链接始终指向最新版本,历史版本见 Releases。Linux 推荐 AppImage,支持应用内自动更新;deb 需手动重新下载升级。
{
"env": {
"ANTHROPIC_BASE_URL": "http://127.0.0.1:23456",
"ANTHROPIC_AUTH_TOKEN": "your token, show in this app settings",
"API_TIMEOUT_MS": "3000000",
"ANTHROPIC_MODEL": "model-fable",
"ANTHROPIC_DEFAULT_FABLE_MODEL": "model-fable",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "model-opus",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "model-sonnet",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "model-haiku",
"CLAUDE_CODE_SUBAGENT_MODEL": "model-opus",
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1",
"CLAUDE_CODE_DISABLE_NONSTREAMING_FALLBACK": "1",
"CLAUDE_CODE_ATTRIBUTION_HEADER": "0",
"CLAUDE_CODE_EFFORT_LEVEL": "max"
}
}
当OPUS_MODEL支持1m上下文的时候,可以设置为model-opus[1m]以获得Claude code工具的完整上下文支持。
也兼容 LiteLLM 风格的 anthropic/ 前缀:anthropic/model-opus / anthropic/model-sonnet / anthropic/model-haiku 等同于无前缀写法,方便接入需要带 provider 前缀才能识别 Anthropic 协议的工具。
虚拟模型和别名:
| 虚拟模型 | 别名 |
|---|---|
model-fable | anthropic/model-fable anthropic/claude-fable* claude-fable* gpt-5.6 gpt-*-sol openai/gpt-5.6 openai/gpt-*-sol |
model-opus | anthropic/model-opus anthropic/claude-opus* claude-opus* gpt-5.5 gpt-*-terra openai/gpt-5.5 openai/gpt-*-terra |
model-sonnet | anthropic/model-sonnet anthropic/claude-sonnet* claude-sonnet* gpt-5.4 gpt-*-luna openai/gpt-5.4 openai/gpt-*-luna |
model-haiku | anthropic/model-haiku anthropic/claude-haiku* claude-haiku* gpt-*-mini openai/gpt-*-mini |
claude-opus*的含义是模糊匹配,你可以传入任意符合规则的模型名,都会被归一为虚拟模型model-opus,比如claude-opus-4-8claude-opus-4-7-20260101claude-opus-100都没问题。gpt-*-sol这类按档位段匹配:gpt-5.6-solgpt-6-solgpt-5.6-sol-20261201都命中 sol 档(terra/luna/mini 同理)。
cc-router 夹在你的工具和大模型厂商中间:工具从入口连进来,请求从出口发给厂商。两头各支持三种主流大模型接口,可以任意组合——比如 Codex 从 OpenAI Responses 入口进来,最终由 DeepSeek 的 Anthropic 端点作答。
三个入口共用同一套订阅、虚拟模型、限额与会话亲和,请求日志的「入口接口」一栏能看到每条请求从哪个入口进来。按你的工具支持的协议展开对应一节:
| 配置项 | 填写 |
|---|---|
| Base URL | http://127.0.0.1:23456(不带 /v1,工具会自己拼 /v1/messages) |
| 鉴权 | x-api-key: <token> 或 Authorization: Bearer <token>,对应 Claude Code 的 ANTHROPIC_API_KEY / ANTHROPIC_AUTH_TOKEN |
| 模型名 | model-fable / model-opus / model-sonnet / model-haiku,或上方别名表里的任意写法(含 anthropic/ 前缀) |
output_config.effort、cache_control、图片、工具调用全部按 Anthropic 原生语义工作。x-claude-code-session-id 请求头、其次 metadata.user_id 识别会话。anthropic-beta / anthropic-version 等白名单头会原样转发给该上游,按订阅单独设置,默认关闭。| 配置项 | 填写 |
|---|---|
| Base URL | http://127.0.0.1:23456/v1 |
| API Key | cc-router 设置页里的 token,Codex 从 OPENAI_API_KEY 或 ~/.codex/auth.json 读取 |
| 模型名 | gpt-5.6 / gpt-5.5 / gpt-5.4 / gpt-5.4-mini,或 openai/ 前缀、gpt-*-sol/terra/luna/mini 档位名,分别落到 fable / opus / sonnet / haiku;也接受 model-* 写法 |
~/.codex/config.toml 片段(设置页「集成」可一键写入并自动备份原文件,之后用 codex -p cc-router 启动):
[model_providers.cc-router]
name = "cc-router"
base_url = "http://127.0.0.1:23456/v1"
wire_api = "responses"
env_key = "OPENAI_API_KEY"
[profiles.cc-router]
model_provider = "cc-router"
model = "model-sonnet"
instructions 与 developer 消息并入 system,reasoning.effort 映射为 thinking 预算,max_output_tokens 映射为 max_tokens(缺省 4096,并会自动抬高到覆盖 thinking 预算)。FAQ
cc-router is a Claude Code plugin with 1 hand-picked skill for development work, indexed on Flowy. Install it with the command on its page. It includes new-provider. Its skills do not fire on their own yet. Request auto-invocation to have Flowy route them as you prompt. Free and open source.
Is this plugin yours?
Claim it with GitHubSubmit a pluginPromote it