[PR #320] [MERGED] Fix astream_events modifying output format unexpectedly #1378

Closed
opened 2026-02-20 17:44:35 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/langgraph/pull/320
Author: @nfcampos
Created: 4/17/2024
Status: Merged
Merged: 4/17/2024
Merged by: @nfcampos

Base: mainHead: nc/17apr/fix-stream-events


📝 Commits (2)

  • 322cea0 Fix astream_events modifying output format unexpectedly
  • 64dd631 Lint

📊 Changes

4 files changed (+195 additions, -15 deletions)

View changed files

📝 langgraph/pregel/__init__.py (+16 -3)
📝 langgraph/pregel/io.py (+34 -12)
📝 tests/test_pregel.py (+52 -0)
📝 tests/test_pregel_async.py (+93 -0)

📄 Description

  • (unrelated) use run_id passed in
  • if using a graph as node in another graph ensure stream_mode for inner call is always values
  • ensure langchain-core doesn't auto promote streamed dicts to addable dicts, which results in unexpected output (only) when calling astream_events

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langchain-ai/langgraph/pull/320 **Author:** [@nfcampos](https://github.com/nfcampos) **Created:** 4/17/2024 **Status:** ✅ Merged **Merged:** 4/17/2024 **Merged by:** [@nfcampos](https://github.com/nfcampos) **Base:** `main` ← **Head:** `nc/17apr/fix-stream-events` --- ### 📝 Commits (2) - [`322cea0`](https://github.com/langchain-ai/langgraph/commit/322cea054c729821deccabd052a65b3147ac6c52) Fix astream_events modifying output format unexpectedly - [`64dd631`](https://github.com/langchain-ai/langgraph/commit/64dd63166810762dab6680e774700fb5a7e7e88b) Lint ### 📊 Changes **4 files changed** (+195 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `langgraph/pregel/__init__.py` (+16 -3) 📝 `langgraph/pregel/io.py` (+34 -12) 📝 `tests/test_pregel.py` (+52 -0) 📝 `tests/test_pregel_async.py` (+93 -0) </details> ### 📄 Description - (unrelated) use run_id passed in - if using a graph as node in another graph ensure stream_mode for inner call is always values - ensure langchain-core doesn't auto promote streamed dicts to addable dicts, which results in unexpected output (only) when calling astream_events --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-20 17:44:35 -05:00
yindo closed this issue 2026-02-20 17:44:35 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraph#1378