Skip to content

Commit 99cd211

Browse files
鲁工鲁工
authored andcommitted
feat: add Kimi K2.7 Code + Seed Agent Plan, fix Seed endpoint, auto-size context window
- Kimi: add kimi-k2.7-code and kimi-k2.7-code-highspeed (256K) on the existing Moonshot Anthropic endpoint. - Seed: correct the pay-as-you-go endpoint to /api/compatible (the old /api/coding rejects general models) with version-suffixed model ids doubao-seed-2-1-{pro,turbo}-260628; add a seed-plan provider for the Agent Plan subscription (/api/plan, ARK_PLAN_API_KEY), mirroring the step/step-plan split. - ccmr claude: inject CLAUDE_CODE_AUTO_COMPACT_WINDOW from the launch model's context_window (unless already set) so 256K/1M models aren't clipped to Claude Code's ~200k default behind a custom base URL. Bump to 1.7.1.
1 parent 79e9fe2 commit 99cd211

10 files changed

Lines changed: 286 additions & 27 deletions

File tree

.env.example

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,15 @@ GLM_GLOBAL_API_KEY=xxxxxxxxxxxxxxxxxxxxx
5454
# ============================================
5555
# Doubao Seed API (火山方舟 Volcengine,仅国内版)
5656
# ============================================
57-
# 从 https://console.volcengine.com/ark 获取,Anthropic 协议接入点
58-
# 使用 seed / seed-2.1-pro / seed-2.1-turbo 别名
57+
# 从 https://console.volcengine.com/ark 获取(按量付费 / 方舟 API 调用)
58+
# Anthropic 接入点 https://ark.cn-beijing.volces.com/api/compatible
59+
# 使用 seed / seed-2.1-pro / seed-2.1-turbo 别名(模型 *-260628)
5960
ARK_API_KEY=xxxxxxxxxxxxxxxxxxxxx
6061

62+
# Doubao Seed - Agent Plan 订阅专属 Key(接入点 https://ark.cn-beijing.volces.com/api/plan)
63+
# 用 seed-plan / seed-plan-turbo 别名
64+
ARK_PLAN_API_KEY=xxxxxxxxxxxxxxxxxxxxx
65+
6166
# ============================================
6267
# MiMo Token Plan API
6368
# ============================================

README.md

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ ccmr claude --print --output-format json "你的问题"
132132
- `ANTHROPIC_BASE_URL=http://127.0.0.1:<gateway-port>`
133133
- `ANTHROPIC_AUTH_TOKEN=ccmr-local-gateway`
134134
- `ANTHROPIC_MODEL` 和 Claude 默认模型变量会指向当前 `default_model`
135+
- `CLAUDE_CODE_AUTO_COMPACT_WINDOW` 会按启动模型的 `context_window` 自动注入(如 Seed/Kimi 256K、DeepSeek 1M),避免 Claude Code 把第三方模型默认裁剪到 ~200k。若你已自行设置该变量,则尊重你的值不覆盖。注意它是会话级全局:运行时用 `/model` 切到不同上下文窗口的模型时,请重启或用 `ccmr claude --model <模型>` 重新启动以匹配
135136

136137
这些变量只作用于 `ccmr claude` 启动的 Claude Code 子进程,不会修改你的官方 Claude Code 配置,也不会影响直接运行 `claude` 的官方订阅模式。
137138

