Skip to content

Commit f784133

Browse files
feat: Add Qwen3-VL-Plus token limits (256K input, 32K output) (QwenLM#720)
- Added 256K input context window limit for Qwen3-VL-Plus model - Updated output token limit from 8K to 32K for Qwen3-VL-Plus - Added comprehensive tests for both input and output limits As requested by Qwen maintainers for proper model support. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude <[email protected]>
1 parent c405434 commit f784133

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

packages/core/src/core/tokenLimits.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,11 @@ describe('tokenLimit with output type', () => {
278278
expect(tokenLimit('qwen-vl-max-latest', 'output')).toBe(8192); // 8K output
279279
});
280280

281+
it('should return different limits for input vs output for qwen3-vl-plus', () => {
282+
expect(tokenLimit('qwen3-vl-plus', 'input')).toBe(262144); // 256K input
283+
expect(tokenLimit('qwen3-vl-plus', 'output')).toBe(32768); // 32K output
284+
});
285+
281286
it('should return same default limits for unknown models', () => {
282287
expect(tokenLimit('unknown-model', 'input')).toBe(DEFAULT_TOKEN_LIMIT); // 128K input
283288
expect(tokenLimit('unknown-model', 'output')).toBe(

packages/core/src/core/tokenLimits.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ const PATTERNS: Array<[RegExp, TokenCount]> = [
135135
[/^qwen-turbo.*$/, LIMITS['128k']],
136136

137137
// Qwen Vision Models
138+
[/^qwen3-vl-plus$/, LIMITS['256k']], // Qwen3-VL-Plus: 256K input
138139
[/^qwen-vl-max.*$/, LIMITS['128k']],
139140

140141
// Generic vision-model: same as qwen-vl-max (128K token context)
@@ -187,8 +188,8 @@ const OUTPUT_PATTERNS: Array<[RegExp, TokenCount]> = [
187188
// Generic vision-model: same as qwen-vl-max-latest (8K max output tokens)
188189
[/^vision-model$/, LIMITS['8k']],
189190

190-
// Qwen3-VL-Plus: 8,192 max output tokens
191-
[/^qwen3-vl-plus$/, LIMITS['8k']],
191+
// Qwen3-VL-Plus: 32K max output tokens
192+
[/^qwen3-vl-plus$/, LIMITS['32k']],
192193
];
193194

194195
/**

0 commit comments

Comments
 (0)