litellm/tests/unit/llms/databricks
T. Cheyney Loffing 13e2d56066
fix(streaming): keep streamed usage when SSE lines without data precede the usage event (#54052)
* 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>
2026-11-25 20:31:21 +00:00
..
agent
chat fix(mcp): drop hosted MCP tool_choice under drop_params and honor drop_params in Bedrock batch rows (#53697) 2026-11-23 08:51:59 -08:00
decisions fix(databricks): reuse base OAuth for decisions (#48395) (#48527) 2026-10-26 20:18:16 -07:00
messages fix(bedrock,databricks): forward the server-side-fallback beta and drop it under drop_params where the model lacks it (#53857) 2026-11-24 03:09:16 +00:00
responses
__init__.py
test_databricks_common_utils.py fix(databricks): reuse base OAuth for decisions (#48395) (#48527) 2026-10-26 20:18:16 -07:00
test_databricks_cost_calculator.py chore(model_prices): sync databricks gemini-4-carbon and gemini-4-hydrogen prices (#52986) 2026-11-19 18:05:11 -08:00
test_databricks_partner_integration.py
test_databricks_streaming_utils.py fix(streaming): keep streamed usage when SSE lines without data precede the usage event (#54052) 2026-11-25 20:31:21 +00:00