litellm/tests/integration/caching
ryan-crabbe-berri b0f408e64e
fix(aiohttp_transport): close sessions of evicted Azure and base64 embedding clients (#52266)
* test(caching): cover unclosed sessions from evicted azure and base64 embedding clients

* fix(aiohttp_transport): keep the owned session out of a collected transport's garbage cycle

An evicted OpenAI SDK client that became a reference cycle was freed by the
cycle collector together with its transport, aiohttp session and connector.
The transport's __del__ could only schedule an async close, so aiohttp's own
finalizers reported the session and connector as unclosed.

The transport now registers a weakref.finalize for the session it owns. The
finalizer registry keeps the session out of the cyclic garbage and disposes
it with the existing loop-aware close once the transport is freed.

* fix(aiohttp_transport): type the session finalizer and cover the factory-built session path
2026-11-17 17:16:41 -08:00
..
response_cache_case.py fix(caching): keep reasoning, citations, and audio on streamed cache hits (#32096) 2026-10-29 10:08:12 -07:00
test_cache_max_messages.py test(integration): look up owned cache keys and clean up sweep models (#47255) 2026-10-18 10:27:53 +00:00
test_embedding_file_block_cache.py
test_evicted_client_closer_real_io.py ci(unit): cut unit check time with cheaper per-test resets and fewer non-unit tests (#51864) 2026-11-14 15:41:30 -08:00
test_evicted_client_unclosed_sessions_real_io.py fix(aiohttp_transport): close sessions of evicted Azure and base64 embedding clients (#52266) 2026-11-17 17:16:41 -08:00
test_in_memory_cache_heap_bound.py fix(router): keep the prompt caching affinity pin alive as long as the prefix's cache_control ttl (#46084) 2026-10-14 21:10:09 -07:00
test_prompt_cache_alert_streaks_real_io.py feat(alerts): report observed Anthropic cache misses as advisories (#51973) 2026-11-16 15:36:07 -08:00
test_redis_cache_non_tls_ssl_settings.py fix(redis): drop ssl_ kwargs from the async pool when ssl is off (#52344) 2026-11-17 13:23:34 -08:00
test_response_cache_chaos.py test(integration): give each owned proxy a private database and Redis by default (#47213) 2026-10-18 03:37:41 +00:00
test_response_cache_empty_output.py test: update the spend tests that still expected the pre-ledger accounting queues (#50814) 2026-11-09 22:07:42 -08:00
test_response_cache_large_payload_key.py perf(caching): hash response cache keys piece by piece and store under the looked-up key (#52267) 2026-11-17 15:58:07 -08:00
test_response_cache_model_group_key.py fix(caching): read the cache key's model group from the router's metadata for the call (#48917) 2026-10-29 05:35:23 -07:00
test_response_cache_stream_replay.py fix(caching): keep reasoning, citations, and audio on streamed cache hits (#32096) 2026-10-29 10:08:12 -07:00
test_valkey_semantic_cache_real_io.py ci(unit): cut unit check time with cheaper per-test resets and fewer non-unit tests (#51864) 2026-11-14 15:41:30 -08:00