Skip to content

Commit e28255e

Browse files
authored
fix: token limits for qwen3-max (#724)
1 parent ae3223a commit e28255e

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

.vscode/launch.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,17 @@
108108
"request": "attach",
109109
"skipFiles": ["<node_internals>/**"],
110110
"type": "node"
111+
},
112+
{
113+
"type": "node",
114+
"request": "launch",
115+
"name": "Debug Current TS File",
116+
"runtimeExecutable": "npx",
117+
"runtimeArgs": ["tsx", "${file}"],
118+
"skipFiles": ["<node_internals>/**"],
119+
"cwd": "${workspaceFolder}",
120+
"console": "integratedTerminal",
121+
"env": {}
111122
}
112123
],
113124
"inputs": [

packages/core/src/core/tokenLimits.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ const PATTERNS: Array<[RegExp, TokenCount]> = [
115115
[/^coder-model$/, LIMITS['1m']],
116116

117117
// Commercial Qwen3-Max-Preview: 256K token context
118-
[/^qwen3-max-preview(-.*)?$/, LIMITS['256k']], // catches "qwen3-max-preview" and date variants
118+
[/^qwen3-max(-preview)?(-.*)?$/, LIMITS['256k']], // catches "qwen3-max" or "qwen3-max-preview" and date variants
119119

120120
// Open-source Qwen3-Coder variants: 256K native
121121
[/^qwen3-coder-.*$/, LIMITS['256k']],
@@ -179,8 +179,8 @@ const OUTPUT_PATTERNS: Array<[RegExp, TokenCount]> = [
179179
// Generic coder-model: same as qwen3-coder-plus (64K max output tokens)
180180
[/^coder-model$/, LIMITS['64k']],
181181

182-
// Qwen3-Max-Preview: 65,536 max output tokens
183-
[/^qwen3-max-preview(-.*)?$/, LIMITS['64k']],
182+
// Qwen3-Max: 65,536 max output tokens
183+
[/^qwen3-max(-preview)?(-.*)?$/, LIMITS['64k']],
184184

185185
// Qwen-VL-Max-Latest: 8,192 max output tokens
186186
[/^qwen-vl-max-latest$/, LIMITS['8k']],

0 commit comments

Comments
 (0)