Files
Xuan Yang cd81f7bde9 fix(streaming): Ensure final partial=False frame is always yielded
The `StreamingResponseAggregator.close()` method previously returned `None` if it didn't accumulate text or parts, such as for safety blocks or pure function calls. This caused clients (e.g., Vertex AI Reasoning Engine) to hang indefinitely waiting for a `partial=False` termination frame, and caused loops to break prematurely.

This fix ensures `close()` always returns a final `LlmResponse(partial=False)` as long as a response exists, carrying over any `error_code`, `error_message`, and `usage_metadata`, regardless of whether `PROGRESSIVE_SSE_STREAMING` is enabled. Added parameterized unit tests to verify behavior across both streaming modes.

Fixes #3754

Change-Id: I40d3b4a14cf36e830454d1a0432786de2e8aa3c3
2026-06-04 14:46:07 -07:00
..
2026-05-22 11:41:51 -07:00
2026-01-20 14:50:09 -08:00