revert: back out prompt_caching.enabled toggle (#56105) for re-evaluation - #56126
Merged
Conversation
waefrebeorn
pushed a commit
to waefrebeorn/slermes
that referenced
this pull request
Jul 2, 2026
…or re-evaluation (NousResearch#56126) * Revert "fix(caching): honor prompt_caching.enabled across model switch + fallback" This reverts commit 1f86e39. * Revert "fix: allow disabling prompt caching" This reverts commit 7e81b23.
Jasper6439
pushed a commit
to Jasper6439/hermes-agent
that referenced
this pull request
Jul 5, 2026
…or re-evaluation (NousResearch#56126) * Revert "fix(caching): honor prompt_caching.enabled across model switch + fallback" This reverts commit 36f9f50. * Revert "fix: allow disabling prompt caching" This reverts commit c1c1a12.
habarmc1223-sudo
pushed a commit
to habarmc1223-sudo/hermes-agent-fluxmem
that referenced
this pull request
Jul 8, 2026
…or re-evaluation (NousResearch#56126) * Revert "fix(caching): honor prompt_caching.enabled across model switch + fallback" This reverts commit 969477b. * Revert "fix: allow disabling prompt caching" This reverts commit 58d8548.
santhreal
pushed a commit
to santhreal/hermes-agent
that referenced
this pull request
Jul 13, 2026
…or re-evaluation (NousResearch#56126) * Revert "fix(caching): honor prompt_caching.enabled across model switch + fallback" This reverts commit c5b2feb. * Revert "fix: allow disabling prompt caching" This reverts commit 64a756d.
5 tasks
Gravezzz
pushed a commit
to Gravezzz/hermes-agent
that referenced
this pull request
Jul 21, 2026
…or re-evaluation (NousResearch#56126) * Revert "fix(caching): honor prompt_caching.enabled across model switch + fallback" This reverts commit 36f9f50. * Revert "fix: allow disabling prompt caching" This reverts commit c1c1a12.
kshitijk4poor
pushed a commit
to kshitijk4poor/hermes-agent
that referenced
this pull request
Aug 1, 2026
Setting prompt_caching.cache_ttl to a falsy value (false, null, off, disabled, no, none) now fully disables prompt caching instead of being silently ignored. The disable propagates through anthropic_prompt_cache_policy() (early return when _cache_disabled flag is set) and restore_primary_runtime() (override after snapshot restore), so it survives /model switches and fallback re-derivation — the gap that caused NousResearch#56105 to be reverted in NousResearch#56126. Salvage of NousResearch#33555 by @BB-light, with model-switch/fallback survival gap fixed on top. Co-authored-by: BB-light <BB-light@users.noreply.github.com>
kshitijk4poor
pushed a commit
that referenced
this pull request
Aug 1, 2026
Setting prompt_caching.cache_ttl to a falsy value (false, null, off, disabled, no, none) now fully disables prompt caching instead of being silently ignored. The disable propagates through anthropic_prompt_cache_policy() (early return when _cache_disabled flag is set) and restore_primary_runtime() (override after snapshot restore), so it survives /model switches and fallback re-derivation — the gap that caused #56105 to be reverted in #56126. Salvage of #33555 by @BB-light, with model-switch/fallback survival gap fixed on top. Co-authored-by: BB-light <BB-light@users.noreply.github.com>
leewenjie
pushed a commit
to leewenjie/hermes-agent
that referenced
this pull request
Aug 7, 2026
…or re-evaluation (NousResearch#56126) * Revert "fix(caching): honor prompt_caching.enabled across model switch + fallback" This reverts commit 36f9f50. * Revert "fix: allow disabling prompt caching" This reverts commit c1c1a12.
randlee
pushed a commit
to randlee/hermes-agent
that referenced
this pull request
Aug 11, 2026
Setting prompt_caching.cache_ttl to a falsy value (false, null, off, disabled, no, none) now fully disables prompt caching instead of being silently ignored. The disable propagates through anthropic_prompt_cache_policy() (early return when _cache_disabled flag is set) and restore_primary_runtime() (override after snapshot restore), so it survives /model switches and fallback re-derivation — the gap that caused NousResearch#56105 to be reverted in NousResearch#56126. Salvage of NousResearch#33555 by @BB-light, with model-switch/fallback survival gap fixed on top. Co-authored-by: BB-light <BB-light@users.noreply.github.com>
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
Reverts #56105 (both commits:
c1c1a12fe"allow disabling prompt caching" +36f9f5014"honor prompt_caching.enabled across model switch + fallback"). Backing theprompt_caching.enabledtoggle out ofmainso it can be properly evaluated before shipping.Why
The toggle added a
load_config()-driven gate insideanthropic_prompt_cache_policy— the function that decides whether Anthropic-stylecache_controlmarkers are emitted. Prompt caching is cost-critical for every Claude user (native Anthropic AND OpenRouter Claude), so any change to that decision path carries broad blast radius and needs a careful review pass before it lands.State after revert
mainis back to the pre-#56105 behavior:prompt_cachingconfig default iscache_ttl-only (noenabledkey).anthropic_prompt_cache_policyhas no config gate — markers are emitted per the existing per-endpoint policy, unchanged.Validation
Verified via direct policy call with real imports. Caching markers are emitted exactly as before #56105 on both paths.
Original issue #13477 (LiteLLM proxy cache_control overload) remains open for a properly-reviewed fix.
Infographic