generated from amazon-archives/__template_MIT-0
-
Notifications
You must be signed in to change notification settings - Fork 253
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When the gateway build the payload to send to Bedrock, it can integrate a "system" array in the JSON payload which is an array of SystemContentBlock objects.
If the raw request payload sent to bedrock-access-gateway has a message object like this:
{
"messages": [
{
"name": null,
"role": "system",
"content": ""
},
... Other messages blocs...
]The Bedrock request must not include it because it's length is < 1 which cause an HTTP 500 error: Invalid length for parameter system[0].text, value: 0, valid min length: 1.
Bedrock request:
{
"modelId": "us.anthropic.claude-3-7-sonnet-20250219-v1:0",
"messages": [
{
"role": "user",
"content": [
{
"text": "user message.."
}
]
},
{
"role": "assistant",
"content": [
{
"text": "assistant message..."
}
]
},
{
"role": "user",
"content": [
{
"text": "user message..."
}
]
}
],
"system": [
{
"text": ""
}
],
"inferenceConfig": {
"temperature": 1.0,
"maxTokens": 5000,
"topP": 1.0
}
}Please complete the following information:
- Which API you used: /api/v1/chat/completions
- Which model you used: us.anthropic.claude-3-7-sonnet-20250219-v1:0
To Reproduce
Send a RAW payload to bedrock-access-gateway with system content set to an empty string.
Expected behavior
Bedrock request sent without the empty string to prevent HTTP 500 error.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working