diff --git a/relay/adaptor/openai/constants.go b/relay/adaptor/openai/constants.go index 9885ce68..aacdba1a 100644 --- a/relay/adaptor/openai/constants.go +++ b/relay/adaptor/openai/constants.go @@ -9,6 +9,7 @@ var ModelList = []string{ "gpt-4-turbo-preview", "gpt-4-turbo", "gpt-4-turbo-2024-04-09", "gpt-4o", "gpt-4o-2024-05-13", "gpt-4o-2024-08-06", + "chatgpt-4o-latest", "gpt-4o-mini", "gpt-4o-mini-2024-07-18", "gpt-4-vision-preview", "text-embedding-ada-002", "text-embedding-3-small", "text-embedding-3-large", diff --git a/relay/billing/ratio/model.go b/relay/billing/ratio/model.go index 1ee37e8b..029ab60b 100644 --- a/relay/billing/ratio/model.go +++ b/relay/billing/ratio/model.go @@ -34,6 +34,7 @@ var ModelRatio = map[string]float64{ "gpt-4-turbo": 5, // $0.01 / 1K tokens "gpt-4-turbo-2024-04-09": 5, // $0.01 / 1K tokens "gpt-4o": 2.5, // $0.005 / 1K tokens + "chatgpt-4o-latest": 2.5, // $0.005 / 1K tokens "gpt-4o-2024-05-13": 2.5, // $0.005 / 1K tokens "gpt-4o-2024-08-06": 1.25, // $0.0025 / 1K tokens "gpt-4o-mini": 0.075, // $0.00015 / 1K tokens @@ -324,6 +325,9 @@ func GetCompletionRatio(name string, channelType int) float64 { } return 2 } + if name == "chatgpt-4o-latest" { + return 3 + } if strings.HasPrefix(name, "claude-3") { return 5 }