热门搜索:
ghcr.io/decolua/9router

ghcr.io/decolua/9router:3cf900a

ghcr.io
ghcr.iolinux/amd643cf900a大小: 未知更新于 2026年5月20日

9Router - 免费AI路由与Token节省工具

永不停歇地编码。借助RTK节省20-40%的tokens,并自动回退到免费及低成本AI模型。

连接所有AI代码工具(Claude Code、Cursor、Antigravity、Copilot、Codex、Gemini、OpenCode、Cline、OpenClaw...)至40+ AI提供商及100+模型。

🚀 快速开始 • 💡 功能特性 • 📖 安装设置 • 🌐 官方网站

🇻🇳 越南语 • 🇨🇳 中文 • 🇯🇵 日语

🤔 为什么选择9Router?

停止浪费金***、tokens和遭遇限制:

  • ❌ 订阅配额每月未使用即过期
  • ❌ 速率限制在编码过程中中断工作
  • ❌ 工具输出(git diff、grep、ls...)快速消耗tokens
  • ❌ 昂贵的API(每个提供商每月20-50***)
  • ❌ 手动在提供商之间切换

9Router解决了这些问题:

  • ✅ RTK Token Saver - 自动压缩tool_result内容,每次请求节省20-40%的tokens
  • ✅ 最大化订阅价值 - 跟踪配额,在重置前充分利用每一部分
  • ✅ 自动回退 - 订阅 → 低成本 → 免费,零停机时间
  • ✅ 多账户 - 每个提供商的账户间轮询
  • ✅ 通用性 - 适用于Claude Code、Codex、Cursor、Cline及任何CLI工具

🔄 工作原理

┌─────────────┐
│ 您的CLI工具 │ (Claude Code, Codex, OpenClaw, Cursor, Cline...)
└──────┬──────┘
│ http://localhost:20128/v1
↓
┌─────────────────────────────────────────────┐
│ 9Router (智能路由) │
│ • RTK Token Saver (减少tool_result tokens) │
│ • 格式转换 (OpenAI ↔ Claude) │
│ • 配额跟踪 │
│ • 自动Token刷新 │
└──────┬──────────────────────────────────────┘
│
├─→ [第一层:订阅] Claude Code, Codex, GitHub Copilot
│ ↓ 配额用尽
├─→ [第二层:低成本] GLM ($0.6/1M), MiniMax ($0.2/1M)
│ ↓ 预算限制
└─→ [第三层:免费] Kiro, OpenCode Free, Vertex ($300赠金)

结果:永不停歇地编码,最低成本 + 通过RTK节省20-40%的tokens

⚡ 快速开始

  1. 全局安装:
npm install -g 9router
9router

🎉 控制台将在 http://localhost:20128 打开

http://localhost:20128

  1. 连接免费提供商(无需注册):

控制台 → 提供商 → 连接Kiro AI(免费Claude无限制)或OpenCode Free(无需认证)→ 完成!

  1. 在CLI工具中使用:
Claude Code/Codex/OpenClaw/Cursor/Cline 设置:
Endpoint: http://localhost:20128/v1
API Key: [从控制台复制]
Model: kr/claude-sonnet-4.5

就是这样!开始使用免费AI模型编码。

替代方法:从源码运行(此仓库):

此仓库包为私有(9router-app),因此源码/Docker执行是预期的本地开发路径。

9router-app

cp .env.example .env
npm install
PORT=20128 NEXT_PUBLIC_BASE_URL=http://localhost:20128 npm run dev

生产模式:

npm run build
PORT=20128 HOSTNAME=0.0.0.0 NEXT_PUBLIC_BASE_URL=http://localhost:20128 npm run start

默认URL:

🔄 格式转换

格式间无缝转换:

  • OpenAI ↔ Claude ↔ Gemini ↔ Cursor ↔ Kiro ↔ Vertex ↔ Antigravity ↔ Ollama ↔ OpenAI 响应
  • 您的 CLI 工具发送 OpenAI 格式 → 9Router 进行转换 → 服务提供商接收原生格式
  • 兼容任何支持自定义 OpenAI 端点的工具

