From 233a92ccb9ea9080eb1dbbb91e6c191fc32245cc Mon Sep 17 00:00:00 2001 From: Sydney Runkle <54324534+sydney-runkle@users.noreply.github.com> Date: Fri, 27 Jun 2025 09:49:26 -0400 Subject: [PATCH] fix[prebuilt]: bind tools even if it's only provider tools (#5227) bind tools even if just provider tools --- libs/prebuilt/langgraph/prebuilt/chat_agent_executor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/prebuilt/langgraph/prebuilt/chat_agent_executor.py b/libs/prebuilt/langgraph/prebuilt/chat_agent_executor.py index a923d4b58..6425c7c3c 100644 --- a/libs/prebuilt/langgraph/prebuilt/chat_agent_executor.py +++ b/libs/prebuilt/langgraph/prebuilt/chat_agent_executor.py @@ -448,7 +448,7 @@ def create_react_agent( if ( _should_bind_tools(model, tool_classes, num_builtin=len(llm_builtin_tools)) - and len(tool_classes) > 0 + and len(tool_classes + llm_builtin_tools) > 0 ): model = cast(BaseChatModel, model).bind_tools(tool_classes + llm_builtin_tools) # type: ignore[operator]