Skip to content

AWS Bedrock ValidationException: Protocol violation when assistant message contains both tool_calls and content #1593

@ThePlenkov

Description

@ThePlenkov

Summary: cagent generates assistant messages with both tool_calls AND content, violating AWS Bedrock API protocol and causing ValidationException.

Full technical details, reproduction steps, and suggested fix in first comment below.

Metadata

Metadata

Assignees

Labels

area/providersFor features/issues/fixes related to LLM providers (Bedrock, LiteLLM, Qwen, custom, etc.)area/providers/anthropicFor features/issues/fixes related to the usage of Anthropic modelsarea/providers/bedrockAWS Bedrock provider supportkind/fixPR fixes a bug (maps to fix: commit prefix)

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions