diff --git a/langgraph/pregel/__init__.py b/langgraph/pregel/__init__.py index cb88512c4..746a1e1ed 100644 --- a/langgraph/pregel/__init__.py +++ b/langgraph/pregel/__init__.py @@ -760,10 +760,11 @@ class Pregel( ) ) checkpoint_config = { + **checkpoint_config, "configurable": { **checkpoint_config["configurable"], "thread_ts": checkpoint["id"], - } + }, } # increment start to 0 start += 1 @@ -885,10 +886,11 @@ class Pregel( ) ) checkpoint_config = { + **checkpoint_config, "configurable": { **checkpoint_config["configurable"], "thread_ts": checkpoint["id"], - } + }, } # yield debug checkpoint if stream_mode == "debug": @@ -1031,10 +1033,11 @@ class Pregel( ) ) checkpoint_config = { + **checkpoint_config, "configurable": { **checkpoint_config["configurable"], "thread_ts": checkpoint["id"], - } + }, } # increment start to 0 start += 1 @@ -1162,10 +1165,11 @@ class Pregel( ) ) checkpoint_config = { + **checkpoint_config, "configurable": { **checkpoint_config["configurable"], "thread_ts": checkpoint["id"], - } + }, } # yield debug checkpoint if stream_mode == "debug": diff --git a/tests/test_pregel.py b/tests/test_pregel.py index dc8e179c5..e1e1c4ee1 100644 --- a/tests/test_pregel.py +++ b/tests/test_pregel.py @@ -4372,10 +4372,15 @@ def test_branch_then(snapshot: SnapshotAssertion) -> None: "step": 0, "payload": { "config": { + "tags": [], + "metadata": {"thread_id": "10"}, + "callbacks": None, + "recursion_limit": 25, + "run_id": None, "configurable": { "thread_id": "10", "thread_ts": AnyStr(), - } + }, }, "values": {"my_key": "value", "market": "DE"}, }, @@ -4407,10 +4412,15 @@ def test_branch_then(snapshot: SnapshotAssertion) -> None: "step": 1, "payload": { "config": { + "tags": [], + "metadata": {"thread_id": "10"}, + "callbacks": None, + "recursion_limit": 25, + "run_id": None, "configurable": { "thread_id": "10", "thread_ts": AnyStr(), - } + }, }, "values": {"my_key": "value prepared", "market": "DE"}, }, @@ -4442,10 +4452,15 @@ def test_branch_then(snapshot: SnapshotAssertion) -> None: "step": 2, "payload": { "config": { + "tags": [], + "metadata": {"thread_id": "10"}, + "callbacks": None, + "recursion_limit": 25, + "run_id": None, "configurable": { "thread_id": "10", "thread_ts": AnyStr(), - } + }, }, "values": {"my_key": "value prepared slow", "market": "DE"}, }, @@ -4477,10 +4492,15 @@ def test_branch_then(snapshot: SnapshotAssertion) -> None: "step": 3, "payload": { "config": { + "tags": [], + "metadata": {"thread_id": "10"}, + "callbacks": None, + "recursion_limit": 25, + "run_id": None, "configurable": { "thread_id": "10", "thread_ts": AnyStr(), - } + }, }, "values": { "my_key": "value prepared slow finished", diff --git a/tests/test_pregel_async.py b/tests/test_pregel_async.py index ed33e12e7..b641cb718 100644 --- a/tests/test_pregel_async.py +++ b/tests/test_pregel_async.py @@ -3584,8 +3584,6 @@ async def test_start_branch_then() -> None: async def test_branch_then() -> None: - pass - class State(TypedDict): my_key: Annotated[str, operator.add] market: str @@ -3629,10 +3627,15 @@ async def test_branch_then() -> None: "step": 0, "payload": { "config": { + "tags": [], + "metadata": {"thread_id": "10"}, + "callbacks": None, + "recursion_limit": 25, + "run_id": None, "configurable": { "thread_id": "10", "thread_ts": AnyStr(), - } + }, }, "values": {"my_key": "value", "market": "DE"}, }, @@ -3664,10 +3667,15 @@ async def test_branch_then() -> None: "step": 1, "payload": { "config": { + "tags": [], + "metadata": {"thread_id": "10"}, + "callbacks": None, + "recursion_limit": 25, + "run_id": None, "configurable": { "thread_id": "10", "thread_ts": AnyStr(), - } + }, }, "values": {"my_key": "value prepared", "market": "DE"}, }, @@ -3699,10 +3707,15 @@ async def test_branch_then() -> None: "step": 2, "payload": { "config": { + "tags": [], + "metadata": {"thread_id": "10"}, + "callbacks": None, + "recursion_limit": 25, + "run_id": None, "configurable": { "thread_id": "10", "thread_ts": AnyStr(), - } + }, }, "values": {"my_key": "value prepared slow", "market": "DE"}, }, @@ -3734,10 +3747,15 @@ async def test_branch_then() -> None: "step": 3, "payload": { "config": { + "tags": [], + "metadata": {"thread_id": "10"}, + "callbacks": None, + "recursion_limit": 25, + "run_id": None, "configurable": { "thread_id": "10", "thread_ts": AnyStr(), - } + }, }, "values": { "my_key": "value prepared slow finished",