-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Require models refresh on cli version mismatch #10414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@codex review |
|
shouldn't etag handle this? |
|
Codex Review: Didn't find any major issues. 👍 ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
There was a problem hiding this 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_versionfield 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.
New versions can need to receive different model configurations. If the cache is for a different version, refresh.