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
{{ message }}
Repository navigation
[Bug] Empty tool_calls arrays split continuous reasoning into separate parts #47875
OpenCode's pinned @ai-sdk/[email protected] closes active reasoning whenever a streamed delta contains tool_calls, even when the array is empty. Consecutive reasoning deltas with tool_calls: [] therefore produce separate persisted reasoning parts instead of one continuous part.
This is the SDK bug tracked in vercel/ai#20203, fixed by vercel/ai#20253 and published in compatible 3.0.44. OpenCode's pinned version still needs the fix. A narrow backport would avoid a major SDK migration.
Related: #40865 describes fragmented Thought blocks, but also content-field behavior outside this report's scope. This report only concerns consecutive reasoning_content deltas with empty tool-call arrays, not merging across real text or tool boundaries.
Plugins
None required; reproduced with local SSE fixtures through the SDK and real session processor.
This is fixed in v2: OpenAI-compatible streaming uses the native parser, which keeps reasoning in one response-wide channel and does not split it on empty tool_calls arrays. Upgrade with npm i -g @opencode/cli@latest. If you still see this on v2, please open a new issue with the details.
Activity
neriousy commentedon Oct 19, 2026
This is fixed in v2: OpenAI-compatible streaming uses the native parser, which keeps reasoning in one response-wide channel and does not split it on empty
tool_callsarrays. Upgrade withnpm i -g @opencode/cli@latest. If you still see this on v2, please open a new issue with the details.