Skip to content

Revert "Refactor enableThinking/reasoningEffort into IModelCapabilityOptions"#308330

Merged
bhavyaus merged 1 commit intomainfrom
revert-308294-dev/bhavyau/model-capabilities-refactor
Apr 7, 2026
Merged

Revert "Refactor enableThinking/reasoningEffort into IModelCapabilityOptions"#308330
bhavyaus merged 1 commit intomainfrom
revert-308294-dev/bhavyau/model-capabilities-refactor

Conversation

@bhavyaus
Copy link
Copy Markdown
Collaborator

@bhavyaus bhavyaus commented Apr 7, 2026

Reverts #308294

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

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 IModelCapabilityOptions and reintroduce top-level enableThinking / reasoningEffort on IMakeChatRequestOptions, updating call sites and tests accordingly.
  • Move tool-search/context-editing capability logic back into platform/networking/common/anthropic.ts and 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() forwards enableThinking but drops opts.reasoningEffort. Since ToolCallingLoop now computes/passes reasoningEffort via ToolCallingLoopFetchOptions, this override should forward it to makeChatRequest2 as 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

@bhavyaus bhavyaus merged commit c75b65f into main Apr 7, 2026
27 checks passed
@bhavyaus bhavyaus deleted the revert-308294-dev/bhavyau/model-capabilities-refactor branch April 7, 2026 21:50
@vs-code-engineering vs-code-engineering bot added this to the 1.116.0 milestone Apr 7, 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.

3 participants