You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using Kimi K2.6 (or other interleaved models via @ai-sdk/openai-compatible), long conversations with tool calls fail on history replay with:
thinking is enabled but reasoning_content is missing in assistant tool call message at index X
Root cause
normalizeMessages() only adds empty reasoning_content for assistant messages after the last user turn. Historical assistant messages containing tool calls (but no reasoning text) skip this step, causing the API to reject the request.
Fix approach
Also force reasoning_content when the assistant message contains tool-call parts, even if reasoning text is empty.
All of the above describe the same underlying issue: historical assistant messages containing tool calls but no reasoning parts failing validation with thinking is enabled but reasoning_content is missing in assistant tool call message at index X. Please coordinate with those issues rather than filing a new one.
Activity
github-actions commentedon Apr 22, 2026
This issue might be a duplicate of existing issues. Please check:
reasoning_contentfor interleaved modelsreasoning_contentfor tool-call assistant messages with interleaved modelsreasoning_contenton Kimi K2.6reasoning_contenton Kimi K2.6reasoning_contentstripped from assistant messages on replayreasoning_contentAll of the above describe the same underlying issue: historical assistant messages containing tool calls but no reasoning parts failing validation with
thinking is enabled but reasoning_content is missing in assistant tool call message at index X. Please coordinate with those issues rather than filing a new one.