Skip to content

fix: calculate max output tokens based on budget thinking tokens - #2056

Merged
rekram1-node merged 2 commits into
anomalyco:devfrom
snipeship:hotfix/budget-output-tokens
Sep 7, 2025
Merged

rekram1-node merged 2 commits into
anomalyco:devfrom
snipeship:hotfix/budget-output-tokens

Conversation

@snipeship

@snipeship snipeship commented Aug 19, 2025 •

Copy link
Copy Markdown
Contributor

this is just a proposal to make the process of enabling reasoning on Anthropic models not a pita.

the current implementation can cause max tokens errors when budgetTokens is set, forcing users to debug token limits, etc.

this change fixes that by adjusting the max output tokens automatically.

closes #2055

@snipeship
snipeship force-pushed the hotfix/budget-output-tokens branch from bc85f92 to 0b5200b Compare September 2, 2025 12:04
@rekram1-node
rekram1-node force-pushed the hotfix/budget-output-tokens branch from 0b5200b to 2ce4744 Compare September 7, 2025 18:03
@rekram1-node
rekram1-node merged commit 4654fb8 into anomalyco:dev Sep 7, 2025
lacymorrow pushed a commit to lacymorrow/lash that referenced this pull request Sep 8, 2025
Rwanbt pushed a commit to Rwanbt/unifia that referenced this pull request May 5, 2026
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
meSingh pushed a commit to meSingh/opencode that referenced this pull request Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: incorrect max_tokens calculation when "thinking" is enabled & "budgetTokens" is set for Anthropic models

2 participants