Files
crewAI/lib
Devin AI 70b278ecce fix: strip trailing whitespace from final assistant message for Anthropic
Fixes #4413. Anthropic API rejects requests where the final assistant
message ends with trailing whitespace (400 invalid_request_error).
This strips trailing whitespace from the last assistant message content
in _format_messages_for_anthropic, handling both string and list content.

Co-Authored-By: João <joao@crewai.com>
2026-02-08 07:49:29 +00:00
..