From 68834106ff78c415779846c5de1546fcbade8a4b Mon Sep 17 00:00:00 2001 From: sharziki Date: Thu, 14 May 2026 20:55:49 -0400 Subject: [PATCH] fix: forward socket_timeout and socket_connect_timeout to RedisCluster MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit _get_redis_cluster_kwargs() filters kwargs before passing them to redis.RedisCluster(). The allow-list was missing socket_timeout and socket_connect_timeout, so those values were silently dropped for cluster clients — causing connections to hang indefinitely on unreachable nodes. Add both kwargs to the explicit allow-list so they are forwarded to redis-py cluster clients, matching the behavior of the non-cluster Redis path. Closes #27919 --- litellm/_redis.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/litellm/_redis.py b/litellm/_redis.py index 65284162663..5ab551453bb 100644 --- a/litellm/_redis.py +++ b/litellm/_redis.py @@ -100,6 +100,8 @@ def _get_redis_cluster_kwargs(client=None): "azure_tenant_id", "azure_client_secret", "max_connections", + "socket_timeout", + "socket_connect_timeout", } return available_args