copilot: Fix issue when switching between OpenAI and Anthropic models#56655
Merged
Conversation
benbrandt
reviewed
May 16, 2026
| #[serde(default)] | ||
| pub summary: Vec<ResponseReasoningItem>, | ||
| #[serde(default, skip_serializing_if = "Option::is_none")] | ||
| pub encrypted_content: Option<String>, |
Member
There was a problem hiding this comment.
There's potentially more here (at least on the openai provider now) that we may want?
Member
Author
There was a problem hiding this comment.
This matches what the Copilot Extension does: https://github.com/microsoft/vscode-copilot-chat/blob/9e668cb12144c701cf0f2c6b3458c00fe3da20f1/src/platform/endpoint/node/responsesApi.ts#L221-L226
benbrandt
approved these changes
May 16, 2026
benbrandt
left a comment
Member
There was a problem hiding this comment.
In general seems like an improvement!
This was referenced May 27, 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.
We were storing reasoning output inside
RedactedThinkingwhich causes issues when switching mid-turn from an OpenAI to an Anthropic model. This implementation fixes this by storing it insidereasoning_details, which matches our responses implementation inopen_ai.rsSee https://github.com/microsoft/vscode-copilot-chat/blob/main/src/platform/endpoint/node/responsesApi.ts
For whatever reason the copilot chat extension sets
summary: [], this is what our implementation does tooCloses #56385
Release Notes: