pub struct ProviderCapabilities {Show 14 fields
pub structured_output: StructuredOutputCapability,
pub tool_calling: ToolCallingCapability,
pub parallel_tool_calls: bool,
pub vision: bool,
pub documents: bool,
pub audio_input: bool,
pub audio_output: bool,
pub streaming: bool,
pub prompt_caching: bool,
pub reasoning_controls: bool,
pub temperature: bool,
pub seed: bool,
pub max_context_tokens: Option<u64>,
pub preserves_call_ids: bool,
}Expand description
Declared capabilities of one provider-model pair (spec §20.3).
Fields§
§structured_output: StructuredOutputCapabilityStructured-output transport.
tool_calling: ToolCallingCapabilityTool-calling support.
parallel_tool_calls: boolWhether several tool calls may appear in one response.
vision: boolImage input.
documents: boolDocument input — a PDF, a spreadsheet, a plain-text attachment.
Separate from vision on purpose: a model that reads a
PNG may reject a PDF, and a gateway may strip one and not the other.
Defaults to false when a stored declaration predates the flag, which
is the fail-closed answer.
audio_input: boolAudio input.
audio_output: boolAudio output.
streaming: boolIncremental output.
prompt_caching: boolPrompt caching honoured by the provider.
reasoning_controls: boolReasoning effort or budget controls.
temperature: boolWhether a sampling temperature may be sent. Reasoning models that accept only
their default declare false, and the adapter then drops the parameter.
seed: boolWhether a sampling seed is honoured.
max_context_tokens: Option<u64>Context window in tokens, when known.
preserves_call_ids: boolWhether tool-call ids round-trip unchanged.
Implementations§
Source§impl ProviderCapabilities
impl ProviderCapabilities
Sourcepub const fn with_structured_output(
self,
capability: StructuredOutputCapability,
) -> Self
pub const fn with_structured_output( self, capability: StructuredOutputCapability, ) -> Self
Sets the structured-output transport.
Sourcepub const fn with_tool_calling(self, capability: ToolCallingCapability) -> Self
pub const fn with_tool_calling(self, capability: ToolCallingCapability) -> Self
Sets tool calling; Parallel also sets parallel_tool_calls.
Sourcepub const fn with_streaming(self, streaming: bool) -> Self
pub const fn with_streaming(self, streaming: bool) -> Self
Sets streaming support.
Sourcepub const fn with_vision(self, vision: bool) -> Self
pub const fn with_vision(self, vision: bool) -> Self
Sets vision support.
Sourcepub const fn with_documents(self, documents: bool) -> Self
pub const fn with_documents(self, documents: bool) -> Self
Sets document-input support.
Sourcepub const fn with_max_context_tokens(self, tokens: u64) -> Self
pub const fn with_max_context_tokens(self, tokens: u64) -> Self
Sets the context window.
Sourcepub const fn with_preserves_call_ids(self, preserves: bool) -> Self
pub const fn with_preserves_call_ids(self, preserves: bool) -> Self
Sets whether call ids round-trip.
Sourcepub const fn with_prompt_caching(self, caching: bool) -> Self
pub const fn with_prompt_caching(self, caching: bool) -> Self
Sets prompt caching support.
Sourcepub const fn with_reasoning_controls(self, controls: bool) -> Self
pub const fn with_reasoning_controls(self, controls: bool) -> Self
Sets whether reasoning effort may be sent.
Sourcepub const fn with_temperature(self, temperature: bool) -> Self
pub const fn with_temperature(self, temperature: bool) -> Self
Sets whether a sampling temperature may be sent.
Sourcepub const fn supports_tools(&self) -> bool
pub const fn supports_tools(&self) -> bool
Returns true when any tool calling is available.
Trait Implementations§
Source§impl Clone for ProviderCapabilities
impl Clone for ProviderCapabilities
Source§impl Debug for ProviderCapabilities
impl Debug for ProviderCapabilities
Source§impl Default for ProviderCapabilities
impl Default for ProviderCapabilities
Source§impl<'de> Deserialize<'de> for ProviderCapabilities
impl<'de> Deserialize<'de> for ProviderCapabilities
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 ProviderCapabilities
Source§impl Hash for ProviderCapabilities
impl Hash for ProviderCapabilities
Source§impl PartialEq for ProviderCapabilities
impl PartialEq for ProviderCapabilities
Source§impl Serialize for ProviderCapabilities
impl Serialize for ProviderCapabilities
impl StructuralPartialEq for ProviderCapabilities
Auto Trait Implementations§
impl Freeze for ProviderCapabilities
impl RefUnwindSafe for ProviderCapabilities
impl Send for ProviderCapabilities
impl Sync for ProviderCapabilities
impl Unpin for ProviderCapabilities
impl UnsafeUnpin for ProviderCapabilities
impl UnwindSafe for ProviderCapabilities
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.