Skip to main content

AnthropicConfig

Struct AnthropicConfig 

Source
pub struct AnthropicConfig {
Show 13 fields 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: Option<ReasoningEffortLevel>, pub task_budget_tokens: Option<u32>, pub task_budget_beta: String, pub thinking_display: Option<ThinkingDisplayMode>, pub count_tokens_enabled: bool, pub advisor: AdvisorConfig, pub fallbacks: AnthropicFallbacks,
}
Expand description

Anthropic-specific provider configuration

Fields§

§extended_thinking_enabled: bool

Enable 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: String

Beta header for interleaved thinking feature

§interleaved_thinking_budget_tokens: u32

Budget 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: String

Type value for enabling interleaved thinking

§tool_search: ToolSearchConfig

Tool search configuration for dynamic tool discovery (advanced-tool-use beta)

§memory: AnthropicMemoryConfig

Native Anthropic memory tool configuration.

§effort: Option<ReasoningEffortLevel>

Effort 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. Unset by default: each model then uses its own default effort (for example medium on Claude Opus 5.5, high on Claude Opus 5). An explicit agent.reasoning_effort or /effort selection takes precedence; a value the active model does not support falls back to that model’s default.

§task_budget_tokens: Option<u32>

Optional Anthropic task budget token total for Claude Fable 5/5.1, Opus 5, and Opus 5.5 (not sent for other models). 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: String

Beta header for Anthropic task budgets.

§thinking_display: Option<ThinkingDisplayMode>

Controls how thinking content is returned in API responses.

  • “summarized”: Thinking blocks contain summarized text (default on Opus 4.6 and earlier).
  • “omitted”: Thinking blocks have an empty thinking field (default on Opus 4.7+).
  • “updates”: Only the progress updates between tool calls are returned as text (Claude Sonnet 5.5, Claude Opus 5.5 and Claude Fable 5.x; the VT Code default on Claude Sonnet 5.5 and Claude Opus 5.5). Ignored on models without progress updates.

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: bool

Enable 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

§advisor: AdvisorConfig

Claude Advisor server-side tool configuration. The advisor pairs a faster executor model with a higher-intelligence advisor model for strategic guidance mid-generation. Only honored for Anthropic models and providers.

§fallbacks: AnthropicFallbacks

Server-side refusal fallbacks (fallbacks request parameter).

  • “default”: let Anthropic pick the recommended fallback model when the primary model declines on policy grounds (the VT Code default).
  • “off”: never send fallbacks.
  • a list of 1-3 { model, max_tokens } entries tried in order.

Only sent to the first-party Claude API (api.anthropic.com) for models whose capability profile supports server-side fallbacks (Claude Opus 5, Opus 5.5, Fable 5 and Fable 5.1); other models and endpoints send nothing.

Trait Implementations§

Source§

impl Clone for AnthropicConfig

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AnthropicConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for AnthropicConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for AnthropicConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl JsonSchema for AnthropicConfig

Source§

fn schema_name() -> Cow<'static, str>

The name of the generated JSON Schema. Read more
Source§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
Source§

fn json_schema(generator: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
Source§

fn inline_schema() -> bool

Whether JSON Schemas generated for this type should be included directly in parent schemas, rather than being re-used where possible using the $ref keyword. Read more
Source§

impl Serialize for AnthropicConfig

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more