diff --git a/libs/prebuilt/langgraph/prebuilt/chat_agent_executor.py b/libs/prebuilt/langgraph/prebuilt/chat_agent_executor.py index bf2179c88..4cbbcfc62 100644 --- a/libs/prebuilt/langgraph/prebuilt/chat_agent_executor.py +++ b/libs/prebuilt/langgraph/prebuilt/chat_agent_executor.py @@ -903,6 +903,8 @@ def create_react_agent( if not isinstance(last_message, AIMessage) or not last_message.tool_calls: if post_model_hook is not None: return "post_model_hook" + elif response_format is not None: + return "respond" else: return END # Otherwise if there is, we continue @@ -1077,3 +1079,4 @@ __all__ = [ +