fix(oneshot): honor configured auxiliary.<task>.timeout in run_oneshot (residual of #56322) - #605
Open
hashbender wants to merge 1 commit into
Open
fix(oneshot): honor configured auxiliary.<task>.timeout in run_oneshot (residual of #56322)#605hashbender wants to merge 1 commit into
hashbender wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to merged NousResearch#56322 (which fixed the same
auxiliary.<task>.timeoutbug class, NousResearch#32729, for thegenerate_titlesibling).The residual
agent/oneshot.py::run_oneshothard-codedtimeout: float = 60.0in its signature and forwarded it tocall_llm. The livellm.oneshotJSON-RPC handler (tui_gateway/server.py) callsrun_oneshot(task=task, ...)and never passes a timeout, so60.0was always forwarded. Butcall_llmonly readsauxiliary.<task>.timeoutfrom config when it's called withtimeout=None:So a configured
auxiliary.<task>.timeoutwas silently ignored on the entire livellm.oneshotpath — the exact shape of NousResearch#32729 that NousResearch#56322 just fixed forgenerate_title(which now usestimeout: Optional[float] = None), left unfixed on this sibling.Fix
Default
run_oneshot'stimeouttoNoneand resolve it the same waycall_llmdoes when the caller passes nothing:auxiliary.<task>.timeoutis now honored on thellm.oneshotpath.timeout=from a caller is still forwarded verbatim (incl.0.0, since the check isis not None).Deliberate choice — no behavior change for unconfigured callers: I resolve with
default=60.0rather than lettingcall_llmapply its_DEFAULT_AUX_TIMEOUTof 30s, so callers that neither pass a timeout nor configure the task keep the historical 60s oneshot default. If you'd rather alignrun_oneshotfully 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:call_llm(the regression),timeout=is forwarded and skips resolution.Mirror-of: NousResearch#56737
NousResearch#56737