pub struct Model {Show 13 fields
pub id: String,
pub provider: String,
pub api: Api,
pub max_tokens: usize,
pub context_window: usize,
pub base_url: String,
pub reasoning: bool,
pub force_adaptive_thinking: bool,
pub supports_temperature: bool,
pub input_cost_per_mtok: f64,
pub output_cost_per_mtok: f64,
pub cache_read_cost_per_mtok: f64,
pub cache_write_cost_per_mtok: f64,
}Expand description
A resolved model definition used to drive provider requests.
Fields§
§id: String§provider: String§api: Api§max_tokens: usizeMaximum output tokens the model can produce in one turn.
context_window: usizeContext window size in tokens.
base_url: StringBase URL (without trailing slash) the provider POSTs to.
reasoning: boolWhether the model supports extended thinking / reasoning.
force_adaptive_thinking: boolAdaptive-thinking models select effort rather than a token budget.
supports_temperature: boolWhether passing temperature is supported.
input_cost_per_mtok: f64Pricing per 1M tokens (USD).
output_cost_per_mtok: f64§cache_read_cost_per_mtok: f64§cache_write_cost_per_mtok: f64Implementations§
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
Auto Trait Implementations§
impl Forget for Model
impl Freeze for Model
impl Move 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