Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions litellm/_redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 7 additions & 1 deletion tests/test_litellm/test_redis.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import json
import os
from unittest.mock import MagicMock, patch

import pytest
Expand Down Expand Up @@ -165,6 +164,13 @@ def test_max_connections_in_cluster_kwargs():
), "max_connections should be in available Redis cluster kwargs"


def test_socket_timeouts_in_cluster_kwargs():
"""Test that Redis cluster clients can receive socket timeout configuration"""
kwargs = _get_redis_cluster_kwargs()
assert "socket_timeout" in kwargs
assert "socket_connect_timeout" in kwargs


def test_get_redis_async_client_with_connection_pool():
"""Test that connection_pool parameter is properly passed to Redis client"""
# Create a mock connection pool
Expand Down
Loading