Skip to content

Commit 1c8aa59

Browse files
鲁工鲁工
authored andcommitted
feat: Qwen3.8 Max GA — switch to GA model id, restore pay-go default
The GA release drops the -preview suffix and opens pay-as-you-go access. Verified live before the change: the token-plan endpoint answers 200 for qwen3.8-max (old qwen3.8-max-preview still answers but is deprecated), and the pay-go dashscope Anthropic endpoint now returns 200 with a pay-go key — the exact condition v1.11.1 said would restore the pay-go variant. So qwen gets a 3.8-max variant back as its default (bare aliases qwen/tongyi and qwen3.8/qwen3.8-max point at it, qwen-max/ qwen3.7 stay on 3.7-max), and qwen-plan-3.8-max switches to the GA id. Post-change doctor through the user's runtime config: qwen3.8-max [OK] 1.47s, qwen3.7-max [OK] 4.81s, qwen-plan-3.8-max [OK] 1.01s.
1 parent 71fb6f2 commit 1c8aa59

7 files changed

Lines changed: 100 additions & 62 deletions

File tree

README.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,9 @@ ccmr claude --print --output-format json "你的问题"
197197
| `kimi-plan-for-coding-highspeed` | `kimi-plan-highspeed` | Kimi K2.7 Code HighSpeed(Allegretto 及以上) | Kimi Code 会员订阅 |
198198
| `minimax-m3` | `minimax`, `minimax-cn`, `mm` | MiniMax M3 | MiniMax CN |
199199
| `minimax-global-m3` | `minimax-global`, `minimax-io` | MiniMax M3 | MiniMax Global |
200-
| `qwen3.7-max` | `qwen`, `qwen-max`, `qwen3.7`, `tongyi` | Qwen3.7 Max | 阿里云(按量付费) |
201-
| `qwen-plan-3.8-max` | `qwen-plan`, `qwen-plan-3.8`, `qwen-plan-max`, `qwen3.8`, `qwen3.8-max` | Qwen3.8 Max (Preview) | 千问 Token Plan(订阅) |
200+
| `qwen3.8-max` | `qwen`, `tongyi`, `qwen3.8` | Qwen3.8 Max | 阿里云(按量付费) |
201+
| `qwen3.7-max` | `qwen-max`, `qwen3.7` | Qwen3.7 Max | 阿里云(按量付费) |
202+
| `qwen-plan-3.8-max` | `qwen-plan`, `qwen-plan-3.8`, `qwen-plan-max` | Qwen3.8 Max | 千问 Token Plan(订阅) |
202203
| `qwen-plan-3.7-max` | `qwen-plan-3.7` | Qwen3.7 Max | 千问 Token Plan(订阅) |
203204
| `glm-plan-5.2` | `glm-plan`, `glm`, `glm-5.2`, `zhipu`, `chatglm` | GLM-5.2 | 智谱 GLM Coding Plan(订阅) |
204205
| `glm-global-5.2` | `glm-global`, `zai`, `z-ai` | GLM-5.2 | Z.ai(国际) |
@@ -226,7 +227,7 @@ ccmr claude --print --output-format json "你的问题"
226227
| Kimi K3 (Coding Plan `kimi-plan-k3-1m` / `kimi-plan-k3`) | 1M / 256K(按档位) | 1M / 128K |
227228
| Kimi K2.7 Code / HighSpeed (Coding Plan) | 256K | 32K |
228229
| MiniMax M3 (CN / Global) | 1M | 128K |
229-
| Qwen3.8 Max Preview (仅 Token Plan) | 1M | 64K |
230+
| Qwen3.8 Max (按量付费 / Token Plan) | 1M | 64K |
230231
| Qwen3.7 Max (按量付费 / Token Plan) | 1M | 64K |
231232
| GLM-5.2 (Coding Plan / 国际) | 1M | 128K |
232233
| Step 3.7 Flash (按量付费 / Step Plan) | 256K | 384K |
@@ -405,8 +406,8 @@ npx claude-code-model-router claude
405406
```bash
406407
# 使用短名称(向后兼容)
407408
/model deepseek # 切换到 DeepSeek V4 Pro
408-
/model qwen # 切换到 Qwen3.7 Max(按量付费)
409-
/model qwen-plan # 切换到 Qwen3.8 Max Preview(千问 Token Plan 订阅)
409+
/model qwen # 切换到 Qwen3.8 Max(按量付费)
410+
/model qwen-plan # 切换到 Qwen3.8 Max(千问 Token Plan 订阅)
410411
/model glm # 切换到 GLM-5.2(智谱 Coding Plan 订阅)
411412
/model glm-global # 切换到 GLM-5.2(国际 Z.ai)
412413
/model seed # 切换到 Doubao Seed 2.1 Pro(火山方舟 按量付费)
@@ -434,8 +435,9 @@ npx claude-code-model-router claude
434435
/model kimi-k2.6 # Kimi K2.6
435436
/model kimi-k2.7-code # Kimi K2.7 Code
436437
/model kimi-k2.7-code-highspeed # Kimi K2.7 Code HighSpeed
438+
/model qwen3.8-max # Qwen3.8 Max(按量付费;别名 qwen / qwen3.8)
437439
/model qwen3.7-max # Qwen3.7 Max(按量付费)
438-
/model qwen-plan-3.8-max # Qwen3.8 Max Preview(Token Plan 订阅;别名 qwen3.8 / qwen3.8-max
440+
/model qwen-plan-3.8-max # Qwen3.8 Max(Token Plan 订阅)
439441
/model qwen-plan-3.7-max # Qwen3.7 Max(Token Plan 订阅)
440442
/model seed-2.1-pro # Doubao Seed 2.1 Pro(按量付费)
441443
/model seed-2.1-turbo # Doubao Seed 2.1 Turbo(按量付费)
@@ -524,6 +526,11 @@ DeepSeek Anthropic 兼容接口会忽略 `metadata` 字段,但某些 Claude Co
524526

525527
## 更新日志
526528

529+
### v1.14.0
530+
531+
- **Qwen3.8 Max 正式版(GA)**:模型 ID 去掉 `-preview` 后缀,统一更新为 `qwen3.8-max`(旧 `qwen3.8-max-preview` 上游暂可用但已弃用),`qwen-plan-3.8-max` 同步切到 GA id
532+
- **恢复按量付费 `qwen3.8-max` 并设为默认**:正式版已开放按量付费(实测按量 key 在 dashscope Anthropic 端点返回 200,兑现 v1.11.1 的"待开放后恢复")。裸别名 `qwen` / `tongyi``qwen3.8` / `qwen3.8-max` 现指向按量版 3.8;`qwen3.7-max`(别名 `qwen-max` / `qwen3.7`)保留
533+
527534
### v1.13.0
528535

529536
- 移除 **GLM-5.1**(国内 `glm-plan-5.1` 与国际 `glm-global-5.1`,别名 `glm-5` / `glm-5.1` 同步下线):智谱官方已退役 5.1,Coding Plan 对旧模型的调用会被上游自动切换到 GLM-5.2,继续保留只会误导。GLM 现仅保留 5.2(国内 Coding Plan / 国际 Z.ai)

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: 32 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/config.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.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "claude-code-model-router",
3-
"version": "1.13.0",
3+
"version": "1.14.0",
44
"description": "A lightweight API gateway for routing Claude Code requests to multiple AI models",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

src/config.ts

Lines changed: 32 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -203,12 +203,18 @@ export const DEFAULT_CONFIG: RouterConfig = {
203203
auth_type: 'api_key',
204204
supports_streaming: true,
205205
supports_tools: true,
206-
default_variant: '3.7-max',
206+
default_variant: '3.8-max',
207207
variants: {
208-
// qwen3.8-max-preview is Token-Plan-only today; a pay-as-you-go key
209-
// gets 403 Model.AccessDenied. It lives on the qwen-plan provider
210-
// (sk-sp- subscription key) below, not here. Re-add a pay-go variant
211-
// only once Alibaba opens the preview to pay-as-you-go.
208+
// GA release of Qwen3.8 Max dropped the -preview suffix and opened
209+
// pay-as-you-go access (the preview was Token-Plan-only and 403'd
210+
// pay-go keys; verified live that the GA id returns 200 here).
211+
'3.8-max': {
212+
model_key: 'qwen3.8-max',
213+
display_name: 'Qwen3.8 Max',
214+
model_id: 'qwen3.8-max',
215+
max_tokens: 65536,
216+
context_window: 1000000,
217+
},
212218
'3.7-max': {
213219
model_key: 'qwen3.7-max',
214220
display_name: 'Qwen3.7 Max',
@@ -234,7 +240,9 @@ export const DEFAULT_CONFIG: RouterConfig = {
234240
variants: {
235241
'3.8-max': {
236242
display_name: 'Qwen3.8 Max (Token Plan)',
237-
model_id: 'qwen3.8-max-preview',
243+
// GA id; the retired qwen3.8-max-preview id still answers upstream
244+
// but is deprecated.
245+
model_id: 'qwen3.8-max',
238246
max_tokens: 65536,
239247
context_window: 1000000,
240248
},
@@ -525,14 +533,13 @@ export const DEFAULT_CONFIG: RouterConfig = {
525533
'minimax-io': 'minimax-global-m3',
526534
'minimax-global-m3': 'minimax-global-m3',
527535
mm: 'minimax-m3',
528-
qwen: 'qwen3.7-max',
529-
tongyi: 'qwen3.7-max',
536+
qwen: 'qwen3.8-max',
537+
tongyi: 'qwen3.8-max',
538+
'qwen3.8': 'qwen3.8-max',
539+
'qwen3.8-max': 'qwen3.8-max',
530540
'qwen-max': 'qwen3.7-max',
531541
'qwen3.7-max': 'qwen3.7-max',
532542
'qwen3.7': 'qwen3.7-max',
533-
// qwen3.8-max-preview is reachable only via the Token Plan provider below.
534-
'qwen3.8': 'qwen-plan-3.8-max',
535-
'qwen3.8-max': 'qwen-plan-3.8-max',
536543
'qwen-plan': 'qwen-plan-3.8-max',
537544
'qwen-plan-3.8': 'qwen-plan-3.8-max',
538545
'qwen-plan-3.8-max': 'qwen-plan-3.8-max',
@@ -1287,9 +1294,15 @@ providers:
12871294
api_key_env: QWEN_API_KEY
12881295
auth_header: x-api-key
12891296
auth_type: api_key
1290-
default_variant: 3.7-max
1297+
default_variant: 3.8-max
12911298
variants:
1292-
# qwen3.8-max-preview 目前仅 Token Plan 发放,按量付费调用 403,见下方 qwen-plan
1299+
# Qwen3.8 Max 正式版(GA 去掉 -preview 后缀)已开放按量付费,实测 200
1300+
3.8-max:
1301+
model_key: qwen3.8-max
1302+
display_name: "Qwen3.8 Max"
1303+
model_id: qwen3.8-max
1304+
max_tokens: 65536
1305+
context_window: 1000000
12931306
3.7-max:
12941307
model_key: qwen3.7-max
12951308
display_name: "Qwen3.7 Max"
@@ -1310,7 +1323,8 @@ providers:
13101323
variants:
13111324
3.8-max:
13121325
display_name: "Qwen3.8 Max (Token Plan)"
1313-
model_id: qwen3.8-max-preview
1326+
# GA id;旧 qwen3.8-max-preview 上游暂可用但已弃用
1327+
model_id: qwen3.8-max
13141328
max_tokens: 65536
13151329
context_window: 1000000
13161330
3.7-max:
@@ -1548,13 +1562,13 @@ aliases:
15481562
minimax-io: minimax-global-m3
15491563
minimax-global-m3: minimax-global-m3
15501564
mm: minimax-m3
1551-
qwen: qwen3.7-max
1552-
tongyi: qwen3.7-max
1565+
qwen: qwen3.8-max
1566+
tongyi: qwen3.8-max
1567+
qwen3.8: qwen3.8-max
1568+
qwen3.8-max: qwen3.8-max
15531569
qwen-max: qwen3.7-max
15541570
qwen3.7-max: qwen3.7-max
15551571
qwen3.7: qwen3.7-max
1556-
qwen3.8: qwen-plan-3.8-max
1557-
qwen3.8-max: qwen-plan-3.8-max
15581572
qwen-plan: qwen-plan-3.8-max
15591573
qwen-plan-3.8: qwen-plan-3.8-max
15601574
qwen-plan-3.8-max: qwen-plan-3.8-max

tests/config.test.ts

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -154,21 +154,27 @@ describe('Kimi Code: coding-plan subscription provider', () => {
154154
});
155155
});
156156

157-
describe('Qwen 3.8: Token-Plan-only, 3.5 removal, pay-go stays on 3.7', () => {
157+
describe('Qwen 3.8 GA: pay-go restored as default, Token Plan on the GA id', () => {
158158
const manager = new ConfigManager(null);
159159
const config = manager.getConfig();
160160

161-
it('keeps the pay-as-you-go qwen provider on 3.7-max (3.8 is not pay-go)', () => {
162-
// qwen3.8-max-preview returns 403 on pay-as-you-go keys (Token-Plan-only),
163-
// so it must NOT be a pay-go model; the bare qwen alias stays on 3.7.
164-
expect(config.models['qwen3.8-max']).toBeUndefined();
165-
const model = config.models['qwen3.7-max'];
161+
it('restores qwen3.8-max as the pay-as-you-go default', () => {
162+
// The GA release dropped the -preview suffix AND opened pay-as-you-go
163+
// access (verified live: dashscope endpoint returns 200 with a pay-go
164+
// key), so the v1.11.1 removal is reverted: 3.8 is back as the pay-go
165+
// default and the bare aliases point at it.
166+
const model = config.models['qwen3.8-max'];
166167
expect(model).toBeDefined();
167-
expect(model.model_id).toBe('qwen3.7-max');
168+
expect(model.model_id).toBe('qwen3.8-max');
168169
expect(model.api_key_env).toBe('QWEN_API_KEY');
169-
expect(manager.resolveModelName('qwen')).toBe('qwen3.7-max');
170-
expect(manager.resolveModelName('tongyi')).toBe('qwen3.7-max');
170+
expect(manager.resolveModelName('qwen')).toBe('qwen3.8-max');
171+
expect(manager.resolveModelName('tongyi')).toBe('qwen3.8-max');
172+
expect(manager.resolveModelName('qwen3.8')).toBe('qwen3.8-max');
173+
expect(manager.resolveModelName('qwen3.8-max')).toBe('qwen3.8-max');
174+
// 3.7 stays available under its versioned aliases
175+
expect(config.models['qwen3.7-max'].model_id).toBe('qwen3.7-max');
171176
expect(manager.resolveModelName('qwen-max')).toBe('qwen3.7-max');
177+
expect(manager.resolveModelName('qwen3.7')).toBe('qwen3.7-max');
172178
});
173179

174180
it('removes the qwen3.5 models and their alias', () => {
@@ -178,23 +184,20 @@ describe('Qwen 3.8: Token-Plan-only, 3.5 removal, pay-go stays on 3.7', () => {
178184
expect(config.models[manager.resolveModelName('qwen3.5')]).toBeUndefined();
179185
});
180186

181-
it('serves qwen3.8-max-preview only through the Token Plan provider', () => {
187+
it('keeps the Token Plan provider on its dedicated endpoint with the GA id', () => {
182188
// sk-sp- keys from platform.qianwenai.com only work on the dedicated
183-
// token-plan endpoint (they 403 on the pay-as-you-go dashscope one), so
184-
// the subscription is its own provider/key + base_url — and the only
185-
// place the preview model actually resolves.
189+
// token-plan endpoint (they 403 on the pay-as-you-go dashscope one).
190+
// The subscription model now uses the GA id too (the old -preview id
191+
// still answers upstream but is deprecated).
186192
const model = config.models['qwen-plan-3.8-max'];
187193
expect(model).toBeDefined();
188-
expect(model.model_id).toBe('qwen3.8-max-preview');
194+
expect(model.model_id).toBe('qwen3.8-max');
189195
expect(model.base_url).toBe(
190196
'https://token-plan.cn-beijing.maas.aliyuncs.com/apps/anthropic'
191197
);
192198
expect(model.api_key_env).toBe('QWEN_PLAN_API_KEY');
193199
expect(model.auth_type).toBe('api_key');
194200
expect(manager.resolveModelName('qwen-plan')).toBe('qwen-plan-3.8-max');
195-
// the intuitive 3.8 names route to the subscription model (its only home)
196-
expect(manager.resolveModelName('qwen3.8')).toBe('qwen-plan-3.8-max');
197-
expect(manager.resolveModelName('qwen3.8-max')).toBe('qwen-plan-3.8-max');
198201
expect(config.models['qwen-plan-3.7-max'].model_id).toBe('qwen3.7-max');
199202
expect(config.models['qwen-plan-3.7-max'].api_key_env).toBe('QWEN_PLAN_API_KEY');
200203
});

0 commit comments

Comments
 (0)