Skip to content

fix(oneshot): honor configured auxiliary.<task>.timeout in run_oneshot (residual of #56322) - #605

Open
hashbender wants to merge 1 commit into
mainfrom
mirror/pr-56737
Open

fix(oneshot): honor configured auxiliary.<task>.timeout in run_oneshot (residual of #56322)#605
hashbender wants to merge 1 commit into
mainfrom
mirror/pr-56737

Conversation

@hashbender

Copy link
Copy Markdown
Owner

Follow-up to merged NousResearch#56322 (which fixed the same auxiliary.<task>.timeout bug class, NousResearch#32729, for the generate_title sibling).

The residual

agent/oneshot.py::run_oneshot hard-coded timeout: float = 60.0 in its signature and forwarded it to call_llm. The live llm.oneshot JSON-RPC handler (tui_gateway/server.py) calls run_oneshot(task=task, ...) and never passes a timeout, so 60.0 was always forwarded. But call_llm only reads auxiliary.<task>.timeout from config when it's called with timeout=None:

effective_timeout = timeout if timeout is not None else _get_task_timeout(task)

So a configured auxiliary.<task>.timeout was silently ignored on the entire live llm.oneshot path — the exact shape of NousResearch#32729 that NousResearch#56322 just fixed for generate_title (which now uses timeout: Optional[float] = None), left unfixed on this sibling.

Fix

Default run_oneshot's timeout to None and resolve it the same way call_llm does when the caller passes nothing:

effective_timeout = timeout if timeout is not None else _get_task_timeout(task, default=60.0)
  • Configured auxiliary.<task>.timeout is now honored on the llm.oneshot path.
  • An explicit timeout= from a caller is still forwarded verbatim (incl. 0.0, since the check is is not None).

Deliberate choice — no behavior change for unconfigured callers: I resolve with default=60.0 rather than letting call_llm apply its _DEFAULT_AUX_TIMEOUT of 30s, so callers that neither pass a timeout nor configure the task keep the historical 60s oneshot default. If you'd rather align run_oneshot fully with the auxiliary system's 30s default (dropping the bespoke 60s), that's a one-token change (default=60.0 → drop the arg) — I kept it non-regressive by default.

Tests

Added to tests/agent/test_oneshot.py:

  • configured task timeout reaches call_llm (the regression),
  • unconfigured falls back to 60s,
  • an explicit timeout= is forwarded and skips resolution.

Mirror-of: NousResearch#56737
NousResearch#56737

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.

1 participant