Skip to content

fix(config): add stale timeout settings (salvage #12675)#12891

Merged
teknium1 merged 1 commit into
mainfrom
hermes/hermes-02f3be3c
Apr 20, 2026
Merged

fix(config): add stale timeout settings (salvage #12675)#12891
teknium1 merged 1 commit into
mainfrom
hermes/hermes-02f3be3c

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Salvage of #12675 by @helix4u onto current main.

Exposes the non-streaming stale-call watchdog timeout via config.yaml:

  • providers.<id>.stale_timeout_seconds — provider-wide
  • providers.<id>.models.<model>.stale_timeout_seconds — per-model override

Legacy HERMES_API_CALL_STALE_TIMEOUT env var still works as fallback; local-endpoint auto-disable preserved when no explicit config is set.

Why

Discord report (PaulT): gpt-5.4 on openai-codex hit the hardcoded 300s non-stream watchdog three times on a 173-msg / 254k-token turn. Raising the env var to 1800s unblocked him, but there was no config.yaml knob. This ships the knob.

Changes (+267/-31, 6 files)

  • hermes_cli/timeouts.py: new get_provider_stale_timeout() mirroring get_provider_request_timeout()
  • run_agent.py: _resolved_api_call_stale_timeout_base() + _compute_non_stream_stale_timeout() resolver (config > env > 300s default)
  • tests/hermes_cli/test_timeouts.py: 5 new tests covering precedence + local-endpoint interaction
  • cli-config.yaml.example, docs updates

Validation

scripts/run_tests.sh tests/hermes_cli/test_timeouts.py → 12 passed

Original PR: #12675 — authorship preserved via cherry-pick + rebase-merge.

@teknium1 teknium1 merged commit 03e3c22 into main Apr 20, 2026
3 of 7 checks passed
@teknium1 teknium1 deleted the hermes/hermes-02f3be3c branch April 20, 2026 07:52
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.

2 participants