Lift deep-research hard timeout into a setting (#783)
The 600s wall-clock cap in research_handler.start_research was too short for local / edge LLMs to finish a deep-research synthesis — long extraction passes plus a slow final report routinely blew past 10 minutes and the run was killed with partial results. Introduce research_run_timeout_seconds (default 1800s = 30 min) in DEFAULT_SETTINGS and resolve it at start_research entry when the caller hasn't pinned hard_timeout. Bound the resolved value at [60, 86400] so a misconfigured settings.json can't either disable the safety net or explode into a multi-day hang. Existing call sites in research_routes.py and chat_routes.py keep working unchanged — they don't pass hard_timeout and now pick up the new default. Closes #595.
This commit is contained in:
@@ -66,6 +66,11 @@ DEFAULT_SETTINGS = {
|
||||
"research_max_tokens": 16384,
|
||||
"research_extraction_timeout_seconds": 90,
|
||||
"research_extraction_concurrency": 3,
|
||||
# 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.
|
||||
"research_run_timeout_seconds": 1800,
|
||||
"agent_max_tool_calls": 0,
|
||||
"agent_input_token_budget": 6000,
|
||||
"agent_stream_timeout_seconds": 300,
|
||||
|
||||
Reference in New Issue
Block a user