fix(auxiliary): floor compression timeout so reasoning models don't fall back to marker (#54915) - #54943
Closed
Tranquil-Flow wants to merge 1 commit into
Closed
Conversation
…all back to marker (NousResearch#54915)
Contributor
This was referenced Jul 6, 2026
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.
Problem
When Hermes uses a reasoning model (e.g. Codex / GPT-5.5) as the auxiliary
compression provider (
auxiliary.compression.provider: auto), contextcompression can time out at the default 120 s and silently fall back to the
deterministic context marker — losing the LLM summary:
The root cause is that
call_llm(task="compression", ...)resolves itstimeout from
auxiliary.compression.timeout(default 120 s) with no floor.A reasoning model summarising a large context can legitimately exceed 120 s.
Fix
Adds a bounded 300 s floor to config-derived compression timeouts only:
_COMPRESSION_TIMEOUT_FLOOR_SECONDS = 300.0(finite, bounded)._effective_aux_timeout(task, timeout)— single source of truthused by both
call_llm(sync) andasync_call_llm(async). It resolves thetimeout as before, then applies
max(effective, floor)only whentimeout is None and task == "compression".This honours all constraints from the issue:
compressionis floored — other auxiliary tasks keep their own timeouts.timeout=override is not floored.max), so a higher config value is kept unchanged.Verification
f1345290e— the 120 s config timeoutreaches the client unfloored (
assert 120.0 >= 300.0).Tests exercise the real
call_llm/async_call_llmproduction paths (mockedLLM client) and assert the timeout that reaches
client.chat.completions.create.Closes #54915.
Auto-published by Moonsong via Path B automated pipeline.