Fix duplicate tool execution in structured_tool.invoke()

- Remove duplicate function call on line 285 that caused tools to execute twice
- Add comprehensive test to prevent regression
- Fixes issue #3489

Co-Authored-By: João <joao@crewai.com>
This commit is contained in:
Devin AI
2025-09-10 01:51:27 +00:00
parent 6676d94ba1
commit a533e111e8
2 changed files with 27 additions and 3 deletions

View File

@@ -282,8 +282,6 @@ class CrewStructuredTool:
except Exception:
raise
result = self.func(**parsed_args, **kwargs)
if asyncio.iscoroutine(result):
return asyncio.run(result)