Files
langgraphjs/libs/langgraph-api
Christian Bromann e3a1933a88 fix(core): keep stream() on 3-tuple shape (#2489)
## Summary
- Fixes `ValueError: too many values to unpack (expected 3)` when JS
graphs on `@langchain/langgraph` >=1.3 stream through the legacy path
(plain `stream()` / `streamEvents` v2 → `on_chain_stream`), which
affected deepagents 1.10.x and similar stacks on runtimes that expect
Python's 3-tuple stream shape.
- **Root cause:** `_streamIterator` always yielded a 4-element
`[namespace, mode, payload, meta]` when `subgraphs` + multi-mode and a
checkpointer were active, even though `StreamChunkMeta` is only for the
native v3 protocol stream (`streamEvents(..., { version: "v3" })` /
`pump()`).
- **Fix:** Introduce `isV3` and only append `meta` when `options.version
=== "v3"`; all other consumers get the Python-aligned 3-tuple
`[namespace, mode, payload]`.
- **Tests:** Add `stream() shape parity with Python` regression coverage
(3-tuples for subgraphs + multi-mode with checkpointer; v3 still emits
companion `checkpoints` events).
2026-06-04 12:59:18 -07:00
..
2026-06-01 09:20:26 -07:00
2025-02-05 01:22:24 +01:00
2025-07-03 14:21:00 +02:00

LangGraph.js API

In-memory implementation of the LangGraph.js API.

Tests

  1. Build the latest code changes to test: pnpm build
  2. Start a local server: pnpm dev
  3. Run the tests: pnpm test