mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-28 00:00:38 +00:00
* fix(watsonx): keep streamed usage when SSE id and event fields precede the usage event * fix(streaming): pass only data and raw JSON lines to the parser in both chat stream readers Both the OpenAI-like reader and the base reader that most OpenAI-compatible providers use turned SSE lines without a payload (id, event, retry, comments and unknown fields) into empty chunks, which end the stream after finish_reason and drop the usage event that follows * test(watsonx): cover retry and comment SSE lines and the async stream iterator * fix(streaming): skip SSE data lines with no payload in the base stream reader * refactor(responses): drop the unreachable event and empty line branch in the chat bridge stream reader Both base stream reader loops skip lines without a payload before calling _handle_string_chunk, so this branch can no longer run --------- Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| agent | ||
| chat | ||
| decisions | ||
| messages | ||
| responses | ||
| __init__.py | ||
| test_databricks_common_utils.py | ||
| test_databricks_cost_calculator.py | ||
| test_databricks_partner_integration.py | ||
| test_databricks_streaming_utils.py | ||