63e42047e3
The hasValuableContent() function in streamHelpers.ts returned undefined instead of explicit false when checking empty delta chunks. This caused JavaScript type coercion issues where undefined !== '' evaluated to true, passing empty chunks through to clients. Fix: Replace implicit returns with explicit boolean returns using typeof checks and length comparisons for all content fields (content, reasoning_content, tool_calls, text, thinking, partial_json). Test: Added unit tests covering OpenAI, Claude, and Gemini format edge cases. Co-authored-by: oyi77 <oyi77@users.noreply.github.com>