From ad33af4c98d958d653448ccd54cf62996e598f5b Mon Sep 17 00:00:00 2001 From: "open-swe[bot]" Date: Tue, 12 Aug 2025 17:05:55 +0000 Subject: [PATCH] Apply patch [skip ci] --- libs/prebuilt/langgraph/prebuilt/chat_agent_executor.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libs/prebuilt/langgraph/prebuilt/chat_agent_executor.py b/libs/prebuilt/langgraph/prebuilt/chat_agent_executor.py index dcd777d34..ea7898c01 100644 --- a/libs/prebuilt/langgraph/prebuilt/chat_agent_executor.py +++ b/libs/prebuilt/langgraph/prebuilt/chat_agent_executor.py @@ -1320,8 +1320,10 @@ def create_react_agent( ] if pending_tool_calls: + # Create a temporary ToolExecutor to inject tool arguments + temp_executor = ToolExecutor(tool_classes[0]) if tool_classes else None pending_tool_calls = [ - tool_node.inject_tool_args(call, state, store) # type: ignore[arg-type] + temp_executor.inject_tool_args(call, state, store) if temp_executor else call # type: ignore[arg-type] for call in pending_tool_calls ] return [Send(call["name"], call) for call in pending_tool_calls] @@ -1395,3 +1397,4 @@ __all__ = [ "AgentStateWithStructuredResponsePydantic", ] +