[PR #3935] [MERGED] fix(docs): prioritize interrupts in SQL agent streaming examples #3945

Closed
opened 2026-06-05 18:53:40 -04:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/docs/pull/3935
Author: @mahirdesai2004
Created: 5/9/2026
Status: Merged
Merged: 6/2/2026
Merged by: @npentrel

Base: mainHead: fix/sql-agent-interrupt-stream-handling


📝 Commits (1)

  • de8ea65 fix(docs): prioritize interrupts in SQL agent streaming examples

📊 Changes

1 file changed (+6 additions, -10 deletions)

View changed files

📝 src/oss/langgraph/sql-agent.mdx (+6 -10)

📄 Description

Summary

Fixes the SQL agent tutorial streaming example where the interrupt handling branch becomes unreachable when using stream_mode="values".

Since streamed steps may contain both:

  • messages
  • interrupt

the previous condition order caused the interrupt branch to never execute.

This PR updates the example logic to prioritize interrupt handling before message printing in both affected Python examples.

Changes

  • Reordered conditional checks in sql-agent.mdx
  • Removed unreachable else: pass
  • No runtime or library behavior changes (docs-only fix)

Related Issues/PRs

Fixes #37251


🔄 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/docs/pull/3935 **Author:** [@mahirdesai2004](https://github.com/mahirdesai2004) **Created:** 5/9/2026 **Status:** ✅ Merged **Merged:** 6/2/2026 **Merged by:** [@npentrel](https://github.com/npentrel) **Base:** `main` ← **Head:** `fix/sql-agent-interrupt-stream-handling` --- ### 📝 Commits (1) - [`de8ea65`](https://github.com/langchain-ai/docs/commit/de8ea651dbe9ba9c1a31b296b845edf6a5952f8a) fix(docs): prioritize interrupts in SQL agent streaming examples ### 📊 Changes **1 file changed** (+6 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `src/oss/langgraph/sql-agent.mdx` (+6 -10) </details> ### 📄 Description ## Summary Fixes the SQL agent tutorial streaming example where the interrupt handling branch becomes unreachable when using stream_mode="values". Since streamed steps may contain both: - messages - __interrupt__ the previous condition order caused the interrupt branch to never execute. This PR updates the example logic to prioritize interrupt handling before message printing in both affected Python examples. ## Changes - Reordered conditional checks in sql-agent.mdx - Removed unreachable else: pass - No runtime or library behavior changes (docs-only fix) ## Related Issues/PRs Fixes #37251 --- <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-06-05 18:53:40 -04:00
yindo closed this issue 2026-06-05 18:53:40 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/docs#3945