Skip to content

fix(langgraph): require langgraph-api>=0.10.0 for DeltaChannel#8043

Open
Sydney Runkle (sydney-runkle) wants to merge 6 commits into
mainfrom
sydney-runkle/langgraph/delta-channel-checkpointer-warning
Open

fix(langgraph): require langgraph-api>=0.10.0 for DeltaChannel#8043
Sydney Runkle (sydney-runkle) wants to merge 6 commits into
mainfrom
sydney-runkle/langgraph/delta-channel-checkpointer-warning

Conversation

@sydney-runkle

@sydney-runkle Sydney Runkle (sydney-runkle) commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

A graph that uses DeltaChannel depends on server-side reconstruction support added in langgraph-api>=0.10.0. When such a graph is run under an older API server, delta channels fail at runtime. StateGraph.compile now reads importlib.metadata.version("langgraph-api") and raises a RuntimeError with an upgrade hint when it is <0.10.0; packaging.version.Version keeps release candidates such as 0.10.0rc1 below the final 0.10.0 boundary. The check is a no-op when langgraph-api is not installed (local execution) or when the graph has no delta channel.

Verified end-to-end against real langgraph-api releases: 0.9.0 raises at compile time, 0.10.0 compiles successfully.

Self-Hosted Release Note

StateGraph.compile now raises a clear error when a graph uses DeltaChannel but the installed langgraph-api is <0.10.0, prompting an upgrade instead of failing later at runtime.

Test Plan

  • Compiling a DeltaChannel graph raises under langgraph-api<0.10.0 (including 0.10.0rc1), succeeds at >=0.10.0, and is silent when langgraph-api is absent or the graph has no delta channel.

Made by Open SWE

A graph using `DeltaChannel` reconstructs state via the saver's
`get_delta_channel_history` API (added in `langgraph-checkpoint>=4.1.0`).
Savers from older packages lack it and fail at runtime. `StateGraph.compile`
now warns at compile time so users know to upgrade `langgraph-checkpoint`.

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
@Shivani767

Copy link
Copy Markdown

I have a fix ready for this in PR #8044. Could you please assign this issue to me?

Replace the checkpointer-capability heuristic with a direct `langgraph-api`
version check: `DeltaChannel` reconstruction needs server-side support added
in `langgraph-api>0.9.0`. `StateGraph.compile` now raises a `RuntimeError`
when a delta-channel graph is compiled under an older API server, and is a
no-op when `langgraph-api` is not installed (local execution).

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
@open-swe open-swe Bot changed the title feat(langgraph): warn when checkpointer lacks DeltaChannel support fix(langgraph): check langgraph-api version for DeltaChannel support Jun 11, 2026
Comment thread libs/langgraph/langgraph/graph/state.py
Comment thread libs/langgraph/langgraph/graph/state.py Outdated
return
if Version(api_version) > _MIN_DELTA_CHANNEL_API_VERSION:
return
raise RuntimeError(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought we can just fallback to non-delta channel, but raising error may be even better since they explictly want to get the benefits of delta channel.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think we want to raise bc delta channels have different types of reducers

Comment thread libs/langgraph/langgraph/graph/state.py Outdated
api_version = metadata.version("langgraph-api")
except metadata.PackageNotFoundError:
return
if Version(api_version) > _MIN_DELTA_CHANNEL_API_VERSION:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it include the 0.10.0rcs?
like 0.10.0rc3?

maybe even better to just check on >=0.10.0.
because all the RCs in 0.1.0 don't have prune support.

Use a `>=` bound (raise below 0.9.0) and simplify the check: drop the
module-level constant and the early-return ladder. Verified end-to-end
against real langgraph-api releases — 0.8.6 raises, 0.10.0 compiles.

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
@open-swe open-swe Bot changed the title fix(langgraph): check langgraph-api version for DeltaChannel support fix(langgraph): require langgraph-api>=0.9.0 for DeltaChannel Jun 15, 2026
@sydney-runkle

Copy link
Copy Markdown
Collaborator Author

Open SWE (@open-swe) can you please do this

oh interesting. I was thinking of try import the version constant in langgraph-api, but I guess either way would work.also also let's just check on >=0.10.0, we don't want to include RCs for this particular condition

Raise for API versions below 0.10.0 so prereleases such as 0.10.0rc1 are
not accepted by the delta-channel compatibility check. Verified against real
langgraph-api releases: 0.9.0 raises and 0.10.0 compiles.

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
@open-swe open-swe Bot changed the title fix(langgraph): require langgraph-api>=0.9.0 for DeltaChannel fix(langgraph): require langgraph-api>=0.10.0 for DeltaChannel Jun 17, 2026
Use the version constant exported by `langgraph-api` instead of package
metadata for the DeltaChannel API compatibility check. This keeps the check
aligned with the API package itself while still avoiding a hard dependency
when `langgraph-api` is absent.

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
Revert the optional `langgraph_api.__version__` import path in favor of the
cleaner `importlib.metadata.version("langgraph-api")` check for DeltaChannel
API compatibility. This avoids importing the optional API package at compile
time while preserving the same version boundary.

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
@sydney-runkle Sydney Runkle (sydney-runkle) marked this pull request as ready for review June 17, 2026 20:58

@open-swe open-swe Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Open SWE Review found 1 potential issue.

Open in WebView Open SWE trace

CompiledStateGraph: The compiled `StateGraph`.
"""
checkpointer = ensure_valid_checkpointer(checkpointer)
_check_delta_channel_api_support(self.channels)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 Frozen test env rejects DeltaChannel graphs

This compile-time check runs in the langgraph test environment, but CI installs dependencies with uv sync --frozen --group test --no-dev; on the 3.11-3.13 matrix the frozen libs/langgraph/uv.lock pulls langgraph-api==0.6.39 via langgraph-cli[inmem]. As a result, every existing test that compiles a DeltaChannel graph now fails before running. I reproduced the CI environment with Python 3.13 and g.compile() raises RuntimeError: DeltaChannel requires langgraph-api>=0.10.0, but 0.6.39 is installed. Please update the test/CI lock or dependency constraint to install langgraph-api>=0.10.0 alongside this check.

(Refers to line 1242)


Your feedback helps Open SWE learn. React with 👍 or 👎 to tell us if this review comment was useful.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you can, or someone else (including me), create a deployment to use this code with pinned lg-api to 0.9.0 to see if it fail.

api_version = metadata.version("langgraph-api")
except metadata.PackageNotFoundError:
return
if Version(api_version) < Version("0.10.0"):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we are going to release 0.10.1 to fix the read+prune bug found by Parker.

maybe we can hold on with that(but not sure 0.10.1 will come tomorrow), or we can release this one, and then update this value to 0.10.1 in next release.

wdyt?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah we can hold off on this one

@christian-bromann

Copy link
Copy Markdown
Member

How do we guarantee this for JS deployments?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants