Research: add configurable run timeout

Surfaces the research_run_timeout_seconds setting (added in #783) in
Settings → Research as a "Max Time" field, and lets 0 disable the
wall-clock cap entirely for long deep-research runs.

- settings.py: document that 0 disables the cap; default stays 1800s.
- research_handler.py: resolve 0 (or negative) to no timeout
  (asyncio.wait_for timeout=None); other values stay bounded to
  [60, 86400] as before.
- index.html / settings.js: "Max Time" input bound to
  research_run_timeout_seconds, validated to {0} ∪ [60, 86400], with
  copy making explicit that 0 = no limit (unbounded model/API cost).

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Nikita Rozanov
2026-06-02 13:57:57 +02:00
committed by GitHub
parent c3228f8b59
commit 119075f368
4 changed files with 43 additions and 8 deletions
+4 -1
View File
@@ -89,7 +89,10 @@ DEFAULT_SETTINGS = {
# Hard wall-clock cap on a single deep-research run. The previous 600s
# (10 min) default cut off slow local / edge LLMs mid-synthesis; 1800s
# (30 min) is comfortable for most local setups while still bounding
# runaway jobs. Tune via Settings or by editing data/settings.json.
# runaway jobs. Set to 0 to disable the cap entirely (unlimited) — only
# for very long deep-research runs, since a stalled job then runs an
# unbounded model/API bill. Other values are bounded to [60, 86400].
# Tune via Settings or by editing data/settings.json.
"research_run_timeout_seconds": 1800,
"agent_max_tool_calls": 0,
"agent_input_token_budget": 6000,