pub struct AliasedModel {
pub name: String,
pub real_name: Option<String>,
}Expand description
A model name with optional aliasing.
Strings like "fast-gpt4, gpt-4.1" parse to an AliasedModel where:
name = "fast-gpt4"— used in config and displayreal_name = Some("gpt-4.1")— resolved when building API requests
If no comma is present, real_name is None and both fields are identical.
Fields§
§name: StringDisplay / config name (may be a user-defined alias).
real_name: Option<String>Actual model ID sent to the API if this is an alias, otherwise None.
Implementations§
Source§impl AliasedModel
impl AliasedModel
Sourcepub fn capability_name(&self) -> &str
pub fn capability_name(&self) -> &str
The name used when probing provider capabilities (e.g. context window lookup).
Trait Implementations§
Source§impl Clone for AliasedModel
impl Clone for AliasedModel
Source§impl Debug for AliasedModel
impl Debug for AliasedModel
Source§impl<'de> Deserialize<'de> for AliasedModel
impl<'de> Deserialize<'de> for AliasedModel
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 Display for AliasedModel
impl Display for AliasedModel
impl Eq for AliasedModel
Source§impl FromStr for AliasedModel
impl FromStr for AliasedModel
Source§impl Hash for AliasedModel
impl Hash for AliasedModel
Source§impl PartialEq for AliasedModel
impl PartialEq for AliasedModel
Source§impl Serialize for AliasedModelwhere
Self: Display,
impl Serialize for AliasedModelwhere
Self: Display,
impl StructuralPartialEq for AliasedModel
Auto Trait Implementations§
impl Forget for AliasedModel
impl Freeze for AliasedModel
impl Move for AliasedModel
impl RefUnwindSafe for AliasedModel
impl Send for AliasedModel
impl Sync for AliasedModel
impl Unpin for AliasedModel
impl UnsafeUnpin for AliasedModel
impl UnwindSafe for AliasedModel
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