Skip to content

fix(config): honor configured timeout for auxiliary title generation (#32729) - #39035

Closed
rodboev wants to merge 6 commits into
NousResearch:mainfrom
rodboev:pr/config-title-generation-timeout
Closed

fix(config): honor configured timeout for auxiliary title generation (#32729)#39035
rodboev wants to merge 6 commits into
NousResearch:mainfrom
rodboev:pr/config-title-generation-timeout

Conversation

@rodboev

@rodboev rodboev commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Users running slow local LLMs see "Auxiliary title generation failed: Request timed out." after every session, even after setting auxiliary.title_generation.timeout to a large value in config.yaml. The configured timeout is silently ignored.

The root cause is in agent/title_generator.py. generate_title() declares timeout: float = 30.0 as a default parameter (line 32). auto_title_session() calls it without passing timeout (line 99), so the parameter takes its hardcoded default of 30.0. This value is forwarded to call_llm(task="title_generation", ..., timeout=30.0). Inside call_llm() at agent/auxiliary_client.py:5027, the resolution logic is effective_timeout = timeout if timeout is not None else _get_task_timeout(task). Because timeout is 30.0 (not None), the _get_task_timeout("title_generation") branch, which reads auxiliary.title_generation.timeout from config.yaml, is never reached. The config value is dead code for title generation.

The fix changes the timeout default from 30.0 to None. With timeout=None, call_llm falls through to _get_task_timeout("title_generation"), which reads the config. When the config key is absent, _get_task_timeout falls back to _DEFAULT_AUX_TIMEOUT (30 seconds), preserving the existing behavior for users who have not set the config. Users who have set it now get the value they configured.

Changes

  • agent/title_generator.py: change generate_title() signature from timeout: float = 30.0 to timeout: Optional[float] = None (+1 line changed)
  • tests/agent/test_title_generator.py: add test_timeout_defaults_to_none and test_explicit_timeout_passed_through to TestGenerateTitle (+~20 lines)

Validation

Scenario Before After
auxiliary.title_generation.timeout: 1800 in config.yaml ignored, hardcoded 30s timeout honored, 1800s timeout
No auxiliary.title_generation.timeout in config.yaml 30s timeout (from hardcoded default) 30s timeout (from _DEFAULT_AUX_TIMEOUT fallback, unchanged)
Caller passes timeout=120.0 explicitly 120s timeout 120s timeout (unchanged)
Fast cloud model, no config override title generates within 30s title generates within 30s (unchanged)
Slow local model (e.g. qwen3.6:27b on limited VRAM) "Auxiliary title generation failed: Request timed out." succeeds if within configured timeout

Test plan

  • pytest tests/agent/test_title_generator.py -v --timeout=0 — 22 passed
  • New: test_timeout_defaults_to_none asserts call_llm receives timeout=None when no timeout is passed to generate_title()
  • New: test_explicit_timeout_passed_through asserts call_llm receives timeout=120.0 when generate_title(..., timeout=120.0) is called

Not in scope

Other auxiliary tasks may have similar hardcoded-default patterns (compression, vision, web_extract, session_search). This PR fixes only title generation, which is the one reported upstream. A broader audit of all auxiliary task timeout defaults would be a follow-up.

Upstream

Closes #32729.
Reported by @veryheavypickle.

@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint area/config Config system, migrations, profiles labels Jun 4, 2026
@rodboev
rodboev force-pushed the pr/config-title-generation-timeout branch from 8937bd0 to a51552f Compare June 28, 2026 17:41
@rodboev
rodboev force-pushed the pr/config-title-generation-timeout branch from 8e52be6 to c654e24 Compare June 28, 2026 20:01
@kshitijk4poor

Copy link
Copy Markdown
Collaborator

Closing as superseded by #56322 (salvage of #41844) for #32729. Your title-generator one-liner + tests are correct, but this PR also bundles an unrelated arm64 Docker CI rewrite (.github/workflows/docker.yml) that isn't part of the timeout bug — so it can't land as-is for this issue. #41844 carries just the focused fix. If the Docker CI change has independent merit, please resubmit it as its own PR — happy to look at it separately. Credit for the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/config Config system, migrations, profiles comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: auxiliary title generation config is hardcoded to 30s and ignores config

3 participants