Files
crewAI/lib
Devin AI 37b75aeb6a fix: handle 'Action: None' in parser to prevent OutputParserError
When LLMs output 'Action: None' (or variations like 'Action: N/A'),
the parser now correctly treats this as a signal for a direct response
instead of raising an OutputParserError.

This fixes issue #4186 where the parser would fail and leak internal
'Thought:' text to users instead of providing a clean response.

Changes:
- Add ACTION_NONE_REGEX constant to match non-action values
- Update parse() to detect and handle Action: None patterns
- Convert Action: None to AgentFinish with the thought as output
- Add comprehensive tests for all variations

Closes #4186

Co-Authored-By: João <joao@crewai.com>
2026-01-06 19:44:09 +00:00
..
2025-12-19 15:47:00 -05:00