From a3ee8145399568d8b8aa708513f4ed9a522bc581 Mon Sep 17 00:00:00 2001 From: William FH <13333726+hinthornw@users.noreply.github.com> Date: Fri, 12 Sep 2025 14:05:07 -0700 Subject: [PATCH] chore(langgraph): Log when no values event is emitted from RemoteGraph (#6140) --- libs/langgraph/langgraph/pregel/remote.py | 5 +++++ libs/langgraph/tests/test_pregel.py | 1 + 2 files changed, 6 insertions(+) diff --git a/libs/langgraph/langgraph/pregel/remote.py b/libs/langgraph/langgraph/pregel/remote.py index 497adbe90..65ef470ae 100644 --- a/libs/langgraph/langgraph/pregel/remote.py +++ b/libs/langgraph/langgraph/pregel/remote.py @@ -1,5 +1,6 @@ from __future__ import annotations +import logging from collections.abc import AsyncIterator, Iterator, Sequence from dataclasses import asdict from typing import ( @@ -61,6 +62,8 @@ from langgraph.types import ( StreamMode, ) +logger = logging.getLogger(__name__) + __all__ = ("RemoteGraph", "RemoteException") _CONF_DROPLIST = frozenset( @@ -950,6 +953,7 @@ class RemoteGraph(PregelProtocol): try: return chunk except UnboundLocalError: + logger.warning("No events received from remote graph") return None async def ainvoke( @@ -990,6 +994,7 @@ class RemoteGraph(PregelProtocol): try: return chunk except UnboundLocalError: + logger.warning("No events received from remote graph") return None diff --git a/libs/langgraph/tests/test_pregel.py b/libs/langgraph/tests/test_pregel.py index 7cc67bd35..d60f6bdd0 100644 --- a/libs/langgraph/tests/test_pregel.py +++ b/libs/langgraph/tests/test_pregel.py @@ -8383,6 +8383,7 @@ def test_get_graph_nonterminal_last_step_source(snapshot: SnapshotAssertion) -> assert json.dumps(graph_json, indent=2, sort_keys=True) == snapshot + def test_null_resume_disallowed_with_multiple_interrupts( sync_checkpointer: BaseCheckpointSaver, ) -> None: