mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-08-23 16:12:25 +02:00
fix[prebuilt]: bind tools even if it's only provider tools (#5227)
bind tools even if just provider tools
This commit is contained in:
@@ -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]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user