Update OpenAI models and prices #2261 (#2269)

* Update OpenAI models

* Sort OpenAI models by created timestamp in ascending order

* Update OpenAI models price

* uncheck fallback listing (even if old)
closes #2261

* linting

---------

Co-authored-by: Yaner <1468275133@qq.com>
This commit is contained in:
Timothy Carambat 2024-09-11 13:08:10 -07:00 committed by GitHub
parent c612239ecb
commit 43b6ece0a5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -9,10 +9,22 @@ const { RetryError } = require("../error.js");
class OpenAIProvider extends Provider { class OpenAIProvider extends Provider {
model; model;
static COST_PER_TOKEN = { static COST_PER_TOKEN = {
"gpt-3.5-turbo": {
input: 0.0015,
output: 0.002,
},
"gpt-3.5-turbo-16k": {
input: 0.003,
output: 0.004,
},
"gpt-4": { "gpt-4": {
input: 0.03, input: 0.03,
output: 0.06, output: 0.06,
}, },
"gpt-4-turbo": {
input: 0.01,
output: 0.03,
},
"gpt-4o": { "gpt-4o": {
input: 0.005, input: 0.005,
output: 0.015, output: 0.015,
@ -21,13 +33,9 @@ class OpenAIProvider extends Provider {
input: 0.06, input: 0.06,
output: 0.12, output: 0.12,
}, },
"gpt-3.5-turbo": { "gpt-4o-mini": {
input: 0.0015, input: 0.00015,
output: 0.002, output: 0.0006,
},
"gpt-3.5-turbo-16k": {
input: 0.003,
output: 0.004,
}, },
}; };