Skip to content

Commit 79e9fe2

Browse files
鲁工鲁工
authored andcommitted
feat: add Doubao Seed 2.1 and GLM-5.2 (CN/Global), upgrade Qwen to 3.7-max
Track the latest provider releases so a fresh `init` routes them without yaml overrides: - Qwen flagship upgraded from qwen3-max to qwen3.7-max (aliases qwen-max, qwen3.7). - GLM upgraded to GLM-5.2 (1M context) and split into CN (open.bigmodel.cn) and Global (Z.ai, GLM_GLOBAL_API_KEY) providers; GLM-5.1 kept available. - Add ByteDance Doubao Seed 2.1 Pro/Turbo via Volcengine Ark's Anthropic endpoint (ARK_API_KEY), 256K context/output. CN only -- BytePlus has not shipped Seed 2.1 internationally yet. Also hardens the default network binding: bind to 127.0.0.1 instead of 0.0.0.0 and warn when bound to a non-loopback host without CCMR_REQUIRED_AUTH_TOKEN, so the key-holding proxy is not exposed to the LAN by default. Bump to 1.7.0.
1 parent f873dc0 commit 79e9fe2

14 files changed

Lines changed: 430 additions & 60 deletions

.env.example

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,24 @@ MINIMAX_GLOBAL_API_KEY=eyJhbGciOixxxxxxxxxxxxxxx
4040
QWEN_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxx
4141

4242
# ============================================
43-
# GLM API (智谱 AI)
43+
# GLM CN API (智谱 AI 国内版)
4444
# ============================================
4545
# 从 https://open.bigmodel.cn/ 获取
4646
GLM_API_KEY=xxxxxxxxxxxxxxxxxxxxx
4747

48+
# ============================================
49+
# GLM Global API (Z.ai 国际版)
50+
# ============================================
51+
# 从 https://z.ai/model-api 获取,使用 glm-global / glm-global-5.2 别名
52+
GLM_GLOBAL_API_KEY=xxxxxxxxxxxxxxxxxxxxx
53+
54+
# ============================================
55+
# Doubao Seed API (火山方舟 Volcengine,仅国内版)
56+
# ============================================
57+
# 从 https://console.volcengine.com/ark 获取,Anthropic 协议接入点
58+
# 使用 seed / seed-2.1-pro / seed-2.1-turbo 别名
59+
ARK_API_KEY=xxxxxxxxxxxxxxxxxxxxx
60+
4861
# ============================================
4962
# MiMo Token Plan API
5063
# ============================================
@@ -69,6 +82,11 @@ MIMO_PAYG_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxx
6982
# 网关端口
7083
# GATEWAY_PORT=8080
7184

85+
# 入站鉴权令牌(可选;若将网关绑定到非 127.0.0.1 的地址则必须设置)
86+
# 设置后,调用方需在 "x-api-key" 或 "Authorization: Bearer <token>" 中携带此令牌。
87+
# 仅当网关保持绑定在 127.0.0.1 时才可留空。
88+
# CCMR_REQUIRED_AUTH_TOKEN=
89+
7290
# 日志级别
7391
# LOG_LEVEL=INFO
7492

README.md

Lines changed: 37 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ npx claude-code-model-router init
5252
# 启动网关
5353
npx claude-code-model-router start
5454
npx claude-code-model-router start --port 9000 # 指定端口
55+
npx claude-code-model-router start --host 0.0.0.0 # 监听所有网卡(见下方安全提示)
5556

