Updated 2026

9Router 评测:给 Claude Code、Codex、Cursor 加一个 AI 编程智能调度中心

这是一篇面向 2026 年的 9Router 实用评测,介绍它如何为 Claude Code、Codex、Cursor、Cline 等 AI 编程工具提供 RTK Token 压缩、三级降级、格式转换、额度追踪和本地数据面板。

推荐项目

AI Coding Router and Token Saver

9Router

An open-source local routing layer for Claude Code, Codex, Cursor, Cline, and other AI coding tools, with token compression, fallback routing, provider translation, quota tracking, and a local dashboard.

价格
Open source
平台
Localhost, Docker, VPS, Cloudflare Workers
免费入口
9Router 可以把 coding tools 路由到免费或低成本模型入口,例如 Kiro AI、OpenCode Free、OpenRouter 兼容模型和自定义供应商。
查看工具
Terminal AI Coding Agent

Claude Code

Anthropic's agentic coding tool for working in existing codebases from the terminal.

价格
Commercial
平台
Terminal, macOS, Linux
免费入口
Anthropic 曾为符合条件的开源维护者提供 Claude 访问计划。
查看工具
Cloud and Terminal Coding Agent

OpenAI Codex

OpenAI's GPT-5.5 coding agent across ChatGPT, Codex App, CLI, IDE, cloud worktrees, Skills, Automations, GitHub workflows, and mobile remote control.

价格
Commercial
平台
Web, Terminal, IDE, Desktop, Mobile, Cloud, GitHub
免费入口
可能通过免费 ChatGPT/Codex 入口或学生 API 额度获得试用机会。
查看工具
AI Code Editor

Cursor

A VS Code-style AI editor that now spans inline editing, local agents, cloud agents, development environments, PR review, Bugbot, and team collaboration.

价格
Free tier, paid plans
平台
macOS, Windows, Linux
免费入口
Cursor 曾提供学生可申请的一年 Pro 访问路径。
查看工具
Agentic Coding Extension

Cline

A VS Code extension for agent-style coding tasks that can inspect files, edit code, and run commands with approval.

价格
Open source
平台
VS Code
查看工具
Terminal AI Coding Agent

opencode

An open-source AI coding agent with terminal, IDE, desktop, multi-session, provider-flexible, and local-model workflows.

价格
Open source
平台
Terminal, IDE, Desktop, macOS, Linux, Windows
查看工具
Model Router

OpenRouter

A model routing platform that exposes many hosted models through one API, including free model options when available.

价格
Free models and paid usage
平台
API, Web
免费入口
OpenRouter 提供可通过 API key 使用的免费模型列表,适合接入支持自定义模型的 coding tools。
查看工具
Open Source AI Coding Assistant

Continue

An open-source assistant for VS Code and JetBrains that lets teams connect their preferred models and workflows.

价格
Open source, optional hosted services
平台
VS Code, JetBrains
查看工具

简短结论

9Router 最适合理解成 AI 编程工具的本地调度中心。它不替代 Claude Code、Codex、Cursor 或 Cline,而是放在这些工具前面:接收本地 OpenAI-compatible 请求,压缩冗余工具输出,做格式转换,追踪额度,再把请求路由到当前最合适的模型路径。

我的判断:当 AI 编程已经变成你的日常基础设施时,9Router 值得部署。如果你经常因为 Claude Code 额度、长日志、大 diff、模型报错而中断开发,这种 router layer 可能比再装一个 coding assistant 更有价值。

9Router 本地 dashboard,用于 AI 编程路由和供应商管理
9Router 官方 GitHub 仓库中的 dashboard 截图,已压缩为 Coding Agent Tools 站内 WebP。

GitHub 对它的定位

9Router GitHub 仓库 把它描述为面向 Claude Code、Cursor、Codex、Gemini、OpenCode、Cline、OpenClaw、Antigravity、Copilot 等工具的免费 AI Router 与 Token Saver。README 反复强调三件事:RTK 压缩节省 Token、自动从订阅模型降级到便宜/免费模型、兼容大量供应商。

我在 2026 年 5 月 12 日查看仓库时,它的描述还提到 40+ providers、RTK token savings,以及避免 AI coding session 因额度或限制被迫停止。

RTK Token Saver 是真正的钩子

AI 编程的成本往往不在你写的那一句 prompt,而在后续工具反复送回模型的内容:git diffgreplstree、报错堆栈、build log、测试输出、重复上下文。

9Router 集成 RTK,在请求进入模型前压缩工具输出。README 里声称每次请求可节省 20-40% input tokens,并列出了 diff、搜索、目录列表和日志输出等场景。我不会把这个数字当成所有场景的绝对保证,但方向是对的:coding agents 确实会浪费大量上下文在机器生成文本上。

三级降级为什么实用

9Router 的核心路由模式可以这样理解:

层级作用Coding Agent Tools 的理解
订阅模型你最信任或已经付费的主力模型优先使用最好路径。
便宜模型主力模型失败后的低成本备份不中断工作,同时控制成本。
免费模型最后的免费 fallback保持会话继续,但输出要更谨慎 review。

这对 Claude Code 尤其有意义。一次长 debugging session 就可能快速消耗额度。9Router 把“模型报错、额度耗尽、预算到顶”变成路由事件,而不是让你停下来手动重新配置。

兼容生态

README 里强调 9Router 的通用性,因为很多工具都能配置 OpenAI-compatible endpoint。它适合:

安装与部署

README 给出的最短路径是:

npm install -g 9router
9router

启动后会打开本地 dashboard,常见地址是 http://localhost:20128,API endpoint 通常是 http://localhost:20128/v1。然后你连接 provider、创建 combo、复制 dashboard API key,把 Claude Code 或 Cursor 指向这个 endpoint。

仓库还提供源码运行和生产模式说明,README 也把 localhost、VPS、Docker、Cloudflare Workers 这类部署方式列为可选路径。

我会在什么情况下用它

如果你已经有这些痛点,9Router 值得试:

我会谨慎的地方

9Router 强在它处于请求链路中间,风险也在这里。用于私有仓库前,我会先确认:

我的规则:把 router 当成工程基础设施,而不是普通浏览器插件。它需要配置负责人、权限边界和可观测性。

结论

9Router 是 2026 年 AI 编程工具栈里很有意思的新角色,因为它不要求你换编辑器或换 agent,而是优化现有工具的成本和稳定性。它应该和 OpenRouter、Continue、opencode、Claude Code、Codex 一起放进决策树里。

我不会建议新手一上来就用它做第一套 AI 编程环境。但如果你已经每天重度使用 Claude Code、Codex 或 Cursor,并且开始关心成本、限额和 fallback,那么 9Router 值得认真部署体验。