Fix "The thinking budget (52428) is invalid" Gemini 2.5 Pro Preview e… #4401
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
Fixes #4399
I think this has caused issues before; if you check the "Thinking Budget" box and don't change the defaults then we don't end up persisting the custom
maxTokensandmaxThinkingTokensin your settings. We probably should fix this on the webview side, but we still need to handle the case where these values areundefinedin the settings and default to the values that we display in the webview (in this caseDEFAULT_HYBRID_REASONING_MODEL_MAX_TOKENSandDEFAULT_HYBRID_REASONING_MODEL_THINKING_TOKENS).Important
Fixes Gemini 2.5 Pro Preview thinking budget bug by defaulting to specified token values when settings are undefined and updates tests accordingly.
DEFAULT_HYBRID_REASONING_MODEL_MAX_TOKENSandDEFAULT_HYBRID_REASONING_MODEL_THINKING_TOKENSwhen settings areundefinedinmodel-params.ts.maxTokensand is at least 1024 tokens.model-params.spec.tsto test new default behavior and clamping logic for reasoning budget and thinking tokens.model-params.test.tstomodel-params.spec.tsfor consistency with testing framework.This description was created by
for e50c7ab. You can customize this summary. It will automatically update as commits are pushed.