This commit is contained in:
1 parent
c6088aeb4b
commit
f12128a5c3
4 files changed
+136
-33
No files matched your search
@@ -44,6 +44,12 @@ const (
|
||||
// 600-second command timeout so the tool can return a structured timeout
|
||||
// result instead of being cancelled first by the generic agent wrapper.
|
||||
shellExecToolTimeout = 10*time.Minute + 5*time.Second
|
||||
// xlsxTranslateToolTimeout is slightly longer than xlsx_translate's own
|
||||
// 20-minute internal budget so the tool can return a structured timeout
|
||||
// result instead of being cancelled first by the generic agent wrapper.
|
||||
// Workbook translation runs many LLM batches serialised by the provider's
|
||||
// concurrency gate, which no other tool comes close to needing.
|
||||
xlsxTranslateToolTimeout = 20*time.Minute + 5*time.Second
|
||||
// webFetchToolSlack is how much longer the agent wrapper waits than the
|
||||
// shared page-fetch budget. Same 5s headroom as shell_exec, so web_fetch can
|
||||
// return its own timeout result instead of being cancelled first.
|
||||
@@ -117,6 +123,8 @@ func toolExecutionTimeout(toolName string, arguments ...string) time.Duration {
|
||||
switch toolName {
|
||||
case "shell_exec":
|
||||
return shellExecToolTimeout
|
||||
case agenttools.ToolXlsxTranslate:
|
||||
return xlsxTranslateToolTimeout
|
||||
case "web_fetch":
|
||||
return webfetch.PageFetchTimeout() + webFetchToolSlack
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user