feat: enforce configurable tool timeouts - #1015
Open
radu-mocanu wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR makes configured tool timeouts actually take effect in the LangGraph runtime integration by extending the durable interrupt mechanism to support time-bounded waits (via WaitUntil) and ensuring timeout resumes fail the agent execution rather than being returned as tool error messages.
Changes:
- Add optional
timeout(ms) support to@durable_interrupt, emitting a composite interrupt payload[value, WaitUntil(...)]and raisingUiPathTimeoutErrorwhen resumed by a timer. - Apply the configured timeout to Process, IXP Extraction, DeepRAG, and Batch Transform durable interrupts.
- Update tool-node error handling and tests so
UiPathTimeoutErrorbubbles up (failing the agent) and composite interrupts are validated.
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| uv.lock | Bumps package version to 0.14.17 in the lockfile. |
| pyproject.toml | Bumps package version to 0.14.17. |
| src/uipath_langchain/_utils/durable_interrupt/decorator.py | Adds timeout-aware interrupt/resume helpers and overloads for durable_interrupt(timeout=...). |
| src/uipath_langchain/agent/tools/tool_node.py | Re-raises UiPathTimeoutError to fail agent execution instead of converting to ToolMessage. |
| src/uipath_langchain/agent/tools/process_tool.py | Passes configured tool timeout into @durable_interrupt for process invocation. |
| src/uipath_langchain/agent/tools/extraction_tool.py | Switches IXP extraction to @durable_interrupt(timeout=...) to support timeouts. |
| src/uipath_langchain/agent/tools/internal_tools/deeprag_tool.py | Applies optional resource timeout to DeepRAG durable interrupts. |
| src/uipath_langchain/agent/tools/internal_tools/batch_transform_tool.py | Applies optional resource timeout to Batch Transform durable interrupts. |
| tests/agent/tools/test_tool_node.py | Adds a timeout tool test ensuring UiPathTimeoutError is re-raised. |
| tests/agent/tools/test_process_tool.py | Validates composite interrupt includes WaitUntil when timeout is configured. |
| tests/agent/tools/test_extraction_tool.py | Updates interrupt patching and validates WaitUntil is included when timeout is configured. |
| tests/agent/tools/test_durable_interrupt.py | Adds coverage for timeout behavior: composite interrupts and timer-resume rejection. |
| tests/agent/tools/internal_tools/test_deeprag_tool.py | Validates composite interrupt behavior with WaitUntil when timeout is configured. |
| tests/agent/tools/internal_tools/test_batch_transform_tool.py | Validates composite interrupt behavior with WaitUntil when timeout is configured. |
|
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.



Summary
Why
configured tool timeouts were stored but not applied by the runtime.