From cbfc983dc303bd93f09d1c7fa1f248c09dd97105 Mon Sep 17 00:00:00 2001 From: "Laisky.Cai" Date: Sat, 9 Nov 2024 22:48:54 +0800 Subject: [PATCH] feat: add new claude models (#1910) * feat: Add new models to ModelList in constants.go * feat: update model lists and mappings for Claude 3.5 versions --------- Co-authored-by: JustSong <39998050+songquanpeng@users.noreply.github.com> --- relay/adaptor/anthropic/constants.go | 2 ++ relay/adaptor/aws/claude/main.go | 5 +++-- relay/adaptor/groq/constants.go | 3 +++ relay/adaptor/vertexai/claude/adapter.go | 7 ++++++- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/relay/adaptor/anthropic/constants.go b/relay/adaptor/anthropic/constants.go index 393264433a..cb574706d4 100644 --- a/relay/adaptor/anthropic/constants.go +++ b/relay/adaptor/anthropic/constants.go @@ -8,4 +8,6 @@ var ModelList = []string{ "claude-3-opus-20240229", "claude-3-5-sonnet-20240620", "claude-3-5-sonnet-20241022", + "claude-3-5-sonnet-latest", + "claude-3-5-haiku-20241022", } diff --git a/relay/adaptor/aws/claude/main.go b/relay/adaptor/aws/claude/main.go index 20de7038a0..3fe3dfd8fa 100644 --- a/relay/adaptor/aws/claude/main.go +++ b/relay/adaptor/aws/claude/main.go @@ -29,11 +29,12 @@ var AwsModelIDMap = map[string]string{ "claude-instant-1.2": "anthropic.claude-instant-v1", "claude-2.0": "anthropic.claude-v2", "claude-2.1": "anthropic.claude-v2:1", + "claude-3-haiku-20240307": "anthropic.claude-3-haiku-20240307-v1:0", "claude-3-sonnet-20240229": "anthropic.claude-3-sonnet-20240229-v1:0", + "claude-3-opus-20240229": "anthropic.claude-3-opus-20240229-v1:0", "claude-3-5-sonnet-20240620": "anthropic.claude-3-5-sonnet-20240620-v1:0", "claude-3-5-sonnet-20241022": "anthropic.claude-3-5-sonnet-20241022-v2:0", - "claude-3-opus-20240229": "anthropic.claude-3-opus-20240229-v1:0", - "claude-3-haiku-20240307": "anthropic.claude-3-haiku-20240307-v1:0", + "claude-3-5-sonnet-latest": "anthropic.claude-3-5-sonnet-20241022-v2:0", "claude-3-5-haiku-20241022": "anthropic.claude-3-5-haiku-20241022-v1:0", } diff --git a/relay/adaptor/groq/constants.go b/relay/adaptor/groq/constants.go index 9c19df393d..0864ebe75e 100644 --- a/relay/adaptor/groq/constants.go +++ b/relay/adaptor/groq/constants.go @@ -11,7 +11,9 @@ var ModelList = []string{ "llama-3.2-11b-vision-preview", "llama-3.2-1b-preview", "llama-3.2-3b-preview", + "llama-3.2-11b-vision-preview", "llama-3.2-90b-text-preview", + "llama-3.2-90b-vision-preview", "llama-guard-3-8b", "llama3-70b-8192", "llama3-8b-8192", @@ -21,4 +23,5 @@ var ModelList = []string{ "mixtral-8x7b-32768", "distil-whisper-large-v3-en", "whisper-large-v3", + "whisper-large-v3-turbo", } diff --git a/relay/adaptor/vertexai/claude/adapter.go b/relay/adaptor/vertexai/claude/adapter.go index b39e2ddab1..cb911cfea0 100644 --- a/relay/adaptor/vertexai/claude/adapter.go +++ b/relay/adaptor/vertexai/claude/adapter.go @@ -13,7 +13,12 @@ import ( ) var ModelList = []string{ - "claude-3-haiku@20240307", "claude-3-opus@20240229", "claude-3-5-sonnet@20240620", "claude-3-sonnet@20240229", + "claude-3-haiku@20240307", + "claude-3-sonnet@20240229", + "claude-3-opus@20240229", + "claude-3-5-sonnet@20240620", + "claude-3-5-sonnet-v2@20241022", + "claude-3-5-haiku@20241022", } const anthropicVersion = "vertex-2023-10-16"