@@ -142,6 +143,8 @@ ccmr claude --print --output-format json "你的问题"
142143
| `deepseek-v4-pro` | `deepseek`, `deepseek-v4`, `deepseek-pro`, `ds` | DeepSeek V4 Pro | DeepSeek |
143144
| `deepseek-v4-flash` | `deepseek-flash`, `deepseek-chat` | DeepSeek V4 Flash | DeepSeek |
144145
| `kimi-k2.6` | `kimi`, `kimi-k2`, `moonshot` | Kimi K2.6 | Moonshot |
146+
| `kimi-k2.7-code` | `kimi-code`, `k2.7-code` | Kimi K2.7 Code | Moonshot |
147+
| `kimi-k2.7-code-highspeed` | `kimi-highspeed`, `k2.7-highspeed` | Kimi K2.7 Code HighSpeed | Moonshot |
145148
| `minimax-m3` | `minimax`, `minimax-cn`, `mm` | MiniMax M3 | MiniMax CN |
146149
| `minimax-global-m3` | `minimax-global`, `minimax-io` | MiniMax M3 | MiniMax Global |
147150
| `qwen3.5-plus` | `qwen`, `qwen3.5`, `tongyi` | Qwen3.5 Plus | 阿里云 |
@@ -158,8 +161,10 @@ ccmr claude --print --output-format json "你的问题"
158161
| `mimo-token-cn-v2.5-pro` | `mimo-token-cn`, `mimo-cn` | MiMo V2.5 Pro | MiMo Token Plan CN |
159162
| `mimo-token-ams-v2.5-pro` | `mimo-token-ams`, `mimo-ams` | MiMo V2.5 Pro | MiMo Token Plan AMS |
160163
| `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 | 火山方舟(国内) |
164+
| `seed-2.1-pro` | `seed`, `seed-pro`, `doubao` | Doubao Seed 2.1 Pro | 火山方舟(按量付费) |
165+
| `seed-2.1-turbo` | `seed-turbo` | Doubao Seed 2.1 Turbo | 火山方舟(按量付费) |
166+
| `seed-plan-2.1-pro` | `seed-plan`, `seed-plan-pro`, `doubao-plan` | Doubao Seed 2.1 Pro | 火山方舟(Agent Plan 订阅) |
167+
| `seed-plan-2.1-turbo` | `seed-plan-turbo` | Doubao Seed 2.1 Turbo | 火山方舟(Agent Plan 订阅) |
163168

164169
### 模型参数
165170

@@ -168,6 +173,7 @@ ccmr claude --print --output-format json "你的问题"
168173
| DeepSeek V4 Pro | 1M | 384K |
169174
| DeepSeek V4 Flash | 1M | 384K |
170175
| Kimi K2.6 | 256K | 32K |
176+
| Kimi K2.7 Code / HighSpeed | 256K | 32K |
171177
| MiniMax M3 (CN / Global) | 1M | 128K |
172178
| Qwen3.5 Plus | 1M | 64K |
173179
| Qwen3.5 Flash | 1M | 64K |
@@ -177,7 +183,7 @@ ccmr claude --print --output-format json "你的问题"
177183
| Step 3.7 Flash (按量付费 / Step Plan) | 256K | 384K |
178184
| MiMo V2.5 Pro | 1M | 128K |
179185
| MiMo V2.5 | 1M | 128K |
180-
| Doubao Seed 2.1 Pro / Turbo | 256K | 256K |
186+
| Doubao Seed 2.1 Pro / Turbo (按量付费 / Agent Plan) | 256K | 256K |
181187

182188
## 配置
183189

@@ -191,7 +197,8 @@ MINIMAX_GLOBAL_API_KEY=xxx # MiniMax Global: https://platform.minimax.io/
191197
QWEN_API_KEY=sk-xxx # https://dashscope.console.aliyun.com/
192198
GLM_API_KEY=xxx # GLM 国内版(智谱): https://open.bigmodel.cn/
193199
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
200+
ARK_API_KEY=xxx # Doubao Seed 火山方舟 按量付费 (/api/compatible): https://console.volcengine.com/ark
201+
ARK_PLAN_API_KEY=xxx # Doubao Seed 火山方舟 Agent Plan 订阅 (/api/plan) 专属 Key
195202
STEP_API_KEY=xxx # 阶跃星辰按量付费: https://platform.stepfun.com/
196203
STEP_PLAN_API_KEY=xxx # 阶跃星辰 Step Plan 订阅: https://platform.stepfun.com/
197204
MIMO_API_KEY=tp-xxx # MiMo Token Plan,默认 SGP 集群
@@ -285,10 +292,13 @@ npx claude-code-model-router claude
285292
/model qwen-max # 切换到 Qwen3.7 Max
286293
/model glm # 切换到 GLM-5.2(国内 智谱)
287294
/model glm-global # 切换到 GLM-5.2(国际 Z.ai)
288-
/model seed # 切换到 Doubao Seed 2.1 Pro(火山方舟,仅国内)
295+
/model seed # 切换到 Doubao Seed 2.1 Pro(火山方舟 按量付费)
296+
/model seed-plan # 切换到 Doubao Seed 2.1 Pro(火山方舟 Agent Plan 订阅)
289297
/model step # 切换到 Step 3.7 Flash(按量付费)
290298
/model step-plan # 切换到 Step 3.7 Flash(Step Plan 订阅)
291299
/model kimi # 切换到 Kimi K2.6
300+
/model kimi-code # 切换到 Kimi K2.7 Code(编程专用)
301+
/model kimi-highspeed # 切换到 Kimi K2.7 Code HighSpeed(约 6 倍速)
292302
/model minimax # 切换到 MiniMax M3(国内 Token Plan)
293303
/model minimax-global # 切换到 MiniMax M3(海外)
294304
/model mimo # 切换到 MiMo V2.5 Pro(Token Plan SGP)
@@ -307,11 +317,15 @@ npx claude-code-model-router claude
307317
/model minimax-m3 # MiniMax M3
308318
/model minimax-global-m3 # MiniMax M3 Global
309319
/model kimi-k2.6 # Kimi K2.6
320+
/model kimi-k2.7-code # Kimi K2.7 Code
321+
/model kimi-k2.7-code-highspeed # Kimi K2.7 Code HighSpeed
310322
/model qwen3.5-plus # Qwen3.5 Plus
311323
/model qwen3.5-flash # Qwen3.5 Flash
312324
/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(火山方舟,仅国内)
325+
/model seed-2.1-pro # Doubao Seed 2.1 Pro(按量付费)
326+
/model seed-2.1-turbo # Doubao Seed 2.1 Turbo(按量付费)
327+
/model seed-plan-2.1-pro # Doubao Seed 2.1 Pro(Agent Plan 订阅)
328+
/model seed-plan-2.1-turbo # Doubao Seed 2.1 Turbo(Agent Plan 订阅)
315329
/model mimo-v2.5-pro # MiMo V2.5 Pro
316330
/model mimo-v2.5 # MiMo V2.5
317331
/model mimo-token-ams-v2.5-pro # MiMo V2.5 Pro Token Plan AMS
@@ -373,6 +387,12 @@ DeepSeek Anthropic 兼容接口会忽略 `metadata` 字段,但某些 Claude Co
373387

374388
## 更新日志
375389

390+
### v1.7.1
391+
- 修正 Doubao Seed 接入点:按量付费应走 `https://ark.cn-beijing.volces.com/api/compatible`(而非旧 Coding Plan 的 `/api/coding`),模型 ID 带版本后缀 `doubao-seed-2-1-pro-260628` / `doubao-seed-2-1-turbo-260628`
392+
- 新增 Agent Plan 订阅入口 `seed-plan``https://ark.cn-beijing.volces.com/api/plan`,需 `ARK_PLAN_API_KEY`),与按量付费 `seed` 区分,模式同 `step` / `step-plan`
393+
- Kimi 新增 `kimi-k2.7-code``kimi-k2.7-code-highspeed`(编程专用,256K 上下文;别名 `kimi-code` / `kimi-highspeed`
394+
- `ccmr claude` 启动时按所选模型的 `context_window` 自动注入 `CLAUDE_CODE_AUTO_COMPACT_WINDOW`(已自行设置则不覆盖),并在启动横幅显示当前模型与压缩窗口
395+
376396
### v1.7.0
377397
- Qwen 旗舰升级为 Qwen3.7 Max(`qwen3.7-max`,别名 `qwen-max` / `qwen3.7`
378398
- GLM 升级为 GLM-5.2 并区分国内/国际版:

dist/cli.js

Lines changed: 12 additions & 0 deletions
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.

dist/config.js

Lines changed: 111 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)