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> |
||
|---|---|---|
| .. | ||
| config | ||
| executors | ||
| handlers | ||
| providers | ||
| rtk | ||
| services | ||
| shared | ||
| transformer | ||
| translator | ||
| utils | ||
| .npmignore | ||
| AGENTS.md | ||
| index.js | ||