Files
crewAI/lib
Devin AI fcb9941528 Fix stop sequences synchronization for Anthropic, Bedrock, and Gemini providers
- Add stop property getter/setter to AnthropicCompletion to sync stop with stop_sequences
- Add stop property getter/setter to BedrockCompletion to sync stop with stop_sequences
- Add stop property getter/setter to GeminiCompletion to sync stop with stop_sequences
- Add comprehensive tests for all three providers to verify synchronization works correctly

This fixes issue #3836 where CrewAgentExecutor sets llm.stop but the provider-specific
stop_sequences attribute (which is sent to the API) was not synchronized, causing the
model to generate entire conversations instead of stopping at the expected boundaries.

The fix ensures that when CrewAgentExecutor sets llm.stop, the value is properly
synchronized with the provider-specific stop_sequences attribute that gets sent to
the API, preventing massive token usage and cost overruns.

Co-Authored-By: João <joao@crewai.com>
2025-11-05 18:15:31 +00:00
..