mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-10 22:41:41 +00:00
aiohttp shields its DNS resolution task; when the connector closes it cancels that child, so the request task sees CancelledError without ever being cancelled itself. map_aiohttp_exceptions() only caught Exception, so the BaseException skipped transport mapping, router retries and proxy error handling, and /v1/responses answered 500 "No response returned". Catch CancelledError in the mapper, re-raise when the current task is really being cancelled (Task.cancelling() > 0), and otherwise map it to httpx.ConnectError so the usual retry, fallback and error mapping apply. Co-authored-by: yassin <yassin@berri.ai> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| test_aiohttp_cleanup_closed.py | ||
| test_aiohttp_handler.py | ||
| test_aiohttp_so_keepalive.py | ||
| test_aiohttp_transport.py | ||
| test_async_client_cleanup.py | ||
| test_container_handler.py | ||
| test_credential_leak_prevention.py | ||
| test_gemini_session_leak.py | ||
| test_http_handler.py | ||
| test_llm_http_handler.py | ||
| test_mock_transport.py | ||