Skip to content

Cap budget token calculation for Anthropic models in messages API#3283

Merged
bhavyaus merged 2 commits intomainfrom
dev/bhavyau/update-messaging
Jan 29, 2026
Merged

Cap budget token calculation for Anthropic models in messages API#3283
bhavyaus merged 2 commits intomainfrom
dev/bhavyau/update-messaging

Conversation

@bhavyaus
Copy link
Contributor

Polishing settings description

Copilot AI review requested due to automatic review settings January 29, 2026 18:55
@bhavyaus bhavyaus enabled auto-merge January 29, 2026 18:55
@vs-code-engineering vs-code-engineering bot added this to the January 2026 milestone Jan 29, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request removes the 32,000 token hardcoded cap on the thinking budget for Anthropic models in the Messages API and updates the related documentation to reflect this change.

Changes:

  • Removed the 32,000 token cap from the Math.min() calculation in the Messages API thinking budget logic
  • Updated the configuration description to reflect that the valid range is now 1,024 to max_tokens-1 instead of explicitly mentioning 32,000

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/platform/endpoint/node/messagesApi.ts Removes hardcoded 32000 cap from thinking budget calculation, now only capping at (maxTokens - 1) and the configured budget
package.nls.json Updates the anthropic.thinking.budgetTokens configuration description to remove the explicit 32,000 upper limit reference

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@bhavyaus bhavyaus added this pull request to the merge queue Jan 29, 2026
Merged via the queue into main with commit 1b21554 Jan 29, 2026
19 checks passed
@bhavyaus bhavyaus deleted the dev/bhavyau/update-messaging branch January 29, 2026 22:33
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.

2 participants