Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

fix: add logging to sync client close failure in disconnect()

Ryan Crabbe05d18e60b218
diff --git a/litellm/caching/redis_cache.py b/litellm/caching/redis_cache.py
index 55c5b9af97a..dcc2df5f91c 100644
--- a/litellm/caching/redis_cache.py
+++ b/litellm/caching/redis_cache.py
@@ -1107,8 +1107,8 @@ class RedisCache(BaseCache):
await self.async_redis_conn_pool.disconnect(inuse_connections=True)
try:
self.redis_client.close()
- except Exception:
- pass
+ except Exception as e:
+ verbose_logger.debug("Error closing sync Redis client: %s", e)
async def test_connection(self) -> dict:
"""