Skip to content

fix(agent): make title generation timeout configurable via auxiliary.title_generation.timeout - #18129

Closed
Jay4242 wants to merge 4 commits into
NousResearch:mainfrom
Jay4242:title-generation-timeout
Closed

fix(agent): make title generation timeout configurable via auxiliary.title_generation.timeout#18129
Jay4242 wants to merge 4 commits into
NousResearch:mainfrom
Jay4242:title-generation-timeout

Conversation

@Jay4242

@Jay4242 Jay4242 commented Apr 30, 2026

Copy link
Copy Markdown

What does this PR do?

I was getting title generation timeouts due to the default being set to 30 seconds and my LLM backend being slow locally hosted hardware, which is often multitasking.

This PR should correct reading the timeout from the ~/.hermes/config.yml which I can now set to absurdly high timeouts to compensate for my slow hardware.

Related Issue

None.

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests (adding or improving test coverage)
  • ♻️ Refactor (no behavior change)
  • 🎯 New skill (bundled or hub)

Changes Made

/agent/title_generator.py#L31 - timeout: float = 30.0, changed to timeout: Optional[float] = None,

/agent/title_generator.py#L46 - docstring extended with a paragraph about the timeout.

/tests/agent/test_title_generator.py#L116 - Test added.

How to Test

  1. Run a local server that takes longer than 30 seconds to process a request.
  2. Start a Hermes conversation until you see title generation timeout errors.
  3. Make the change to timeout: Optional[float] = None,
  4. Update the config.yml title generation timeout to a higher value.
  5. Start a Hermes conversation until it creates a title.

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform: Ubuntu 24.04

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings) — or N/A
  • I've updated cli-config.yaml.example if I added/changed config keys — or N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — or N/A
  • I've considered cross-platform impact (Windows, macOS) per the compatibility guide — or N/A
  • I've updated tool descriptions/schemas if I changed tool behavior — or N/A

For New Skills

  • This skill is broadly useful to most users (if bundled) — see Contributing Guide
  • SKILL.md follows the standard format (frontmatter, trigger conditions, steps, pitfalls)
  • No external dependencies that aren't already available (prefer stdlib, curl, existing Hermes tools)
  • I've tested the skill end-to-end: hermes --toolsets skills -q "Use the X skill to do Y"

Screenshots / Logs

Jay4242 added 3 commits April 30, 2026 16:00
…eneration.timeout

generate_title() passed a hardcoded timeout=30.0 to call_llm(), which short-circuited the config-backed _get_task_timeout('title_generation') resolution.  This made auxiliary.title_generation.timeout in config.yaml a dead key — the value was never consulted.  Changed the default from 30.0 to None so call_llm() resolves timeout from config (falling back to _DEFAULT_AUX_TIMEOUT, 30s) when not explicitly overridden.  Matches the pattern used by every other auxiliary task (compression, web_extract, session_search, approval).
@Jay4242
Jay4242 marked this pull request as ready for review May 1, 2026 00:02
@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 May 1, 2026

@veryheavypickle veryheavypickle left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good, it solves the issue and call_llm() defaults to _DEFAULT_AUX_TIMEOUT which is currently 30s anyway. This solves auxiliary title generation config is hardcoded to 30s and ignores config

@veryheavypickle

Copy link
Copy Markdown

@teknium1 I see you worked on this part of the codebase, would you please be able to review this? I see your preferred username got taken and almost tagged the wrong person.

I can confirm that this PR is genuine as I have given it my full review.

Thank you for your time.

@veryheavypickle

Copy link
Copy Markdown

@Jay4242 could you please merge with main? This branch is compatible

@Jay4242

Jay4242 commented May 27, 2026

Copy link
Copy Markdown
Author

@Jay4242 could you please merge with main? This branch is compatible

Merged. Thanks.

@luiztosk

Copy link
Copy Markdown

@Jay4242 the merge seems stuck, it says in the checker that @veryheavypickle "Approved these changes with read-only permissions"

Additionally, the following PRs are duplicates of this one:
#18839
#39035 (this also includes unrelated changes to a docker.yml file)
#41831
#41841
#41844
#42548 (this also reduces max_tokens for title generation)

This PR fixes #32729 and also fixes #41812

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.

4 participants