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

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>
This commit is contained in:
Sydney Runkle
2026-06-17 16:50:12 +00:00
co-authored by open-swe[bot] <open-swe@users.noreply.github.com>
parent 8cbd400a11
commit 30d1571f73
2 changed files with 13 additions and 7 deletions
+3 -3
View File
@@ -126,7 +126,7 @@ def _check_delta_channel_api_support(channels: Mapping[str, Any]) -> None:
"""Raise if a `DeltaChannel` graph runs under an API server too old to support it.
`DeltaChannel` reconstruction needs server-side support added in
`langgraph-api>=0.9.0`, so we raise at compile time when an older API
`langgraph-api>=0.10.0`, so we raise at compile time when an older API
server is installed. Skipped when `langgraph-api` is absent (local
execution) or the graph has no delta channel.
"""
@@ -136,9 +136,9 @@ def _check_delta_channel_api_support(channels: Mapping[str, Any]) -> None:
api_version = metadata.version("langgraph-api")
except metadata.PackageNotFoundError:
return
if Version(api_version) < Version("0.9.0"):
if Version(api_version) < Version("0.10.0"):
raise RuntimeError(
f"`DeltaChannel` requires `langgraph-api>=0.9.0`, but {api_version} "
f"`DeltaChannel` requires `langgraph-api>=0.10.0`, but {api_version} "
"is installed. Upgrade with `pip install -U langgraph-api`."
)
@@ -1,7 +1,7 @@
"""Compile-time check that `DeltaChannel` graphs run under a supported API server.
`DeltaChannel` reconstruction relies on server-side support added in
`langgraph-api>=0.9.0`. When running under an older API server, delta channels
`langgraph-api>=0.10.0`. When running under an older API server, delta channels
fail at runtime, so `StateGraph.compile` raises with an upgrade hint. The check
is skipped when `langgraph-api` is not installed (local execution).
"""
@@ -57,13 +57,19 @@ def api_version(monkeypatch: pytest.MonkeyPatch):
def test_delta_graph_raises_for_old_api(api_version) -> None:
api_version("0.8.9")
with pytest.raises(RuntimeError, match="requires `langgraph-api>=0.9.0`"):
api_version("0.9.9")
with pytest.raises(RuntimeError, match="requires `langgraph-api>=0.10.0`"):
_delta_graph().compile()
def test_delta_graph_raises_for_api_release_candidate(api_version) -> None:
api_version("0.10.0rc1")
with pytest.raises(RuntimeError, match="requires `langgraph-api>=0.10.0`"):
_delta_graph().compile()
def test_delta_graph_ok_for_min_api(api_version) -> None:
api_version("0.9.0")
api_version("0.10.0")
_delta_graph().compile()