pub struct CustomModel {
pub id: String,
pub name: Option<String>,
pub context_window: Option<u64>,
pub max_tokens: Option<u64>,
pub reasoning: bool,
pub input: Option<String>,
pub cost: Option<ModelCost>,
}Expand description
A custom model definition within a provider.
Fields§
§id: StringThe model identifier sent to the API.
name: Option<String>A human-readable display name.
context_window: Option<u64>Maximum context window size in tokens.
max_tokens: Option<u64>Maximum output tokens per request.
reasoning: boolWhether the model supports extended thinking / chain-of-thought.
input: Option<String>Whether the model accepts image/file inputs.
cost: Option<ModelCost>Token pricing information.
Trait Implementations§
Source§impl Clone for CustomModel
impl Clone for CustomModel
Source§fn clone(&self) -> CustomModel
fn clone(&self) -> CustomModel
Returns a duplicate of the value. Read more
1.0.0 · 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 CustomModel
impl Debug for CustomModel
Source§impl<'de> Deserialize<'de> for CustomModel
impl<'de> Deserialize<'de> for CustomModel
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 Freeze for CustomModel
impl RefUnwindSafe for CustomModel
impl Send for CustomModel
impl Sync for CustomModel
impl Unpin for CustomModel
impl UnwindSafe for CustomModel
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