pub enum OpenAIModel {
Show 19 variants
Gpt52,
Gpt51,
Gpt5,
Gpt5Mini,
Gpt5Nano,
Gpt51Codex,
Gpt51CodexMini,
Gpt5Codex,
Gpt5CodexMini,
Gpt41,
Gpt41Mini,
Gpt4o,
Gpt4oMini,
O3Pro,
O3,
O3Mini,
O1,
O1Pro,
Custom(String),
}Expand description
OpenAI model identifiers.
§Examples
use llm_toolkit::models::OpenAIModel;
let model = OpenAIModel::Gpt52;
assert_eq!(model.as_api_id(), "gpt-5.2");
let model: OpenAIModel = "4o".parse().unwrap();
assert_eq!(model, OpenAIModel::Gpt4o);Variants§
Gpt52
GPT-5.2 - Latest flagship (December 2025)
Gpt51
GPT-5.1 - Previous flagship (November 2025)
Gpt5
GPT-5 - Original GPT-5 (August 2025)
Gpt5Mini
GPT-5 Mini - Cost-effective
Gpt5Nano
GPT-5 Nano - Smallest
Gpt51Codex
GPT-5.1 Codex - Optimized for agentic coding
Gpt51CodexMini
GPT-5.1 Codex Mini - Cost-effective coding
Gpt5Codex
GPT-5 Codex - Legacy agentic coding
Gpt5CodexMini
GPT-5 Codex Mini - Legacy cost-effective coding
Gpt41
GPT-4.1 - Improved instruction following
Gpt41Mini
GPT-4.1 Mini - Cost-effective
Gpt4o
GPT-4o - Legacy, still useful for audio
Gpt4oMini
GPT-4o Mini - Cost-effective legacy
O3Pro
o3-pro - Extended reasoning
O3
o3 - Standard reasoning
O3Mini
o3-mini - Fast reasoning
O1
o1 - Previous reasoning model
O1Pro
o1-pro - Extended previous reasoning
Custom(String)
Custom model (validated: must start with “gpt-”, “o1-”, or “o3-”)
Implementations§
Source§impl OpenAIModel
impl OpenAIModel
Trait Implementations§
Source§impl Clone for OpenAIModel
impl Clone for OpenAIModel
Source§fn clone(&self) -> OpenAIModel
fn clone(&self) -> OpenAIModel
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OpenAIModel
impl Debug for OpenAIModel
Source§impl Default for OpenAIModel
impl Default for OpenAIModel
Source§impl Display for OpenAIModel
impl Display for OpenAIModel
Source§impl From<OpenAIModel> for Model
impl From<OpenAIModel> for Model
Source§fn from(m: OpenAIModel) -> Self
fn from(m: OpenAIModel) -> Self
Converts to this type from the input type.
Source§impl FromStr for OpenAIModel
impl FromStr for OpenAIModel
Source§impl Hash for OpenAIModel
impl Hash for OpenAIModel
Source§impl PartialEq for OpenAIModel
impl PartialEq for OpenAIModel
impl Eq for OpenAIModel
impl StructuralPartialEq for OpenAIModel
Auto Trait Implementations§
impl Freeze for OpenAIModel
impl RefUnwindSafe for OpenAIModel
impl Send for OpenAIModel
impl Sync for OpenAIModel
impl Unpin for OpenAIModel
impl UnwindSafe for OpenAIModel
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more