From c600b26ca61b29d6939b56d07d79e93a303a31f5 Mon Sep 17 00:00:00 2001 From: Greyson Lalonde Date: Tue, 2 Dec 2025 08:36:03 -0500 Subject: [PATCH] fix: ensure _run backward compat --- lib/crewai/src/crewai/tools/base_tool.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/crewai/src/crewai/tools/base_tool.py b/lib/crewai/src/crewai/tools/base_tool.py index aedda4d54..f5bde0a93 100644 --- a/lib/crewai/src/crewai/tools/base_tool.py +++ b/lib/crewai/src/crewai/tools/base_tool.py @@ -330,12 +330,7 @@ class Tool(BaseTool, Generic[P, R]): def _run(self, *args: P.args, **kwargs: P.kwargs) -> R: """Execute the wrapped function.""" - result = self.func(*args, **kwargs) - if _is_awaitable(result): - raise NotImplementedError( - f"{self.name} is an async function. Use arun() for async execution." - ) - return result + return self.func(*args, **kwargs) # type: ignore[return-value] async def arun(self, *args: P.args, **kwargs: P.kwargs) -> R: """Execute the tool asynchronously with type-safe parameters."""