Skip to content

Conversation

@aibrahim-oai
Copy link
Collaborator

@aibrahim-oai aibrahim-oai commented Feb 2, 2026

New versions can need to receive different model configurations. If the cache is for a different version, refresh.

@aibrahim-oai aibrahim-oai changed the title Version models cache by client version Require models refresh on cli version mismatch Feb 2, 2026
@aibrahim-oai
Copy link
Collaborator Author

@codex review

@pakrym-oai
Copy link
Collaborator

shouldn't etag handle this?

@chatgpt-codex-connector
Copy link
Contributor

Codex Review: Didn't find any major issues. 👍

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@aibrahim-oai aibrahim-oai requested a review from Copilot February 3, 2026 02:55
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements client version tracking in the models cache to ensure cache invalidation when the CLI version changes. This prevents newer versions from using potentially incompatible cached model configurations from older versions.

Changes:

  • Added client_version field to the models cache structure
  • Modified cache validation logic to check version matching
  • Refactored version formatting function to be accessible across modules

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
codex-rs/core/src/models_manager/mod.rs Exposed client_version_to_whole() function as public API
codex-rs/core/src/models_manager/manager.rs Updated cache operations to include version checking and moved version formatting function
codex-rs/core/src/models_manager/cache.rs Added client_version field to cache structure and validation logic
codex-rs/core/tests/suite/models_cache_ttl.rs Added comprehensive tests for version matching, missing version, and version mismatch scenarios
codex-rs/app-server/tests/common/models_cache.rs Updated test helper to include client version in cache creation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@aibrahim-oai aibrahim-oai merged commit b8addcd into main Feb 3, 2026
28 of 32 checks passed
@aibrahim-oai aibrahim-oai deleted the codex/versioned-models-cache branch February 3, 2026 02:55
@github-actions github-actions bot locked and limited conversation to collaborators Feb 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants