AWS Bedrock returns XML error (Unexpected token <) with Claude 3 Sonnet on v0.8.2 #12173
Replies: 3 comments 1 reply
-
|
Ok the issue was an environment variable conflict. Librechat was prioritizing the global AWS_REGION (used for Minio/S3) over BEDROCK_AWS_DEFAULT_REGION. |
Beta Was this translation helpful? Give feedback.
-
|
Need to reopen this issue. AWS Environment Variables Conflict: Bedrock + S3 MinIODescriptionThere's a conflict when using both AWS Bedrock and S3 (MinIO) simultaneously due to AWS SDK credential resolution. Configuration
IssueWhen both sets of credentials are configured, the application encounters authentication errors. The AWS SDK appears to prioritize the default Expected BehaviorThe application should:
Environment
|
Beta Was this translation helpful? Give feedback.
-
|
Thanks for reporting back. This is working as designed, LibreChat's Bedrock client exclusively uses the When those However, when The fix for your setup: Make sure you have the BEDROCK_AWS_DEFAULT_REGION=us-east-1
BEDROCK_AWS_ACCESS_KEY_ID=your_bedrock_access_key
BEDROCK_AWS_SECRET_ACCESS_KEY=your_bedrock_secret_keyThis ensures LibreChat passes those credentials directly to the Bedrock client, completely bypassing the default credential chain (and your MinIO Our Bedrock docs cover the credential resolution behavior in detail. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What happened?
Description
I am encountering a persistent error when using AWS Bedrock with Claude 3 models (Sonnet/Haiku). The application returns:
librechat log
librechat.yaml
Expected behavior
The request should be successfully parsed as JSON. It seems the payload sent by LibreChat v0.8.2 might not be using the required Messages API format for Claude 3, triggering a legacy API error from AWS.
Environment evidence:
Version Information
v0.8.2@sha256:1e9ffe435b56412f7bf41148673e5594ecb067a3cc3991925d1cc2222db7e2a7
Steps to Reproduce
What browsers are you seeing the problem on?
Chrome
Relevant log output
Screenshots
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions