pub struct AvailableModel {
pub id: String,
pub display_name: Option<String>,
pub provider: ProviderType,
pub capabilities: Vec<ModelCapability>,
pub owned_by: Option<String>,
pub context_window: Option<u32>,
pub max_output_tokens: Option<u32>,
pub created_at: Option<i64>,
}Expand description
A model available from a provider.
Fields§
§id: StringModel identifier (e.g. “claude-sonnet-4-20250514”, “gpt-4o”).
display_name: Option<String>Human-readable name, if provided by the API.
provider: ProviderTypeWhich provider owns this model.
capabilities: Vec<ModelCapability>What the model can do.
owned_by: Option<String>Organization/owner string from the API.
context_window: Option<u32>Maximum input context window (tokens).
max_output_tokens: Option<u32>Maximum output tokens the model can produce.
created_at: Option<i64>Unix timestamp (seconds) when the model was created.
Implementations§
Source§impl AvailableModel
impl AvailableModel
Sourcepub fn is_chat_capable(&self) -> bool
pub fn is_chat_capable(&self) -> bool
Whether this model supports chat completions.
Trait Implementations§
Source§impl Clone for AvailableModel
impl Clone for AvailableModel
Source§fn clone(&self) -> AvailableModel
fn clone(&self) -> AvailableModel
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 AvailableModel
impl Debug for AvailableModel
Source§impl<'de> Deserialize<'de> for AvailableModel
impl<'de> Deserialize<'de> for AvailableModel
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
Auto Trait Implementations§
impl Freeze for AvailableModel
impl RefUnwindSafe for AvailableModel
impl Send for AvailableModel
impl Sync for AvailableModel
impl Unpin for AvailableModel
impl UnsafeUnpin for AvailableModel
impl UnwindSafe for AvailableModel
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