pub struct ProviderModelDefinition {
pub id: String,
pub name: Option<String>,
pub api: Option<String>,
pub base_url: Option<String>,
pub reasoning: bool,
pub thinking_level_map: Option<BTreeMap<ModelThinkingLevel, Option<String>>>,
pub input: Option<Vec<ModelInput>>,
pub cost: Option<ModelCost>,
pub context_window: Option<u64>,
pub max_tokens: Option<u64>,
pub headers: Option<BTreeMap<String, String>>,
pub compat: Option<Value>,
}Expand description
One model definition accepted by ProviderConfigInput::models.
Fields§
§id: StringModel id.
name: Option<String>Display name (defaults to id).
api: Option<String>API shape override.
base_url: Option<String>Base URL override.
reasoning: boolWhether the model supports reasoning.
thinking_level_map: Option<BTreeMap<ModelThinkingLevel, Option<String>>>Optional thinking-level map.
input: Option<Vec<ModelInput>>Accepted input modalities (defaults to text).
cost: Option<ModelCost>Pricing (defaults to zeros).
context_window: Option<u64>Context window.
max_tokens: Option<u64>Max output tokens.
headers: Option<BTreeMap<String, String>>Static headers.
compat: Option<Value>Compatibility blob.
Trait Implementations§
Source§impl Clone for ProviderModelDefinition
impl Clone for ProviderModelDefinition
Source§fn clone(&self) -> ProviderModelDefinition
fn clone(&self) -> ProviderModelDefinition
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ProviderModelDefinition
impl Debug for ProviderModelDefinition
Source§impl<'de> Deserialize<'de> for ProviderModelDefinition
impl<'de> Deserialize<'de> for ProviderModelDefinition
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 ProviderModelDefinition
impl PartialEq for ProviderModelDefinition
impl StructuralPartialEq for ProviderModelDefinition
Auto Trait Implementations§
impl Freeze for ProviderModelDefinition
impl RefUnwindSafe for ProviderModelDefinition
impl Send for ProviderModelDefinition
impl Sync for ProviderModelDefinition
impl Unpin for ProviderModelDefinition
impl UnsafeUnpin for ProviderModelDefinition
impl UnwindSafe for ProviderModelDefinition
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§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 moreCreates a shared type from an unshared type.