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: