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.
This commit is contained in:
mateo-berri 2026-11-06 13:58:59 -08:00
parent 9bcb039ac2
commit ec312bb5e9

View file

@ -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