一个开源项目,把所有 AI 编程工具免费接满了
Claude Code 在用,Cursor 在用,Cline 也在用。
每个都要单独配置账号、单独充钱、单独管理订阅额度。
今天介绍一个开源项目,把这些全部收进一个本地代理里。

decolua/9router,GitHub 10.7k Stars。
它是什么?
一个本地代理服务,帮你统一接入 40+ 个 AI 模型提供商,100+ 个模型。
Claude Code、Cursor、Cline、Codex、Copilot、OpenClaw 全都可以连进来。

连进来之后,它帮你自动路由:订阅额度快用完了,自动切换到便宜模型,再切换到免费模型,不停机,不等待。
省 token 的核心能力
它有个 RTK Token Saver 技术,专门压缩工具输出里的内容。

git diff、grep 结果、ls 输出——这些东西占 token 比例很高,但又不重要。
9Router 自动压缩,平均省 20-40% 的 token 用量。
三档自动切换

第一档:你的付费订阅——Claude Code、Codex、Copilot
第二档:便宜模型——GLM(每百万 token 0.6 美元)、MiniMax(每百万 token 0.2 美元)
第三档:免费模型——Kiro AI(免费无限 Claude)、OpenCode Free(无需注册)
安装方法
一行命令:
npm install -g 9router
9router浏览器打开 http://localhost:20128 就是 Dashboard。
在 Dashboard 里连一个免费 provider,比如 Kiro AI,拿到 API Key。
然后在 Claude Code 设置里填入:
• Endpoint:http://localhost:20128/v1 • API Key:粘贴 Dashboard 里的 key • Model:kr/claude-sonnet-4.5
适合谁用?
程序员:用 Claude Code 但不想付订阅费的人
多工具党:同时跑 Claude Code、Cursor、Cline,想统一管理
省预算:想把订阅费压缩到接近零
GitHub:https://github.com/decolua/9router
官网:https://9router.com
夜雨聆风