From e77b9abc78fe4b023c2c662ea20bd18828576525 Mon Sep 17 00:00:00 2001 From: romel lauron Date: Thu, 12 Mar 2026 00:20:03 +0800 Subject: [PATCH 1/2] feat(models): add missing AWS Bedrock mappings Add aws-bedrock provider entries for Anthropic models that were missing Bedrock mappings but are available on AWS Bedrock. Prices verified against AWS Bedrock pricing. Models added: - claude-haiku-4-5 - claude-haiku-4-5-20251001 - claude-opus-4-6 - claude-3-haiku / claude-3-haiku-20240307 - claude-3-5-haiku-20241022 Co-Authored-By: Claude Opus 4.6 --- packages/models/src/models/anthropic.ts | 94 +++++++++++++++++++++++++ 1 file changed, 94 insertions(+) diff --git a/packages/models/src/models/anthropic.ts b/packages/models/src/models/anthropic.ts index e7511a9616..2cd4c95fbd 100644 --- a/packages/models/src/models/anthropic.ts +++ b/packages/models/src/models/anthropic.ts @@ -77,6 +77,23 @@ export const anthropicModels = [ deprecatedAt: new Date("2025-12-19"), deactivatedAt: new Date("2026-02-19T17:00:00Z"), }, + { + providerId: "aws-bedrock", + modelName: "anthropic.claude-3-5-haiku-20241022-v1:0", + deprecatedAt: new Date("2025-10-28"), + deactivatedAt: new Date("2026-04-28"), + inputPrice: 0.8 / 1e6, + outputPrice: 4.0 / 1e6, + cachedInputPrice: 0.08 / 1e6, + minCacheableTokens: 2048, + requestPrice: 0, + discount: 0.3, + contextSize: 200000, + maxOutput: 8192, + streaming: true, + vision: false, + tools: true, + }, ], }, { @@ -414,6 +431,22 @@ export const anthropicModels = [ webSearch: true, webSearchPrice: 0.01, // $10 per 1000 searches }, + { + providerId: "aws-bedrock", + modelName: "anthropic.claude-haiku-4-5-20251001-v1:0", + inputPrice: 1.0 / 1e6, + outputPrice: 5.0 / 1e6, + cachedInputPrice: 0.1 / 1e6, + minCacheableTokens: 2048, + requestPrice: 0, + discount: 0.3, + contextSize: 200000, + maxOutput: 64000, + streaming: true, + vision: false, + tools: true, + jsonOutputSchema: true, + }, ], }, { @@ -441,6 +474,22 @@ export const anthropicModels = [ webSearch: true, webSearchPrice: 0.01, // $10 per 1000 searches }, + { + providerId: "aws-bedrock", + modelName: "anthropic.claude-haiku-4-5-20251001-v1:0", + inputPrice: 1.0 / 1e6, + outputPrice: 5.0 / 1e6, + cachedInputPrice: 0.1 / 1e6, + minCacheableTokens: 2048, + requestPrice: 0, + discount: 0.3, + contextSize: 200000, + maxOutput: 64000, + streaming: true, + vision: false, + tools: true, + jsonOutputSchema: true, + }, ], }, { @@ -682,6 +731,19 @@ export const anthropicModels = [ vision: true, tools: true, }, + { + providerId: "aws-bedrock", + modelName: "anthropic.claude-3-haiku-20240307-v1:0", + inputPrice: 0.25 / 1e6, + outputPrice: 1.25 / 1e6, + requestPrice: 0, + discount: 0.3, + contextSize: 200000, + maxOutput: 4096, + streaming: true, + vision: true, + tools: true, + }, ], }, { @@ -706,6 +768,19 @@ export const anthropicModels = [ vision: true, tools: true, }, + { + providerId: "aws-bedrock", + modelName: "anthropic.claude-3-haiku-20240307-v1:0", + inputPrice: 0.25 / 1e6, + outputPrice: 1.25 / 1e6, + requestPrice: 0, + discount: 0.3, + contextSize: 200000, + maxOutput: 4096, + streaming: true, + vision: true, + tools: true, + }, ], }, { @@ -818,6 +893,25 @@ export const anthropicModels = [ webSearch: true, webSearchPrice: 0.01, // $10 per 1000 searches }, + { + test: "skip", + providerId: "aws-bedrock", + modelName: "anthropic.claude-opus-4-6-v1", + inputPrice: 5.0 / 1e6, + outputPrice: 25.0 / 1e6, + cachedInputPrice: 0.5 / 1e6, + minCacheableTokens: 4096, + requestPrice: 0, + discount: 0.3, + contextSize: 1000000, + maxOutput: 128000, + reasoning: true, + reasoningOutput: "omit", + streaming: true, + vision: true, + tools: true, + jsonOutputSchema: true, + }, ], }, ] as const satisfies ModelDefinition[]; From 3d384fee012ba4e4fba7bcff690afa88428f559e Mon Sep 17 00:00:00 2001 From: romel lauron Date: Fri, 13 Mar 2026 00:07:47 +0800 Subject: [PATCH 2/2] fix(models): correct minCacheableTokens values MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix incorrect minCacheableTokens thresholds per official Anthropic docs: Haiku 4.5 → 4096, Sonnet 4.6 → 2048, Claude 3 Haiku → 1024. Remove Bedrock entries for models that don't support Global Cross-region inference. Co-Authored-By: Claude Opus 4.6 --- packages/models/src/models/anthropic.ts | 61 ++++--------------------- 1 file changed, 9 insertions(+), 52 deletions(-) diff --git a/packages/models/src/models/anthropic.ts b/packages/models/src/models/anthropic.ts index 2cd4c95fbd..a4c6d876a2 100644 --- a/packages/models/src/models/anthropic.ts +++ b/packages/models/src/models/anthropic.ts @@ -77,23 +77,6 @@ export const anthropicModels = [ deprecatedAt: new Date("2025-12-19"), deactivatedAt: new Date("2026-02-19T17:00:00Z"), }, - { - providerId: "aws-bedrock", - modelName: "anthropic.claude-3-5-haiku-20241022-v1:0", - deprecatedAt: new Date("2025-10-28"), - deactivatedAt: new Date("2026-04-28"), - inputPrice: 0.8 / 1e6, - outputPrice: 4.0 / 1e6, - cachedInputPrice: 0.08 / 1e6, - minCacheableTokens: 2048, - requestPrice: 0, - discount: 0.3, - contextSize: 200000, - maxOutput: 8192, - streaming: true, - vision: false, - tools: true, - }, ], }, { @@ -354,7 +337,7 @@ export const anthropicModels = [ inputPrice: 3.0 / 1e6, outputPrice: 15.0 / 1e6, cachedInputPrice: 0.3 / 1e6, - minCacheableTokens: 4096, + minCacheableTokens: 2048, requestPrice: 0, contextSize: 200000, maxOutput: 64000, @@ -374,7 +357,7 @@ export const anthropicModels = [ inputPrice: 3.0 / 1e6, outputPrice: 15.0 / 1e6, cachedInputPrice: 0.3 / 1e6, - minCacheableTokens: 1024, + minCacheableTokens: 2048, requestPrice: 0, discount: 0.3, contextSize: 200000, @@ -394,7 +377,7 @@ export const anthropicModels = [ inputPrice: 3.0 / 1e6, outputPrice: 15.0 / 1e6, cachedInputPrice: 0.3 / 1e6, - minCacheableTokens: 1024, + minCacheableTokens: 2048, requestPrice: 0, contextSize: 200000, maxOutput: 64000, @@ -420,7 +403,7 @@ export const anthropicModels = [ inputPrice: 1.0 / 1e6, outputPrice: 5.0 / 1e6, cachedInputPrice: 0.1 / 1e6, - minCacheableTokens: 2048, + minCacheableTokens: 4096, requestPrice: 0, contextSize: 200000, maxOutput: 64000, @@ -437,7 +420,7 @@ export const anthropicModels = [ inputPrice: 1.0 / 1e6, outputPrice: 5.0 / 1e6, cachedInputPrice: 0.1 / 1e6, - minCacheableTokens: 2048, + minCacheableTokens: 4096, requestPrice: 0, discount: 0.3, contextSize: 200000, @@ -463,7 +446,7 @@ export const anthropicModels = [ inputPrice: 1.0 / 1e6, outputPrice: 5.0 / 1e6, cachedInputPrice: 0.1 / 1e6, - minCacheableTokens: 2048, + minCacheableTokens: 4096, requestPrice: 0, contextSize: 200000, maxOutput: 64000, @@ -480,7 +463,7 @@ export const anthropicModels = [ inputPrice: 1.0 / 1e6, outputPrice: 5.0 / 1e6, cachedInputPrice: 0.1 / 1e6, - minCacheableTokens: 2048, + minCacheableTokens: 4096, requestPrice: 0, discount: 0.3, contextSize: 200000, @@ -723,21 +706,8 @@ export const anthropicModels = [ inputPrice: 0.25 / 1e6, outputPrice: 1.25 / 1e6, cachedInputPrice: 0.03 / 1e6, - minCacheableTokens: 2048, - requestPrice: 0, - contextSize: 200000, - maxOutput: 4096, - streaming: true, - vision: true, - tools: true, - }, - { - providerId: "aws-bedrock", - modelName: "anthropic.claude-3-haiku-20240307-v1:0", - inputPrice: 0.25 / 1e6, - outputPrice: 1.25 / 1e6, + minCacheableTokens: 1024, requestPrice: 0, - discount: 0.3, contextSize: 200000, maxOutput: 4096, streaming: true, @@ -760,21 +730,8 @@ export const anthropicModels = [ inputPrice: 0.25 / 1e6, outputPrice: 1.25 / 1e6, cachedInputPrice: 0.03 / 1e6, - minCacheableTokens: 2048, - requestPrice: 0, - contextSize: 200000, - maxOutput: 4096, - streaming: true, - vision: true, - tools: true, - }, - { - providerId: "aws-bedrock", - modelName: "anthropic.claude-3-haiku-20240307-v1:0", - inputPrice: 0.25 / 1e6, - outputPrice: 1.25 / 1e6, + minCacheableTokens: 1024, requestPrice: 0, - discount: 0.3, contextSize: 200000, maxOutput: 4096, streaming: true,