Skip to content

feat: enforce configurable tool timeouts - #1015

Open
radu-mocanu wants to merge 1 commit into
mainfrom
feat/tool-timeout-settings
Open

feat: enforce configurable tool timeouts#1015
radu-mocanu wants to merge 1 commit into
mainfrom
feat/tool-timeout-settings

Conversation

@radu-mocanu

Copy link
Copy Markdown
Collaborator

Summary

  • enforces configured timeouts for process, IXP, DeepRAG, and Batch Transform operations
  • fails agent execution when a timed operation expires
  • preserves indefinite waiting when no timeout is configured

Why

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

Copilot AI review requested due to automatic review settings July 29, 2026 10:57

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 raising UiPathTimeoutError when 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 UiPathTimeoutError bubbles 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.

@sonarqubecloud

Copy link
Copy Markdown

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.

2 participants