fix(agent): honor configured auxiliary.title_generation.timeout (#32729) - #287
Open
hashbender wants to merge 1 commit into
Open
fix(agent): honor configured auxiliary.title_generation.timeout (#32729)#287hashbender wants to merge 1 commit into
hashbender wants to merge 1 commit into
Conversation
|
Review Complete Risk: 🟢 Low (15/100) — no findings · 164 LOC across 3 files This PR adds configurable title generation with auxiliary client support and a dedicated timeout — well-structured, tested, and no issues found. Files Reviewed (3 files) |
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.
Bug fix:
auxiliary.title_generation.timeoutconfig was being silently ignored.Reported in NousResearch#32729: user updated
auxiliary.title_generation.timeoutinconfig.yamlto a high value (e.g. 1800) for a slow local LLM, but the titlegeneration worker continued to time out at 30 s and surface
Auxiliary title generation failed: Request timed out.after every session.Root cause
agent/title_generator.py::generate_title()(the worker entrypoint) hadtimeout: float = 30.0hardcoded in its signature. Its only caller(
auto_title_session) never passed an explicit timeout, so the hardcodeddefault was always what reached
call_llm()— which then refused to readauxiliary.title_generation.timeoutfrom config (the config lookup onlyfires when
call_llmis called withtimeout=None).In other words: the user's
auxiliary.title_generation.timeoutsetting wascorrect, complete, and respected by
call_llm. The contract break was asingle hardcoded signature default.
Fix (single-line, two production files)
agent/title_generator.py:54—timeout: float = 30.0→timeout: Optional[float] = None. The Optional type matchescall_llm'scontract and the existing helper resolves the configured timeout when None
is forwarded.
agent/auxiliary_client.py:5726—timeout: float = None→timeout: Optional[float] = None. Pure annotation accuracy: the runtimedefault was already
None; only the type was lying. Brings the signaturein line with the runtime branching on
Noneto consult the configuredtimeout.
Tests
tests/agent/test_title_generator_timeout_32729.py(new file, 5 tests):test_default_signature_is_optional_float_none— signature default isNone, type isOptional[float].test_no_explicit_timeout_forwards_none_to_call_llm— without an explicittimeout,
call_llmreceivestimeout=None(RED on upstream/main).test_explicit_timeout_from_caller_is_forwarded_unchanged— explicitcaller-supplied timeout is passed through verbatim.
test_auto_title_session_does_not_pass_timeout_to_generate_title—auto_title_sessiondoes not inject a timeout at the worker boundary(preserves the contract).
test_auto_title_session_full_call_chain_preserves_none_timeout—end-to-end chain
auto_title_session → generate_title → call_llmsurfacestimeout=Nonetocall_llm(RED on upstream/main).3 of 5 fail on
upstream/main; all 5 pass with the fix.Verification (post-rebase onto current
upstream/main)Rebase history
Built against
upstream/main=44ddc552f5at2026-07-01T10:00:00Z.Rebased onto current
upstream/main=1c350728ecbefore publication.Rebase applied cleanly with no conflicts. Final HEAD:
36476b1b698717aae7463266294afac6117800fb. Branch is exactly one focusedcommit ahead of
upstream/main.Cross-reference
PR NousResearch#39035 by @rodboev (opened 2026-06-04, 28 days ago, still open) takes
the same approach for the
title_generatorfix but bundles an unrelated.github/workflows/docker.ymlchange splitting PR validation from cachedpublish builds (+22/-8 lines of CI infrastructure). This PR retains only
the surgical bug fix and adds the
Optional[float]annotation accuracyfix for
call_llm's signature. Maintainer can choose to merge one, theother, or both.
Notes
test_enforces_total_timeout_while_stream_keeps_emitting_eventstiming flake in
tests/agent/test_auxiliary_client.pyis deselected.Verified to fail in isolation on
upstream/mainwithout the fix applied —pre-existing, unrelated.
changes.
Auto-published by Moonsong via Path B automated pipeline.
Reviewed against CONTRIBUTING.md and AGENTS.md contribution rubric.
Mirror-of: NousResearch#56285
NousResearch#56285