betas.ts
constants/betas.ts
No strong subsystem tag
53
Lines
2218
Bytes
20
Exports
1
Imports
10
Keywords
What this is
This page documents one file from the repository and includes its full source so you can read it without leaving the docs site.
Beginner explanation
This file is one piece of the larger system. Its name, directory, imports, and exports show where it fits. Start by reading the exports and related files first.
How it is used
Start from the exports list and related files. Those are the easiest clues for where this file fits into the system.
Expert explanation
Architecturally, this file intersects with general runtime concerns. It contains 53 lines, 1 detected imports, and 20 detected exports.
Important relationships
Detected exports
CLAUDE_CODE_20250219_BETA_HEADERINTERLEAVED_THINKING_BETA_HEADERCONTEXT_1M_BETA_HEADERCONTEXT_MANAGEMENT_BETA_HEADERSTRUCTURED_OUTPUTS_BETA_HEADERWEB_SEARCH_BETA_HEADERTOOL_SEARCH_BETA_HEADER_1PTOOL_SEARCH_BETA_HEADER_3PEFFORT_BETA_HEADERTASK_BUDGETS_BETA_HEADERPROMPT_CACHING_SCOPE_BETA_HEADERFAST_MODE_BETA_HEADERREDACT_THINKING_BETA_HEADERTOKEN_EFFICIENT_TOOLS_BETA_HEADERSUMMARIZE_CONNECTOR_TEXT_BETA_HEADERAFK_MODE_BETA_HEADERCLI_INTERNAL_BETA_HEADERADVISOR_BETA_HEADERBEDROCK_EXTRA_PARAMS_HEADERSVERTEX_COUNT_TOKENS_ALLOWED_BETAS
Keywords
bedrockfeatureinterleaved_thinking_beta_headerbetaheadersclaude_code_20250219_beta_headercontext_1m_beta_headercontext_management_beta_headeradvanced-tool-use-2025-11-20vertex
Detected imports
bun:bundle
Source notes
This page embeds the full file contents. Small or leaf files are still indexed honestly instead of being over-explained.
Full source
import { feature } from 'bun:bundle'
export const CLAUDE_CODE_20250219_BETA_HEADER = 'claude-code-20250219'
export const INTERLEAVED_THINKING_BETA_HEADER =
'interleaved-thinking-2025-05-14'
export const CONTEXT_1M_BETA_HEADER = 'context-1m-2025-08-07'
export const CONTEXT_MANAGEMENT_BETA_HEADER = 'context-management-2025-06-27'
export const STRUCTURED_OUTPUTS_BETA_HEADER = 'structured-outputs-2025-12-15'
export const WEB_SEARCH_BETA_HEADER = 'web-search-2025-03-05'
// Tool search beta headers differ by provider:
// - Claude API / Foundry: advanced-tool-use-2025-11-20
// - Vertex AI / Bedrock: tool-search-tool-2025-10-19
export const TOOL_SEARCH_BETA_HEADER_1P = 'advanced-tool-use-2025-11-20'
export const TOOL_SEARCH_BETA_HEADER_3P = 'tool-search-tool-2025-10-19'
export const EFFORT_BETA_HEADER = 'effort-2025-11-24'
export const TASK_BUDGETS_BETA_HEADER = 'task-budgets-2026-03-13'
export const PROMPT_CACHING_SCOPE_BETA_HEADER =
'prompt-caching-scope-2026-01-05'
export const FAST_MODE_BETA_HEADER = 'fast-mode-2026-02-01'
export const REDACT_THINKING_BETA_HEADER = 'redact-thinking-2026-02-12'
export const TOKEN_EFFICIENT_TOOLS_BETA_HEADER =
'token-efficient-tools-2026-03-28'
export const SUMMARIZE_CONNECTOR_TEXT_BETA_HEADER = feature('CONNECTOR_TEXT')
? 'summarize-connector-text-2026-03-13'
: ''
export const AFK_MODE_BETA_HEADER = feature('TRANSCRIPT_CLASSIFIER')
? 'afk-mode-2026-01-31'
: ''
export const CLI_INTERNAL_BETA_HEADER =
process.env.USER_TYPE === 'ant' ? 'cli-internal-2026-02-09' : ''
export const ADVISOR_BETA_HEADER = 'advisor-tool-2026-03-01'
/**
* Bedrock only supports a limited number of beta headers and only through
* extraBodyParams. This set maintains the beta strings that should be in
* Bedrock extraBodyParams *and not* in Bedrock headers.
*/
export const BEDROCK_EXTRA_PARAMS_HEADERS = new Set([
INTERLEAVED_THINKING_BETA_HEADER,
CONTEXT_1M_BETA_HEADER,
TOOL_SEARCH_BETA_HEADER_3P,
])
/**
* Betas allowed on Vertex countTokens API.
* Other betas will cause 400 errors.
*/
export const VERTEX_COUNT_TOKENS_ALLOWED_BETAS = new Set([
CLAUDE_CODE_20250219_BETA_HEADER,
INTERLEAVED_THINKING_BETA_HEADER,
CONTEXT_MANAGEMENT_BETA_HEADER,
])