pub struct ModelPricing {Show 17 fields
pub input_cost_per_1k: Option<f64>,
pub output_cost_per_1k: Option<f64>,
pub cache_read_cost_per_1k: Option<f64>,
pub cache_creation_cost_per_1k: Option<f64>,
pub max_input_tokens: Option<u32>,
pub max_output_tokens: Option<u32>,
pub mode: Option<String>,
pub provider: Option<String>,
pub supports_function_calling: Option<bool>,
pub supports_tool_choice: Option<bool>,
pub supports_vision: Option<bool>,
pub supports_reasoning: Option<bool>,
pub supports_prompt_caching: Option<bool>,
pub supports_response_schema: Option<bool>,
pub supports_parallel_function_calling: Option<bool>,
pub supported_endpoints: Option<Vec<String>>,
pub supported_modalities: Option<Vec<String>>,
}Fields§
§input_cost_per_1k: Option<f64>§output_cost_per_1k: Option<f64>§cache_read_cost_per_1k: Option<f64>Cost per 1k tokens read from the prompt cache, converted from the
upstream cache_read_input_token_cost per-token field using the same
per-token -> per-1k convention as input_cost_per_1k. When that field
is absent, the equivalent input_cost_per_token_cache_hit field is
read instead. No current registry entry needs this fallback (entries
that publish the cache-hit field also publish the cache-read field);
it guards against an upstream regression that drops the latter.
cache_creation_cost_per_1k: Option<f64>Cost per 1k tokens written to the prompt cache, converted from the
upstream cache_creation_input_token_cost per-token field.
max_input_tokens: Option<u32>§max_output_tokens: Option<u32>§mode: Option<String>§provider: Option<String>§supports_function_calling: Option<bool>§supports_tool_choice: Option<bool>§supports_vision: Option<bool>§supports_reasoning: Option<bool>§supports_prompt_caching: Option<bool>§supports_response_schema: Option<bool>§supports_parallel_function_calling: Option<bool>§supported_endpoints: Option<Vec<String>>§supported_modalities: Option<Vec<String>>Trait Implementations§
Source§impl Clone for ModelPricing
impl Clone for ModelPricing
Auto Trait Implementations§
impl Freeze for ModelPricing
impl RefUnwindSafe for ModelPricing
impl Send for ModelPricing
impl Sync for ModelPricing
impl Unpin for ModelPricing
impl UnsafeUnpin for ModelPricing
impl UnwindSafe for ModelPricing
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