pub struct ModelCapabilities {
pub streaming: FeatureSupport,
pub tools: FeatureSupport,
pub parallel_tools: FeatureSupport,
pub structured_output: FeatureSupport,
pub reasoning: FeatureSupport,
pub image_input: FeatureSupport,
pub audio_input: FeatureSupport,
pub document_input: FeatureSupport,
pub max_context_tokens: Option<u64>,
pub extensions: BTreeMap<String, FeatureSupport>,
}Expand description
Capabilities of a specific model endpoint.
Fields§
§streaming: FeatureSupportStreaming output.
tools: FeatureSupportTool calling.
parallel_tools: FeatureSupportParallel tool calls.
structured_output: FeatureSupportNative structured output.
reasoning: FeatureSupportReasoning or thinking round trips.
image_input: FeatureSupportImage input.
audio_input: FeatureSupportAudio input.
document_input: FeatureSupportDocument input.
max_context_tokens: Option<u64>Known context-window limit.
extensions: BTreeMap<String, FeatureSupport>Namespaced additional capabilities.
Implementations§
Source§impl ModelCapabilities
impl ModelCapabilities
Sourcepub fn audit(&self) -> CapabilityAudit
pub fn audit(&self) -> CapabilityAudit
Produces a stable, serializable capability inventory for deployment
audits and doctor tooling.
Sourcepub fn validate_request(
&self,
request: &ModelRequest,
streaming: bool,
) -> Result<Vec<ModelWarning>, ModelError>
pub fn validate_request( &self, request: &ModelRequest, streaming: bool, ) -> Result<Vec<ModelWarning>, ModelError>
Validates the features required by a request and returns visible compatibility warnings.
Unsupported features always fail because generic middleware cannot
invent a safe degradation. Unknown support is accepted only under
FeaturePolicy::BestEffort. Emulation is accepted by
FeaturePolicy::AllowEmulation and FeaturePolicy::BestEffort.
§Errors
Returns ModelErrorKind::UnsupportedFeature when the request’s
feature policy cannot accept a required capability.
Trait Implementations§
Source§impl Clone for ModelCapabilities
impl Clone for ModelCapabilities
Source§fn clone(&self) -> ModelCapabilities
fn clone(&self) -> ModelCapabilities
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more