@@ -9,6 +9,54 @@ export type ApiHandlerOptions = Omit<ProviderSettings, "apiProvider" | "id">
99export type AnthropicModelId = keyof typeof anthropicModels
1010export const anthropicDefaultModelId : AnthropicModelId = "claude-3-7-sonnet-20250219"
1111export const anthropicModels = {
12+ "claude-sonnet-4-20250514:thinking" : {
13+ maxTokens : 64_000 ,
14+ contextWindow : 200_000 ,
15+ supportsImages : true ,
16+ supportsComputerUse : true ,
17+ supportsPromptCache : true ,
18+ inputPrice : 3.0 , // $3 per million input tokens
19+ outputPrice : 15.0 , // $15 per million output tokens
20+ cacheWritesPrice : 3.75 , // $3.75 per million tokens
21+ cacheReadsPrice : 0.3 , // $0.30 per million tokens
22+ thinking : true ,
23+ } ,
24+ "claude-sonnet-4-20250514" : {
25+ maxTokens : 8192 ,
26+ contextWindow : 200_000 ,
27+ supportsImages : true ,
28+ supportsComputerUse : true ,
29+ supportsPromptCache : true ,
30+ inputPrice : 3.0 , // $3 per million input tokens
31+ outputPrice : 15.0 , // $15 per million output tokens
32+ cacheWritesPrice : 3.75 , // $3.75 per million tokens
33+ cacheReadsPrice : 0.3 , // $0.30 per million tokens
34+ thinking : false ,
35+ } ,
36+ "claude-opus-4-20250514:thinking" : {
37+ maxTokens : 64_000 ,
38+ contextWindow : 200_000 ,
39+ supportsImages : true ,
40+ supportsComputerUse : true ,
41+ supportsPromptCache : true ,
42+ inputPrice : 15.0 , // $15 per million input tokens
43+ outputPrice : 75.0 , // $75 per million output tokens
44+ cacheWritesPrice : 18.75 , // $18.75 per million tokens
45+ cacheReadsPrice : 1.5 , // $1.50 per million tokens
46+ thinking : true ,
47+ } ,
48+ "claude-opus-4-20250514" : {
49+ maxTokens : 8192 ,
50+ contextWindow : 200_000 ,
51+ supportsImages : true ,
52+ supportsComputerUse : true ,
53+ supportsPromptCache : true ,
54+ inputPrice : 15.0 , // $15 per million input tokens
55+ outputPrice : 75.0 , // $75 per million output tokens
56+ cacheWritesPrice : 18.75 , // $18.75 per million tokens
57+ cacheReadsPrice : 1.5 , // $1.50 per million tokens
58+ thinking : false ,
59+ } ,
1260 "claude-3-7-sonnet-20250219:thinking" : {
1361 maxTokens : 128_000 ,
1462 contextWindow : 200_000 ,
@@ -160,6 +208,34 @@ export const bedrockModels = {
160208 maxCachePoints : 1 ,
161209 cachableFields : [ "system" ] ,
162210 } ,
211+ "anthropic.claude-sonnet-4-20250514-v1:0" : {
212+ maxTokens : 8192 ,
213+ contextWindow : 200_000 ,
214+ supportsImages : true ,
215+ supportsComputerUse : true ,
216+ supportsPromptCache : true ,
217+ inputPrice : 3.0 ,
218+ outputPrice : 15.0 ,
219+ cacheWritesPrice : 3.75 ,
220+ cacheReadsPrice : 0.3 ,
221+ minTokensPerCachePoint : 1024 ,
222+ maxCachePoints : 4 ,
223+ cachableFields : [ "system" , "messages" , "tools" ] ,
224+ } ,
225+ "anthropic.claude-opus-4-20250514-v1:0" : {
226+ maxTokens : 8192 ,
227+ contextWindow : 200_000 ,
228+ supportsImages : true ,
229+ supportsComputerUse : true ,
230+ supportsPromptCache : true ,
231+ inputPrice : 15.0 ,
232+ outputPrice : 75.0 ,
233+ cacheWritesPrice : 18.75 ,
234+ cacheReadsPrice : 1.5 ,
235+ minTokensPerCachePoint : 1024 ,
236+ maxCachePoints : 4 ,
237+ cachableFields : [ "system" , "messages" , "tools" ] ,
238+ } ,
163239 "anthropic.claude-3-7-sonnet-20250219-v1:0" : {
164240 maxTokens : 8192 ,
165241 contextWindow : 200_000 ,
@@ -582,6 +658,54 @@ export const vertexModels = {
582658 inputPrice : 1.25 ,
583659 outputPrice : 5 ,
584660 } ,
661+ "claude-sonnet-4-20250514:thinking" : {
662+ maxTokens : 64_000 ,
663+ contextWindow : 200_000 ,
664+ supportsImages : true ,
665+ supportsComputerUse : true ,
666+ supportsPromptCache : true ,
667+ inputPrice : 3.0 ,
668+ outputPrice : 15.0 ,
669+ cacheWritesPrice : 3.75 ,
670+ cacheReadsPrice : 0.3 ,
671+ thinking : true ,
672+ } ,
673+ "claude-sonnet-4-20250514" : {
674+ maxTokens : 8192 ,
675+ contextWindow : 200_000 ,
676+ supportsImages : true ,
677+ supportsComputerUse : true ,
678+ supportsPromptCache : true ,
679+ inputPrice : 3.0 ,
680+ outputPrice : 15.0 ,
681+ cacheWritesPrice : 3.75 ,
682+ cacheReadsPrice : 0.3 ,
683+ thinking : false ,
684+ } ,
685+ "claude-opus-4-20250514:thinking" : {
686+ maxTokens : 64_000 ,
687+ contextWindow : 200_000 ,
688+ supportsImages : true ,
689+ supportsComputerUse : true ,
690+ supportsPromptCache : true ,
691+ inputPrice : 15.0 ,
692+ outputPrice : 75.0 ,
693+ cacheWritesPrice : 18.75 ,
694+ cacheReadsPrice : 1.5 ,
695+ thinking : true ,
696+ } ,
697+ "claude-opus-4-20250514" : {
698+ maxTokens : 8192 ,
699+ contextWindow : 200_000 ,
700+ supportsImages : true ,
701+ supportsComputerUse : true ,
702+ supportsPromptCache : true ,
703+ inputPrice : 15.0 ,
704+ outputPrice : 75.0 ,
705+ cacheWritesPrice : 18.75 ,
706+ cacheReadsPrice : 1.5 ,
707+ thinking : false ,
708+ } ,
585709 "claude-3-7-sonnet@20250219:thinking" : {
586710 maxTokens : 64_000 ,
587711 contextWindow : 200_000 ,
@@ -1797,6 +1921,10 @@ export const PROMPT_CACHING_MODELS = new Set([
17971921 "anthropic/claude-3.7-sonnet" ,
17981922 "anthropic/claude-3.7-sonnet:beta" ,
17991923 "anthropic/claude-3.7-sonnet:thinking" ,
1924+ "anthropic/claude-sonnet-4-20250514" ,
1925+ "anthropic/claude-sonnet-4-20250514:thinking" ,
1926+ "anthropic/claude-opus-4-20250514" ,
1927+ "anthropic/claude-opus-4-20250514:thinking" ,
18001928 "google/gemini-2.5-pro-preview" ,
18011929 "google/gemini-2.5-flash-preview" ,
18021930 "google/gemini-2.5-flash-preview:thinking" ,
@@ -1814,6 +1942,10 @@ export const COMPUTER_USE_MODELS = new Set([
18141942 "anthropic/claude-3.7-sonnet" ,
18151943 "anthropic/claude-3.7-sonnet:beta" ,
18161944 "anthropic/claude-3.7-sonnet:thinking" ,
1945+ "anthropic/claude-sonnet-4-20250514" ,
1946+ "anthropic/claude-sonnet-4-20250514:thinking" ,
1947+ "anthropic/claude-opus-4-20250514" ,
1948+ "anthropic/claude-opus-4-20250514:thinking" ,
18171949] )
18181950
18191951const routerNames = [ "openrouter" , "requesty" , "glama" , "unbound" , "litellm" ] as const
0 commit comments