|
|
@@ -9,6 +9,54 @@ export type ApiHandlerOptions = Omit<ProviderSettings, "apiProvider" | "id">
|
|
|
export type AnthropicModelId = keyof typeof anthropicModels
|
|
|
export const anthropicDefaultModelId: AnthropicModelId = "claude-3-7-sonnet-20250219"
|
|
|
export const anthropicModels = {
|
|
|
+ "claude-sonnet-4-20250514:thinking": {
|
|
|
+ maxTokens: 64_000,
|
|
|
+ contextWindow: 200_000,
|
|
|
+ supportsImages: true,
|
|
|
+ supportsComputerUse: true,
|
|
|
+ supportsPromptCache: true,
|
|
|
+ inputPrice: 3.0, // $3 per million input tokens
|
|
|
+ outputPrice: 15.0, // $15 per million output tokens
|
|
|
+ cacheWritesPrice: 3.75, // $3.75 per million tokens
|
|
|
+ cacheReadsPrice: 0.3, // $0.30 per million tokens
|
|
|
+ thinking: true,
|
|
|
+ },
|
|
|
+ "claude-sonnet-4-20250514": {
|
|
|
+ maxTokens: 8192,
|
|
|
+ contextWindow: 200_000,
|
|
|
+ supportsImages: true,
|
|
|
+ supportsComputerUse: true,
|
|
|
+ supportsPromptCache: true,
|
|
|
+ inputPrice: 3.0, // $3 per million input tokens
|
|
|
+ outputPrice: 15.0, // $15 per million output tokens
|
|
|
+ cacheWritesPrice: 3.75, // $3.75 per million tokens
|
|
|
+ cacheReadsPrice: 0.3, // $0.30 per million tokens
|
|
|
+ thinking: false,
|
|
|
+ },
|
|
|
+ "claude-opus-4-20250514:thinking": {
|
|
|
+ maxTokens: 64_000,
|
|
|
+ contextWindow: 200_000,
|
|
|
+ supportsImages: true,
|
|
|
+ supportsComputerUse: true,
|
|
|
+ supportsPromptCache: true,
|
|
|
+ inputPrice: 15.0, // $15 per million input tokens
|
|
|
+ outputPrice: 75.0, // $75 per million output tokens
|
|
|
+ cacheWritesPrice: 18.75, // $18.75 per million tokens
|
|
|
+ cacheReadsPrice: 1.5, // $1.50 per million tokens
|
|
|
+ thinking: true,
|
|
|
+ },
|
|
|
+ "claude-opus-4-20250514": {
|
|
|
+ maxTokens: 8192,
|
|
|
+ contextWindow: 200_000,
|
|
|
+ supportsImages: true,
|
|
|
+ supportsComputerUse: true,
|
|
|
+ supportsPromptCache: true,
|
|
|
+ inputPrice: 15.0, // $15 per million input tokens
|
|
|
+ outputPrice: 75.0, // $75 per million output tokens
|
|
|
+ cacheWritesPrice: 18.75, // $18.75 per million tokens
|
|
|
+ cacheReadsPrice: 1.5, // $1.50 per million tokens
|
|
|
+ thinking: false,
|
|
|
+ },
|
|
|
"claude-3-7-sonnet-20250219:thinking": {
|
|
|
maxTokens: 128_000,
|
|
|
contextWindow: 200_000,
|
|
|
@@ -160,6 +208,34 @@ export const bedrockModels = {
|
|
|
maxCachePoints: 1,
|
|
|
cachableFields: ["system"],
|
|
|
},
|
|
|
+ "anthropic.claude-sonnet-4-20250514-v1:0": {
|
|
|
+ maxTokens: 8192,
|
|
|
+ contextWindow: 200_000,
|
|
|
+ supportsImages: true,
|
|
|
+ supportsComputerUse: true,
|
|
|
+ supportsPromptCache: true,
|
|
|
+ inputPrice: 3.0,
|
|
|
+ outputPrice: 15.0,
|
|
|
+ cacheWritesPrice: 3.75,
|
|
|
+ cacheReadsPrice: 0.3,
|
|
|
+ minTokensPerCachePoint: 1024,
|
|
|
+ maxCachePoints: 4,
|
|
|
+ cachableFields: ["system", "messages", "tools"],
|
|
|
+ },
|
|
|
+ "anthropic.claude-opus-4-20250514-v1:0": {
|
|
|
+ maxTokens: 8192,
|
|
|
+ contextWindow: 200_000,
|
|
|
+ supportsImages: true,
|
|
|
+ supportsComputerUse: true,
|
|
|
+ supportsPromptCache: true,
|
|
|
+ inputPrice: 15.0,
|
|
|
+ outputPrice: 75.0,
|
|
|
+ cacheWritesPrice: 18.75,
|
|
|
+ cacheReadsPrice: 1.5,
|
|
|
+ minTokensPerCachePoint: 1024,
|
|
|
+ maxCachePoints: 4,
|
|
|
+ cachableFields: ["system", "messages", "tools"],
|
|
|
+ },
|
|
|
"anthropic.claude-3-7-sonnet-20250219-v1:0": {
|
|
|
maxTokens: 8192,
|
|
|
contextWindow: 200_000,
|
|
|
@@ -582,6 +658,54 @@ export const vertexModels = {
|
|
|
inputPrice: 1.25,
|
|
|
outputPrice: 5,
|
|
|
},
|
|
|
+ "claude-sonnet-4-20250514:thinking": {
|
|
|
+ maxTokens: 64_000,
|
|
|
+ contextWindow: 200_000,
|
|
|
+ supportsImages: true,
|
|
|
+ supportsComputerUse: true,
|
|
|
+ supportsPromptCache: true,
|
|
|
+ inputPrice: 3.0,
|
|
|
+ outputPrice: 15.0,
|
|
|
+ cacheWritesPrice: 3.75,
|
|
|
+ cacheReadsPrice: 0.3,
|
|
|
+ thinking: true,
|
|
|
+ },
|
|
|
+ "claude-sonnet-4-20250514": {
|
|
|
+ maxTokens: 8192,
|
|
|
+ contextWindow: 200_000,
|
|
|
+ supportsImages: true,
|
|
|
+ supportsComputerUse: true,
|
|
|
+ supportsPromptCache: true,
|
|
|
+ inputPrice: 3.0,
|
|
|
+ outputPrice: 15.0,
|
|
|
+ cacheWritesPrice: 3.75,
|
|
|
+ cacheReadsPrice: 0.3,
|
|
|
+ thinking: false,
|
|
|
+ },
|
|
|
+ "claude-opus-4-20250514:thinking": {
|
|
|
+ maxTokens: 64_000,
|
|
|
+ contextWindow: 200_000,
|
|
|
+ supportsImages: true,
|
|
|
+ supportsComputerUse: true,
|
|
|
+ supportsPromptCache: true,
|
|
|
+ inputPrice: 15.0,
|
|
|
+ outputPrice: 75.0,
|
|
|
+ cacheWritesPrice: 18.75,
|
|
|
+ cacheReadsPrice: 1.5,
|
|
|
+ thinking: true,
|
|
|
+ },
|
|
|
+ "claude-opus-4-20250514": {
|
|
|
+ maxTokens: 8192,
|
|
|
+ contextWindow: 200_000,
|
|
|
+ supportsImages: true,
|
|
|
+ supportsComputerUse: true,
|
|
|
+ supportsPromptCache: true,
|
|
|
+ inputPrice: 15.0,
|
|
|
+ outputPrice: 75.0,
|
|
|
+ cacheWritesPrice: 18.75,
|
|
|
+ cacheReadsPrice: 1.5,
|
|
|
+ thinking: false,
|
|
|
+ },
|
|
|
"claude-3-7-sonnet@20250219:thinking": {
|
|
|
maxTokens: 64_000,
|
|
|
contextWindow: 200_000,
|
|
|
@@ -1797,6 +1921,10 @@ export const PROMPT_CACHING_MODELS = new Set([
|
|
|
"anthropic/claude-3.7-sonnet",
|
|
|
"anthropic/claude-3.7-sonnet:beta",
|
|
|
"anthropic/claude-3.7-sonnet:thinking",
|
|
|
+ "anthropic/claude-sonnet-4-20250514",
|
|
|
+ "anthropic/claude-sonnet-4-20250514:thinking",
|
|
|
+ "anthropic/claude-opus-4-20250514",
|
|
|
+ "anthropic/claude-opus-4-20250514:thinking",
|
|
|
"google/gemini-2.5-pro-preview",
|
|
|
"google/gemini-2.5-flash-preview",
|
|
|
"google/gemini-2.5-flash-preview:thinking",
|
|
|
@@ -1814,6 +1942,10 @@ export const COMPUTER_USE_MODELS = new Set([
|
|
|
"anthropic/claude-3.7-sonnet",
|
|
|
"anthropic/claude-3.7-sonnet:beta",
|
|
|
"anthropic/claude-3.7-sonnet:thinking",
|
|
|
+ "anthropic/claude-sonnet-4-20250514",
|
|
|
+ "anthropic/claude-sonnet-4-20250514:thinking",
|
|
|
+ "anthropic/claude-opus-4-20250514",
|
|
|
+ "anthropic/claude-opus-4-20250514:thinking",
|
|
|
])
|
|
|
|
|
|
const routerNames = ["openrouter", "requesty", "glama", "unbound", "litellm"] as const
|