Skip to content

AWS Bedrock ValidationException: Assistant message contains both tool_calls and content #1592

@ThePlenkov

Description

@ThePlenkov

When using cagent with AWS Bedrock via LiteLLM proxy, cagent generates assistant messages with both tool_calls AND content in the same turn, violating Anthropic/AWS Bedrock API protocol. This causes ValidationException: The number of toolResult blocks exceeds the number of toolUse blocks. Related to #1544. Full details and reproduction case available upon request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions