Variable: betas
@providerprotocol/ai / anthropic / betas
Variable: betas
Section titled “Variable: betas”
constbetas:object
Defined in: src/providers/anthropic/types.ts:33
Known Anthropic beta header values.
Beta features are enabled by passing these values in the betas config option
or via the anthropic-beta HTTP header. Multiple betas can be enabled simultaneously.
Type Declaration
Section titled “Type Declaration”advancedToolUse
Section titled “advancedToolUse”
readonlyadvancedToolUse:"advanced-tool-use-2025-11-20"='advanced-tool-use-2025-11-20'
Advanced tool use: Tool Search, Programmatic Tool Calling, Tool Use Examples.
codeExecution
Section titled “codeExecution”
readonlycodeExecution:"code-execution-2025-08-25"='code-execution-2025-08-25'
Code execution tool for running Python/Bash in secure sandbox.
computerUse
Section titled “computerUse”
readonlycomputerUse:"computer-use-2025-01-24"='computer-use-2025-01-24'
Computer use tool for Claude 4 models (mouse, keyboard, screenshots).
computerUseLegacy
Section titled “computerUseLegacy”
readonlycomputerUseLegacy:"computer-use-2024-10-22"='computer-use-2024-10-22'
Legacy computer use tool (Claude 3.x models).
computerUseOpus
Section titled “computerUseOpus”
readonlycomputerUseOpus:"computer-use-2025-11-24"='computer-use-2025-11-24'
Computer use tool for Claude Opus 4.5 with additional commands.
context1m
Section titled “context1m”
readonlycontext1m:"context-1m-2025-08-07"='context-1m-2025-08-07'
Enables 1 million token context window for Claude Sonnet 4.
contextManagement
Section titled “contextManagement”
readonlycontextManagement:"context-management-2025-06-27"='context-management-2025-06-27'
Automatic tool call clearing for context management.
devFullThinking
Section titled “devFullThinking”
readonlydevFullThinking:"dev-full-thinking-2025-05-14"='dev-full-thinking-2025-05-14'
Developer mode for full thinking output visibility.
effort
Section titled “effort”
readonlyeffort:"effort-2025-11-24"='effort-2025-11-24'
Effort parameter for Claude Opus 4.5 - controls response thoroughness vs efficiency.
extendedCacheTtl
Section titled “extendedCacheTtl”
readonlyextendedCacheTtl:"extended-cache-ttl-2025-04-11"='extended-cache-ttl-2025-04-11'
Enables 1-hour cache TTL (vs default 5-minute).
filesApi
Section titled “filesApi”
readonlyfilesApi:"files-api-2025-04-14"='files-api-2025-04-14'
Files API for uploading and managing files.
fineGrainedToolStreaming
Section titled “fineGrainedToolStreaming”
readonlyfineGrainedToolStreaming:"fine-grained-tool-streaming-2025-05-14"='fine-grained-tool-streaming-2025-05-14'
Streams tool use parameters without buffering/JSON validation.
interleavedThinking
Section titled “interleavedThinking”
readonlyinterleavedThinking:"interleaved-thinking-2025-05-14"='interleaved-thinking-2025-05-14'
Enables Claude to think between tool calls in Claude 4 models.
maxTokens35Sonnet
Section titled “maxTokens35Sonnet”
readonlymaxTokens35Sonnet:"max-tokens-3-5-sonnet-2024-07-15"='max-tokens-3-5-sonnet-2024-07-15'
Enables up to 8,192 output tokens from Claude Sonnet 3.5.
mcpClient
Section titled “mcpClient”
readonlymcpClient:"mcp-client-2025-04-04"='mcp-client-2025-04-04'
MCP connector to connect to remote MCP servers.
mcpClientLatest
Section titled “mcpClientLatest”
readonlymcpClientLatest:"mcp-client-2025-11-20"='mcp-client-2025-11-20'
Updated MCP client.
messageBatches
Section titled “messageBatches”
readonlymessageBatches:"message-batches-2024-09-24"='message-batches-2024-09-24'
Message Batches API for async processing at 50% cost.
modelContextWindowExceeded
Section titled “modelContextWindowExceeded”
readonlymodelContextWindowExceeded:"model-context-window-exceeded-2025-08-26"='model-context-window-exceeded-2025-08-26'
Handling for when model context window is exceeded.
output128k
Section titled “output128k”
readonlyoutput128k:"output-128k-2025-02-19"='output-128k-2025-02-19'
Enables 128K token output length.
readonlypdfs:"pdfs-2024-09-25"='pdfs-2024-09-25'
PDF document support.
promptCaching
Section titled “promptCaching”
readonlypromptCaching:"prompt-caching-2024-07-31"='prompt-caching-2024-07-31'
Prompt caching for reduced latency and costs. Now works automatically with cache_control.
skills
Section titled “skills”
readonlyskills:"skills-2025-10-02"='skills-2025-10-02'
Agent Skills for specialized tasks (PowerPoint, Excel, Word, PDF).
structuredOutputs
Section titled “structuredOutputs”
readonlystructuredOutputs:"structured-outputs-2025-11-13"='structured-outputs-2025-11-13'
Guaranteed JSON schema conformance for responses. Available for Claude Sonnet 4.5+.
tokenCounting
Section titled “tokenCounting”
readonlytokenCounting:"token-counting-2024-11-01"='token-counting-2024-11-01'
Token counting endpoint.
tokenEfficientTools
Section titled “tokenEfficientTools”
readonlytokenEfficientTools:"token-efficient-tools-2025-02-19"='token-efficient-tools-2025-02-19'
Reduces output token consumption by up to 70% for tool calls.
Example
Section titled “Example”import { anthropic, betas } from 'provider-protocol/anthropic';
// Using the betas config option (recommended)const provider = anthropic('claude-sonnet-4-20250514', { betas: [betas.structuredOutputs, betas.interleavedThinking],});
// Or use string values directly for new/unlisted betasconst provider = anthropic('claude-sonnet-4-20250514', { betas: ['new-beta-2025-12-01'],});