From ebd88829b89ef64d3b213ba2c54b09d52df0860a Mon Sep 17 00:00:00 2001 From: "open-swe[bot]" Date: Mon, 11 Aug 2025 20:16:47 +0000 Subject: [PATCH] Apply patch [skip ci] --- libs/prebuilt/langgraph/prebuilt/chat_agent_executor.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libs/prebuilt/langgraph/prebuilt/chat_agent_executor.py b/libs/prebuilt/langgraph/prebuilt/chat_agent_executor.py index 5279674e2..0ccbf4483 100644 --- a/libs/prebuilt/langgraph/prebuilt/chat_agent_executor.py +++ b/libs/prebuilt/langgraph/prebuilt/chat_agent_executor.py @@ -570,15 +570,13 @@ def create_react_agent( if is_dynamic_model: resolved_model = model(state, runtime) # type: ignore[operator] if ( - _should_bind_tools( - resolved_model, tool_classes, num_builtin=len(llm_builtin_tools) - ) # type: ignore[arg-type] + _should_bind_tools(resolved_model, tool_classes, num_builtin=len(llm_builtin_tools)) # type: ignore[arg-type] and len(tool_classes + llm_builtin_tools) > 0 ): resolved_model = cast(BaseChatModel, resolved_model).bind_tools( tool_classes + llm_builtin_tools # type: ignore[operator] ) - return _get_prompt_runnable(prompt) | resolved_model + return _get_prompt_runnable(prompt) | resolved_model # type: ignore[operator] else: return static_model @@ -1046,3 +1044,4 @@ __all__ = [ ] +