pub struct Model {
pub provider: String,
pub id: String,
pub name: Option<String>,
pub description: Option<String>,
pub context_window: Option<u32>,
pub supported_features: Vec<String>,
pub cost_input: Option<f64>,
pub cost_output: Option<f64>,
pub cost_cache_read: Option<f64>,
pub cost_cache_write: Option<f64>,
pub input_modalities: Vec<String>,
}Expand description
A discovered model
Fields§
§provider: StringProvider that hosts this model.
id: StringModel identifier (e.g. “claude-sonnet-4-5”).
name: Option<String>Human-readable model name.
description: Option<String>Optional model description.
context_window: Option<u32>Maximum context window size in tokens.
supported_features: Vec<String>Features the model supports (e.g. “tools”, “vision”).
cost_input: Option<f64>Cost per million input tokens.
cost_output: Option<f64>Cost per million output tokens.
cost_cache_read: Option<f64>Cost per million cache-read tokens.
cost_cache_write: Option<f64>Cost per million cache-write tokens.
input_modalities: Vec<String>Supported input modalities (e.g. “text”, “image”).
Implementations§
Source§impl Model
impl Model
Sourcepub fn from_entry(entry: &ModelEntry) -> Model
pub fn from_entry(entry: &ModelEntry) -> Model
Create from a model_db::ModelEntry
Sourcepub fn from_registry_model(model: &Model) -> Model
pub fn from_registry_model(model: &Model) -> Model
Create from a model_registry::Model
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Model
impl RefUnwindSafe for Model
impl Send for Model
impl Sync for Model
impl Unpin for Model
impl UnsafeUnpin for Model
impl UnwindSafe for Model
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
Source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
Query the “status” flags for the
self file descriptor.Source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
Source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
Set the “status” flags for the
self file descriptor. Read moreSource§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more