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 interleaved reasoning models like Kimi K2.6, assistant messages containing parts but no parts fail API validation during long-context replay. The model API expects on all assistant tool-call messages, even if empty.
Error:
Context
in only injects empty for assistant messages after the last user turn (). Historical assistant messages with tool calls that appear before the last user message do not get the field.
AI SDK PR #12049 added reasoning extraction from message content, but OpenCode filters reasoning parts out of content before AI SDK sees them, so the SDK never has a chance to add for these messages.
Solution (in our fork)
Also force when the assistant message contains parts:
No issue template was used. Please resubmit using one of the three required templates: Bug Report, Feature Request, or Question. Bug reports require a Description field with reproduction context; the title should not start with fix:.
Please edit this issue to address the above within 2 hours, or it will be automatically closed.
This issue might be a duplicate of existing issues. Please check:
Activity
github-actions commentedon Apr 22, 2026
This issue doesn't fully meet our contributing guidelines.
What needs to be fixed:
fix:.Please edit this issue to address the above within 2 hours, or it will be automatically closed.
This issue might be a duplicate of existing issues. Please check:
If you believe this was flagged incorrectly, please let a maintainer know.