mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-08-11 09:46:05 +00:00
parent
263dbba741
commit
000eee56ed
3 changed files with 8 additions and 8 deletions
|
|
@ -247,7 +247,7 @@ describe('DefaultOpenAICompatibleProvider', () => {
|
|||
'prompt-id',
|
||||
);
|
||||
|
||||
expect(result.max_tokens).toBe(131072);
|
||||
expect(result.max_tokens).toBe(128_000);
|
||||
});
|
||||
|
||||
it('should ignore malformed QWEN_CODE_MAX_OUTPUT_TOKENS values', () => {
|
||||
|
|
|
|||
|
|
@ -309,9 +309,9 @@ describe('tokenLimit with output type', () => {
|
|||
});
|
||||
|
||||
it('should return correct output limits for Claude Opus 4.6 through 4.8', () => {
|
||||
expect(tokenLimit('claude-opus-4-6', 'output')).toBe(131072);
|
||||
expect(tokenLimit('claude-opus-4-7', 'output')).toBe(131072);
|
||||
expect(tokenLimit('vertex/claude-opus-4-8', 'output')).toBe(131072);
|
||||
expect(tokenLimit('claude-opus-4-6', 'output')).toBe(128_000);
|
||||
expect(tokenLimit('claude-opus-4-7', 'output')).toBe(128_000);
|
||||
expect(tokenLimit('vertex/claude-opus-4-8', 'output')).toBe(128_000);
|
||||
expect(tokenLimit('claude-sonnet-4-6', 'output')).toBe(65536);
|
||||
});
|
||||
});
|
||||
|
|
@ -469,9 +469,9 @@ describe('defaultOutputCeiling', () => {
|
|||
});
|
||||
|
||||
it('allows Claude Opus 4.6 through 4.8 to use the full 128K default', () => {
|
||||
expect(defaultOutputCeiling('claude-opus-4-6')).toBe(131_072);
|
||||
expect(defaultOutputCeiling('claude-opus-4-7')).toBe(131_072);
|
||||
expect(defaultOutputCeiling('vertex/claude-opus-4-8')).toBe(131_072);
|
||||
expect(defaultOutputCeiling('claude-opus-4-6')).toBe(128_000);
|
||||
expect(defaultOutputCeiling('claude-opus-4-7')).toBe(128_000);
|
||||
expect(defaultOutputCeiling('vertex/claude-opus-4-8')).toBe(128_000);
|
||||
});
|
||||
|
||||
it('uses the default output limit for an unknown model', () => {
|
||||
|
|
|
|||
|
|
@ -245,7 +245,7 @@ const OUTPUT_PATTERNS: Array<[RegExp, TokenCount]> = [
|
|||
[/^o\d/, LIMITS['128k']], // o-series: 128K
|
||||
|
||||
// Anthropic Claude
|
||||
[/^claude-opus-4-(?:6|7|8)/, LIMITS['128k']], // Opus 4.6-4.8: 128K
|
||||
[/^claude-opus-4-(?:6|7|8)/, 128_000 as TokenCount], // Opus 4.6-4.8: 128K
|
||||
[/^claude-sonnet-4-6/, LIMITS['64k']], // Sonnet 4.6: 64K
|
||||
[/^claude-/, LIMITS['64k']], // Claude fallback: 64K
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue