pub struct HostedCapabilities {
pub web_search: bool,
}Expand description
The set of hosted capabilities that the provider advertises.
Distinguished from Capabilities:
Capabilitiesdescribes model-level abilities (thinking, vision, tool_calls, etc.)HostedCapabilitiesdescribes the provider adapter’s own implementation state: whether the current adapter can declare hostedweb_search,fetch, orcode_executionon the wire.
At session startup, this struct is obtained via
super::LlmProvider::hosted_capabilities and, together with
capabilities.web_search.mode, determines the source of web search capability for the
session. Note that local grep/glob tools (the search tool) are not part of the
capability layer and are managed separately by [tools.search].
Native metadata returned by the model after a completions call.
Fields§
§web_search: boolWhether the provider adapter supports hosted web search.
The hosted tool version is hardcoded internally by the adapter to always use the
latest (Anthropic web_search_20260209, OpenAI Responses API web_search); the
agent is unaware of the specific version field.
Implementations§
Source§impl HostedCapabilities
impl HostedCapabilities
Sourcepub const fn with_web_search(web_search: bool) -> Self
pub const fn with_web_search(web_search: bool) -> Self
Constructs from a single field. A convenience entry point for cross-crate tests and adapter implementations.
Trait Implementations§
Source§impl Clone for HostedCapabilities
impl Clone for HostedCapabilities
Source§fn clone(&self) -> HostedCapabilities
fn clone(&self) -> HostedCapabilities
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 HostedCapabilities
Source§impl Debug for HostedCapabilities
impl Debug for HostedCapabilities
Source§impl Default for HostedCapabilities
impl Default for HostedCapabilities
Source§fn default() -> HostedCapabilities
fn default() -> HostedCapabilities
Source§impl<'de> Deserialize<'de> for HostedCapabilities
impl<'de> Deserialize<'de> for HostedCapabilities
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 HostedCapabilities
Source§impl PartialEq for HostedCapabilities
impl PartialEq for HostedCapabilities
Source§fn eq(&self, other: &HostedCapabilities) -> bool
fn eq(&self, other: &HostedCapabilities) -> bool
self and other values to be equal, and is used by ==.