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): say when an async client drops an unusable connect func

mateo-berri307ca1bcc74a
diff --git a/litellm/_redis.py b/litellm/_redis.py
index 8c0ce1e7a3b..f6fd031142a 100644
--- a/litellm/_redis.py
+++ b/litellm/_redis.py
@@ -589,6 +589,12 @@ def _async_credential_provider(redis_connect_func: object | None) -> CredentialP
if azure_credential is not None:
return AzureADCredentialProvider(azure_credential, username=os.environ.get("REDIS_USERNAME") or None)
+ if redis_connect_func is not None:
+ verbose_logger.warning(
+ "REDIS: dropping redis_connect_func, which an async connection cannot run. "
+ "Configure Azure AD or GCP IAM auth so a credential provider handles the token instead."
+ )
+
return None