Increase DEFAULT_OUTPUT_TOKEN_LIMIT from 8K to 16K#2411
Merged
Conversation
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Contributor
📋 Review SummaryThis PR increases the 🔍 General Feedback
🎯 Specific Feedback🟡 High
🟢 Medium
🔵 Low
✅ Highlights
|
Contributor
Code Coverage Summary
CLI Package - Full Text ReportCore Package - Full Text ReportFor detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run. |
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TLDR
Increased
DEFAULT_OUTPUT_TOKEN_LIMITfrom 8,192 (8K) to 16,384 (16K) tokens. This change allows the model to generate longer responses by default.Dive Deeper
The constant
DEFAULT_OUTPUT_TOKEN_LIMITinpackages/core/src/core/tokenLimits.tshas been updated from8_192to16_384. This is a single-line change that affects the default maximum output tokens for model responses when no specific limit is configured.Compatibility Analysis
Based on
models.devdata covering 3,813 models:Breakdown of incompatible models (844 total):
Key observations:
Impact: Users of models with output limits below 16K will need to explicitly configure the max tokens in their settings:
model.generationConfig.samplingParams.max_tokensfor model-specific configurationmodelProvider.generationConfig.samplingParams.max_tokensfor provider-level configurationThis is a breaking change for models with 8K or lower limits (e.g., DeepSeek-V3, Qwen-Max, Llama-3.1) but improves the default experience for the majority of modern models.
Reviewer Test Plan
Verify the change in
packages/core/src/core/tokenLimits.ts:grep "DEFAULT_OUTPUT_TOKEN_LIMIT" packages/core/src/core/tokenLimits.tsExpected output should show
16_384instead of8_192.Run the existing tests to ensure no regressions:
npm test -- packages/core/src/core/tokenLimits.test.tsOptionally, verify the constant is correctly exported and used throughout the codebase.
Testing Matrix
Linked issues / bugs
Related to #2356