fix(bedrock): preserve missing credentials error

This commit is contained in:
MarkXian 2026-09-03 15:39:09 +08:00
parent 77a740ba08
commit df6b749960

View file

@ -1472,11 +1472,6 @@ class BaseAWSLLM:
from botocore.exceptions import NoCredentialsError
except ImportError:
raise ImportError("Missing boto3 to call bedrock. Run 'pip install boto3'.")
if credentials is None:
raise ValueError(
"AWS credentials are required when Bedrock bearer token authentication is not configured."
)
if credentials is None:
raise NoCredentialsError()