5657
# 查看可用模型
5758
npx claude-code-model-router models
@@ -64,6 +65,9 @@ npx claude-code-model-router claude --gateway-port 9000 # 自定义网关端口
6465
claude
6566
```
6667

68+
> **安全提示**:网关默认绑定到 `127.0.0.1`(仅本机可访问)。网关会用你本地配置的各厂商 API Key 代理上游请求,因此任何能访问该端口的人都能消耗你的额度。
69+
> 若确需通过 `--host 0.0.0.0` 暴露到局域网,请务必设置环境变量 `CCMR_REQUIRED_AUTH_TOKEN`,此时调用方必须在 `x-api-key``Authorization: Bearer <token>` 中携带该令牌。未设置时绑定非回环地址会打印警告。
70+
6771
### Claude Code 原生参数支持
6872

6973
`ccmr claude` 命令完整支持 Claude Code 的原生启动参数:
@@ -142,15 +146,20 @@ ccmr claude --print --output-format json "你的问题"
142146
| `minimax-global-m3` | `minimax-global`, `minimax-io` | MiniMax M3 | MiniMax Global |
143147
| `qwen3.5-plus` | `qwen`, `qwen3.5`, `tongyi` | Qwen3.5 Plus | 阿里云 |
144148
| `qwen3.5-flash` | - | Qwen3.5 Flash | 阿里云 |
145-
| `qwen3-max` | - | Qwen3 Max | 阿里云 |
146-
| `glm-5.1` | `glm`, `glm-5`, `zhipu`, `chatglm` | GLM-5.1 | 智谱 AI |
149+
| `qwen3.7-max` | `qwen-max`, `qwen3.7` | Qwen3.7 Max | 阿里云 |
150+
| `glm-5.2` | `glm`, `zhipu`, `chatglm` | GLM-5.2 | 智谱 AI(国内) |
151+
| `glm-5.1` | `glm-5` | GLM-5.1 | 智谱 AI(国内) |
152+
| `glm-global-5.2` | `glm-global`, `zai`, `z-ai` | GLM-5.2 | Z.ai(国际) |
153+
| `glm-global-5.1` | - | GLM-5.1 | Z.ai(国际) |
147154
| `step-3.7-flash` | `step`, `step-3.7`, `stepfun` | Step 3.7 Flash | 阶跃星辰(按量付费) |
148155
| `step-plan-3.7-flash` | `step-plan`, `step-plan-3.7`, `stepplan` | Step 3.7 Flash (Step Plan) | 阶跃星辰(订阅) |
149156
| `mimo-v2.5-pro` | `mimo`, `mimo-pro`, `mimo-token-sgp`, `xiaomi` | MiMo V2.5 Pro | MiMo Token Plan SGP |
150157
| `mimo-v2.5` | `mimo-v2` | MiMo V2.5 | MiMo Token Plan SGP |
151158
| `mimo-token-cn-v2.5-pro` | `mimo-token-cn`, `mimo-cn` | MiMo V2.5 Pro | MiMo Token Plan CN |
152159
| `mimo-token-ams-v2.5-pro` | `mimo-token-ams`, `mimo-ams` | MiMo V2.5 Pro | MiMo Token Plan AMS |
153160
| `mimo-payg-v2.5-pro` | `mimo-payg`, `mimo-payg-pro` | MiMo V2.5 Pro | MiMo Pay-as-you-go |
161+
| `seed-2.1-pro` | `seed`, `seed-pro`, `doubao` | Doubao Seed 2.1 Pro | 火山方舟(国内) |
162+
| `seed-2.1-turbo` | `seed-turbo` | Doubao Seed 2.1 Turbo | 火山方舟(国内) |
154163

155164
### 模型参数
156165

@@ -162,11 +171,13 @@ ccmr claude --print --output-format json "你的问题"
162171
| MiniMax M3 (CN / Global) | 1M | 128K |
163172
| Qwen3.5 Plus | 1M | 64K |
164173
| Qwen3.5 Flash | 1M | 64K |
165-
| Qwen3 Max | 1M | 64K |
166-
| GLM-5.1 | 200K | 128K |
174+
| Qwen3.7 Max | 1M | 64K |
175+
| GLM-5.2 (国内 / 国际) | 1M | 128K |
176+
| GLM-5.1 (国内 / 国际) | 200K | 128K |
167177
| Step 3.7 Flash (按量付费 / Step Plan) | 256K | 384K |
168178
| MiMo V2.5 Pro | 1M | 128K |
169179
| MiMo V2.5 | 1M | 128K |
180+
| Doubao Seed 2.1 Pro / Turbo | 256K | 256K |
170181

171182
## 配置
172183

@@ -178,7 +189,9 @@ KIMI_API_KEY=sk-xxx # https://platform.kimi.ai/
178189
MINIMAX_API_KEY=xxx # MiniMax CN / Token Plan: https://platform.minimaxi.com/
179190
MINIMAX_GLOBAL_API_KEY=xxx # MiniMax Global: https://platform.minimax.io/
180191
QWEN_API_KEY=sk-xxx # https://dashscope.console.aliyun.com/
181-
GLM_API_KEY=xxx # https://open.bigmodel.cn/
192+
GLM_API_KEY=xxx # GLM 国内版(智谱): https://open.bigmodel.cn/
193+
GLM_GLOBAL_API_KEY=xxx # GLM 国际版(Z.ai): https://z.ai/model-api
194+
ARK_API_KEY=xxx # Doubao Seed 火山方舟(仅国内): https://console.volcengine.com/ark
182195
STEP_API_KEY=xxx # 阶跃星辰按量付费: https://platform.stepfun.com/
183196
STEP_PLAN_API_KEY=xxx # 阶跃星辰 Step Plan 订阅: https://platform.stepfun.com/
184197
MIMO_API_KEY=tp-xxx # MiMo Token Plan,默认 SGP 集群
@@ -243,7 +256,7 @@ claude
243256
```bash
244257
npx claude-code-model-router claude
245258
```
246-
- 使用第三方 AI 模型(DeepSeek V4, GLM-5.1, Qwen3.5, Kimi K2.6, MiMo V2.5 等)
259+
- 使用第三方 AI 模型(DeepSeek V4, GLM-5.2, Qwen3.7, Kimi K2.6, Doubao Seed 2.1, MiMo V2.5 等)
247260
- 按 API 使用量付费
248261
- 配置存储在 `~/.claude-gateway/`
249262

@@ -269,7 +282,10 @@ npx claude-code-model-router claude
269282
# 使用短名称(向后兼容)
270283
/model deepseek # 切换到 DeepSeek V4 Pro
271284
/model qwen # 切换到 Qwen3.5 Plus
272-
/model glm # 切换到 GLM-5.1
285+
/model qwen-max # 切换到 Qwen3.7 Max
286+
/model glm # 切换到 GLM-5.2(国内 智谱)
287+
/model glm-global # 切换到 GLM-5.2(国际 Z.ai)
288+
/model seed # 切换到 Doubao Seed 2.1 Pro(火山方舟,仅国内)
273289
/model step # 切换到 Step 3.7 Flash(按量付费)
274290
/model step-plan # 切换到 Step 3.7 Flash(Step Plan 订阅)
275291
/model kimi # 切换到 Kimi K2.6
@@ -282,15 +298,20 @@ npx claude-code-model-router claude
282298
# 使用版本别名(明确指定版本)
283299
/model deepseek-v4-pro # DeepSeek V4 Pro
284300
/model deepseek-v4-flash # DeepSeek V4 Flash
285-
/model glm-5.1 # GLM-5.1
301+
/model glm-5.2 # GLM-5.2(国内 智谱)
302+
/model glm-5.1 # GLM-5.1(国内 智谱)
303+
/model glm-global-5.2 # GLM-5.2(国际 Z.ai)
304+
/model glm-global-5.1 # GLM-5.1(国际 Z.ai)
286305
/model step-3.7-flash # Step 3.7 Flash(按量付费)
287306
/model step-plan-3.7-flash # Step 3.7 Flash(Step Plan 订阅)
288307
/model minimax-m3 # MiniMax M3
289308
/model minimax-global-m3 # MiniMax M3 Global
290309
/model kimi-k2.6 # Kimi K2.6
291310
/model qwen3.5-plus # Qwen3.5 Plus
292311
/model qwen3.5-flash # Qwen3.5 Flash
293-
/model qwen3-max # Qwen3 Max
312+
/model qwen3.7-max # Qwen3.7 Max
313+
/model seed-2.1-pro # Doubao Seed 2.1 Pro(火山方舟,仅国内)
314+
/model seed-2.1-turbo # Doubao Seed 2.1 Turbo(火山方舟,仅国内)
294315
/model mimo-v2.5-pro # MiMo V2.5 Pro
295316
/model mimo-v2.5 # MiMo V2.5
296317
/model mimo-token-ams-v2.5-pro # MiMo V2.5 Pro Token Plan AMS
@@ -352,6 +373,13 @@ DeepSeek Anthropic 兼容接口会忽略 `metadata` 字段,但某些 Claude Co
352373

353374
## 更新日志
354375

376+
### v1.7.0
377+
- Qwen 旗舰升级为 Qwen3.7 Max(`qwen3.7-max`,别名 `qwen-max` / `qwen3.7`
378+
- GLM 升级为 GLM-5.2 并区分国内/国际版:
379+
- 国内版(智谱 `open.bigmodel.cn`)默认 `glm-5.2`,保留 `glm-5.1`
380+
- 新增国际版(Z.ai `api.z.ai`),别名 `glm-global` / `zai`,需配置 `GLM_GLOBAL_API_KEY`
381+
- 新增字节豆包 Doubao Seed 2.1 Pro / Turbo(火山方舟 `ark.cn-beijing.volces.com`,Anthropic 协议),别名 `seed` / `seed-turbo` / `doubao`,需配置 `ARK_API_KEY`(目前仅国内版,国际版 BytePlus 暂未上线 Seed 2.1)
382+
355383
### v1.3.3
356384
- CLI 和健康检查版本号改为从 `package.json` 读取,避免发布后显示旧版本
357385

dist/cli.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/cli.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/config.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)