mirror of
https://github.com/BerriAI/litellm.git
synced 2026-12-01 01:18:34 +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> |
||
|---|---|---|
| .. | ||
| agentcore | ||
| chat_completions | ||
| invoke_transformations | ||
| mantle | ||
| __init__.py | ||
| test_bedrock_converse_handler.py | ||
| test_bedrock_gpt_oss.py | ||
| test_converse_transformation.py | ||
| test_converse_transformation_nova_2.py | ||
| test_invoke_handler.py | ||
| test_mistral_config.py | ||
| test_native_output_fallback.py | ||
| test_service_tier.py | ||
| test_streaming_choice_index.py | ||
| test_tool_result_images.py | ||
| test_writer_palmyra.py | ||