@@ -160,6 +160,8 @@ export const GOOGLE_MODEL_TO_ID: Partial<{ [m in GoogleModel]: string }> = {
160160
161161// https://docs.anthropic.com/claude/docs/models-overview -- stable names for the modesl ...
162162export const ANTHROPIC_MODELS = [
163+ "claude-3-5-sonnet" ,
164+ "claude-3-5-sonnet-4k" , // added 2024-06-24
163165 "claude-3-haiku" ,
164166 "claude-3-haiku-8k" , // limited context window, offered for free
165167 "claude-3-sonnet" ,
@@ -170,12 +172,15 @@ export const ANTHROPIC_MODELS = [
170172const CLAUDE_SONNET_VERSION = "20240229" ;
171173const CLAUDE_HAIKU_VERSION = "20240307" ;
172174const CLAUDE_OPUS_VERSION = "20240229" ;
175+ const CLAUDE_SONNET_3_5_VERSION = "20240620" ;
173176// ... and we add a version number (there is no "*-latest") when dispatching on the backend
174177export const ANTHROPIC_VERSION : { [ name in AnthropicModel ] : string } = {
178+ "claude-3-sonnet-4k" : CLAUDE_SONNET_VERSION ,
175179 "claude-3-opus" : CLAUDE_OPUS_VERSION ,
176180 "claude-3-opus-8k" : CLAUDE_OPUS_VERSION ,
177181 "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 ,
179184 "claude-3-haiku" : CLAUDE_HAIKU_VERSION ,
180185 "claude-3-haiku-8k" : CLAUDE_HAIKU_VERSION ,
181186} as const ;
@@ -228,7 +233,7 @@ export const USER_SELECTABLE_LLMS_BY_VENDOR: {
228233 // we show opus and the context restricted models (to avoid high costs)
229234 return (
230235 m === "claude-3-opus-8k" ||
231- m === "claude-3-sonnet-4k" ||
236+ m === "claude-3-5- sonnet-4k" ||
232237 m === "claude-3-haiku-8k"
233238 ) ;
234239 } ) ,
@@ -709,6 +714,8 @@ export const LLM_USERNAMES: LLM2String = {
709714 "claude-3-haiku-8k" : "Claude 3 Haiku 8k" ,
710715 "claude-3-sonnet" : "Claude 3 Sonnet" ,
711716 "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" ,
712719 "claude-3-opus" : "Claude 3 Opus 200k" ,
713720 "claude-3-opus-8k" : "Claude 3 Opus 8k" ,
714721} as const ;
@@ -758,14 +765,18 @@ export const LLM_DESCR: LLM2String = {
758765 "Fastest model, lightweight actions (Anthropic, 200k token context)" ,
759766 "claude-3-haiku-8k" :
760767 "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)" ,
761772 "claude-3-sonnet" :
762773 "Best combination of performance and speed (Anthropic, 200k token context)" ,
763774 "claude-3-sonnet-4k" :
764775 "Best combination of performance and speed (Anthropic, 4k token context)" ,
765776 "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)" ,
767778 "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)" ,
769780} as const ;
770781
771782export function isFreeModel ( model : unknown , isCoCalcCom : boolean ) : boolean {
@@ -969,6 +980,18 @@ export const LLM_COST: { [name in LanguageModelCore]: Cost } = {
969980 max_tokens : 200_000 ,
970981 free : false ,
971982 } ,
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+ } ,
972995 "claude-3-sonnet-4k" : {
973996 prompt_tokens : usd1Mtokens ( 3 ) ,
974997 completion_tokens : usd1Mtokens ( 15 ) ,
0 commit comments