diff --git a/libs/prebuilt/langgraph/prebuilt/chat_agent_executor.py b/libs/prebuilt/langgraph/prebuilt/chat_agent_executor.py index 5f0ab6682..abf38a8c6 100644 --- a/libs/prebuilt/langgraph/prebuilt/chat_agent_executor.py +++ b/libs/prebuilt/langgraph/prebuilt/chat_agent_executor.py @@ -972,6 +972,10 @@ def create_react_agent( arespond, ), ) + if post_model_hook is not None: + post_model_hook_paths.append("respond") + else: + agent_paths.append("respond") else: if post_model_hook is not None: post_model_hook_paths.append(END) @@ -1072,3 +1076,4 @@ __all__ = [ "AgentStateWithStructuredResponsePydantic", ] +