pub struct Model {Show 15 fields
pub id: String,
pub name: String,
pub created: i64,
pub input_modalities: Vec<InputModality>,
pub output_modalities: Vec<OutputModality>,
pub quantization: Quantization,
pub context_length: u64,
pub max_output_length: u64,
pub pricing: Pricing,
pub supported_sampling_parameters: Vec<SamplingParameter>,
pub supported_features: Vec<Feature>,
pub openrouter: Option<OpenRouterInfo>,
pub hugging_face_id: Option<String>,
pub description: Option<String>,
pub datacenters: Option<Vec<Datacenter>>,
}Expand description
A model available from the provider.
Fields§
§id: Stringe.g., “anthropic/claude-sonnet-4”
name: String§created: i64Unix timestamp.
input_modalities: Vec<InputModality>§output_modalities: Vec<OutputModality>§quantization: Quantization§context_length: u64Max input tokens.
max_output_length: u64Max output tokens.
pricing: Pricing§supported_sampling_parameters: Vec<SamplingParameter>§supported_features: Vec<Feature>§openrouter: Option<OpenRouterInfo>§hugging_face_id: Option<String>Required for Hugging Face models.
description: Option<String>§datacenters: Option<Vec<Datacenter>>Trait Implementations§
Source§impl<'de> Deserialize<'de> for Model
impl<'de> Deserialize<'de> for Model
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Model
Auto Trait Implementations§
impl Freeze for Model
impl RefUnwindSafe for Model
impl Send for Model
impl Sync for Model
impl Unpin for Model
impl UnwindSafe for Model
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)