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.
This commit is contained in:
Tim Rogers
2026-03-30 17:09:28 +01:00
committed by GitHub
parent ea0b874274
commit d2db6e96d5

View File

@@ -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,