fix(langgraph): drop 'tools' stream_mode + content-match id preservation#176
Merged
Conversation
…id preservation
Two follow-up fixes after live smoke-testing 0.0.10 against a real
LangGraph 0.8.5 backend:
1. defaultStreamMode no longer requests 'tools'. langgraph_api < 0.9.x
rejects the entire request with HTTP 422 the moment any unknown
stream_mode appears in the array. Tool-call data is still derivable
from messages-tuple events. Previously every submit was failing with
422 against current servers.
2. Content-aware id preservation. Track-by-id in chat-message-list
relies on stable message ids across emissions, but two language-
server quirks were tearing down the DOM mid-stream:
- The server echoes our optimistic human message back with its own
id (e.g. 9867e1ce vs our 'optimistic-…').
- Final messages can arrive with a run id different from the chunk
id used during streaming partials.
Both cases now match by (role, content) — with prefix-relationship
tolerance for AI streaming → final — and the existing id is retained.
Applied in both mergeMessages and the values-event sync path so
streaming partials, message-tuple events, and full-state snapshots
all converge on stable ids.
Bumps @ngaf/langgraph 0.0.4 → 0.0.6 (skipping 0.0.5 which was published
via local pack but never tagged).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Live smoke against a real LangGraph backend (langgraph_api 0.8.5) revealed two issues after 0.0.10 / 0.0.4 shipped:
Changes
Versions
Test plan
🤖 Generated with Claude Code