Add Claude Opus 4.5 (#7648)

This commit is contained in:
Saoud Rizwan authored and GitHub committed 2025-11-24 13:33:31 -08:00
1 parent 41ebe7c9d1
commit a017f3dfd3
15 files changed
+69 -20

No files matched your search

+1
View File
@@ -70,6 +70,7 @@ export class AnthropicHandler implements ApiHandler {
case "claude-3-7-sonnet-20250219":
case "claude-3-5-sonnet-20241022":
case "claude-3-5-haiku-20241022":
case "claude-opus-4-5-20251101":
case "claude-opus-4-20250514":
case "claude-opus-4-1-20250805":
case "claude-3-opus-20240229":
+1
View File
@@ -95,6 +95,7 @@ export class VertexHandler implements ApiHandler {
case "claude-haiku-4-5@20251001":
case "claude-sonnet-4-5@20250929":
case "claude-sonnet-4@20250514":
case "claude-opus-4-5@20251101":
case "claude-opus-4-1@20250805":
case "claude-opus-4@20250514":
case "claude-3-7-sonnet@20250219":
@@ -44,6 +44,7 @@ export async function createOpenRouterStream(
case "anthropic/claude-sonnet-4.5":
case "anthropic/claude-4.5-sonnet": // OpenRouter accidentally included this in model list for a brief moment, and users may be using this model id. And to support prompt caching, we need to add it here.
case "anthropic/claude-sonnet-4":
case "anthropic/claude-opus-4.5":
case "anthropic/claude-opus-4.1":
case "anthropic/claude-opus-4":
case "anthropic/claude-3.7-sonnet":
@@ -107,6 +108,7 @@ export async function createOpenRouterStream(
case "anthropic/claude-sonnet-4.5":
case "anthropic/claude-4.5-sonnet":
case "anthropic/claude-sonnet-4":
case "anthropic/claude-opus-4.5":
case "anthropic/claude-opus-4.1":
case "anthropic/claude-opus-4":
case "anthropic/claude-3.7-sonnet":
@@ -151,6 +153,7 @@ export async function createOpenRouterStream(
case "anthropic/claude-sonnet-4.5":
case "anthropic/claude-4.5-sonnet":
case "anthropic/claude-sonnet-4":
case "anthropic/claude-opus-4.5":
case "anthropic/claude-opus-4.1":
case "anthropic/claude-opus-4":
case "anthropic/claude-3.7-sonnet":
@@ -134,6 +134,11 @@ export async function refreshOpenRouterModels(controller: Controller): Promise<R
modelInfo.cacheWritesPrice = 3.75
modelInfo.cacheReadsPrice = 0.3
break
case "anthropic/claude-opus-4.5":
modelInfo.supportsPromptCache = true
modelInfo.cacheWritesPrice = 6.25
modelInfo.cacheReadsPrice = 0.5
break
case "anthropic/claude-opus-4.1":
case "anthropic/claude-opus-4":
modelInfo.supportsPromptCache = true
+35
View File
@@ -362,6 +362,16 @@ export const anthropicModels = {
cacheReadsPrice: 0.3,
tiers: CLAUDE_SONNET_1M_TIERS,
},
"claude-opus-4-5-20251101": {
maxTokens: 8192,
contextWindow: 200_000,
supportsImages: true,
supportsPromptCache: true,
inputPrice: 5.0,
outputPrice: 25.0,
cacheWritesPrice: 6.25,
cacheReadsPrice: 0.5,
},
"claude-opus-4-1-20250805": {
maxTokens: 8192,
contextWindow: 200_000,
@@ -465,6 +475,11 @@ export const claudeCodeModels = {
supportsImages: false,
supportsPromptCache: false,
},
"claude-opus-4-5-20251101": {
...anthropicModels["claude-opus-4-5-20251101"],
supportsImages: false,
supportsPromptCache: false,
},
"claude-opus-4-1-20250805": {
...anthropicModels["claude-opus-4-1-20250805"],
supportsImages: false,
@@ -548,6 +563,16 @@ export const bedrockModels = {
cacheReadsPrice: 0.3,
tiers: CLAUDE_SONNET_1M_TIERS,
},
"anthropic.claude-opus-4-5-20251101-v1:0": {
maxTokens: 8192,
contextWindow: 200_000,
supportsImages: true,
supportsPromptCache: true,
inputPrice: 5.0,
outputPrice: 25.0,
cacheWritesPrice: 6.25,
cacheReadsPrice: 0.5,
},
"anthropic.claude-opus-4-20250514-v1:0": {
maxTokens: 8192,
contextWindow: 200_000,
@@ -878,6 +903,16 @@ export const vertexModels = {
cacheWritesPrice: 1.25,
cacheReadsPrice: 0.1,
},
"claude-opus-4-5@20251101": {
maxTokens: 8192,
contextWindow: 200_000,
supportsImages: true,
supportsPromptCache: true,
inputPrice: 5.0,
outputPrice: 25.0,
cacheWritesPrice: 6.25,
cacheReadsPrice: 0.5,
},
"claude-opus-4-1@20250805": {
maxTokens: 8192,
contextWindow: 200_000,