👥 多账户支持

  • 每个服务提供商可添加多个账户
  • 自动轮询或基于优先级的路由
  • 当一个账户达到配额时自动切换到下一个账户

🔄 自动令牌刷新

  • OAuth 令牌在过期前自动刷新
  • 无需手动重新认证
  • 所有服务提供商间的无缝体验

🎨 自定义组合

  • 创建无限的模型组合
  • 混合订阅、低成本和免费层级
  • 为组合命名以便快速访问
  • 通过云同步在设备间共享组合

📝 请求日志

  • 启用调试模式以获取完整的请求/响应日志
  • 跟踪 API 调用、头信息和负载
  • 排查集成问题
  • 导出日志用于分析

💾 云同步

  • 在设备间同步服务提供商、组合和设置
  • 自动后台同步
  • 安全加密存储
  • 从任何地方访问您的配置

云运行时注意事项

  • 生产环境中建议使用服务器端云变量:BASE_URL(同步调度器使用的内部回调 URL)CLOUD_URL(云同步端点基础)
  • BASE_URL(同步调度器使用的内部回调 URL)
BASE_URL
  • CLOUD_URL(云同步端点基础)
CLOUD_URL
  • NEXT_PUBLIC_BASE_URL 和 NEXT_PUBLIC_CLOUD_URL 仍为兼容性/UI 目的提供支持,但服务器运行时现在优先使用 BASE_URL/CLOUD_URL。
NEXT_PUBLIC_BASE_URL
  NEXT_PUBLIC_CLOUD_URL
  BASE_URL
  CLOUD_URL
  • 云同步请求现在采用超时 + 快速失败机制,以避免在云 DNS/网络不可用时 UI 卡顿。

📊 使用分析

  • 按服务提供商和模型跟踪令牌使用情况
  • 成本估算和支出趋势
  • 月度报告和洞察
  • 优化您的 AI 支出

[!IMPORTANT] 理解仪表板成本:使用分析中显示的“成本”仅用于跟踪和比较目的。9Router 本身从不向您收取任何费用。您只需直接向服务提供商付费(如果使用付费服务)。例如:如果您的仪表板在使用 iFlow 模型时显示“总成本 $290”,这表示您直接使用付费 API 本应支付的金额。您的实际成本 = $0(iFlow 是免费无限量的)。可以将其视为“节省跟踪器”,显示您通过使用免费模型或通过 9Router 路由所节省的金额!

[!IMPORTANT] 理解仪表板成本:

使用分析中显示的“成本”仅用于跟踪和比较目的。9Router 本身从不向您收取任何费用。您只需直接向服务提供商付费(如果使用付费服务)。

例如:如果您的仪表板在使用 iFlow 模型时显示“总成本 $290”,这表示您直接使用付费 API 本应支付的金额。您的实际成本 = $0(iFlow 是免费无限量的)。

可以将其视为“节省跟踪器”,显示您通过使用免费模型或通过 9Router 路由所节省的金额!

🌐 随处部署

  • 💻 本地主机 - 默认方式,支持离线使用
  • ☁️ VPS/云服务器 - 跨设备共享
  • 🐳 Docker - 一键部署
  • 🚀 Cloudflare Workers - 全球边缘网络

仪表盘会跟踪您的令牌使用量,并显示若直接使用付费API时的预估成本。这并非实际账单——而是用于展示通过9Router使用免费模型或现有订阅所节省的金额的参考。

示例:

  • 仪表盘显示:"$290 总成本"
  • 实际情况:您正在使用 iFlow(免费无限量)
  • 您的实际成本:$0.00
  • $290 的含义:使用免费模型而非付费API所节省的金额!

成本显示是一个“节省跟踪器”,帮助您了解自己的使用模式和优化机会。

不会。9Router 是在您自己的计算机上运行的免费开源软件。它绝不会向您收取任何费用。

您只需支付:

  • ✅ 订阅提供商(Claude Code 每月 $20,Codex 每月 $20-200)→ 直接在其网站上向他们支付
  • ✅ 低成本提供商(GLM、MiniMax)→ 直接向他们支付,9Router 仅路由您的请求
  • ❌ 9Router 本身 → 绝不会收取任何费用,永远不会

