Skip to content

Commit 1bcae71

Browse files
committed
feat(types): add claude-opus-4-8 to Anthropic, Bedrock, and Vertex registries
- Register claude-opus-4-8 in anthropicModels with 1M context, 128k output, supportsReasoningBudget, supportsReasoningBinary, supportsTemperature: false (mirrors 4.7 - no breaking API changes per the official migration guide). - Register anthropic.claude-opus-4-8 in bedrockModels with cache points, cachableFields, and 1M context tier pricing. - Register claude-opus-4-8 in vertexModels with the same shape. - Add anthropic.claude-opus-4-8 to BEDROCK_1M_CONTEXT_MODEL_IDS and BEDROCK_GLOBAL_INFERENCE_MODEL_IDS. - Add claude-opus-4-8 to VERTEX_1M_CONTEXT_MODEL_IDS.
1 parent b917925 commit 1bcae71

3 files changed

Lines changed: 70 additions & 0 deletions

File tree

packages/types/src/providers/anthropic.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,24 @@ export const anthropicModels = {
108108
supportsReasoningBinary: true,
109109
supportsTemperature: false,
110110
},
111+
"claude-opus-4-8": {
112+
maxTokens: 128_000, // Overridden to 8k if `enableReasoningEffort` is false.
113+
contextWindow: 1_000_000, // 1M context window native (no beta header required, same as 4.7)
114+
supportsImages: true,
115+
supportsPromptCache: true,
116+
inputPrice: 5.0, // $5 per million input tokens (regular tier)
117+
outputPrice: 25.0, // $25 per million output tokens (regular tier)
118+
cacheWritesPrice: 6.25, // $6.25 per million tokens
119+
cacheReadsPrice: 0.5, // $0.50 per million tokens
120+
// 4.8 inherits the adaptive-thinking model introduced in 4.7 — no breaking
121+
// API changes. supportsReasoningBudget is kept true so the existing token-cap
122+
// handling and max-token overrides behave identically.
123+
supportsReasoningBudget: true,
124+
// 4.8 still rejects budget_tokens-style thinking payloads, so the UI must
125+
// expose reasoning as a binary on/off toggle on this provider path.
126+
supportsReasoningBinary: true,
127+
supportsTemperature: false,
128+
},
111129
"claude-opus-4-5-20251101": {
112130
maxTokens: 32_000, // Overridden to 8k if `enableReasoningEffort` is false.
113131
contextWindow: 200_000,

packages/types/src/providers/bedrock.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,32 @@ export const bedrockModels = {
191191
},
192192
],
193193
},
194+
"anthropic.claude-opus-4-8": {
195+
maxTokens: 8192,
196+
contextWindow: 200_000, // Default 200K, extendable to 1M with beta flag 'context-1m-2025-08-07'
197+
supportsImages: true,
198+
supportsPromptCache: true,
199+
supportsReasoningBudget: true,
200+
inputPrice: 5.0, // $5 per million input tokens (≤200K context) — verify against Bedrock console
201+
outputPrice: 25.0, // $25 per million output tokens (≤200K context) — verify against Bedrock console
202+
cacheWritesPrice: 6.25, // $6.25 per million tokens
203+
cacheReadsPrice: 0.5, // $0.50 per million tokens
204+
minTokensPerCachePoint: 1024,
205+
maxCachePoints: 4,
206+
cachableFields: ["system", "messages", "tools"],
207+
// Tiered pricing for extended context (requires beta flag 'context-1m-2025-08-07')
208+
// 4.8 inherits the same Bedrock pricing structure as 4.7 — no API breaking changes.
209+
// Adaptive thinking is the only supported reasoning mode (same as 4.7).
210+
tiers: [
211+
{
212+
contextWindow: 1_000_000, // 1M tokens with beta flag
213+
inputPrice: 10.0, // $10 per million input tokens (>200K context)
214+
outputPrice: 37.5, // $37.50 per million output tokens (>200K context)
215+
cacheWritesPrice: 12.5, // $12.50 per million tokens (>200K context)
216+
cacheReadsPrice: 1.0, // $1.00 per million tokens (>200K context)
217+
},
218+
],
219+
},
194220
"anthropic.claude-opus-4-5-20251101-v1:0": {
195221
maxTokens: 8192,
196222
contextWindow: 200_000,
@@ -550,6 +576,7 @@ export const BEDROCK_1M_CONTEXT_MODEL_IDS = [
550576
"anthropic.claude-sonnet-4-6",
551577
"anthropic.claude-opus-4-6-v1",
552578
"anthropic.claude-opus-4-7",
579+
"anthropic.claude-opus-4-8",
553580
] as const
554581

555582
// Amazon Bedrock models that support Global Inference profiles
@@ -569,6 +596,7 @@ export const BEDROCK_GLOBAL_INFERENCE_MODEL_IDS = [
569596
"anthropic.claude-opus-4-5-20251101-v1:0",
570597
"anthropic.claude-opus-4-6-v1",
571598
"anthropic.claude-opus-4-7",
599+
"anthropic.claude-opus-4-8",
572600
] as const
573601

574602
// Amazon Bedrock Service Tier types

packages/types/src/providers/vertex.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,29 @@ export const vertexModels = {
396396
},
397397
],
398398
},
399+
"claude-opus-4-8": {
400+
maxTokens: 8192,
401+
contextWindow: 200_000, // Default 200K, extendable to 1M with beta flag 'context-1m-2025-08-07'
402+
supportsImages: true,
403+
supportsPromptCache: true,
404+
inputPrice: 5.0, // $5 per million input tokens (≤200K context)
405+
outputPrice: 25.0, // $25 per million output tokens (≤200K context)
406+
cacheWritesPrice: 6.25, // $6.25 per million tokens
407+
cacheReadsPrice: 0.5, // $0.50 per million tokens
408+
supportsReasoningBudget: true,
409+
supportsTemperature: false,
410+
// 4.8 inherits the same Vertex pricing structure as 4.7 — no breaking changes.
411+
// Tiered pricing for extended context (requires beta flag 'context-1m-2025-08-07')
412+
tiers: [
413+
{
414+
contextWindow: 1_000_000, // 1M tokens with beta flag
415+
inputPrice: 10.0, // $10 per million input tokens (>200K context)
416+
outputPrice: 37.5, // $37.50 per million output tokens (>200K context)
417+
cacheWritesPrice: 12.5, // $12.50 per million tokens (>200K context)
418+
cacheReadsPrice: 1.0, // $1.00 per million tokens (>200K context)
419+
},
420+
],
421+
},
399422
"claude-opus-4-5@20251101": {
400423
maxTokens: 8192,
401424
contextWindow: 200_000,
@@ -595,6 +618,7 @@ export const VERTEX_1M_CONTEXT_MODEL_IDS = [
595618
"claude-sonnet-4-6",
596619
"claude-opus-4-6",
597620
"claude-opus-4-7",
621+
"claude-opus-4-8",
598622
] as const
599623

600624
export const VERTEX_REGIONS = [

0 commit comments

Comments
 (0)