# copilot: Fix issue when switching between OpenAI and Anthropic models \(\#56655\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/1dc07b40b99be515c3133882ab387b4f21d717ba)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 1dc07b40b99be515c3133882ab387b4f21d717ba

Requested commit: 1dc07b40b99be515c3133882ab387b4f21d717ba

Commit: 1dc07b40b99be515c3133882ab387b4f21d717ba

Tree: 2cf856077f8557b87a6272a7db509276ed6613f6

Author: Bennet Bo Fenner

Committer: GitHub

## Message

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

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
```

## Parents

- [5aeb8a7e0fabfe27f1518e01874d093b9bbce618](https://git.cafe/gitcafe/zed/commit/5aeb8a7e0fabfe27f1518e01874d093b9bbce618?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/1dc07b40b99be515c3133882ab387b4f21d717ba?format=markdown)
