fix(vlm): omit unset default max_tokens#2949
Merged
Merged
Conversation
2872791 to
2b1dacb
Compare
chenjw
approved these changes
Jul 2, 2026
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.
Description
Remove the remaining hardcoded VLM
max_tokens=32768fallbacks outside the OpenAI backend. Whenvlm.max_tokensis not configured, these backends now omit the token-limit parameter and let the selected model/provider apply its own default.Related Issue
Fixes #2751
Follow-up to #2946, which already removed the OpenAI backend fallback.
Type of Change
Changes Made
max_tokenswhenvlm.max_tokensis unset in LiteLLM and VolcEngine VLM backends.max_tokensconstant and fallback.Testing
Not run locally; this is a small request-parameter change and the earlier
uv runvalidation was interrupted before completion.Checklist
Screenshots (if applicable)
N/A
Additional Notes
Leaving the parameter unset avoids hardcoding one completion-token budget for models and providers with different limits.