fix: token limits for qwen3-max (#724)

This commit is contained in:
Mingholy
2025-10-14 15:40:20 +08:00
committed by GitHub
parent ae3223a317
commit e28255edb6
2 changed files with 14 additions and 3 deletions

11
.vscode/launch.json vendored
View File

@@ -108,6 +108,17 @@
"request": "attach",
"skipFiles": ["<node_internals>/**"],
"type": "node"
},
{
"type": "node",
"request": "launch",
"name": "Debug Current TS File",
"runtimeExecutable": "npx",
"runtimeArgs": ["tsx", "${file}"],
"skipFiles": ["<node_internals>/**"],
"cwd": "${workspaceFolder}",
"console": "integratedTerminal",
"env": {}
}
],
"inputs": [

View File

@@ -115,7 +115,7 @@ const PATTERNS: Array<[RegExp, TokenCount]> = [
[/^coder-model$/, LIMITS['1m']],
// Commercial Qwen3-Max-Preview: 256K token context
[/^qwen3-max-preview(-.*)?$/, LIMITS['256k']], // catches "qwen3-max-preview" and date variants
[/^qwen3-max(-preview)?(-.*)?$/, LIMITS['256k']], // catches "qwen3-max" or "qwen3-max-preview" and date variants
// Open-source Qwen3-Coder variants: 256K native
[/^qwen3-coder-.*$/, LIMITS['256k']],
@@ -179,8 +179,8 @@ const OUTPUT_PATTERNS: Array<[RegExp, TokenCount]> = [
// Generic coder-model: same as qwen3-coder-plus (64K max output tokens)
[/^coder-model$/, LIMITS['64k']],
// Qwen3-Max-Preview: 65,536 max output tokens
[/^qwen3-max-preview(-.*)?$/, LIMITS['64k']],
// Qwen3-Max: 65,536 max output tokens
[/^qwen3-max(-preview)?(-.*)?$/, LIMITS['64k']],
// Qwen-VL-Max-Latest: 8,192 max output tokens
[/^qwen-vl-max-latest$/, LIMITS['8k']],