diff --git a/libs/langgraph/langgraph/pregel/remote.py b/libs/langgraph/langgraph/pregel/remote.py index 54db4ad60..1233cd63f 100644 --- a/libs/langgraph/langgraph/pregel/remote.py +++ b/libs/langgraph/langgraph/pregel/remote.py @@ -326,7 +326,7 @@ class RemoteGraph(PregelProtocol, Runnable): response: dict = self.sync_client.threads.update_state( # type: ignore thread_id=merged_config["configurable"]["thread_id"], - values=values, # type: ignore + values=values, as_node=as_node, checkpoint=self._get_checkpoint(merged_config), ) @@ -342,7 +342,7 @@ class RemoteGraph(PregelProtocol, Runnable): response: dict = await self.client.threads.update_state( # type: ignore thread_id=merged_config["configurable"]["thread_id"], - values=values, # type: ignore + values=values, as_node=as_node, checkpoint=self._get_checkpoint(merged_config), ) diff --git a/libs/sdk-py/langgraph_sdk/schema.py b/libs/sdk-py/langgraph_sdk/schema.py index 19014a76c..4e5314692 100644 --- a/libs/sdk-py/langgraph_sdk/schema.py +++ b/libs/sdk-py/langgraph_sdk/schema.py @@ -186,6 +186,7 @@ class ThreadTask(TypedDict): interrupts: list[dict] checkpoint: Optional[Checkpoint] state: Optional["ThreadState"] + result: Optional[dict[str, Any]] class ThreadState(TypedDict):