pub struct ProviderCapabilities {
pub chat: bool,
pub chat_stream: bool,
pub tool_calling: bool,
pub parallel_tool_calls: bool,
pub json_schema_output: bool,
pub vision: bool,
pub embeddings: bool,
pub max_input_tokens: Option<u32>,
pub max_output_tokens: Option<u32>,
pub prompt_caching: bool,
pub max_cache_breakpoints: Option<u8>,
pub cache_ttl_options: Vec<CacheTtl>,
}Expand description
Static capability advertisement returned by provider implementations.
Fields§
§chat: boolProvider can return a complete chat response.
chat_stream: boolProvider can stream chat events.
tool_calling: boolProvider accepts tool definitions in chat requests.
parallel_tool_calls: boolProvider can execute or request multiple tool calls concurrently.
json_schema_output: boolProvider can constrain output with a JSON schema.
vision: boolProvider can consume image content.
embeddings: boolProvider can produce embeddings.
max_input_tokens: Option<u32>Maximum supported input tokens, when known.
max_output_tokens: Option<u32>Maximum supported output tokens, when known.
prompt_caching: boolProvider supports prompt caching.
false for providers with no caching (e.g. local models without a
cache layer). true for providers that either accept explicit
cache markers (Anthropic) or perform automatic prefix caching
(OpenAI, DeepSeek).
max_cache_breakpoints: Option<u8>Maximum number of cache breakpoints the provider accepts.
Some(4) for Anthropic (which permits up to four cache_control
markers per request). None for providers that perform automatic
caching without an explicit breakpoint concept (OpenAI, DeepSeek).
cache_ttl_options: Vec<CacheTtl>Cache TTLs the provider supports.
Empty for providers with automatic caching. Non-empty for Anthropic
([FiveMinutes, OneHour]).
Implementations§
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 moreSource§impl Debug for ProviderCapabilities
impl Debug for ProviderCapabilities
Source§impl Default for ProviderCapabilities
impl Default for ProviderCapabilities
Source§fn default() -> ProviderCapabilities
fn default() -> 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 PartialEq for ProviderCapabilities
impl PartialEq for ProviderCapabilities
Source§fn eq(&self, other: &ProviderCapabilities) -> bool
fn eq(&self, other: &ProviderCapabilities) -> bool
self and other values to be equal, and is used by ==.