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> |
||
|---|---|---|
| .. | ||
| chat | ||
| embedding | ||
| messages | ||
| responses | ||
| __init__.py | ||
| test_abliteration_provider.py | ||
| test_aiand_provider.py | ||
| test_assemblyai_provider.py | ||
| test_charity_engine.py | ||
| test_cognition_provider.py | ||
| test_coralbricks_provider.py | ||
| test_cortecs_provider.py | ||
| test_dynamic_config.py | ||
| test_empiriolabs_provider.py | ||
| test_hostinger_router_provider.py | ||
| test_huawei_maas_provider.py | ||
| test_inferenceapis_provider.py | ||
| test_json_loader.py | ||
| test_json_providers.py | ||
| test_kyma_provider.py | ||
| test_libertai_provider.py | ||
| test_meta_provider.py | ||
| test_model_info.py | ||
| test_openinfer_provider.py | ||
| test_perplexity_orchestrator_provider.py | ||
| test_pinstripes_provider.py | ||
| test_prism_provider.py | ||
| test_provider_affinity_forwarding.py | ||
| test_refuseless_provider.py | ||
| test_reka_provider.py | ||
| test_resetdata_provider.py | ||
| test_sarvam_provider.py | ||
| test_scx_ai_provider.py | ||
| test_streamlake_provider.py | ||
| test_tensormesh_provider.py | ||
| test_vispark_provider.py | ||
| test_wally_provider.py | ||
| test_xiaomi_mimo.py | ||
| test_zerogpu_provider.py | ||