-
Notifications
You must be signed in to change notification settings - Fork 7.2k
clean models manager #9168
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
clean models manager #9168
Conversation
|
@codex review |
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c0a5e8c2cf
ℹ️ 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".
|
@codex review this |
|
Codex Review: Didn't find any major issues. Delightful! ℹ️ 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". |
63dbbce to
be7284e
Compare
codex-rs/tui/src/app.rs
Outdated
| ) -> Option<AppExitInfo> { | ||
| let available_models = models_manager.list_models(config).await; | ||
| let available_models = models_manager | ||
| .list_models(config, RefreshStrategy::default()) |
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.
Consider not having default and being explicit.
| } | ||
| if let Err(err) = self | ||
| .refresh_available_models_no_cache(remote_models_feature) | ||
| .refresh_available_models(config, RefreshStrategy::Online) |
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.
I wouldn't make RefreshStrategy::Online public if it's only used internally
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.
makes sense
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.
I cannot control visibility of a member of enum
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.
Maybe change your code in a way that doesn't require the enum member
Have only the following Methods:
list_models: getting current available modelstry_list_models: sync version no refresh for tui useget_default_model: get the default model (should be tightened to core and received on session configuration)get_model_info: getModelInfofor a specific model (should be tightened to core but used in tests)refresh_if_new_etag: trigger refresh on different etagsAlso move the cache to its own struct