mirror of
https://github.com/openai/codex.git
synced 2026-04-29 00:55:38 +00:00
load models from disk and set a ttl and etag (#7722)
# External (non-OpenAI) Pull Request Requirements Before opening this Pull Request, please read the dedicated "Contributing" markdown file or your PR may be closed: https://github.com/openai/codex/blob/main/docs/contributing.md If your PR conforms to our contribution guidelines, replace this text with a detailed and high quality description of your changes. Include a link to a bug report or enhancement request.
This commit is contained in:
@@ -956,9 +956,11 @@ fn active_blob(chat: &ChatWidget) -> String {
|
||||
}
|
||||
|
||||
fn get_available_model(chat: &ChatWidget, model: &str) -> ModelPreset {
|
||||
chat.models_manager
|
||||
.available_models
|
||||
.blocking_read()
|
||||
let models = chat
|
||||
.models_manager
|
||||
.try_list_models()
|
||||
.expect("models lock available");
|
||||
models
|
||||
.iter()
|
||||
.find(|&preset| preset.model == model)
|
||||
.cloned()
|
||||
|
||||
Reference in New Issue
Block a user