pub struct ProviderModelConfig {Show 16 fields
pub id: String,
pub name: Option<String>,
pub api: Option<String>,
pub base_url: Option<String>,
pub reasoning: bool,
pub thinking_level_map: Option<ThinkingLevelMap>,
pub input: Vec<InputModality>,
pub input_limits: Option<InputLimits>,
pub cost: ModelCost,
pub prompt_cache: Option<PromptCache>,
pub context_window: u64,
pub max_tokens: u64,
pub sampling_params: Option<JsonObject>,
pub sampling_params_by_thinking_level: Option<SamplingByLevel>,
pub headers: Option<IndexMap<String, String>>,
pub compat: Option<JsonValue>,
}Expand description
A model in a registration or override.
Most fields default to the models.json values when
they are missing (name = id, input = ["text"], zero cost, 128 000 / 16 384 tokens).
Fields§
§id: StringModel id.
name: Option<String>Display name (default: id).
api: Option<String>API (default: the provider’s).
base_url: Option<String>Base URL (default: the provider’s).
reasoning: boolThinking support.
thinking_level_map: Option<ThinkingLevelMap>Provider value per thinking level.
input: Vec<InputModality>Input modalities.
input_limits: Option<InputLimits>Request/image limits.
cost: ModelCostPricing.
prompt_cache: Option<PromptCache>Prompt cache lifetimes.
context_window: u64Context window.
max_tokens: u64Maximum output tokens.
sampling_params: Option<JsonObject>Sampling defaults.
sampling_params_by_thinking_level: Option<SamplingByLevel>Sampling per thinking level.
headers: Option<IndexMap<String, String>>Model headers. On a registration they stay on the model; on an override they are request-time headers.
compat: Option<JsonValue>Compatibility flags.
Implementations§
Trait Implementations§
Source§impl Clone for ProviderModelConfig
impl Clone for ProviderModelConfig
Source§impl Debug for ProviderModelConfig
impl Debug for ProviderModelConfig
Source§impl<'de> Deserialize<'de> for ProviderModelConfig
impl<'de> Deserialize<'de> for ProviderModelConfig
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
Source§impl PartialEq for ProviderModelConfig
impl PartialEq for ProviderModelConfig
Source§impl Serialize for ProviderModelConfig
impl Serialize for ProviderModelConfig
impl StructuralPartialEq for ProviderModelConfig
Auto Trait Implementations§
impl Freeze for ProviderModelConfig
impl RefUnwindSafe for ProviderModelConfig
impl Send for ProviderModelConfig
impl Sync for ProviderModelConfig
impl Unpin for ProviderModelConfig
impl UnsafeUnpin for ProviderModelConfig
impl UnwindSafe for ProviderModelConfig
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