Skip to content

Commit 567bc49

Browse files
鲁工鲁工
authored andcommitted
fix: qwen3.8-max-preview is Token-Plan-only, not pay-as-you-go
v1.11.0 wrongly assumed qwen3.8-max-preview was callable on pay-as-you-go DashScope and made it the pay-go `qwen` default. A pay-go key actually gets 403 Model.AccessDenied for it (verified: qwen3.7-max [OK], qwen3.8-max [403] on the same key), and there is no self-serve activation — the preview is delivered via the Token Plan subscription (sk-sp- keys) at launch. - Remove the 3.8-max variant from the pay-as-you-go qwen provider; revert its default to 3.7-max, so `qwen`/`tongyi` resolve to a model that works. - Keep qwen3.8-max-preview on the qwen-plan (subscription) provider only. - Point the intuitive `qwen3.8` / `qwen3.8-max` aliases at qwen-plan-3.8-max (its only working home) instead of a dead pay-go key. - Re-add a pay-go variant once Alibaba opens the preview to pay-as-you-go. Evidence: dashscope 403 Model.AccessDenied = no permission for the model; qianwenai.com Token Plan personal doc lists qwen3.8-max-preview under the subscription; pay-as-you-go model list does not.
1 parent 37cb88f commit 567bc49

7 files changed

Lines changed: 62 additions & 69 deletions

File tree

README.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,8 @@ 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.8-max` | `qwen`, `qwen3.8`, `tongyi` | Qwen3.8 Max (Preview) | 阿里云(按量付费) |
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 (Preview) | 千问 Token Plan(订阅) |
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(订阅) |
203202
| `qwen-plan-3.7-max` | `qwen-plan-3.7` | Qwen3.7 Max | 千问 Token Plan(订阅) |
204203
| `glm-5.2` | `glm`, `zhipu`, `chatglm` | GLM-5.2 | 智谱 AI(国内) |
205204
| `glm-5.1` | `glm-5` | GLM-5.1 | 智谱 AI(国内) |
@@ -229,7 +228,7 @@ ccmr claude --print --output-format json "你的问题"
229228
| Kimi K3 (Coding Plan `kimi-plan-k3-1m` / `kimi-plan-k3`) | 1M / 256K(按档位) | 1M / 128K |
230229
| Kimi K2.7 Code / HighSpeed (Coding Plan) | 256K | 32K |
231230
| MiniMax M3 (CN / Global) | 1M | 128K |
232-
| Qwen3.8 Max Preview (按量付费 / Token Plan) | 1M | 64K |
231+
| Qwen3.8 Max Preview ( Token Plan) | 1M | 64K |
233232
| Qwen3.7 Max (按量付费 / Token Plan) | 1M | 64K |
234233
| GLM-5.2 (国内 / 国际) | 1M | 128K |
235234
| GLM-5.1 (国内 / 国际) | 200K | 128K |
@@ -407,8 +406,7 @@ npx claude-code-model-router claude
407406
```bash
408407
# 使用短名称(向后兼容)
409408
/model deepseek # 切换到 DeepSeek V4 Pro
410-
/model qwen # 切换到 Qwen3.8 Max Preview(按量付费)
411-
/model qwen-max # 切换到 Qwen3.7 Max(按量付费)
409+
/model qwen # 切换到 Qwen3.7 Max(按量付费)
412410
/model qwen-plan # 切换到 Qwen3.8 Max Preview(千问 Token Plan 订阅)
413411
/model glm # 切换到 GLM-5.2(国内 智谱)
414412
/model glm-global # 切换到 GLM-5.2(国际 Z.ai)
@@ -439,9 +437,8 @@ npx claude-code-model-router claude
439437
/model kimi-k2.6 # Kimi K2.6
440438
/model kimi-k2.7-code # Kimi K2.7 Code
441439
/model kimi-k2.7-code-highspeed # Kimi K2.7 Code HighSpeed
442-
/model qwen3.8-max # Qwen3.8 Max Preview(按量付费)
443440
/model qwen3.7-max # Qwen3.7 Max(按量付费)
444-
/model qwen-plan-3.8-max # Qwen3.8 Max Preview(Token Plan 订阅)
441+
/model qwen-plan-3.8-max # Qwen3.8 Max Preview(Token Plan 订阅;别名 qwen3.8 / qwen3.8-max
445442
/model qwen-plan-3.7-max # Qwen3.7 Max(Token Plan 订阅)
446443
/model seed-2.1-pro # Doubao Seed 2.1 Pro(按量付费)
447444
/model seed-2.1-turbo # Doubao Seed 2.1 Turbo(按量付费)
@@ -530,6 +527,13 @@ DeepSeek Anthropic 兼容接口会忽略 `metadata` 字段,但某些 Claude Co
530527

