Skip to content

Commit 140867f

Browse files
committed
feat(bedrock): add anthropic.claude-opus-4-7 to native model registry
Adds Claude Opus 4.7 to the Bedrock native model registry with: - Full ModelInfo (maxTokens, contextWindow, pricing, cache config) - supportsReasoningBudget: true (enables thinking budget in UI) - cachableFields for multi-point prompt caching - 1M context tier pricing - Global Inference support Without this entry, custom model usage falls back to guessModelInfoFromId() which lacks supportsReasoningBudget and cachableFields, causing "too many tokens" errors during parallel file injection (no cache = tokens accumulate). Note: Pricing estimated based on claude-opus-4-6-v1. To be verified against Bedrock console pricing page before merge.
1 parent 9d022d4 commit 140867f

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

packages/types/src/providers/bedrock.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,30 @@ export const bedrockModels = {
167167
},
168168
],
169169
},
170+
"anthropic.claude-opus-4-7": {
171+
maxTokens: 8192,
172+
contextWindow: 200_000, // Default 200K, extendable to 1M with beta flag 'context-1m-2025-08-07'
173+
supportsImages: true,
174+
supportsPromptCache: true,
175+
supportsReasoningBudget: true,
176+
inputPrice: 5.0, // $5 per million input tokens (≤200K context) — verify against Bedrock console
177+
outputPrice: 25.0, // $25 per million output tokens (≤200K context) — verify against Bedrock console
178+
cacheWritesPrice: 6.25, // $6.25 per million tokens
179+
cacheReadsPrice: 0.5, // $0.50 per million tokens
180+
minTokensPerCachePoint: 1024,
181+
maxCachePoints: 4,
182+
cachableFields: ["system", "messages", "tools"],
183+
// Tiered pricing for extended context (requires beta flag 'context-1m-2025-08-07')
184+
tiers: [
185+
{
186+
contextWindow: 1_000_000, // 1M tokens with beta flag
187+
inputPrice: 10.0, // $10 per million input tokens (>200K context)
188+
outputPrice: 37.5, // $37.50 per million output tokens (>200K context)
189+
cacheWritesPrice: 12.5, // $12.50 per million tokens (>200K context)
190+
cacheReadsPrice: 1.0, // $1.00 per million tokens (>200K context)
191+
},
192+
],
193+
},
170194
"anthropic.claude-opus-4-5-20251101-v1:0": {
171195
maxTokens: 8192,
172196
contextWindow: 200_000,
@@ -525,6 +549,7 @@ export const BEDROCK_1M_CONTEXT_MODEL_IDS = [
525549
"anthropic.claude-sonnet-4-5-20250929-v1:0",
526550
"anthropic.claude-sonnet-4-6",
527551
"anthropic.claude-opus-4-6-v1",
552+
"anthropic.claude-opus-4-7",
528553
] as const
529554

530555
// Amazon Bedrock models that support Global Inference profiles
@@ -535,13 +560,15 @@ export const BEDROCK_1M_CONTEXT_MODEL_IDS = [
535560
// - Claude Haiku 4.5
536561
// - Claude Opus 4.5
537562
// - Claude Opus 4.6
563+
// - Claude Opus 4.7
538564
export const BEDROCK_GLOBAL_INFERENCE_MODEL_IDS = [
539565
"anthropic.claude-sonnet-4-20250514-v1:0",
540566
"anthropic.claude-sonnet-4-5-20250929-v1:0",
541567
"anthropic.claude-sonnet-4-6",
542568
"anthropic.claude-haiku-4-5-20251001-v1:0",
543569
"anthropic.claude-opus-4-5-20251101-v1:0",
544570
"anthropic.claude-opus-4-6-v1",
571+
"anthropic.claude-opus-4-7",
545572
] as const
546573

547574
// Amazon Bedrock Service Tier types

0 commit comments

Comments
 (0)