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 redis event loop closed at first call (#16913)

wangsoft42c883d64fa1
diff --git a/litellm/caching/redis_cache.py b/litellm/caching/redis_cache.py
index 55ae47fe461..8d6a7296385 100644
--- a/litellm/caching/redis_cache.py
+++ b/litellm/caching/redis_cache.py
@@ -193,7 +193,7 @@ class RedisCache(BaseCache):
connection_pool=self.async_redis_conn_pool, **self.redis_kwargs
)
in_memory_llm_clients_cache.set_cache(
- key="async-redis-client", value=self.redis_async_client
+ key="async-redis-client", value=redis_async_client
)
self.redis_async_client = redis_async_client # type: ignore