mirror of
https://github.com/openai/codex.git
synced 2026-09-03 14:59:03 +00:00
## What changed - Add the public asynchronous `ModelsCache` contract and cache entry/error types. - Let model providers and `OpenAiModelsManager` accept caller-provided cache implementations while retaining the existing file-backed cache by default. - Treat cache read failures as misses, keep cache write failures non-fatal, and support refreshing an entry's TTL after ETag revalidation. - Continue to prefer an explicitly configured static model catalog over an injected cache. ## Testing - Cover injected cache hits, read and write failures, TTL refreshes, and end-to-end model selection. - Verify that the file-backed implementation satisfies the new cache contract and does not serve expired entries before revalidation. GitOrigin-RevId: eef957a317910b8502a0c20f8fc112f689d5e389