AWS Bedrock not working in Agents with MCP #8484
Answered
by
danny-avila
Micheletto
asked this question in
Troubleshooting
-
What happened?When using an Agent with an MCP configured, for example the Elevenlabs official MCP server, and Claude 4 in AWS Bedrock, all requests fail with the following red box error: Version InformationSteps to Reproduce
What browsers are you seeing the problem on?Chrome Relevant log outputThis is the associated error that LibreChat throws: [api/server/controllers/agents/client.js #sendCompletion] Operation aborted The model returned the following errors: Malformed input request, please reformat your input and try again. Screenshots![]() Code of Conduct
|
Beta Was this translation helpful? Give feedback.
Answered by
danny-avila
Jul 15, 2025
Replies: 1 comment 2 replies
-
![]() Updating Instructions (docker): |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@Micheletto I was able to reproduce this and seems Bedrock is requiring
max_tokens
to be set for anthropic models:https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters-anthropic-claude-messages-request-response.html
But this is only really "required" if tools are also added.
When using an agent, it omits any model parameters you didn't set, while with non-agent, it always sets a default
max_tokens
for anthropic models.I will implement something to get around this, but for now you can explicitly set max output tokens to make it work: