@@ -160,6 +160,8 @@ export const GOOGLE_MODEL_TO_ID: Partial<{ [m in GoogleModel]: string }> = {
160
160
161
161
// https://docs.anthropic.com/claude/docs/models-overview -- stable names for the modesl ...
162
162
export const ANTHROPIC_MODELS = [
163
+ "claude-3-5-sonnet" ,
164
+ "claude-3-5-sonnet-4k" , // added 2024-06-24
163
165
"claude-3-haiku" ,
164
166
"claude-3-haiku-8k" , // limited context window, offered for free
165
167
"claude-3-sonnet" ,
@@ -170,12 +172,15 @@ export const ANTHROPIC_MODELS = [
170
172
const CLAUDE_SONNET_VERSION = "20240229" ;
171
173
const CLAUDE_HAIKU_VERSION = "20240307" ;
172
174
const CLAUDE_OPUS_VERSION = "20240229" ;
175
+ const CLAUDE_SONNET_3_5_VERSION = "20240620" ;
173
176
// ... and we add a version number (there is no "*-latest") when dispatching on the backend
174
177
export const ANTHROPIC_VERSION : { [ name in AnthropicModel ] : string } = {
178
+ "claude-3-sonnet-4k" : CLAUDE_SONNET_VERSION ,
175
179
"claude-3-opus" : CLAUDE_OPUS_VERSION ,
176
180
"claude-3-opus-8k" : CLAUDE_OPUS_VERSION ,
177
181
"claude-3-sonnet" : CLAUDE_SONNET_VERSION ,
178
- "claude-3-sonnet-4k" : CLAUDE_SONNET_VERSION ,
182
+ "claude-3-5-sonnet" : CLAUDE_SONNET_3_5_VERSION ,
183
+ "claude-3-5-sonnet-4k" : CLAUDE_SONNET_3_5_VERSION ,
179
184
"claude-3-haiku" : CLAUDE_HAIKU_VERSION ,
180
185
"claude-3-haiku-8k" : CLAUDE_HAIKU_VERSION ,
181
186
} as const ;
@@ -228,7 +233,7 @@ export const USER_SELECTABLE_LLMS_BY_VENDOR: {
228
233
// we show opus and the context restricted models (to avoid high costs)
229
234
return (
230
235
m === "claude-3-opus-8k" ||
231
- m === "claude-3-sonnet-4k" ||
236
+ m === "claude-3-5- sonnet-4k" ||
232
237
m === "claude-3-haiku-8k"
233
238
) ;
234
239
} ) ,
@@ -709,6 +714,8 @@ export const LLM_USERNAMES: LLM2String = {
709
714
"claude-3-haiku-8k" : "Claude 3 Haiku 8k" ,
710
715
"claude-3-sonnet" : "Claude 3 Sonnet" ,
711
716
"claude-3-sonnet-4k" : "Claude 3 Sonnet 4k" ,
717
+ "claude-3-5-sonnet" : "Claude 3.5 Sonnet" ,
718
+ "claude-3-5-sonnet-4k" : "Claude 3.5 Sonnet 4k" ,
712
719
"claude-3-opus" : "Claude 3 Opus 200k" ,
713
720
"claude-3-opus-8k" : "Claude 3 Opus 8k" ,
714
721
} as const ;
@@ -758,14 +765,18 @@ export const LLM_DESCR: LLM2String = {
758
765
"Fastest model, lightweight actions (Anthropic, 200k token context)" ,
759
766
"claude-3-haiku-8k" :
760
767
"Fastest model, lightweight actions (Anthropic, 8k token context)" ,
768
+ "claude-3-5-sonnet" :
769
+ "Our most intelligent model (Anthropic, 200k token context)" ,
770
+ "claude-3-5-sonnet-4k" :
771
+ "Our most intelligent model (Anthropic, 4k token context)" ,
761
772
"claude-3-sonnet" :
762
773
"Best combination of performance and speed (Anthropic, 200k token context)" ,
763
774
"claude-3-sonnet-4k" :
764
775
"Best combination of performance and speed (Anthropic, 4k token context)" ,
765
776
"claude-3-opus" :
766
- "Most intelligent, complex analysis, higher-order math and coding (Anthropic, 200k token context)" ,
777
+ "Excels at writing and complex tasks (Anthropic, 200k token context)" ,
767
778
"claude-3-opus-8k" :
768
- "Most intelligent, complex analysis, higher-order math and coding (Anthropic, 8k token context)" ,
779
+ "Excels at writing and complex tasks (Anthropic, 8k token context)" ,
769
780
} as const ;
770
781
771
782
export function isFreeModel ( model : unknown , isCoCalcCom : boolean ) : boolean {
@@ -969,6 +980,18 @@ export const LLM_COST: { [name in LanguageModelCore]: Cost } = {
969
980
max_tokens : 200_000 ,
970
981
free : false ,
971
982
} ,
983
+ "claude-3-5-sonnet" : {
984
+ prompt_tokens : usd1Mtokens ( 3 ) ,
985
+ completion_tokens : usd1Mtokens ( 15 ) ,
986
+ max_tokens : 4_000 , // limited to 4k tokens, offered for free
987
+ free : false ,
988
+ } ,
989
+ "claude-3-5-sonnet-4k" : {
990
+ prompt_tokens : usd1Mtokens ( 3 ) ,
991
+ completion_tokens : usd1Mtokens ( 15 ) ,
992
+ max_tokens : 4_000 , // limited to 4k tokens, offered for free
993
+ free : false ,
994
+ } ,
972
995
"claude-3-sonnet-4k" : {
973
996
prompt_tokens : usd1Mtokens ( 3 ) ,
974
997
completion_tokens : usd1Mtokens ( 15 ) ,
0 commit comments