Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 94 additions & 0 deletions packages/models/src/models/anthropic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
],
},
{
Expand Down Expand Up @@ -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,
},
],
},
{
Expand Down Expand Up @@ -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,
},
],
},
{
Expand Down Expand Up @@ -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,
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Don't rely on cachedInputPrice omission to disable Bedrock prompt caching.

Lines 734-746 and 771-783 intentionally drop cached pricing, but the Bedrock request path still falls back minCacheableTokens to 1024 when that field is missing in packages/actions/src/prepare-request-body.ts Lines 1139-1144, then emits cachePoint blocks from that threshold in Lines 1185-1190. For Claude 3 Haiku, cache-controlled requests can still be serialized as prompt-caching even though these mappings are supposed to represent a non-cacheable Bedrock model. Please gate cachePoint generation on an explicit caching capability instead of inferring it from price fields.

Also applies to: 771-783

],
},
{
Expand All @@ -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,
},
],
},
{
Expand Down Expand Up @@ -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[];
Loading