fix(cli): preserve empty reasoning_content in interleaved transform - #9470
Merged
Conversation
Contributor
Author
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (2 files)
Reviewed by gpt-5.4-20260305 · 312,956 tokens |
kilo-code-bot
Bot
force-pushed
the
fix/cli-preserve-empty-reasoning-content
branch
from
April 24, 2026 14:22
a2773d1 to
c68c97a
Compare
DeepSeek thinking mode may return empty reasoning_content on assistant messages in a tool call chain, which must be sent back in subsequent requests. The interleaved transform's truthy check was dropping it. Always set providerOptions.openaiCompatible[field] for assistant messages so the AI SDK's metadata spread carries it through. Cherry-picked from anomalyco/opencode#24146 (931e6ed).
kilo-code-bot
Bot
force-pushed
the
fix/cli-preserve-empty-reasoning-content
branch
from
April 24, 2026 14:31
c68c97a to
7fe4508
Compare
1 task
imanolmzd-svg
approved these changes
Apr 24, 2026
This was referenced Apr 25, 2026
jliounis
pushed a commit
to jliounis/kilocode
that referenced
this pull request
May 18, 2026
…-reasoning-content fix(cli): preserve empty reasoning_content in interleaved transform
t7tran
pushed a commit
to t7tran/kilocode
that referenced
this pull request
Aug 14, 2026
…-reasoning-content fix(cli): preserve empty reasoning_content in interleaved transform
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.
Cherry-picks anomalyco/opencode#24146.
DeepSeek thinking mode can return empty
reasoning_contenton assistant messages in a tool call chain, which must be sent back verbatim in subsequent requests. The interleaved transform's truthy check was dropping it, causing multi-turn tool calls to fail withThe 'reasoning_content' in the thinking mode must be passed back to the API.The fix always setsproviderOptions.openaiCompatible[field]for assistant messages so the AI SDK's metadata spread carries the empty string through.