mirror of
https://github.com/openai/codex.git
synced 2026-05-24 13:04:29 +00:00
Collaboration modes were slightly invasive both into ThreadManager construction and ModelProvider
18 lines
401 B
Rust
18 lines
401 B
Rust
use codex_protocol::openai_models::ModelPreset;
|
|
use std::convert::Infallible;
|
|
|
|
#[derive(Debug, Clone)]
|
|
pub(crate) struct ModelCatalog {
|
|
models: Vec<ModelPreset>,
|
|
}
|
|
|
|
impl ModelCatalog {
|
|
pub(crate) fn new(models: Vec<ModelPreset>) -> Self {
|
|
Self { models }
|
|
}
|
|
|
|
pub(crate) fn try_list_models(&self) -> Result<Vec<ModelPreset>, Infallible> {
|
|
Ok(self.models.clone())
|
|
}
|
|
}
|