9Router 是一个本地代理/路由器。它不会获取您的***信息,无法发送账单,也没有计费系统。它是完全免费的软件。

是的!当前的免费提供商(Kiro、OpenCode Free、Vertex)是真正免费的,无隐藏费用。

这些是各公司提供的免费服务:

  • Kiro AI:通过 AWS Builder ID / Google / GitHub OAuth 提供免费无限量的 Claude 4.5 + GLM-5 + MiniMax

拉取命令

轩辕镜像通过轩辕镜像拉取

专属域名未获取到

请登录使用轩辕镜像享受快速拉取体验,支持国内访问优化,速度提升

🚀 国内优化⚡ 访问优化🔒 安全可靠
原始仓库从原始仓库拉取镜像
docker pull ghcr.io/decolua/9router:3cf900a

更多版本

84 个版本
ghcr.io/decolua/9router
ghcr.io/decolua/9router:master
masterghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:0.4.55
0.4.55ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:530dc9c
530dc9cghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:0.4.29
0.4.29ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:0.4.33
0.4.33ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:42f0736
42f0736ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:0.4.50
0.4.50ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:0.4.52
0.4.52ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:7f7b86f
7f7b86fghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:0.4.37
0.4.37ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:0.4
0.4ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:ad661c1
ad661c1ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:0.4.20
0.4.20ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:7046122
7046122ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:0.3.96
0.3.96ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:0.4.41
0.4.41ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:0.4.46
0.4.46ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:0.4.31
0.4.31ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:a331c34
a331c34ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:0.4.6
0.4.6ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:d4bc42e
d4bc42eghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:0.4.18
0.4.18ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:76f3d4b
76f3d4bghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:0.4.30
0.4.30ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:1f3d3a8
1f3d3a8ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:0.3.83
0.3.83ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:0.4.28
0.4.28ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:b39eb61
b39eb61ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:ef3abea
ef3abeaghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:0.4.12
0.4.12ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:9c6be62
9c6be62ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:0.4.16
0.4.16ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:ecd6e93
ecd6e93ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:0.3.91
0.3.91ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:0.4.39
0.4.39ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:d076c7d
d076c7dghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:0.3.75
0.3.75ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:8f81363
8f81363ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:0.4.8
0.4.8ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:0.4.38
0.4.38ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:0.4.44
0.4.44ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:936d65a
936d65aghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:0.4.11
0.4.11ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:0.4.27
0.4.27ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:c42c014
c42c014ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:0.4.4
0.4.4ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:4ba546a
4ba546aghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:0.4.14
0.4.14ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:bee8dad
bee8dadghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:0.4.25
0.4.25ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:34da52f
34da52fghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:0.4.10
0.4.10ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:8de9aae
8de9aaeghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:0.3.98
0.3.98ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:0.3
0.3ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:1d8251c
1d8251cghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:2eebcee
2eebceeghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:0.4.1
0.4.1ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:0d61a1d
0d61a1dghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:0.4.19
0.4.19ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:224981d
224981dghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:0.3.90
0.3.90ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:7959fd3
7959fd3ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:0.3.89
0.3.89ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:030fb34
030fb34ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:0.4.3
0.4.3ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:a3a0cc8
a3a0cc8ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:0.4.13
0.4.13ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:0.4.49
0.4.49ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:7ccf8c5
7ccf8c5ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:0.4.36
0.4.36ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:b7d85ae
b7d85aeghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:0.3.86
0.3.86ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:81cef7d
81cef7dghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:0.3.97
0.3.97ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:07717ba
07717baghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:147fc16
147fc16ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:091ad3f
091ad3fghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:39d04d0
39d04d0ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:0aff9a5
0aff9a5ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:0.4.2
0.4.2ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:a1317ed
a1317edghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:0.3.87
0.3.87ghcr.iolinux/amd64
ghcr.io/decolua/9router
ghcr.io/decolua/9router:buildcache
buildcacheghcr.iolinux/amd64

镜像拉取常见问题

用户好评

来自真实用户的反馈,见证轩辕镜像的优质服务

用户头像

oldzhang

运维工程师

Linux服务器

5

"Docker访问体验非常流畅,大镜像也能快速完成下载。"

镜像拉取问题咨询请 提交工单。官方公众号:源码跳动。官方技术交流群:51517718。轩辕镜像所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。