Skip to content

Remove anthropic.thinking.budgetTokens setting and hardcode budget to 16000#312824

Merged
bhavyaus merged 1 commit into
mainfrom
dev/bhavyau/remove-anthropic-thinking-budget-setting
Apr 27, 2026
Merged

Remove anthropic.thinking.budgetTokens setting and hardcode budget to 16000#312824
bhavyaus merged 1 commit into
mainfrom
dev/bhavyau/remove-anthropic-thinking-budget-setting

Conversation

@bhavyaus
Copy link
Copy Markdown
Collaborator

Summary

Remove the user-configurable setting github.copilot.chat.anthropic.thinking.budgetTokens and hardcode the thinking budget to 16000 (the previous default value).

Changes

  • configurationService.ts — removed AnthropicThinkingBudget setting definition
  • package.json — removed the configuration property
  • package.nls.json — removed the localization string
  • messagesApi.ts — replaced config lookup with hardcoded 16000, removed "explicitly disabled" code path
  • anthropicProvider.ts — replaced config lookup with hardcoded 16000, simplified _getThinkingBudget()
  • messagesApi.spec.ts — removed mockConfig.setConfig call and cleaned up unused imports/variables

… 16000

Remove the user-configurable setting github.copilot.chat.anthropic.thinking.budgetTokens
and hardcode the thinking budget to 16000 (the previous default value).

This simplifies the thinking budget logic by:
- Removing the setting definition from ConfigKey, package.json, and NLS
- Hardcoding budget=16000 in messagesApi.ts and anthropicProvider.ts
- Removing the ability to disable thinking by setting budget to 0
- Cleaning up unused imports/variables in the test file
Copilot AI review requested due to automatic review settings April 27, 2026 16:26
@bhavyaus bhavyaus enabled auto-merge (squash) April 27, 2026 16:27
@bhavyaus bhavyaus added the ~release-cherry-pick Trigger: cherry-pick this PR to the latest release branch label Apr 27, 2026
@vs-code-engineering
Copy link
Copy Markdown
Contributor

This PR will be automatically cherry-picked to release/1.118 when merged.

Copy link
Copy Markdown
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 PR removes the user-facing configuration for Anthropic “thinking” budget tokens and standardizes behavior by hardcoding the budget to the previous default (16000) across the Anthropic request builders.

Changes:

  • Removes the github.copilot.chat.anthropic.thinking.budgetTokens setting from configuration definitions and extension contributions.
  • Hardcodes the Anthropic thinking budget to 16000 in both the Messages API request builder and the BYOK Anthropic provider.
  • Updates tests and localization/configuration assets to eliminate now-dead configuration wiring.
Show a summary per file
File Description
extensions/copilot/src/platform/endpoint/test/node/messagesApi.spec.ts Removes test configuration setup tied to the deleted setting.
extensions/copilot/src/platform/endpoint/node/messagesApi.ts Replaces config lookup/disable path with a hardcoded thinking budget and simplified logic.
extensions/copilot/src/platform/configuration/common/configurationService.ts Deletes the internal ConfigKey entry for the removed setting.
extensions/copilot/src/extension/byok/vscode-node/anthropicProvider.ts Hardcodes thinking budget in BYOK Anthropic provider and simplifies _getThinkingBudget().
extensions/copilot/package.nls.json Removes the localization string for the deleted setting.
extensions/copilot/package.json Removes the contributed configuration property for the deleted setting.

Copilot's findings

Comments suppressed due to low confidence (1)

extensions/copilot/src/platform/endpoint/node/messagesApi.ts:148

  • This introduces a hardcoded magic number (16000) inside request-body construction. Since the same budget is also hardcoded elsewhere (e.g. BYOK Anthropic provider), consider defining a shared constant (and/or a single helper) so the default can’t drift across codepaths.
		const hardcodedBudget = 16000;
		if (endpoint.supportsAdaptiveThinking) {
			thinkingConfig = { type: 'adaptive', display: 'summarized' };
		} else if (endpoint.maxThinkingBudget && endpoint.minThinkingBudget) {
			const maxTokens = options.postOptions.max_tokens ?? 1024;
			const minBudget = endpoint.minThinkingBudget ?? 1024;
			const normalizedBudget = hardcodedBudget < minBudget ? minBudget : hardcodedBudget;
			const maxBudget = endpoint.maxThinkingBudget ?? 32000;
			const thinkingBudget = Math.min(maxBudget, maxTokens - 1, normalizedBudget);
  • Files reviewed: 6/6 changed files
  • Comments generated: 2

Comment thread extensions/copilot/src/platform/endpoint/node/messagesApi.ts
@bhavyaus bhavyaus merged commit 22fd389 into main Apr 27, 2026
30 checks passed
@bhavyaus bhavyaus deleted the dev/bhavyau/remove-anthropic-thinking-budget-setting branch April 27, 2026 17:02
@vs-code-engineering vs-code-engineering Bot added this to the 1.117.0 milestone Apr 27, 2026
@vs-code-engineering vs-code-engineering Bot added release-cherry-pick Automated cherry-pick between release and main branches and removed ~release-cherry-pick Trigger: cherry-pick this PR to the latest release branch labels Apr 27, 2026
bhavyaus added a commit that referenced this pull request Apr 27, 2026
…ode budget to 16000 (#312824) (#312844)

Remove anthropic.thinking.budgetTokens setting and hardcode budget to 16000 (#312824)

Remove the user-configurable setting github.copilot.chat.anthropic.thinking.budgetTokens
and hardcode the thinking budget to 16000 (the previous default value).

This simplifies the thinking budget logic by:
- Removing the setting definition from ConfigKey, package.json, and NLS
- Hardcoding budget=16000 in messagesApi.ts and anthropicProvider.ts
- Removing the ability to disable thinking by setting budget to 0
- Cleaning up unused imports/variables in the test file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-cherry-pick Automated cherry-pick between release and main branches

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants