pub enum ModelCapability {
Show 17 variants
Generate,
Embed,
Rerank,
Classify,
Code,
Reasoning,
Summarize,
ToolUse,
MultiToolCall,
Vision,
VideoUnderstanding,
AudioUnderstanding,
Grounding,
SpeechToText,
TextToSpeech,
ImageGeneration,
VideoGeneration,
}Expand description
What a model can do.
Variants§
Generate
Text completion / chat generation
Embed
Vector embeddings
Rerank
Cross-encoder relevance scoring (query + document → relevance score). Qwen3-Reranker is the canonical local implementation.
Classify
Label assignment / classification
Code
Code generation, repair, refactoring
Reasoning
Chain-of-thought, planning, analysis
Summarize
Text condensation
ToolUse
Function/tool calling
MultiToolCall
Multiple tool calls in a single response (parallel tool execution)
Vision
Vision / image understanding
VideoUnderstanding
Video understanding (multi-frame sampling + temporal tokens).
Distinct from Vision so routing can prefer video-trained
models when the caller attaches a video content block.
AudioUnderstanding
Audio understanding (speech + non-speech audio as an input to
a chat/reasoning model). Distinct from SpeechToText which is
the transcription-only task. Gemma 4 E2B/E4B and Gemini do
this; Qwen2.5-VL does not.
Grounding
Visual grounding — structured object-localization output (bounding boxes keyed to object labels) in addition to text.
SpeechToText
Speech recognition / transcription
TextToSpeech
Speech synthesis / text-to-speech
ImageGeneration
Image generation
VideoGeneration
Video generation
Trait Implementations§
Source§impl Clone for ModelCapability
impl Clone for ModelCapability
impl Copy for ModelCapability
Source§impl Debug for ModelCapability
impl Debug for ModelCapability
Source§impl<'de> Deserialize<'de> for ModelCapability
impl<'de> Deserialize<'de> for ModelCapability
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>,
impl Eq for ModelCapability
Source§impl Hash for ModelCapability
impl Hash for ModelCapability
Source§impl JsonSchema for ModelCapability
impl JsonSchema for ModelCapability
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read moreSource§impl PartialEq for ModelCapability
impl PartialEq for ModelCapability
Source§impl Serialize for ModelCapability
impl Serialize for ModelCapability
impl StructuralPartialEq for ModelCapability
Auto Trait Implementations§
impl Freeze for ModelCapability
impl RefUnwindSafe for ModelCapability
impl Send for ModelCapability
impl Sync for ModelCapability
impl Unpin for ModelCapability
impl UnsafeUnpin for ModelCapability
impl UnwindSafe for ModelCapability
Blanket Implementations§
impl<T> Boilerplate for T
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
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
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> ⓘ
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> ⓘ
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 more