Skip to main content

ProviderCapabilities

Struct ProviderCapabilities 

Source
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: StructuredOutputCapability

Structured-output transport.

§tool_calling: ToolCallingCapability

Tool-calling support.

§parallel_tool_calls: bool

Whether several tool calls may appear in one response.

§vision: bool

Image input.

§documents: bool

Document 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: bool

Audio input.

§audio_output: bool

Audio output.

§streaming: bool

Incremental output.

§prompt_caching: bool

Prompt caching honoured by the provider.

§reasoning_controls: bool

Reasoning effort or budget controls.

§temperature: bool

Whether a sampling temperature may be sent. Reasoning models that accept only their default declare false, and the adapter then drops the parameter.

§seed: bool

Whether a sampling seed is honoured.

§max_context_tokens: Option<u64>

Context window in tokens, when known.

§preserves_call_ids: bool

Whether tool-call ids round-trip unchanged.

Implementations§

Source§

impl ProviderCapabilities

Source

pub const fn minimal() -> Self

The weakest declaration: nothing supported, context unknown.

Source

pub const fn with_structured_output( self, capability: StructuredOutputCapability, ) -> Self

Sets the structured-output transport.

Source

pub const fn with_tool_calling(self, capability: ToolCallingCapability) -> Self

Sets tool calling; Parallel also sets parallel_tool_calls.

Source

pub const fn with_streaming(self, streaming: bool) -> Self

Sets streaming support.

Source

pub const fn with_vision(self, vision: bool) -> Self

Sets vision support.

Source

pub const fn with_documents(self, documents: bool) -> Self

Sets document-input support.

Source

pub const fn with_max_context_tokens(self, tokens: u64) -> Self

Sets the context window.

Source

pub const fn with_preserves_call_ids(self, preserves: bool) -> Self

Sets whether call ids round-trip.

Source

pub const fn with_prompt_caching(self, caching: bool) -> Self

Sets prompt caching support.

Source

pub const fn with_reasoning_controls(self, controls: bool) -> Self

Sets whether reasoning effort may be sent.

Source

pub const fn with_temperature(self, temperature: bool) -> Self

Sets whether a sampling temperature may be sent.

Source

pub const fn with_seed(self, seed: bool) -> Self

Sets whether a sampling seed is honoured.

Source

pub const fn supports_tools(&self) -> bool

Returns true when any tool calling is available.

Trait Implementations§

Source§

impl Clone for ProviderCapabilities

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ProviderCapabilities

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ProviderCapabilities

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for ProviderCapabilities

Source§

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 Eq for ProviderCapabilities

Source§

impl Hash for ProviderCapabilities

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for ProviderCapabilities

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for ProviderCapabilities

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for ProviderCapabilities

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more