feat: support state updates from `wrap_model_call`
by sydney-runkle
·
Feb 06, 2026 at 19:31 UTC
·
scan-b2199235621af192
Get this automatically on every PR
Install the Axiomo GitHub App to get Signals as check runs and PR comments on every pull request.
Risk level: High (50%)
Enable state updates from wrap_model_call middleware via WrapModelCallResult.
WrapModelCallResult added in langchain/agents/middleware/types.py
References of WrapModelCallResult in updated imports
PR description confirms no changes to existing middleware required
New test file test_wrap_model_call_state_update.py with 765 new lines
Trusted contributor with 167 merged PRs. has 518 followers. unfamiliar with libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_wrap_model_call_state_update.py.
Focus on 1 critical file(s)
libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_wrap_model_call_state_update.py
+765
765 lines changed; New file; Source code
libs/langchain_v1/langchain/agents/factory.py
+193
193 lines changed; Source code
libs/langchain_v1/langchain/agents/middleware/types.py
+34
Source code
libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_composition.py
+36
Source code
libs/langchain_v1/langchain/agents/middleware/__init__.py
+2
Source code
118
minutes to review
high
effort level
none
staleness risk
Allocate focused review time
Good evidence, acceptable risk, ready for merge
Consider breaking into smaller PRs
Why is coverage_maintained missing? Consider adding this check.
libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_wrap_model_call_state_update.py
Critical file: 765 lines changed; New file; Source code