[Feat] Expose configurable max output token slider for Anthropic models#942
Draft
zoomote[bot] wants to merge 3 commits into
Draft
[Feat] Expose configurable max output token slider for Anthropic models#942zoomote[bot] wants to merge 3 commits into
zoomote[bot] wants to merge 3 commits into
Conversation
Contributor
Author
|
All previously reported issues are resolved; no new code issues found. See task
Reviewed 1049beb |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Contributor
Author
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.
What changed
getModelMaxOutputTokens()insrc/shared/api.tsnow honorssettings.modelMaxTokensfor Anthropic hybrid models when reasoning is disabled, capping the override at the model's advertisedmaxTokensand falling back to the 8K default when the override is unset or non-positive.ThinkingBudgetcomponent now surfaces a standalone "Max Output Tokens" slider for Anthropic models in the binary-reasoning, reasoning-budget (reasoning off), and non-reasoning branches, so users can override the conservative 8K default from the UI.maxTokensceiling so it never exceeds the slider's maximum.modelMaxTokens: 0edge case; added webview UI tests for Anthropic hybrid, binary, non-reasoning, and OpenRouter Anthropic slider rendering.Why this change was made
Anthropic hybrid reasoning models currently always clamp output to 8K when reasoning is disabled, even though the API supports much larger outputs. Exposing
modelMaxTokensas a configurable slider gives users control over the output budget without changing the safe default when no override is set.Impact
Users can now raise the max output tokens for Anthropic models from the settings UI; the default behavior remains unchanged when the override is not set.