Remove anthropic.thinking.budgetTokens setting and hardcode budget to 16000#312824
Merged
bhavyaus merged 1 commit intoApr 27, 2026
Merged
Conversation
… 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
Contributor
|
This PR will be automatically cherry-picked to |
Contributor
There was a problem hiding this comment.
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.budgetTokenssetting from configuration definitions and extension contributions. - Hardcodes the Anthropic thinking budget to
16000in 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
Yoyokrazy
approved these changes
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
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.
Summary
Remove the user-configurable setting
github.copilot.chat.anthropic.thinking.budgetTokensand hardcode the thinking budget to16000(the previous default value).Changes
AnthropicThinkingBudgetsetting definition16000, removed "explicitly disabled" code path16000, simplified_getThinkingBudget()mockConfig.setConfigcall and cleaned up unused imports/variables