pub struct AnthropicConfig {
pub skip_model_validation: bool,
pub extended_thinking_enabled: bool,
pub interleaved_thinking_beta: String,
pub interleaved_thinking_budget_tokens: u32,
pub interleaved_thinking_type_enabled: String,
pub tool_search: ToolSearchConfig,
pub effort: String,
pub count_tokens_enabled: bool,
}Expand description
Anthropic-specific provider configuration
Fields§
§skip_model_validation: boolDEPRECATED: Model name validation has been removed. The Anthropic API validates model names directly, avoiding maintenance burden and allowing flexibility. This field is kept for backward compatibility but has no effect.
extended_thinking_enabled: boolEnable extended thinking feature for Anthropic models When enabled, Claude uses internal reasoning before responding, providing enhanced reasoning capabilities for complex tasks. Only supported by Claude 4, Claude 4.5, and Claude 3.7 Sonnet models. Claude 4.6 uses adaptive thinking instead of extended thinking. Note: Extended thinking is now auto-enabled by default (31,999 tokens). Set MAX_THINKING_TOKENS=63999 environment variable for 2x budget on 64K models. See: https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking
interleaved_thinking_beta: StringBeta header for interleaved thinking feature
interleaved_thinking_budget_tokens: u32Budget tokens for extended thinking (minimum: 1024, default: 31999) On 64K output models (Opus 4.5, Sonnet 4.5, Haiku 4.5): default 31,999, max 63,999 On 32K output models (Opus 4): max 31,999 Use MAX_THINKING_TOKENS environment variable to override.
interleaved_thinking_type_enabled: StringType value for enabling interleaved thinking
tool_search: ToolSearchConfigTool search configuration for dynamic tool discovery (advanced-tool-use beta)
effort: StringEffort level for token usage (high, medium, low) Controls how many tokens Claude uses when responding, trading off between response thoroughness and token efficiency. Supported by Claude Opus 4.5/4.6 (4.5 requires effort beta header)
count_tokens_enabled: boolEnable token counting via the count_tokens endpoint When enabled, the agent can estimate input token counts before making API calls Useful for proactive management of rate limits and costs
Trait Implementations§
Source§impl Clone for AnthropicConfig
impl Clone for AnthropicConfig
Source§fn clone(&self) -> AnthropicConfig
fn clone(&self) -> AnthropicConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AnthropicConfig
impl Debug for AnthropicConfig
Source§impl Default for AnthropicConfig
impl Default for AnthropicConfig
Source§impl<'de> Deserialize<'de> for AnthropicConfig
impl<'de> Deserialize<'de> for AnthropicConfig
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>,
Source§impl JsonSchema for AnthropicConfig
impl JsonSchema for AnthropicConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for AnthropicConfig
impl RefUnwindSafe for AnthropicConfig
impl Send for AnthropicConfig
impl Sync for AnthropicConfig
impl Unpin for AnthropicConfig
impl UnsafeUnpin for AnthropicConfig
impl UnwindSafe for AnthropicConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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