Skip to content

copilot: Fix issue when switching between OpenAI and Anthropic models#56655

Merged
bennetbo merged 6 commits into
mainfrom
fix-copilot-switching
May 18, 2026
Merged

copilot: Fix issue when switching between OpenAI and Anthropic models#56655
bennetbo merged 6 commits into
mainfrom
fix-copilot-switching

Conversation

@bennetbo

@bennetbo bennetbo commented May 13, 2026

Copy link
Copy Markdown
Member

We were storing reasoning output inside RedactedThinking which causes issues when switching mid-turn from an OpenAI to an Anthropic model. This implementation fixes this by storing it inside reasoning_details, which matches our responses implementation in open_ai.rs

See 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 too

Closes #56385

Release Notes:

  • Fixed an issue where the agent would error when using Copilot as a provider and switching between OpenAI and Anthropic models

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label May 13, 2026
@zed-community-bot zed-community-bot Bot added the staff Pull requests authored by a current member of Zed staff label May 13, 2026
@bennetbo bennetbo marked this pull request as ready for review May 15, 2026 08:35
@bennetbo bennetbo requested a review from benbrandt May 15, 2026 08:47
#[serde(default)]
pub summary: Vec<ResponseReasoningItem>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub encrypted_content: Option<String>,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's potentially more here (at least on the openai provider now) that we may want?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@benbrandt benbrandt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general seems like an improvement!

@bennetbo bennetbo added this pull request to the merge queue May 18, 2026
Merged via the queue into main with commit 1dc07b4 May 18, 2026
33 checks passed
@bennetbo bennetbo deleted the fix-copilot-switching branch May 18, 2026 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement staff Pull requests authored by a current member of Zed staff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Zed Agent GitHub Copilot Chat cannot switch model from different family in the middle of a thread

2 participants