Skip to content

fix(agent): honor configured auxiliary.title_generation.timeout (#32729) - #287

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

fix(agent): honor configured auxiliary.title_generation.timeout (#32729)#287
hashbender wants to merge 1 commit into
mainfrom
mirror/pr-56285

Conversation

@hashbender

Copy link
Copy Markdown
Owner

Bug fix: auxiliary.title_generation.timeout config was being silently ignored.

Reported in NousResearch#32729: user updated auxiliary.title_generation.timeout in
config.yaml to a high value (e.g. 1800) for a slow local LLM, but the title
generation 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) had
timeout: float = 30.0 hardcoded in its signature. Its only caller
(auto_title_session) never passed an explicit timeout, so the hardcoded
default was always what reached call_llm() — which then refused to read
auxiliary.title_generation.timeout from config (the config lookup only
fires when call_llm is called with timeout=None).

In other words: the user's auxiliary.title_generation.timeout setting was
correct, complete, and respected by call_llm. The contract break was a
single hardcoded signature default.

Fix (single-line, two production files)

  1. agent/title_generator.py:54timeout: float = 30.0
    timeout: Optional[float] = None. The Optional type matches call_llm's
    contract and the existing helper resolves the configured timeout when None
    is forwarded.
  2. agent/auxiliary_client.py:5726timeout: float = None
    timeout: Optional[float] = None. Pure annotation accuracy: the runtime
    default was already None; only the type was lying. Brings the signature
    in line with the runtime branching on None to consult the configured
    timeout.

Tests

tests/agent/test_title_generator_timeout_32729.py (new file, 5 tests):

  • test_default_signature_is_optional_float_none — signature default is
    None, type is Optional[float].
  • test_no_explicit_timeout_forwards_none_to_call_llm — without an explicit
    timeout, call_llm receives timeout=None (RED on upstream/main).
  • test_explicit_timeout_from_caller_is_forwarded_unchanged — explicit
    caller-supplied timeout is passed through verbatim.
  • test_auto_title_session_does_not_pass_timeout_to_generate_title
    auto_title_session does 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_llm surfaces
    timeout=None to call_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)

tests/agent/test_title_generator.py .......... 23 passed
tests/agent/test_title_generator_timeout_32729.py ..... 5 passed
tests/agent/test_auxiliary_client.py ........ 274 passed
                                              (1 pre-existing timing flake
                                              deselected: fails on
                                              upstream/main in isolation)

Rebase history

Built against upstream/main = 44ddc552f5 at 2026-07-01T10:00:00Z.
Rebased onto current upstream/main = 1c350728ec before publication.
Rebase applied cleanly with no conflicts. Final HEAD:
36476b1b698717aae7463266294afac6117800fb. Branch is exactly one focused
commit 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_generator fix but bundles an unrelated
.github/workflows/docker.yml change splitting PR validation from cached
publish builds (+22/-8 lines of CI infrastructure). This PR retains only
the surgical bug fix and adds the Optional[float] annotation accuracy
fix for call_llm's signature. Maintainer can choose to merge one, the
other, or both.

Notes

  • One pre-existing test_enforces_total_timeout_while_stream_keeps_emitting_events
    timing flake in tests/agent/test_auxiliary_client.py is deselected.
    Verified to fail in isolation on upstream/main without the fix applied —
    pre-existing, unrelated.
  • No new dependencies, no AI attribution, no config-file changes, no skill
    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

@tenki-reviewer

tenki-reviewer Bot commented Jul 1, 2026

Copy link
Copy Markdown

Review Complete
No issues found!

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)
agent/auxiliary_client.py
agent/title_generator.py
tests/agent/test_title_generator_timeout_32729.py

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