mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-28 00:00:38 +00:00
* 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> |
||
|---|---|---|
| .. | ||
| 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 | ||