1.1.0
📦 langgraphView on GitHub →
✨ 4 features🐛 1 fixes⚡ 1 deprecations🔧 14 symbols
Summary
LangGraph 1.1 introduces an opt-in `version="v2"` format for `invoke` and `stream` methods, enabling full type safety and automatic output coercion for Pydantic/dataclass states. A bug fix was also implemented for subgraph replay behavior.
Migration Steps
- To adopt type-safe streaming and invocation, add `version="v2"` to calls of `invoke()`, `ainvoke()`, `stream()`, or `astream()`.
- When using `version="v2"`, access results via the `.value` attribute (for output data) and the `.interrupts` attribute (for interrupts) on the returned `GraphOutput` object.
- Import `GraphOutput`, `StreamPart`, and individual stream part types from `langgraph.types` for type-safe code.
✨ New Features
- Introduced `version="v2"` opt-in for `stream()`, `astream()`, `invoke()`, and `ainvoke()` to provide full type safety.
- When using `version="v2"`, `invoke()` now returns a `GraphOutput` object containing `.value` and `.interrupts` attributes.
- When using `version="v2"`, `stream()`/`astream()` now yield strongly-typed `StreamPart` dicts instead of bare tuples.
- Automatic coercion of outputs to the declared Pydantic model or dataclass schema type when using `version="v2"`.
🐛 Bug Fixes
- Fixed replay behavior for parent and subgraphs.
Affected Symbols
⚡ Deprecations
- Dict-style access on the `GraphOutput` object returned by `invoke(..., version="v2")` (e.g., `result["key"]`, `"key" in result`, `result["__interrupt__"]`) is deprecated and will be removed in v3.0. Migrate to using `.value` and `.interrupts` attributes instead.