Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

chore(costs): add chatgpt-4o-latest prices (#4407)

Hassieb Pakzad27f5dd837d57
diff --git a/packages/shared/prisma/migrations/20241125124029_add_chatgpt_4o_prices/migration.sql b/packages/shared/prisma/migrations/20241125124029_add_chatgpt_4o_prices/migration.sql
new file mode 100644
index 0000000000..c4eb2b1b94
--- /dev/null
+++ b/packages/shared/prisma/migrations/20241125124029_add_chatgpt_4o_prices/migration.sql
@@ -0,0 +1,25 @@
+INSERT INTO models (
+ id,
+ project_id,
+ model_name,
+ match_pattern,
+ start_date,
+ input_price,
+ output_price,
+ total_price,
+ unit,
+ tokenizer_id,
+ tokenizer_config
+)
+VALUES
+ ('cm3x0p8ev000008kyd96800c8', NULL, 'chatgpt-4o-latest', '(?i)^(chatgpt-4o-latest)$', NULL, 0.000005, 0.000015, NULL, 'TOKENS', 'openai', '{ "tokensPerMessage": 3, "tokensPerName": 1, "tokenizerModel": "gpt-4o" }');
+
+INSERT INTO prices (
+ id,
+ model_id,
+ usage_type,
+ price
+)
+VALUES
+ ('cm3x0psrz000108kydpxg9o2k', 'cm3x0p8ev000008kyd96800c8', 'input', 0.000005),
+ ('cm3x0pyt7000208ky8737gdla', 'cm3x0p8ev000008kyd96800c8', 'output', 0.000015);
diff --git a/worker/src/constants/default-model-prices.json b/worker/src/constants/default-model-prices.json
index 93d8458890..14d9d60b39 100644
--- a/worker/src/constants/default-model-prices.json
+++ b/worker/src/constants/default-model-prices.json
@@ -1160,5 +1160,22 @@
},
"tokenizer_config": null,
"tokenizer_id": "claude"
+ },
+ {
+ "id": "cm3x0p8ev000008kyd96800c8",
+ "model_name": "chatgpt-4o-latest",
+ "match_pattern": "(?i)^(chatgpt-4o-latest)$",
+ "created_at": "2024-11-25T12:47:17.504Z",
+ "updated_at": "2024-11-25T12:47:17.504Z",
+ "prices": {
+ "input": 0.000005,
+ "output": 0.000015
+ },
+ "tokenizer_config": {
+ "tokensPerName": 1,
+ "tokenizerModel": "gpt-4o",
+ "tokensPerMessage": 3
+ },
+ "tokenizer_id": "openai"
}
]