litellm/tests/unit/llms/custom_httpx
mateo-berri 53312cb5f2 fix(streaming): end finished streams cleanly on SDK 3 transport errors and map file download errors
openai SDK 3 reads over httpx2 and, from 3.25, wraps transport errors in APIConnectionError or APITimeoutError. The stream wrapper only knew httpx, so a connection drop after finish_reason raised MidStreamFallbackError and a read timeout fell back as a 500. Transport errors are now classified across httpx, httpx2 and the SDK's explicit cause chain, a drop after finish_reason ends the stream on both the sync and async paths, and file_content(stream=True) raises litellm.Timeout or litellm.APIConnectionError instead of raw transport errors
2026-10-20 19:44:47 -07:00
..
__init__.py test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
test_aiohttp_cleanup_closed.py refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
test_aiohttp_handler.py refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
test_aiohttp_so_keepalive.py refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
test_aiohttp_transport.py fix(http_handler): only replay POST and PATCH when the request never reached the upstream (#46336) 2026-10-14 07:58:26 -07:00
test_asgi_handler.py test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
test_async_client_cleanup.py test: move 76 live top-level tests to offline unit and integration coverage (#45352) 2026-10-08 10:33:35 -07:00
test_container_handler.py test: catch regressions in the validation lines #44798 added (#47420) 2026-10-20 01:06:37 +00:00
test_credential_leak_prevention.py test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
test_gemini_session_leak.py test(unit): stop test modules from putting their own directory on sys.path (#43421) 2026-09-28 12:20:20 -07:00
test_http_handler.py fix(http_handler): only replay POST and PATCH when the request never reached the upstream (#46336) 2026-10-14 07:58:26 -07:00
test_llm_http_handler.py test(bedrock): detect Vault reads on the event-loop thread (#47597) 2026-10-20 10:45:04 -07:00
test_mock_transport.py test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
test_transport_errors.py fix(streaming): end finished streams cleanly on SDK 3 transport errors and map file download errors 2026-10-20 19:44:47 -07:00