mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-14 09:03:16 +00:00
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:
parent
9bcb039ac2
commit
ec312bb5e9
1 changed files with 4 additions and 1 deletions
|
|
@ -1535,7 +1535,10 @@ class BaseAWSLLM(SignsRequestsWithAWS):
|
||||||
aws_region_name: str,
|
aws_region_name: str,
|
||||||
endpoint_type: Literal["runtime", "agent", "agentcore"] | None = "runtime",
|
endpoint_type: Literal["runtime", "agent", "agentcore"] | None = "runtime",
|
||||||
) -> tuple[str, str]:
|
) -> 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 = (
|
endpoint_url: Final = (
|
||||||
api_base
|
api_base
|
||||||
or runtime_endpoint
|
or runtime_endpoint
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue