mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-08 22:21:35 +00:00
Root cause: LLMClientCache._remove_key() was calling aclose()/close() on
httpx clients when their cache entries expired (TTL) or were evicted (LRU).
However, callers of get_async_httpx_client() hold direct references to
these client objects (e.g. litellm.module_level_aclient, streaming handlers,
passthrough request handlers). Closing the underlying httpx client while
these references are still in use causes:
RuntimeError: Cannot send a request, as the client has been closed.
This was introduced in commits
|
||
|---|---|---|
| .. | ||
| test_aiohttp_cleanup_closed.py | ||
| test_aiohttp_handler.py | ||
| test_aiohttp_transport.py | ||
| test_client_cache_eviction.py | ||
| test_gemini_session_leak.py | ||
| test_http_handler.py | ||
| test_llm_http_handler.py | ||
| test_mock_transport.py | ||