diff --git a/litellm/llms/bedrock/base_aws_llm.py b/litellm/llms/bedrock/base_aws_llm.py index 2c72a491b3c..0c4151b4b1b 100644 --- a/litellm/llms/bedrock/base_aws_llm.py +++ b/litellm/llms/bedrock/base_aws_llm.py @@ -1526,7 +1526,10 @@ class BaseAWSLLM(SignsRequestsWithAWS): aws_region_name: str, endpoint_type: Literal["runtime", "agent", "agentcore"] | None = "runtime", ) -> tuple[str, str]: - runtime_endpoint: Final = aws_bedrock_runtime_endpoint or get_secret_str("AWS_BEDROCK_RUNTIME_ENDPOINT") + configured_endpoint: Final = ( + aws_bedrock_runtime_endpoint if isinstance(aws_bedrock_runtime_endpoint, str) else None + ) + runtime_endpoint: Final = configured_endpoint or get_secret_str("AWS_BEDROCK_RUNTIME_ENDPOINT") endpoint_url: Final = ( api_base or runtime_endpoint