mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-15 09:12:18 +00:00
* fix(bedrock): close httpx response stream when invoke stream is aborted * test(bedrock): use Final state holders and fixed datetime in invoke abort tests * fix(bedrock): call response.aiter_bytes eagerly and await aclose safely * refactor(bedrock): share one stream close helper module across routes Move SupportsAclose, aclose_if_supported, and aiter_bytes_then_close into litellm/llms/custom_httpx/stream_close.py so the Bedrock invoke paths, the generic HTTP handler, and the Anthropic messages iterator use one copy, and drop the mock-tolerant close in production code * fix(aiohttp): drop the provider connection when a stream closes before its body ends Closing an unfinished aiohttp response on uvloop starts a graceful TLS shutdown that keeps reading the provider's body for up to 30 s. Aborting the transport first ends the upstream read at once. * test(bedrock): cover each invoke stream layer closing its source * test(aiohttp): pin the TLS test certificate dates and run it through uvloop.run * test(bedrock): assert the converse stream closes its response when an exception event ends it --------- Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| test_aiohttp_cleanup_closed.py | ||
| test_aiohttp_handler.py | ||
| test_aiohttp_so_keepalive.py | ||
| test_aiohttp_transport.py | ||
| test_asgi_handler.py | ||
| test_async_client_cleanup.py | ||
| test_container_handler.py | ||
| test_credential_leak_prevention.py | ||
| test_gemini_session_leak.py | ||
| test_http2_connection_spread.py | ||
| test_http_handler.py | ||
| test_llm_http_handler.py | ||
| test_mock_transport.py | ||
| test_sse_lines.py | ||