fix[prebuilt]: bind tools even if it's only provider tools (#5227)

bind tools even if just provider tools
This commit is contained in:
Sydney Runkle
2025-06-27 09:49:26 -04:00
committed by GitHub
parent e277a6bd9b
commit 233a92ccb9
@@ -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]