fix(config): honor configured timeout for auxiliary title generation (#32729) - #39035
Closed
rodboev wants to merge 6 commits into
Closed
fix(config): honor configured timeout for auxiliary title generation (#32729)#39035rodboev wants to merge 6 commits into
rodboev wants to merge 6 commits into
Conversation
rodboev
force-pushed
the
pr/config-title-generation-timeout
branch
from
June 28, 2026 17:41
8937bd0 to
a51552f
Compare
rodboev
force-pushed
the
pr/config-title-generation-timeout
branch
from
June 28, 2026 20:01
8e52be6 to
c654e24
Compare
1 task
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. |
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.
Summary
Users running slow local LLMs see
"Auxiliary title generation failed: Request timed out."after every session, even after settingauxiliary.title_generation.timeoutto a large value in config.yaml. The configured timeout is silently ignored.The root cause is in
agent/title_generator.py.generate_title()declarestimeout: float = 30.0as a default parameter (line 32).auto_title_session()calls it without passingtimeout(line 99), so the parameter takes its hardcoded default of30.0. This value is forwarded tocall_llm(task="title_generation", ..., timeout=30.0). Insidecall_llm()atagent/auxiliary_client.py:5027, the resolution logic iseffective_timeout = timeout if timeout is not None else _get_task_timeout(task). Becausetimeoutis30.0(notNone), the_get_task_timeout("title_generation")branch, which readsauxiliary.title_generation.timeoutfrom config.yaml, is never reached. The config value is dead code for title generation.The fix changes the
timeoutdefault from30.0toNone. Withtimeout=None,call_llmfalls through to_get_task_timeout("title_generation"), which reads the config. When the config key is absent,_get_task_timeoutfalls 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: changegenerate_title()signature fromtimeout: float = 30.0totimeout: Optional[float] = None(+1 line changed)tests/agent/test_title_generator.py: addtest_timeout_defaults_to_noneandtest_explicit_timeout_passed_throughtoTestGenerateTitle(+~20 lines)Validation
auxiliary.title_generation.timeout: 1800in config.yamlauxiliary.title_generation.timeoutin config.yaml_DEFAULT_AUX_TIMEOUTfallback, unchanged)timeout=120.0explicitlyTest plan
pytest tests/agent/test_title_generator.py -v --timeout=0— 22 passedtest_timeout_defaults_to_noneassertscall_llmreceivestimeout=Nonewhen no timeout is passed togenerate_title()test_explicit_timeout_passed_throughassertscall_llmreceivestimeout=120.0whengenerate_title(..., timeout=120.0)is calledNot 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.