Attach response output message IDs only to phased assistant messages#4785
Merged
dileepyavan merged 11 commits intomainfrom Mar 30, 2026
Merged
Attach response output message IDs only to phased assistant messages#4785dileepyavan merged 11 commits intomainfrom
dileepyavan merged 11 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR simplifies OpenAI Responses API round-tripping by attaching the responseOutputMessageId only to phased assistant messages (stored alongside phase metadata), and stops emitting/sending that ID for non-phased assistant history.
Changes:
- Added
responseOutputMessageIdplumbing to streamed deltas and tool-calling round persistence. - Moved Responses API request-body reconstruction to read the ID from phase metadata and emit IDs only for phased assistant messages.
- Added unit regression coverage for the Responses API request body conversion.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/platform/networking/common/fetch.ts | Extends IResponseDelta with responseOutputMessageId for round-tripping support. |
| src/platform/endpoint/node/responsesApi.ts | Emits message IDs only for phased assistant messages; non-phased assistant history becomes plain assistant input messages. |
| src/platform/endpoint/node/test/responsesApi.spec.ts | Adds regression test asserting IDs are only sent for phased assistant messages. |
| src/platform/endpoint/common/phaseDataContainer.tsx | Expands phase opaque payload to include responseOutputMessageId; adds encode/decode helpers for LM DataParts. |
| src/extension/prompts/node/panel/toolCalling.tsx | Includes responseOutputMessageId in PhaseDataContainer when rendering historical phased rounds. |
| src/extension/prompt/common/toolCallRound.ts | Persists responseOutputMessageId on ToolCallRound. |
| src/extension/prompt/common/intents.ts | Adds responseOutputMessageId to IToolCallRound. |
| src/extension/intents/node/toolCallingLoop.ts | Captures responseOutputMessageId from streaming deltas and stores it on the round. |
| src/extension/conversation/vscode-node/languageModelAccessPrompt.tsx | Decodes phase metadata from LM DataParts and re-embeds via PhaseDataContainer. |
| src/extension/conversation/vscode-node/languageModelAccess.ts | Encodes phase metadata (including output message id) into LM progress DataParts. |
roblourens
previously approved these changes
Mar 27, 2026
DonJayamanne
previously approved these changes
Mar 28, 2026
DonJayamanne
previously approved these changes
Mar 30, 2026
dmitrivMS
approved these changes
Mar 30, 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.
Fixes microsoft/vscode#305838.
This change removes the redundant standalone response-output-message-id prompt path for OpenAI Responses API round-tripping and keeps that identifier attached only to phased assistant messages.
What changed:
responseOutputMessageIdinto phase metadata so phased assistant messages carry the phase and id together.Why:
Validation:
npm run test:unit -- src/platform/endpoint/node/test/responsesApi.spec.tsNotes:
phaseandresponseOutputMessageIdseparately so provider-agnostic response handling remains unchanged.