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]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
fix(redis): validate signed ElastiCache IAM URL
eugene-yao-zocdocaca81c263ccd
diff --git a/litellm/_redis_credential_provider.py b/litellm/_redis_credential_provider.pyindex 4d728ef21b6..4441d318373 100644--- a/litellm/_redis_credential_provider.py+++ b/litellm/_redis_credential_provider.py@@ -4,7 +4,7 @@ import asyncioimport threadingimport timefrom collections.abc import Callable-from typing import TYPE_CHECKING, Any, Final, Protocol, cast+from typing import TYPE_CHECKING, Any, Final, Protocolfrom urllib.parse import quotefrom redis.credentials import CredentialProvider@@ -185,7 +185,10 @@ class ElastiCacheIAMCredentialProvider(CredentialProvider):self._region,expires=self._token_lifetime_seconds,).add_auth(request)- return self._user_name, cast(str, request.url).removeprefix("https://")+ signed_url: Final = request.url+ if signed_url is None:+ raise RuntimeError("Unable to generate AWS ElastiCache IAM credentials")+ return self._user_name, signed_url.removeprefix("https://")def get_credentials(self) -> tuple[str, str]:return self._get_credentials()