Skip to content

fix(executor): pass config to _extract_state for langgraph-prebuilt >= 1.1.0 - #214

Open
samarth70 wants to merge 1 commit into
minitap-ai:mainfrom
samarth70:fix/executor-tool-node-langgraph-1.1
Open

fix(executor): pass config to _extract_state for langgraph-prebuilt >= 1.1.0#214
samarth70 wants to merge 1 commit into
minitap-ai:mainfrom
samarth70:fix/executor-tool-node-langgraph-1.1

Conversation

@samarth70

Copy link
Copy Markdown

Fixes #213.

Problem

langgraph-prebuilt 1.1.0 changed ToolNode._extract_state to require a config parameter:

def _extract_state(
    self,
    input: list[AnyMessage] | dict[str, Any] | BaseModel,
    config: RunnableConfig,
) -> ...

ExecutorToolNode._build_tool_runtime still calls self._extract_state(input), so once the floating langgraph>=1.0.2,<2.0.0 pin resolves to 1.1.x, every tool execution raises:

TypeError: ToolNode._extract_state() missing 1 required positional argument: 'config'

Fix

Forward the config that is already a parameter of _build_tool_runtime:

state = self._extract_state(input, config)

Tests

Added tests/mobile_use/test_executor_tool_node.py — an offline regression test that drives _build_tool_runtime directly:

  • fails on the old call with the exact reported TypeError (verified against langgraph-prebuilt 1.1.0)
  • passes with the fix, asserting the resulting ToolRuntime carries the extracted state, the config, and the tool call id

Verified locally: pytest tests/mobile_use/test_executor_tool_node.py → 1 passed; ruff format --check and ruff check clean on both files.

…= 1.1.0

ToolNode._extract_state gained a required 'config' parameter in
langgraph-prebuilt 1.1.0, so ExecutorToolNode._build_tool_runtime raised
TypeError on every tool execution once the floating langgraph pin
(>=1.0.2,<2.0.0) resolved to 1.1.x. Forward the 'config' already available
at the call site, and add a regression test that reproduces the reported
TypeError on the old call.

Fixes minitap-ai#213
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • rat-review

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 427bf99c-7d30-4535-ba29-d8cc9e70debf

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ExecutorToolNode breaks on langgraph-prebuilt >= 1.1.0: ToolNode._extract_state() missing required 'config' argument

1 participant