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 memory: AnthropicMemoryConfig,
pub effort: String,
pub task_budget_tokens: Option<u32>,
pub task_budget_beta: String,
pub thinking_display: Option<String>,
pub count_tokens_enabled: bool,
}Expand description
Anthropic-specific provider configuration
Fields§
§skip_model_validation: boolModel validation removed. API validates model names directly.
DEPRECATED: 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 adaptive or extended thinking 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 Opus 4.7 uses adaptive thinking instead of budgeted 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 Claude Opus 4.7 ignores this setting and uses adaptive thinking instead. 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)
memory: AnthropicMemoryConfigNative Anthropic memory tool configuration.
effort: StringEffort level for adaptive thinking/token usage (low, medium, high, xhigh, max)
Controls how many tokens Claude uses when responding, trading off between
response thoroughness and token efficiency.
The default config value keeps Claude Opus 4.7 on xhigh; models that do not
support xhigh fall back to their supported model default, typically high.
task_budget_tokens: Option<u32>Optional Anthropic task budget token total for Claude Opus 4.7.
When set, VT Code sends output_config.task_budget = { type = "tokens", total = N }
and the required beta header.
Anthropic currently requires a minimum of 20,000 tokens.
task_budget_beta: StringBeta header for Anthropic task budgets.
thinking_display: Option<String>Controls how thinking content is returned in API responses.
- “summarized”: Thinking blocks contain summarized text (default on Claude 4 models).
- “omitted”: Thinking blocks have an empty
thinkingfield (default on Opus 4.7).
When set, this overrides the model-specific default. See: https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking#controlling-thinking-display
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