litellm/tests/test_litellm/caching
mateo-berri adb9a53ba1 revert: "fix(caching): close evicted LLM clients so their connections are reclaimed (#35492)"
This reverts commit 66bc70365f and the
follow-up 2-line type fix a6d4654261 (#35706), which only retyped a
signature #35492 introduced.

Closing evicted litellm-owned clients breaks every object that fetches
get_async_httpx_client once in __init__ and holds the handler for the
life of the process: 40 guardrail classes plus the pagerduty and email
callbacks. Once the cache entry is evicted (TTL 3600s or the 200-entry
size cap) and the 900s grace passes, the held client is closed and every
subsequent request through it fails with RuntimeError: Cannot send a
request, as the client has been closed. On a production deployment with
a default-on guardrail this surfaced as every request 500ing roughly 75
minutes after boot.

The connection-reclaim goal of #35492 can re-land once handlers survive
their inner client being closed.
2026-08-04 17:05:06 -07:00
..
test_azure_blob_cache.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_caching.py feat(caching): add valkey-semantic cache backend and fix semantic cache scope keys (#30675) 2026-06-19 17:09:17 -07:00
test_caching_handler.py fix(caching): stamp provider on embedding cache-hit logs so spend logs record provider 2026-07-30 22:11:01 +00:00
test_check_and_fix_namespace_none_guard.py chore: litellm oss staging160626 (#30527) 2026-06-16 18:23:13 -07:00
test_disk_cache.py fix(cache): make in-memory and disk cache increments atomic (#34013) 2026-07-20 15:51:01 -07:00
test_dual_cache.py fix(proxy): stop stale auth cache re-publish so key updates and deletes propagate across replicas (#33565) 2026-07-16 15:00:33 -07:00
test_embedding_router.py chore: litellm oss staging 250626 (#31305) 2026-06-25 21:00:28 -07:00
test_gcs_cache.py chore: litellm oss staging (#30745) 2026-06-18 13:55:35 -07:00
test_in_memory_cache.py fix(cache): make in-memory and disk cache increments atomic (#34013) 2026-07-20 15:51:01 -07:00
test_llm_caching_handler.py revert: "fix(caching): close evicted LLM clients so their connections are reclaimed (#35492)" 2026-08-04 17:05:06 -07:00
test_llm_client_cache_e2e.py fix: don't close HTTP/SDK clients on LLMClientCache eviction (#22925) 2026-03-05 12:00:38 -08:00
test_qdrant_semantic_cache.py chore: litellm oss staging 250626 (#31305) 2026-06-25 21:00:28 -07:00
test_redis_cache.py fix(redis): stop an unreachable Redis from blocking every request (#35273) 2026-07-30 14:36:28 -07:00
test_redis_cluster_cache.py fix(caching): check REDIS_CLUSTER_NODES env var in Cache and Router class selection (#22790) 2026-03-06 17:31:30 -08:00
test_redis_connection_pool.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_redis_semantic_cache.py chore: litellm oss staging 250626 (#31305) 2026-06-25 21:00:28 -07:00
test_s3_cache.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_valkey_semantic_cache.py fix(caching): pass only metadata to valkey semantic async embedding (#32295) 2026-07-07 08:52:03 +03:00