From 4c3c30aaf44c82eb2fab5720dcfc5545fdc178c3 Mon Sep 17 00:00:00 2001 From: Sydney Runkle Date: Fri, 27 Feb 2026 15:46:57 -0500 Subject: [PATCH] push --- libs/langgraph/langgraph/pregel/main.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/libs/langgraph/langgraph/pregel/main.py b/libs/langgraph/langgraph/pregel/main.py index c22f9fa29..04d58f909 100644 --- a/libs/langgraph/langgraph/pregel/main.py +++ b/libs/langgraph/langgraph/pregel/main.py @@ -3105,11 +3105,11 @@ class Pregel( durability=durability, **kwargs, ): - # when subgraphs=True with a single stream_mode, stream() - # yields (namespace, payload) tuples — unwrap them - if subgraphs and isinstance(chunk, tuple): - chunk = chunk[-1] if stream_mode == "values": + # when subgraphs=True with a single stream_mode, stream() + # yields (namespace, payload) tuples — unwrap them + if subgraphs and isinstance(chunk, tuple): + chunk = chunk[-1] latest = chunk if ( isinstance(chunk, dict) @@ -3191,11 +3191,11 @@ class Pregel( durability=durability, **kwargs, ): - # when subgraphs=True with a single stream_mode, astream() - # yields (namespace, payload) tuples — unwrap them - if subgraphs and isinstance(chunk, tuple): - chunk = chunk[-1] if stream_mode == "values": + # when subgraphs=True with a single stream_mode, astream() + # yields (namespace, payload) tuples — unwrap them + if subgraphs and isinstance(chunk, tuple): + chunk = chunk[-1] latest = chunk if ( isinstance(chunk, dict)