From d2db6e96d5f985df2862cd5baa7c84eb6ca348f0 Mon Sep 17 00:00:00 2001 From: Tim Rogers Date: Mon, 30 Mar 2026 17:09:28 +0100 Subject: [PATCH] Use selected model when starting Copilot coding agent task (#4820) When setting the session type to "Cloud", VS Code correctly lists models available for Copilot coding agent. However, the selected model is not honored because it is sent in the `model_name` parameter instead of the expected `model` parameter. This switches to using the expected `model` parameter, as expected by the `RemoteAgentJobPayload` type and the underlying API. --- .../chatSessions/vscode-node/copilotCloudSessionsProvider.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/copilot/src/extension/chatSessions/vscode-node/copilotCloudSessionsProvider.ts b/extensions/copilot/src/extension/chatSessions/vscode-node/copilotCloudSessionsProvider.ts index a00a712c3b6..d44c3032d73 100644 --- a/extensions/copilot/src/extension/chatSessions/vscode-node/copilotCloudSessionsProvider.ts +++ b/extensions/copilot/src/extension/chatSessions/vscode-node/copilotCloudSessionsProvider.ts @@ -2566,7 +2566,7 @@ export class CopilotCloudSessionsProvider extends Disposable implements vscode.C problem_statement: problemStatement, event_type: 'visual_studio_code_remote_agent_tool_invoked', ...(customAgentName && customAgentName !== DEFAULT_CUSTOM_AGENT_ID && { custom_agent: customAgentName }), - ...(modelName && modelName !== DEFAULT_MODEL_ID && { model_name: modelName }), + ...(modelName && modelName !== DEFAULT_MODEL_ID && { model: modelName }), ...(resolvePartnerAgentName(partnerAgentName)), pull_request: { title,