Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
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
13 changes: 13 additions & 0 deletions packages/types/src/providers/anthropic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,19 @@ export const anthropicModels = {
cacheWritesPrice: 0.3,
cacheReadsPrice: 0.03,
},
"claude-haiku-4-5-20251001": {
maxTokens: 64_000,
contextWindow: 200_000,
supportsImages: true,
supportsPromptCache: true,
inputPrice: 1.0,
outputPrice: 5.0,
cacheWritesPrice: 1.25,
cacheReadsPrice: 0.1,
supportsReasoningBudget: true,
description:
"Claude Haiku 4.5 delivers near-frontier intelligence at lightning speeds with extended thinking, vision, and multilingual support.",
},
} as const satisfies Record<string, ModelInfo>

export const ANTHROPIC_DEFAULT_MAX_TOKENS = 8192
13 changes: 13 additions & 0 deletions packages/types/src/providers/bedrock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,19 @@ export const bedrockModels = {
maxCachePoints: 4,
cachableFields: ["system", "messages", "tools"],
},
"anthropic.claude-haiku-4-5-20251001-v1:0": {
maxTokens: 8192,
contextWindow: 200_000,
supportsImages: true,
supportsPromptCache: true,
inputPrice: 1.0,
outputPrice: 5.0,
cacheWritesPrice: 1.25, // 5m cache writes
cacheReadsPrice: 0.1, // cache hits / refreshes
minTokensPerCachePoint: 2048,
maxCachePoints: 4,
cachableFields: ["system", "messages", "tools"],
},
"anthropic.claude-3-5-sonnet-20240620-v1:0": {
maxTokens: 8192,
contextWindow: 200_000,
Expand Down
8 changes: 8 additions & 0 deletions packages/types/src/providers/claude-code.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,12 @@ export const claudeCodeModels = {
supportsReasoningBudget: false,
requiredReasoningBudget: false,
},
"claude-haiku-4-5-20251001": {
...anthropicModels["claude-haiku-4-5-20251001"],
supportsImages: false,
supportsPromptCache: true, // Claude Code does report cache tokens
supportsReasoningEffort: false,
supportsReasoningBudget: false,
requiredReasoningBudget: false,
},
} as const satisfies Record<string, ModelInfo>
11 changes: 11 additions & 0 deletions packages/types/src/providers/vertex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,17 @@ export const vertexModels = {
cacheReadsPrice: 0.3,
supportsReasoningBudget: true,
},
"claude-haiku-4-5@20251001": {
maxTokens: 8192,
contextWindow: 200_000,
supportsImages: true,
supportsPromptCache: true,
inputPrice: 1.0,
outputPrice: 5.0,
cacheWritesPrice: 1.25,
cacheReadsPrice: 0.1,
supportsReasoningBudget: true,
},
"claude-opus-4-1@20250805": {
maxTokens: 8192,
contextWindow: 200_000,
Expand Down
2 changes: 2 additions & 0 deletions src/api/providers/anthropic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export class AnthropicHandler extends BaseProvider implements SingleCompletionHa
case "claude-3-5-sonnet-20241022":
case "claude-3-5-haiku-20241022":
case "claude-3-opus-20240229":
case "claude-haiku-4-5-20251001":
case "claude-3-haiku-20240307": {
/**
* The latest message will be the new user message, one before
Expand Down Expand Up @@ -122,6 +123,7 @@ export class AnthropicHandler extends BaseProvider implements SingleCompletionHa
case "claude-3-5-sonnet-20241022":
case "claude-3-5-haiku-20241022":
case "claude-3-opus-20240229":
case "claude-haiku-4-5-20251001":
case "claude-3-haiku-20240307":
betas.push("prompt-caching-2024-07-31")
return { headers: { "anthropic-beta": betas.join(",") } }
Expand Down