Skip to content
Discussion options

You must be logged in to vote

@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:

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@danny-avila
Comment options

Answer selected by Micheletto
@Micheletto
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #8482 on July 15, 2025 16:47.