fix(gateway): bust cache on auxiliary compression changes - #39284
Open
Glucksberg wants to merge 1 commit into
Open
fix(gateway): bust cache on auxiliary compression changes#39284Glucksberg wants to merge 1 commit into
Glucksberg wants to merge 1 commit into
Conversation
Glucksberg
force-pushed
the
fix/aux-compression-cache-bust
branch
from
June 4, 2026 19:10
d295b78 to
acce1a2
Compare
Glucksberg
force-pushed
the
fix/aux-compression-cache-bust
branch
2 times, most recently
from
June 4, 2026 20:42
a19e70f to
04a58a0
Compare
Glucksberg
marked this pull request as ready for review
June 4, 2026 21:05
Glucksberg
force-pushed
the
fix/aux-compression-cache-bust
branch
from
July 11, 2026 08:31
04a58a0 to
7a5f45c
Compare
Glucksberg
force-pushed
the
fix/aux-compression-cache-bust
branch
from
July 11, 2026 20:32
7a5f45c to
4ce5cd5
Compare
Glucksberg
force-pushed
the
fix/aux-compression-cache-bust
branch
2 times, most recently
from
July 13, 2026 22:38
a0f2f59 to
10fae52
Compare
Glucksberg
force-pushed
the
fix/aux-compression-cache-bust
branch
from
July 14, 2026 00:43
10fae52 to
87f19b2
Compare
Glucksberg
added a commit
to Glucksberg/hermes-agent
that referenced
this pull request
Jul 14, 2026
…mpression changes
teknium1
reviewed
Jul 14, 2026
teknium1
left a comment
Contributor
There was a problem hiding this comment.
Thanks for narrowing this to the gateway cache signature; the current-main premise is real: gateway/run.py:15743-15854 has no auxiliary compression fields, while initialization stores auxiliary context state (agent/agent_init.py:1618-1630) and feasibility is memoized per agent (agent/conversation_compression.py:490-497).
Problems
gateway/run.py:15935-15940omitsauxiliary.compression.api_key. That is a supported config field (hermes_cli/config.py:1594-1600) and_resolve_task_provider_model()reads it for compression clients (agent/auxiliary_client.py:5895-5901). A key-only edit therefore still reuses an agent whose feasibility probe has already been marked complete. Fingerprint this field likefallback_chain, rather than retaining its raw value.
Suggested changes
- Add a signature-regression test where only
auxiliary.compression.api_keychanges.
Automated hermes-sweeper review.
| ("auxiliary", "compression", "base_url"), | ||
| ("auxiliary", "compression", "api_mode"), | ||
| ("auxiliary", "compression", "context_length"), | ||
| ("auxiliary", "compression", "fallback_chain"), |
Contributor
There was a problem hiding this comment.
Please include auxiliary.compression.api_key too, using a stable digest. It is a supported compression setting and is read by _resolve_task_provider_model; without it, a key-only repair still reuses an agent whose feasibility probe was already memoized.
Glucksberg
added a commit
to Glucksberg/hermes-agent
that referenced
this pull request
Jul 14, 2026
…mpression changes
Glucksberg
force-pushed
the
fix/aux-compression-cache-bust
branch
from
July 16, 2026 16:15
87f19b2 to
ea7ed67
Compare
Glucksberg
force-pushed
the
fix/aux-compression-cache-bust
branch
4 times, most recently
from
August 9, 2026 21:30
6377496 to
8933a9c
Compare
Glucksberg
force-pushed
the
fix/aux-compression-cache-bust
branch
3 times, most recently
from
August 9, 2026 22:10
48baa1c to
5dcd341
Compare
Glucksberg
force-pushed
the
fix/aux-compression-cache-bust
branch
from
August 10, 2026 03:58
5dcd341 to
04e9260
Compare
Glucksberg
added a commit
to Glucksberg/hermes-agent
that referenced
this pull request
Aug 10, 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.
Summary
fallback_chainfingerprintWhy
Gateway agent construction resolves auxiliary compression feasibility and can cache an unavailable-client warning or a reduced compression threshold. Changing the provider, model, endpoint, context length, API mode, or fallback chain must construct a fresh agent instead of retaining that stale state.
The earlier Honcho memoization change was deliberately removed because it overlaps upstream PR #46385; this contribution is now limited to auxiliary compression cache invalidation.
Validation
4281151ae859241351ba14d8c7682dc67ff4c126on 2026-07-11; current head:4ce5cd577eac58ce1f5d913b879bc9e2ede57367.venv/bin/python -m pytest -q tests/gateway/test_agent_cache.py- 81 passed.venv/bin/ruff check gateway/run.py tests/gateway/test_agent_cache.pyandgit diff --check upstream/main...HEADpassed