pub struct ProviderCapabilities {
pub composes_native_output_with_tools: bool,
}Expand description
Provider behavior that affects how runtimes prepare completion requests.
Capabilities are immutable facts about a model implementation rather than per-request state, so a runtime can snapshot this value when it erases a concrete model instead of retaining a callback into the provider.
Prefer building from ProviderCapabilities::new or Default and
enabling flags with the with_* methods: that form keeps external
implementations compiling when new capabilities are added, where a struct
literal does not.
Fields§
§composes_native_output_with_tools: boolWhether this provider’s native structured output (output_schema ->
format/response_format) composes with tool calls in the same
multi-turn request without suppressing them.
false is the safe assumption: the native constraint may make the model
emit schema JSON instead of calling its tools — see issue #1928.
Providers that enforce structured output and tool use together (e.g.
OpenAI, Anthropic) set this to true, which lets runtimes keep
guaranteed native structured output active when tools are present.
Implementations§
Source§impl ProviderCapabilities
impl ProviderCapabilities
Sourcepub const fn with_native_output_tool_composition(self, supported: bool) -> Self
pub const fn with_native_output_tool_composition(self, supported: bool) -> Self
Declare whether native structured output composes with tool calls.
Trait Implementations§
Source§impl Clone for ProviderCapabilities
impl Clone for ProviderCapabilities
Source§fn clone(&self) -> ProviderCapabilities
fn clone(&self) -> ProviderCapabilities
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ProviderCapabilities
Source§impl Debug for ProviderCapabilities
impl Debug for ProviderCapabilities
Source§impl Default for ProviderCapabilities
impl Default for ProviderCapabilities
Source§fn default() -> ProviderCapabilities
fn default() -> ProviderCapabilities
impl Eq for ProviderCapabilities
Source§impl PartialEq for ProviderCapabilities
impl PartialEq 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,
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.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> 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