Files
crewAI/lib/crewai/tests
Devin AI 43b962f149 fix: surface Anthropic stop_reason to detect truncation (#5148)
- Add stop_reason field to LLMCallCompletedEvent
- Update BaseLLM._emit_call_completed_event to accept and pass stop_reason
- Add _warn_if_truncated helper to AnthropicCompletion that logs a warning
  when stop_reason='max_tokens'
- Apply fix to all 6 Anthropic completion methods (sync and async):
  _handle_completion, _handle_streaming_completion,
  _handle_tool_use_conversation, _ahandle_completion,
  _ahandle_streaming_completion, _ahandle_tool_use_conversation
- Add 7 tests covering truncation warning, event field, and tool use paths

Co-Authored-By: João <joao@crewai.com>
2026-03-27 20:33:50 +00:00
..
2026-03-04 00:45:09 -05:00
2025-10-20 14:10:19 -07:00
2025-12-04 16:53:19 -05:00
2026-02-13 21:34:37 -03:00
2025-10-20 14:10:19 -07:00
2026-03-24 19:03:35 +08:00
2026-02-13 21:34:37 -03:00
2025-12-04 13:34:29 -08:00
2025-10-20 14:10:19 -07:00
2025-12-01 18:56:56 -05:00
2025-10-20 14:10:19 -07:00
2025-10-20 14:10:19 -07:00
2025-10-20 14:10:19 -07:00