pub struct ModelHint {
pub name: Option<String>,
}๐Deprecated:
Deprecated as of protocol version 2026-07-28 (SEP-2577). Remains in the specification for at least twelve months; see the deprecated features registry.
Expand description
Hints to use for model selection.
Keys not declared here are currently left unspecified by the spec and are up to the client to interpret.
Fieldsยง
ยงname: Option<String>๐Deprecated:
Deprecated as of protocol version 2026-07-28 (SEP-2577). Remains in the specification for at least twelve months; see the deprecated features registry.
A hint for a model name.
The client SHOULD treat this as a substring of a model name; for example:
claude-3-5-sonnetshould matchclaude-3-5-sonnet-20241022sonnetshould matchclaude-3-5-sonnet-20241022,claude-3-sonnet-20240229, etc.claudeshould match any Claude model
The client MAY also map the string to a different providerโs model name or a different model family, as long as it fills a similar niche; for example:
gemini-1.5-flashcould matchclaude-3-haiku-20240307
Trait Implementationsยง
Sourceยงimpl<'de> Deserialize<'de> for ModelHint
impl<'de> Deserialize<'de> for ModelHint
Sourceยงfn deserialize<__D>(
__deserializer: __D,
) -> Result<ModelHint, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ModelHint, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Sourceยงimpl Serialize for ModelHint
impl Serialize for ModelHint
Sourceยงfn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for ModelHint
Auto Trait Implementationsยง
impl Freeze for ModelHint
impl RefUnwindSafe for ModelHint
impl Send for ModelHint
impl Sync for ModelHint
impl Unpin for ModelHint
impl UnsafeUnpin for ModelHint
impl UnwindSafe for ModelHint
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