531528
## 更新日志
532529

530+
### v1.11.1
531+
532+
- 修正 v1.11.0 的一个错误假设:**`qwen3.8-max-preview` 目前仅通过千问 Token Plan(`sk-sp-` 订阅 Key)发放**,按量付费账号调用返回 `403 Model.AccessDenied`(权限问题,且无自助开通入口)。因此:
533+
- 从按量付费 `qwen` provider 移除 `qwen3.8-max` 变体,默认改回 `qwen3.7-max`;裸别名 `qwen` / `tongyi` 回指 `qwen3.7-max`
534+
- 3.8 仅保留在 `qwen-plan` provider(订阅可用);别名 `qwen3.8` / `qwen3.8-max` 现指向 `qwen-plan-3.8-max`
535+
- 待阿里将该预览开放到按量付费后,再恢复 pay-go 变体
536+
533537
### v1.11.0
534538

535539
- 新增 **Qwen3.8 Max Preview**`qwen3.8-max`,模型 ID `qwen3.8-max-preview`,阿里 2026-07-19 发布的 2.4T 旗舰预览版):按量付费 `qwen` provider 的默认模型,裸别名 `qwen` / `tongyi` 现指向它;`qwen3.7-max`(别名 `qwen-max` / `qwen3.7`)保留

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: 16 additions & 23 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.11.0",
3+
"version": "1.11.1",
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: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -198,15 +198,12 @@ export const DEFAULT_CONFIG: RouterConfig = {
198198
auth_type: 'api_key',
199199
supports_streaming: true,
200200
supports_tools: true,
201-
default_variant: '3.8-max',
201+
default_variant: '3.7-max',
202202
variants: {
203-
'3.8-max': {
204-
model_key: 'qwen3.8-max',
205-
display_name: 'Qwen3.8 Max',
206-
model_id: 'qwen3.8-max-preview',
207-
max_tokens: 65536,
208-
context_window: 1000000,
209-
},
203+
// qwen3.8-max-preview is Token-Plan-only today; a pay-as-you-go key
204+
// gets 403 Model.AccessDenied. It lives on the qwen-plan provider
205+
// (sk-sp- subscription key) below, not here. Re-add a pay-go variant
206+
// only once Alibaba opens the preview to pay-as-you-go.
210207
'3.7-max': {
211208
model_key: 'qwen3.7-max',
212209
display_name: 'Qwen3.7 Max',
@@ -527,13 +524,14 @@ export const DEFAULT_CONFIG: RouterConfig = {
527524
'minimax-io': 'minimax-global-m3',
528525
'minimax-global-m3': 'minimax-global-m3',
529526
mm: 'minimax-m3',
530-
qwen: 'qwen3.8-max',
531-
tongyi: 'qwen3.8-max',
532-
'qwen3.8': 'qwen3.8-max',
533-
'qwen3.8-max': 'qwen3.8-max',
527+
qwen: 'qwen3.7-max',
528+
tongyi: 'qwen3.7-max',
534529
'qwen-max': 'qwen3.7-max',
535530
'qwen3.7-max': 'qwen3.7-max',
536531
'qwen3.7': 'qwen3.7-max',
532+
// qwen3.8-max-preview is reachable only via the Token Plan provider below.
533+
'qwen3.8': 'qwen-plan-3.8-max',
534+
'qwen3.8-max': 'qwen-plan-3.8-max',
537535
'qwen-plan': 'qwen-plan-3.8-max',
538536
'qwen-plan-3.8': 'qwen-plan-3.8-max',
539537
'qwen-plan-3.8-max': 'qwen-plan-3.8-max',
@@ -1287,14 +1285,9 @@ providers:
12871285
api_key_env: QWEN_API_KEY
12881286
auth_header: x-api-key
12891287
auth_type: api_key
1290-
default_variant: 3.8-max
1288+
default_variant: 3.7-max
12911289
variants:
1292-
3.8-max:
1293-
model_key: qwen3.8-max
1294-
display_name: "Qwen3.8 Max"
1295-
model_id: qwen3.8-max-preview
1296-
max_tokens: 65536
1297-
context_window: 1000000
1290+
# qwen3.8-max-preview 目前仅 Token Plan 发放,按量付费调用 403,见下方 qwen-plan
12981291
3.7-max:
12991292
model_key: qwen3.7-max
13001293
display_name: "Qwen3.7 Max"
@@ -1557,13 +1550,13 @@ aliases:
15571550
minimax-io: minimax-global-m3
15581551
minimax-global-m3: minimax-global-m3
15591552
mm: minimax-m3
1560-
qwen: qwen3.8-max
1561-
tongyi: qwen3.8-max
1562-
qwen3.8: qwen3.8-max
1563-
qwen3.8-max: qwen3.8-max
1553+
qwen: qwen3.7-max
1554+
tongyi: qwen3.7-max
15641555
qwen-max: qwen3.7-max
15651556
qwen3.7-max: qwen3.7-max
15661557
qwen3.7: qwen3.7-max
1558+
qwen3.8: qwen-plan-3.8-max
1559+
qwen3.8-max: qwen-plan-3.8-max
15671560
qwen-plan: qwen-plan-3.8-max
15681561
qwen-plan-3.8: qwen-plan-3.8-max
15691562
qwen-plan-3.8-max: qwen-plan-3.8-max

tests/config.test.ts

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -149,21 +149,20 @@ describe('Kimi Code: coding-plan subscription provider', () => {
149149
});
150150
});
151151

152-
describe('Qwen 3.8: flagship variant, 3.5 removal, and Token Plan provider', () => {
152+
describe('Qwen 3.8: Token-Plan-only, 3.5 removal, pay-go stays on 3.7', () => {
153153
const manager = new ConfigManager(null);
154154
const config = manager.getConfig();
155155

156-
it('exposes qwen3.8-max as the pay-as-you-go default and bare-alias target', () => {
157-
const model = config.models['qwen3.8-max'];
156+
it('keeps the pay-as-you-go qwen provider on 3.7-max (3.8 is not pay-go)', () => {
157+
// qwen3.8-max-preview returns 403 on pay-as-you-go keys (Token-Plan-only),
158+
// so it must NOT be a pay-go model; the bare qwen alias stays on 3.7.
159+
expect(config.models['qwen3.8-max']).toBeUndefined();
160+
const model = config.models['qwen3.7-max'];
158161
expect(model).toBeDefined();
159-
expect(model.model_id).toBe('qwen3.8-max-preview');
160-
expect(model.base_url).toBe('https://dashscope.aliyuncs.com/apps/anthropic');
162+
expect(model.model_id).toBe('qwen3.7-max');
161163
expect(model.api_key_env).toBe('QWEN_API_KEY');
162-
expect(model.max_tokens).toBe(65536);
163-
expect(model.context_window).toBe(1000000);
164-
// bare aliases now resolve to the new flagship; qwen-max stays on 3.7
165-
expect(manager.resolveModelName('qwen')).toBe('qwen3.8-max');
166-
expect(manager.resolveModelName('tongyi')).toBe('qwen3.8-max');
164+
expect(manager.resolveModelName('qwen')).toBe('qwen3.7-max');
165+
expect(manager.resolveModelName('tongyi')).toBe('qwen3.7-max');
167166
expect(manager.resolveModelName('qwen-max')).toBe('qwen3.7-max');
168167
});
169168

@@ -174,16 +173,20 @@ describe('Qwen 3.8: flagship variant, 3.5 removal, and Token Plan provider', ()
174173
expect(config.models[manager.resolveModelName('qwen3.5')]).toBeUndefined();
175174
});
176175

177-
it('exposes the Token Plan subscription as its own provider and key', () => {
176+
it('serves qwen3.8-max-preview only through the Token Plan provider', () => {
178177
// sk-sp- keys from platform.qianwenai.com hit the same DashScope Anthropic
179-
// endpoint but bill against the subscription -> a separate provider/key.
178+
// endpoint but bill against the subscription -> a separate provider/key,
179+
// and the only place the preview model actually resolves.
180180
const model = config.models['qwen-plan-3.8-max'];
181181
expect(model).toBeDefined();
182182
expect(model.model_id).toBe('qwen3.8-max-preview');
183183
expect(model.base_url).toBe('https://dashscope.aliyuncs.com/apps/anthropic');
184184
expect(model.api_key_env).toBe('QWEN_PLAN_API_KEY');
185185
expect(model.auth_type).toBe('api_key');
186186
expect(manager.resolveModelName('qwen-plan')).toBe('qwen-plan-3.8-max');
187+
// the intuitive 3.8 names route to the subscription model (its only home)
188+
expect(manager.resolveModelName('qwen3.8')).toBe('qwen-plan-3.8-max');
189+
expect(manager.resolveModelName('qwen3.8-max')).toBe('qwen-plan-3.8-max');
187190
expect(config.models['qwen-plan-3.7-max'].model_id).toBe('qwen3.7-max');
188191
expect(config.models['qwen-plan-3.7-max'].api_key_env).toBe('QWEN_PLAN_API_KEY');
189192
});

0 commit comments

Comments
 (0)