From ec312bb5e9fef2c7d7cd2e7fb5d5e7dec71d65e9 Mon Sep 17 00:00:00 2001 From: mateo-berri <277851410+mateo-berri@users.noreply.github.com> Date: Fri, 6 Nov 2026 13:58:59 -0800 Subject: [PATCH] fix(bedrock): keep skipping a non-string runtime endpoint The earlier change dropped the isinstance check on aws_bedrock_runtime_endpoint, so a non-string value was used as the host. Two Bedrock image tests rely on that value being skipped, as it was before. --- litellm/llms/bedrock/base_aws_llm.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/litellm/llms/bedrock/base_aws_llm.py b/litellm/llms/bedrock/base_aws_llm.py index e8df454e987..475f964cfe8 100644 --- a/litellm/llms/bedrock/base_aws_llm.py +++ b/litellm/llms/bedrock/base_aws_llm.py @@ -1535,7 +1535,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