Skip to content

opencode: Support interleaved_reasoning and fix DeepSeek#55574

Merged
benbrandt merged 4 commits into
zed-industries:mainfrom
Vlaaaaaaad:opencode-interleaved
May 5, 2026
Merged

opencode: Support interleaved_reasoning and fix DeepSeek#55574
benbrandt merged 4 commits into
zed-industries:mainfrom
Vlaaaaaaad:opencode-interleaved

Conversation

@Vlaaaaaaad

Copy link
Copy Markdown
Contributor

OpenCode API endpoints for DeepSeek were moved from Anthropic-compatible to OpenAI-compatible and DeepSeek requires interleaved reasoning enabled to work. I ran a "rename this variable to potato" test and I can confirm DeepSeek V4 Flash and Pro both work now 🎉

Some other OpenCode Go models were marked on models.dev as supporting interleaved_reasoning so they too got that enabled. Kimi K2.5 and Kimi K2.6 continue to fail with #51743 (#55085 seems to hint at this being an OpenCode issue?), but all other models seem to work fine both with interleaved_reasoning and without it 🤷 I assume it's better to have that turned on? Again, the intersection of OpenAI Chat Completions API, different models, different inference providers, how they all work together is something I know nothing about!

Self-Review Checklist:

  • I've reviewed my own diff for quality, security, and reliability
  • Unsafe blocks (if any) have justifying comments
  • The content is consistent with the UI/UX checklist
  • Tests cover the new/changed behavior
  • Performance impact has been considered and is acceptable

Release Notes:

  • OpenCode Go: use correct DeepSeek endpoints
  • OpenCode: add support for interleaved_reasoning

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label May 3, 2026
@SomeoneToIgnore SomeoneToIgnore added the area:ai Related to Agent Panel, Edit Prediction, Copilot, or other AI features label May 3, 2026
Merging DeepSeek with the other OpenAI-compatible models since it has no reason to be by itself anymore
@Vlaaaaaaad

Copy link
Copy Markdown
Contributor Author

@benbrandt any chance this can be merged and cherry picked to Preview so it's part of this week's release? Having #54880 in there with broken DeepSeek support will confuse a bunch of users.

Apologies for the ping!

@benbrandt

Copy link
Copy Markdown
Member

/cherry-pick preview

@zed-industries-bot

Copy link
Copy Markdown
Contributor
Messages
📖

This PR includes links to the following GitHub Issues: #51743
If this PR aims to close an issue, please include a Closes #ISSUE line at the top of the PR body.

Generated by 🚫 dangerJS against e2e6018

@Vlaaaaaaad

Vlaaaaaaad commented May 5, 2026

Copy link
Copy Markdown
Contributor Author

@benbrandt am... #54880 is in next-Preview since it was merged last week, right?

@benbrandt benbrandt added this pull request to the merge queue May 5, 2026
Merged via the queue into zed-industries:main with commit a423742 May 5, 2026
31 checks passed
zed-zippy Bot added a commit that referenced this pull request May 5, 2026
…erry-pick to preview) (#55777)

Cherry-pick of #55574 to preview

----
OpenCode API endpoints for DeepSeek were [moved from
Anthropic-compatible to
OpenAI-compatible](anomalyco/opencode#24500) and
DeepSeek requires interleaved reasoning enabled to work. I ran a
_"rename this variable to potato"_ test and I can confirm DeepSeek V4
Flash and Pro both work now 🎉

Some other OpenCode Go models were marked [on

models.dev](https://github.com/anomalyco/models.dev/tree/dev/providers/opencode-go/models)
as supporting `interleaved_reasoning` so they too got that enabled. Kimi
K2.5 and Kimi K2.6 continue to fail with
#51743
(#55085 seems to hint at this
being [an OpenCode

issue](#51743 (comment))?),
but all other models seem to work fine both with `interleaved_reasoning`
and without it 🤷 I assume it's better to have that turned on? Again, the
intersection of OpenAI Chat Completions API, different models, different
inference providers, how they all work together is something I know
nothing about!

Self-Review Checklist:

- [X] I've reviewed my own diff for quality, security, and reliability
- [X] Unsafe blocks (if any) have justifying comments
- [X] The content is consistent with the [UI/UX

checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [X] Performance impact has been considered and is acceptable

Release Notes:
- OpenCode Go: use correct DeepSeek endpoints
- OpenCode: add support for interleaved_reasoning

Co-authored-by: Vlad Ionescu <Vlaaaaaaad@users.noreply.github.com>
@maxbrunsfeld

Copy link
Copy Markdown
Collaborator

@zed-industries/approved

@Vlaaaaaaad Vlaaaaaaad deleted the opencode-interleaved branch May 5, 2026 23:31
ebaah46 pushed a commit to ebaah46/zed that referenced this pull request May 6, 2026
…ies#55574)

OpenCode API endpoints for DeepSeek were [moved from
Anthropic-compatible to
OpenAI-compatible](anomalyco/opencode#24500) and
DeepSeek requires interleaved reasoning enabled to work. I ran a
_"rename this variable to potato"_ test and I can confirm DeepSeek V4
Flash and Pro both work now 🎉

Some other OpenCode Go models were marked [on
models.dev](https://github.com/anomalyco/models.dev/tree/dev/providers/opencode-go/models)
as supporting `interleaved_reasoning` so they too got that enabled. Kimi
K2.5 and Kimi K2.6 continue to fail with
zed-industries#51743
(zed-industries#55085 seems to hint at this
being [an OpenCode
issue](zed-industries#51743 (comment))?),
but all other models seem to work fine both with `interleaved_reasoning`
and without it 🤷 I assume it's better to have that turned on? Again, the
intersection of OpenAI Chat Completions API, different models, different
inference providers, how they all work together is something I know
nothing about!

Self-Review Checklist:

- [X] I've reviewed my own diff for quality, security, and reliability
- [X] Unsafe blocks (if any) have justifying comments
- [X] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [X] Performance impact has been considered and is acceptable

Release Notes:
- OpenCode Go: use correct DeepSeek endpoints
- OpenCode: add support for interleaved_reasoning
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ai Related to Agent Panel, Edit Prediction, Copilot, or other AI features cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants