Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-langgraph-prebuilt for
openSUSE:Factory checked in at 2026-11-19 16:56:10
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-langgraph-prebuilt (Old)
and /work/SRC/openSUSE:Factory/.python-langgraph-prebuilt.new.1251 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-langgraph-prebuilt"
Thu Nov 19 16:56:10 2026 rev:5 rq:1398596 version:1.1.3
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-langgraph-prebuilt/python-langgraph-prebuilt.changes
2026-11-16 09:13:26.194291008 +0100
+++
/work/SRC/openSUSE:Factory/.python-langgraph-prebuilt.new.1251/python-langgraph-prebuilt.changes
2026-11-19 16:57:13.783161269 +0100
@@ -1,0 +2,11 @@
+Thu Nov 19 07:28:41 UTC 2026 - Martin Pluskal <[email protected]>
+
+- Update to 1.1.3:
+ * ToolCallRequest.override(state=...): state overrides from
+ wrap_tool_call now also replaces runtime.state, so the
+ tool sees them via both InjectedState and ToolRuntime
+ * Send-dispatched tool calls now get the same state as an
+ edge: read the state the node would get from an edge,
+ coerced to its input schema
+
+-------------------------------------------------------------------
Old:
----
langgraph_prebuilt-1.1.2.tar.gz
New:
----
langgraph_prebuilt-1.1.3.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-langgraph-prebuilt.spec ++++++
--- /var/tmp/diff_new_pack.qYJHdZ/_old 2026-11-19 16:57:14.742201921 +0100
+++ /var/tmp/diff_new_pack.qYJHdZ/_new 2026-11-19 16:57:14.743201963 +0100
@@ -17,7 +17,7 @@
Name: python-langgraph-prebuilt
-Version: 1.1.2
+Version: 1.1.3
Release: 0
Summary: High-level APIs for creating and executing LangGraph agents
and tools
License: MIT
++++++ langgraph_prebuilt-1.1.2.tar.gz -> langgraph_prebuilt-1.1.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/langgraph_prebuilt-1.1.2/PKG-INFO
new/langgraph_prebuilt-1.1.3/PKG-INFO
--- old/langgraph_prebuilt-1.1.2/PKG-INFO 2020-02-02 01:00:00.000000000
+0100
+++ new/langgraph_prebuilt-1.1.3/PKG-INFO 2020-02-02 01:00:00.000000000
+0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.5
Name: langgraph-prebuilt
-Version: 1.1.2
+Version: 1.1.3
Summary: Library with high-level APIs for creating and executing LangGraph
agents and tools.
Project-URL: Source,
https://github.com/langchain-ai/langgraph/tree/main/libs/prebuilt
Project-URL: Twitter, https://x.com/langchain_oss
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/langgraph_prebuilt-1.1.2/langgraph/prebuilt/tool_node.py
new/langgraph_prebuilt-1.1.3/langgraph/prebuilt/tool_node.py
--- old/langgraph_prebuilt-1.1.2/langgraph/prebuilt/tool_node.py
2020-02-02 01:00:00.000000000 +0100
+++ new/langgraph_prebuilt-1.1.3/langgraph/prebuilt/tool_node.py
2020-02-02 01:00:00.000000000 +0100
@@ -107,6 +107,12 @@
return False
+try:
+ from langgraph._internal._constants import CONFIG_KEY_READ_STATE
+except ImportError: # `langgraph` before `CONFIG_KEY_READ_STATE` never sets
the key
+ CONFIG_KEY_READ_STATE = "__pregel_read_state"
+
+
# right now we use a dict as the default, can change this to AgentState, but
depends
# on if this lives in LangChain or LangGraph... ideally would have some typed
# messages key
@@ -189,7 +195,9 @@
Supported keys:
- tool_call: Tool call dict with `name`, `args`, and `id`
- - state: Agent state (`dict`, `list`, or `BaseModel`)
+ - state: Agent state (`dict`, `list`, or `BaseModel`). Also
+ replaces `runtime.state`, so the tool gets this state
through
+ both `InjectedState` and `ToolRuntime`.
Returns:
New ToolCallRequest instance with specified overrides applied.
@@ -204,7 +212,13 @@
new_request = request.override(tool_call=modified_call,
state=new_state)
```
"""
- return replace(self, **overrides)
+ request = replace(self, **overrides)
+ # None outside a graph, or a mock in tests: replace() would raise on
either.
+ if "state" in overrides and isinstance(request.runtime, ToolRuntime):
+ request = replace(
+ request, runtime=replace(request.runtime, state=request.state)
+ )
+ return request
ToolCallWrapper = Callable[
@@ -1324,7 +1338,8 @@
- `ToolCallWithContext` dict — legacy Send payload carrying an inlined
state snapshot; return `input["state"]`.
- list of `ToolCall` dicts — new Send payload with no inlined state;
- hydrate state from channels via `CONFIG_KEY_READ`.
+ read the state this node would get from an edge, coerced to its
+ input schema (raw channel values on older `langgraph`).
- regular graph state (dict/list/BaseModel) — return `input` as-is.
"""
if isinstance(input, dict) and input.get("__type") ==
"tool_call_with_context":
@@ -1335,7 +1350,10 @@
and isinstance(input[-1], dict)
and input[-1].get("type") == "tool_call"
):
- read = config.get(CONF, {}).get(CONFIG_KEY_READ)
+ conf = config.get(CONF, {})
+ if (read_state := conf.get(CONFIG_KEY_READ_STATE)) is not None:
+ return read_state()
+ read = conf.get(CONFIG_KEY_READ)
if read is None:
return {}
# Pregel installs CONFIG_KEY_READ as
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/langgraph_prebuilt-1.1.2/pyproject.toml
new/langgraph_prebuilt-1.1.3/pyproject.toml
--- old/langgraph_prebuilt-1.1.2/pyproject.toml 2020-02-02 01:00:00.000000000
+0100
+++ new/langgraph_prebuilt-1.1.3/pyproject.toml 2020-02-02 01:00:00.000000000
+0100
@@ -4,7 +4,7 @@
[project]
name = "langgraph-prebuilt"
-version = "1.1.2"
+version = "1.1.3"
description = "Library with high-level APIs for creating and executing
LangGraph agents and tools."
authors = []
requires-python = ">=3.10"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/langgraph_prebuilt-1.1.2/tests/test_on_tool_call.py
new/langgraph_prebuilt-1.1.3/tests/test_on_tool_call.py
--- old/langgraph_prebuilt-1.1.2/tests/test_on_tool_call.py 2020-02-02
01:00:00.000000000 +0100
+++ new/langgraph_prebuilt-1.1.3/tests/test_on_tool_call.py 2020-02-02
01:00:00.000000000 +0100
@@ -1,7 +1,9 @@
"""Unit tests for tool call interceptor in ToolNode."""
import functools
-from collections.abc import Callable
+from collections.abc import Awaitable, Callable
+from dataclasses import replace
+from typing import Annotated
from unittest.mock import Mock
import pytest
@@ -12,8 +14,10 @@
from langgraph.types import Command
from langgraph.prebuilt.tool_node import (
+ InjectedState,
ToolCallRequest,
ToolNode,
+ ToolRuntime,
)
pytestmark = pytest.mark.anyio
@@ -1471,3 +1475,54 @@
assert fresh_new_request.tool == add # Other fields should remain the same
assert fresh_new_request.state == state
assert fresh_new_request.runtime is None
+
+
+@tool
+def read_note(note: Annotated[str, InjectedState("note")], runtime:
ToolRuntime) -> str:
+ """Return the note from injected state and from the tool runtime."""
+ return f"InjectedState={note} ToolRuntime={runtime.state['note']}"
+
+
+def _override_state(request: ToolCallRequest) -> ToolCallRequest:
+ return request.override(state={**request.state, "note": "new"})
+
+
+def _override_state_and_stale_runtime(request: ToolCallRequest) ->
ToolCallRequest:
+ stale = replace(request.runtime, state={**request.state, "note": "stale"})
+ return request.override(state={**request.state, "note": "new"},
runtime=stale)
+
+
[email protected](
+ "override",
+ [_override_state, _override_state_and_stale_runtime],
+ ids=["state", "state_and_stale_runtime"],
+)
+async def test_wrapper_state_override_reaches_tool(
+ override: Callable[[ToolCallRequest], ToolCallRequest],
+) -> None:
+ def wrap(
+ request: ToolCallRequest,
+ execute: Callable[[ToolCallRequest], ToolMessage | Command],
+ ) -> ToolMessage | Command:
+ return execute(override(request))
+
+ async def awrap(
+ request: ToolCallRequest,
+ execute: Callable[[ToolCallRequest], Awaitable[ToolMessage | Command]],
+ ) -> ToolMessage | Command:
+ return await execute(override(request))
+
+ tool_call: ToolCall = {"name": "read_note", "args": {}, "id": "call_1"}
+ state = {"messages": [AIMessage("", tool_calls=[tool_call])], "note":
"old"}
+ config = _create_config_with_runtime()
+
+ sync_out = ToolNode([read_note], wrap_tool_call=wrap).invoke(state, config)
+ async_out = await ToolNode([read_note], awrap_tool_call=awrap).ainvoke(
+ state, config
+ )
+
+ expected = "InjectedState=new ToolRuntime=new"
+ assert {
+ "sync": sync_out["messages"][0].content,
+ "async": async_out["messages"][0].content,
+ } == {"sync": expected, "async": expected}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/langgraph_prebuilt-1.1.2/tests/test_tool_node.py
new/langgraph_prebuilt-1.1.3/tests/test_tool_node.py
--- old/langgraph_prebuilt-1.1.2/tests/test_tool_node.py 2020-02-02
01:00:00.000000000 +0100
+++ new/langgraph_prebuilt-1.1.3/tests/test_tool_node.py 2020-02-02
01:00:00.000000000 +0100
@@ -3,6 +3,7 @@
import json
import sys
import warnings
+from collections.abc import Callable
from functools import partial
from typing import (
Annotated,
@@ -1573,6 +1574,66 @@
assert tool_message.content == "hi?"
[email protected]("schema_", _INJECTED_STATE_SCHEMAS)
+def test_tool_node_send_tool_call_gets_same_state_as_edge(schema_: type[T]) ->
None:
+ call = ToolCall(name="record", args={}, id="call_1", type="tool_call")
+ seen: list[tuple[type, type]] = []
+
+ def record(runtime: ToolRuntime, state: Annotated[T, InjectedState]) ->
str:
+ """Record the state types the tool gets."""
+ seen.append((type(runtime.state), type(state)))
+ return "ok"
+
+ def agent(state: Any) -> dict:
+ return {"messages": [AIMessage("", tool_calls=[call])]}
+
+ def state_types(route: Callable[[Any], str | list[Send]]) -> tuple[type,
type]:
+ seen.clear()
+ graph = (
+ StateGraph(schema_)
+ .add_node("agent", agent)
+ .add_node("tools", ToolNode([record]))
+ .add_edge(START, "agent")
+ .add_conditional_edges("agent", route, ["tools"])
+ .compile()
+ )
+ graph.invoke({"messages": [], "foo": "bar"})
+ return seen[0]
+
+ by_send = state_types(lambda _: [Send("tools", [call])])
+ by_edge = state_types(lambda _: "tools")
+ assert by_send == by_edge
+
+
+def test_tool_node_in_graph_run_by_send_gets_that_graphs_state() -> None:
+ call = ToolCall(name="record", args={}, id="call_1", type="tool_call")
+ seen: list[Any] = []
+
+ def record(runtime: ToolRuntime) -> str:
+ """Record the state the tool gets."""
+ seen.append(runtime.state)
+ return "ok"
+
+ class State(TypedDict):
+ value: str
+
+ def call_tools(state: State) -> dict:
+ ToolNode([record]).invoke([call])
+ return {}
+
+ inner = StateGraph(State).add_node(call_tools).add_edge(START,
"call_tools")
+ outer = (
+ StateGraph(State)
+ .add_node("inner", inner.compile())
+ .add_conditional_edges(
+ START, lambda _: [Send("inner", {"value": "inner"})], ["inner"]
+ )
+ .compile()
+ )
+ outer.invoke({"value": "outer"})
+ assert seen == [{"value": "inner"}]
+
+
def test_tool_node_inject_store() -> None:
store = InMemoryStore()
namespace = ("test",)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/langgraph_prebuilt-1.1.2/uv.lock
new/langgraph_prebuilt-1.1.3/uv.lock
--- old/langgraph_prebuilt-1.1.2/uv.lock 2020-02-02 01:00:00.000000000
+0100
+++ new/langgraph_prebuilt-1.1.3/uv.lock 2020-02-02 01:00:00.000000000
+0100
@@ -607,7 +607,7 @@
[[package]]
name = "langgraph-prebuilt"
-version = "1.1.2"
+version = "1.1.3"
source = { editable = "." }
dependencies = [
{ name = "langchain-core" },