Skip to main content

Module anthropic_types

Module anthropic_types 

Source

Structs§

AnthropicAdvisorCaching
Prompt-caching configuration for the advisor tool.
AnthropicAdvisorTool
Anthropic server-side advisor tool definition (beta advisor-tool-2026-03-01).
AnthropicCodeExecutionTool
Native code execution tool definition for Anthropic API.
AnthropicErrorBody
AnthropicFallbackModel
AnthropicFallbackParam
AnthropicFunctionTool
Regular function tool definition for Anthropic API
AnthropicMemoryTool
Native memory tool definition for Anthropic API.
AnthropicMessage
AnthropicMessageDelta
AnthropicMessageResponse
AnthropicOutputConfig
Output configuration for Anthropic API (e.g., effort parameter)
AnthropicRequest
AnthropicStopDetails
AnthropicTaskBudget
AnthropicToolResultBlock
Extracted struct for AnthropicContentBlock::ToolResult (boxed to reduce enum size).
AnthropicToolSearchTool
Tool search tool definition for Anthropic’s advanced-tool-use beta
AnthropicToolUseBlock
Extracted struct for AnthropicContentBlock::ToolUse (boxed to reduce enum size).
AnthropicUsage
AnthropicWebSearchTool
Native web search tool definition for Anthropic API (PTC-enabled search revisions)
CacheControl
CountTokensRequest
Request body for Anthropic’s count_tokens endpoint https://docs.anthropic.com/en/api/messages-count-tokens
CountTokensResponse
Response from Anthropic’s count_tokens endpoint
ImageSource
ToolReference
A reference to a discovered tool from tool search

Enums§

AnthropicContentBlock
AnthropicFallback
AnthropicFallbacksKeyword
AnthropicFallbacksParam
The fallbacks request parameter: the "default" keyword (Anthropic picks the fallback by refusal category) or an explicit list of entries. Each form needs its own beta header; see headers::ServerSideFallbackForm.
AnthropicOutputFormat
Native structured output format for Anthropic responses.
AnthropicStreamDelta
AnthropicStreamEvent
AnthropicTool
Anthropic tool definition Supports both regular function tools and tool search tools (advanced-tool-use beta)
AnthropicUsageIteration
TextCitation
ThinkingConfig
ThinkingDisplay
Controls how thinking content is returned in API responses.
ToolSearchResultContent
Content of a tool search result