Commit Graph

2 Commits

Author SHA1 Message Date
Devin AI
fffd401fd1 Fix lint and type checker issues
- Remove unused imports (pytest, Mock) from test file
- Add type ignore comment for ToolAnswerResult assignment

Co-Authored-By: João <joao@crewai.com>
2025-08-18 06:13:39 +00:00
Devin AI
9d16fde9bf Fix result_as_answer=True bypassing conversion
- Add ToolAnswerResult wrapper class to signal when tool results should bypass conversion
- Modify agent.execute_task to return ToolAnswerResult when result_as_answer=True
- Update task._export_output to skip conversion for ToolAnswerResult instances
- Add comprehensive tests covering the fix and edge cases
- Fixes issue #3335 where tools with result_as_answer=True still triggered LLM conversion

Co-Authored-By: João <joao@crewai.com>
2025-08-18 06:10:14 +00:00