mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-31 04:12:10 +03:00
The #6408 request-shape-keyed TTL cache around getUnifiedModelsResponse was not keyed by DB/settings state, so a write followed by a read within the ~1.5s TTL replayed the pre-write catalog (dropping newly-eligible models like codex/gpt-5.5 and every specialty catalog routed through it since #6303). Fold a modelCatalogCacheVersion (bumped by invalidateDbCache, already called on every settings/connection/combo/pricing write) into the cache so a state change forces an immediate miss; merge response headers through a real Headers instance (fixes X-Request-Id duplication); carry and replay status end-to-end (a mid-build 500 was replayed as 200). Tests call the existing __resetCatalogBuilderRunsForTest hook in setup, matching v1-models-concurrent-6408.