fix(executor): pass config to _extract_state for langgraph-prebuilt >= 1.1.0 - #214
Open
samarth70 wants to merge 1 commit into
Open
fix(executor): pass config to _extract_state for langgraph-prebuilt >= 1.1.0#214samarth70 wants to merge 1 commit into
samarth70 wants to merge 1 commit into
Conversation
…= 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
Contributor
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one) (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #213.
Problem
langgraph-prebuilt1.1.0 changedToolNode._extract_stateto require aconfigparameter:ExecutorToolNode._build_tool_runtimestill callsself._extract_state(input), so once the floatinglanggraph>=1.0.2,<2.0.0pin resolves to 1.1.x, every tool execution raises:Fix
Forward the
configthat is already a parameter of_build_tool_runtime:Tests
Added
tests/mobile_use/test_executor_tool_node.py— an offline regression test that drives_build_tool_runtimedirectly:TypeError(verified against langgraph-prebuilt 1.1.0)ToolRuntimecarries the extracted state, theconfig, and the tool call idVerified locally:
pytest tests/mobile_use/test_executor_tool_node.py→ 1 passed;ruff format --checkandruff checkclean on both files.