From 307ca1bcc74ac8815d054b8fce44684746bd3b45 Mon Sep 17 00:00:00 2001 From: mateo-berri <277851410+mateo-berri@users.noreply.github.com> Date: Thu, 20 Aug 2026 15:53:00 -0700 Subject: [PATCH] fix(redis): say when an async client drops an unusable connect func A caller-supplied redis_connect_func has no way to run on an async connection, so log it instead of dropping it in silence. --- litellm/_redis.py | 6 ++++++ 1 file changed, 6 insertions(+) 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