Skip to content

Conversation

@aeroxy
Copy link
Contributor

@aeroxy aeroxy commented Nov 27, 2025

Support for Kimi K2 Thinking

Release Notes:

  • OpenAI provider supports reasoning content
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Nov 27, 2025
@SomeoneToIgnore SomeoneToIgnore added the area:ai Improvement related to Agent Panel, Edit Prediction, Copilot, or other AI features label Nov 27, 2025
@maxdeviant maxdeviant changed the title ai: OpenAI provider supports reasoning content Nov 27, 2025
@bennetbo bennetbo self-assigned this Dec 1, 2025
match content {
MessageContent::Text(text) | MessageContent::Thinking { text, .. } => {
if !text.trim().is_empty() {
if !text.is_empty() {
Copy link
Member

Choose a reason for hiding this comment

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

Why was this changed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Kimi K2 Thinking will response empty spaces and if we do not emit them the thinking block will look like this:

KimiK2Thinkingwillresponseemptyspacesandifwedonotemitthemthethinkingblockwilllooklikethis

@bennetbo
Copy link
Member

Thank you! I adjusted the text.trim().is_empty() -> text.is_empty() change in order to not regress #40097.

@bennetbo bennetbo enabled auto-merge (squash) January 21, 2026 10:04
@bennetbo bennetbo merged commit 7bd3075 into zed-industries:main Jan 21, 2026
27 checks passed
@github-project-automation github-project-automation bot moved this from Community PRs to Done in Quality Week – December 2025 Jan 21, 2026
zcg pushed a commit to zcg/zed that referenced this pull request Jan 29, 2026
Support for Kimi K2 Thinking

Release Notes:

- Added support for thinking traces when using OpenAI-API-compatible AI providers

---------

Co-authored-by: Bennet Bo Fenner <bennet@zed.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

3 participants