mirror of
https://github.com/Nezumi-2711/9router.git
synced 2026-09-22 13:38:31 +00:00
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>