Conversation
…Options …" This reverts commit 6b33538.
Contributor
There was a problem hiding this comment.
Pull request overview
Reverts the earlier refactor that moved enableThinking/reasoningEffort into IMakeChatRequestOptions.modelCapabilities, restoring the flattened request options shape and moving Anthropic capability helpers back to the Anthropic-specific module.
Changes:
- Remove
IModelCapabilityOptionsand reintroduce top-levelenableThinking/reasoningEffortonIMakeChatRequestOptions, updating call sites and tests accordingly. - Move tool-search/context-editing capability logic back into
platform/networking/common/anthropic.tsand remove corresponding endpoint metadata fields/types. - Update tool-calling loops/endpoints to forward the new flattened options when issuing chat requests.
Show a summary per file
| File | Description |
|---|---|
| extensions/copilot/src/platform/networking/common/networking.ts | Restores flattened enableThinking/reasoningEffort options and removes modelCapabilities typing. |
| extensions/copilot/src/platform/networking/common/anthropic.ts | Reintroduces Anthropic-specific capability helpers/constants (tool search + context editing) and updates enablement checks. |
| extensions/copilot/src/platform/endpoint/test/node/messagesApi.spec.ts | Updates tests to use flattened request options. |
| extensions/copilot/src/platform/endpoint/node/responsesApi.ts | Switches to options.reasoningEffort when building Responses API requests. |
| extensions/copilot/src/platform/endpoint/node/messagesApi.ts | Uses flattened thinking/effort fields and changes tool-search/context-editing gating logic. |
| extensions/copilot/src/platform/endpoint/node/chatEndpoint.ts | Removes tool-search/context-editing endpoint properties and updates Anthropic beta header construction. |
| extensions/copilot/src/platform/endpoint/common/endpointProvider.ts | Removes tool_search / context_editing from capabilities typing. |
| extensions/copilot/src/platform/endpoint/common/chatModelCapabilities.ts | Removes tool-search/context-editing helpers/constants that were moved out. |
| extensions/copilot/src/extension/tools/node/toolSearchTool.ts | Imports supported-model list from Anthropic module. |
| extensions/copilot/src/extension/prompt/node/searchSubagentToolCallingLoop.ts | Forwards flattened thinking/effort options into subagent requests. |
| extensions/copilot/src/extension/prompt/node/executionSubagentToolCallingLoop.ts | Forwards flattened thinking/effort options into subagent requests. |
| extensions/copilot/src/extension/prompt/node/defaultIntentRequestHandler.ts | Updates default tool-calling loop to use flattened thinking options. |
| extensions/copilot/src/extension/intents/node/toolCallingLoop.ts | Threads reasoningEffort as a first-class fetch option instead of nested modelCapabilities. |
| extensions/copilot/src/extension/externalAgents/node/oaiLanguageModelServer.ts | Updates request construction to use flattened enableThinking. |
| extensions/copilot/src/extension/conversation/vscode-node/languageModelAccess.ts | Passes reasoningEffort directly on request options. |
| extensions/copilot/src/extension/chatSessions/claude/node/claudeLanguageModelServer.ts | Updates request construction to use flattened enableThinking. |
Copilot's findings
Comments suppressed due to low confidence (1)
extensions/copilot/src/extension/prompt/node/defaultIntentRequestHandler.ts:702
fetch()forwardsenableThinkingbut dropsopts.reasoningEffort. SinceToolCallingLoopnow computes/passesreasoningEffortviaToolCallingLoopFetchOptions, this override should forward it tomakeChatRequest2as well; otherwise the user-selected/configured reasoning effort never reaches the endpoint for default intent requests.
const location = this.options.overrideRequestLocation ?? this.options.location;
const isThinkingLocation = location === ChatLocation.Agent || location === ChatLocation.MessagesProxy;
return this.options.invocation.endpoint.makeChatRequest2({
...opts,
enableThinking: isThinkingLocation && opts.enableThinking,
debugName,
conversationId: this.options.conversation.sessionId,
turnId: opts.turnId,
finishedCb: (text, index, delta) => {
- Files reviewed: 16/16 changed files
- Comments generated: 1
dmitrivMS
approved these changes
Apr 7, 2026
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.
Reverts #308294