From 8154ab784e53891992bf437064d5177a99ec6613 Mon Sep 17 00:00:00 2001 From: Nuno Campos Date: Thu, 29 Aug 2024 20:15:20 -0700 Subject: [PATCH] For input checkpoint use filtered input writes in checkpoint metadata - if we use the raw input we can end up saving keys that were actually ignored (because not one of the input keys), which is incosistent --- libs/langgraph/langgraph/pregel/loop.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/langgraph/langgraph/pregel/loop.py b/libs/langgraph/langgraph/pregel/loop.py index d791a5539..b2eaac472 100644 --- a/libs/langgraph/langgraph/pregel/loop.py +++ b/libs/langgraph/langgraph/pregel/loop.py @@ -422,7 +422,7 @@ class PregelLoop: self.checkpointer_get_next_version, ), "Can't write to SharedValues in graph input" # save input checkpoint - self._put_checkpoint({"source": "input", "writes": self.input}) + self._put_checkpoint({"source": "input", "writes": dict(input_writes)}) else: raise EmptyInputError(f"Received no input for {input_keys}") # done with input