diff --git a/README.md b/README.md index 2bfd0da4..3554277e 100644 --- a/README.md +++ b/README.md @@ -60,8 +60,6 @@ You can update the used quota using the API key of any token, allowing other con - [feat: 支持 replicate chat models #1989](https://github.com/songquanpeng/one-api/pull/1989) -![](https://s3.laisky.com/uploads/2024/12/oneapi-replicate-3.png) - ## Bug fix ### The token balance cannot be edited diff --git a/relay/adaptor/openai/constants.go b/relay/adaptor/openai/constants.go index cbdc92f1..ab4b777f 100644 --- a/relay/adaptor/openai/constants.go +++ b/relay/adaptor/openai/constants.go @@ -18,6 +18,7 @@ var ModelList = []string{ "dall-e-2", "dall-e-3", "whisper-1", "tts-1", "tts-1-1106", "tts-1-hd", "tts-1-hd-1106", + "o1", "o1-2024-12-17", "o1-preview", "o1-preview-2024-09-12", "o1-mini", "o1-mini-2024-09-12", } diff --git a/relay/billing/ratio/model.go b/relay/billing/ratio/model.go index 2afa9717..f58219ef 100644 --- a/relay/billing/ratio/model.go +++ b/relay/billing/ratio/model.go @@ -49,7 +49,9 @@ var ModelRatio = map[string]float64{ "gpt-3.5-turbo-instruct": 0.75, // $0.0015 / 1K tokens "gpt-3.5-turbo-1106": 0.5, // $0.001 / 1K tokens "gpt-3.5-turbo-0125": 0.25, // $0.0005 / 1K tokens - "o1-preview": 7.5, // $15.00 / 1M input tokens + "o1": 7.5, // $15.00 / 1M input tokens + "o1-2024-12-17": 7.5, + "o1-preview": 7.5, // $15.00 / 1M input tokens "o1-preview-2024-09-12": 7.5, "o1-mini": 1.5, // $3.00 / 1M input tokens "o1-mini-2024-09-12": 1.5, @@ -397,10 +399,8 @@ func GetCompletionRatio(name string, channelType int) float64 { } return 2 } - if strings.HasPrefix(name, "o1-preview") { - return 4 - } - if strings.HasPrefix(name, "o1-mini") { + // including o1, o1-preview, o1-mini + if strings.HasPrefix(name, "o1") { return 4 } if name == "chatgpt-4o-latest" {