litellm/tests/unit/llms/databricks
quietjules beb69b2464
fix(openai_like): end an async stream cleanly when the connection drops after the finish (#54565)
* fix(openai_like): end an async stream cleanly when the connection drops after the finish

The async SSE reader wrapped every read error in a bare RuntimeError, so the
stream wrapper's rule that ends a stream cleanly on an httpx ReadError or
RemoteProtocolError after a finish_reason never matched. Catch only ValueError,
as the sync reader does, so transport errors reach that rule unchanged

* test(databricks): name the RuntimeError wrap tests for the ValueError they raise

* fix(streaming): warn when an upstream drop after the finish ends the stream

* fix(logging): classify httpx network errors as provider connection errors

A stream drop before the finish now reaches failure logging as a raw
httpx.ReadError. With the httpx transport its message is empty, so
normalized_error fell to UNCLASSIFIED where main reported an internal
state error. Map httpx NetworkError and RemoteProtocolError to
500_PROVIDER_CONNECTION_ERROR, which the aiohttp transport already gets
from the message.

The after-finish integration test now also asserts that no error event
reaches the client.

---------

Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com>
2026-11-26 07:48:41 +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(openai_like): end an async stream cleanly when the connection drops after the finish (#54565) 2026-11-26 07:48:41 +00:00