Files
9router/open-sse/utils
zmf 602ee4054b fix(codebuddy-cn): strip empty tool_calls arrays to preserve reasoning
CodeBuddy CN includes "tool_calls": [] in every SSE streaming delta.
@ai-sdk/openai-compatible checks delta.tool_calls != null — an empty
array passes ([] != null is true in JS), triggering premature
reasoning-end on every reasoning chunk (0/1ms durations in OpenCode).

Strip empty tool_calls arrays in passthrough before hasValuableContent.
Zero side-effect: real tool_calls always have at least one element.

Closes #2176

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-01 09:39:31 +07:00
..
2026-05-26 11:35:39 +07:00
2026-05-26 23:09:19 +07:00
2026-06-18 17:36:08 +07:00
2026-06-15 18:18:04 +07:00
2026-05-12 09:19:50 +07:00