Tool timeouts - #736
Conversation
PR Summary by QodoAdd per-tool execution timeouts via CloneableTool AbortSignal injection
AI Description
Diagram
High-Level Assessment
Files changed (25)
|
Code Review by Qodo
1.
|
Does this really affect only MCP tools? Unprivileged tools also use |
Yep, those too. |
nforro
left a comment
There was a problem hiding this comment.
LGTM, individual tool timeouts can be adjusted as needed in the future.
Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
All gateway tools are now derived from CloneableTool class. The CloneableTool timeout attribute sets timeout of the tool execution in seconds. This value is used to set the signal. If signal is already set on the tool, both are registered. Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
All tools handled by MCP gateway now have a timeout parameter inherited from the
CloneableToolclass.The timeout itself is handled by a
TimeSignalpassed through therunmethod. In case that an additional signal is passed to the method from other source, for example from the agent context, both signals are preserved.Timeouts for tools have been derived using existing timeouts and tool characteristics. There may be a good reason to change some of them.
Besides the tool timeout itself, several tools now use timeout for their HTTP sessions. This brings them in line with majority of tools.
RELEASE NOTES BEGIN
Tools handled by MPC gateway have timeouts.
RELEASE NOTES END