diff --git a/src/crewai/llm.py b/src/crewai/llm.py index 741544662..25b798a6d 100644 --- a/src/crewai/llm.py +++ b/src/crewai/llm.py @@ -707,15 +707,6 @@ class LLM(BaseLLM): function_name, lambda: None ) # Ensure fn is always a callable logging.error(f"Error executing function '{function_name}': {e}") - crewai_event_bus.emit( - self, - event=ToolExecutionErrorEvent( - tool_name=function_name, - tool_args=function_args, - tool_class=fn, - error=str(e), - ), - ) crewai_event_bus.emit( self, event=LLMCallFailedEvent(error=f"Tool execution error: {str(e)}"), diff --git a/src/crewai/tools/tool_usage.py b/src/crewai/tools/tool_usage.py index c73faa5cb..dc5f8f29a 100644 --- a/src/crewai/tools/tool_usage.py +++ b/src/crewai/tools/tool_usage.py @@ -148,7 +148,7 @@ class ToolUsage: tool_string: str, tool: CrewStructuredTool, calling: Union[ToolCalling, InstructorToolCalling], - ) -> str: + ) -> str: if self._check_tool_repeated_usage(calling=calling): # type: ignore # _check_tool_repeated_usage of "ToolUsage" does not return a value (it only ever returns None) try: result = self._i18n.errors("task_repeated_usage").format(