mirror of
https://github.com/openai/codex.git
synced 2026-11-14 06:48:26 +00:00
Allow injecting model catalog caches (#36992)
## 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
This commit is contained in:
1 parent
11e390bb10
commit
44cb66e4ed
8 files changed
+903
-203
No files matched your search
@@ -1,4 +1,4 @@
|
||||
pub(crate) mod cache;
|
||||
pub mod cache;
|
||||
pub mod collaboration_mode_presets;
|
||||
pub(crate) mod config;
|
||||
pub mod manager;
|
||||
|
||||
Reference in new issue
Block a user