[codex] fix model cache invalidation on config reload#1311
Draft
lost9999 wants to merge 3 commits intonesquena:masterfrom
Draft
[codex] fix model cache invalidation on config reload#1311lost9999 wants to merge 3 commits intonesquena:masterfrom
lost9999 wants to merge 3 commits intonesquena:masterfrom
Conversation
sunnysktsang
pushed a commit
to sunnysktsang/hermes-webui
that referenced
this pull request
May 3, 2026
…sorbed CHANGELOG, ROADMAP, TESTING bumped (3936 \u2192 3946). 8 constituent PRs: - nesquena#1523 (@franksong2702) branch indicator codepoint fix - nesquena#1519 (@franksong2702) onboarding API-key focus loss fix - nesquena#1518 (@franksong2702) voice-mode toggle-off recognizer stop - nesquena#1516 (@franksong2702) YAML newline CSS rules - nesquena#1517 (@franksong2702) __CACHE_VERSION__ \u2192 __WEBUI_VERSION__ rename - nesquena#1532 (@ai-ag2026) state.db WebUI session recovery - nesquena#1525 (@ai-ag2026) stale stream state proactive cleanup - nesquena#1526 (@ai-ag2026) max_tokens forwarding + OpenRouter quota classifier Opus MUST-FIX absorbed: sw.js conflict-marker cleanup + regression guard. Opus SHOULD-FIX deferred to follow-up nesquena#1533 (race in _clear_stale_stream_state). 2 closed as duplicates: nesquena#1528 (identical to nesquena#1517), nesquena#1529 (superseded by nesquena#1516). 1 maintainer-review label: nesquena#1531 (Asunfly stowaway change in force-push). 5 stay on hold: nesquena#1418 nesquena#1464 nesquena#1404 nesquena#1353 nesquena#1311.
Contributor
|
Reconciled this against current Findings:
Verification from the fresh branch:
Recommendation: close this conflicting PR in favor of the already-merged cache work plus #1752 for the remaining custom-provider routing slice. |
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
Fix
/api/modelsreturning stale model metadata afterconfig.yamlchanges outside the WebUI default-model endpoint.Root Cause
get_available_models()detects aconfig.yamlmtime change and callsreload_config(), but the first mtime check happens before the fast-path cache logic. Afterreload_config()updates_cfg_mtime, the later cache invalidation path no longer sees a config change, so the 24h in-memory_available_models_cachecan keep serving olddefault_modeland model groups.Changes
config.yamledit so it catches stale in-memory cache reuse.Validation
HERMES_HOME=/home/lost9999/.hermes HERMES_WEBUI_STATE_DIR=/home/lost9999/.hermes/webui /home/lost9999/.hermes/hermes-agent/venv/bin/python -m pytest tests/test_ttl_cache.py -qRefs #1240.