Skip to content

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

chore(cost-tracking): add support for openai o3 and o4-mini models (#6491)

marliessophiee39dda87f960
diff --git a/packages/shared/src/server/llm/types.ts b/packages/shared/src/server/llm/types.ts
index 3704757011..b89c77cf52 100644
--- a/packages/shared/src/server/llm/types.ts
+++ b/packages/shared/src/server/llm/types.ts
@@ -254,6 +254,10 @@ export type ExperimentMetadata = z.infer<typeof ExperimentMetadataSchema>;
// NOTE: Update docs page when changing this! https://langfuse.com/docs/playground#openai-playground--anthropic-playground
export const openAIModels = [
+ "o3",
+ "o3-2025-04-16",
+ "o4-mini",
+ "o4-mini-2025-04-16",
"gpt-4.1",
"gpt-4.1-2025-04-14",
"gpt-4.1-mini-2025-04-14",
diff --git a/worker/src/constants/default-model-prices.json b/worker/src/constants/default-model-prices.json
index 4682e3d686..d69af1c507 100644
--- a/worker/src/constants/default-model-prices.json
+++ b/worker/src/constants/default-model-prices.json
@@ -1588,5 +1588,73 @@
"tokensPerMessage": 3
},
"tokenizer_id": "openai"
+ },
+ {
+ "id": "cm7wmny967124dhjtb95w8f81",
+ "model_name": "o3",
+ "match_pattern": "(?i)^(o3)$",
+ "created_at": "2025-04-16T23:26:54.132Z",
+ "updated_at": "2025-04-16T23:26:54.132Z",
+ "prices": {
+ "input": 10e-6,
+ "input_cached_tokens": 2.5e-6,
+ "input_cache_read": 2.5e-6,
+ "output": 40e-6,
+ "output_reasoning_tokens": 40e-6,
+ "output_reasoning": 40e-6
+ },
+ "tokenizer_config": null,
+ "tokenizer_id": null
+ },
+ {
+ "id": "cm7wopq3327124dhjtb95w8f81",
+ "model_name": "o3-2025-04-16",
+ "match_pattern": "(?i)^(o3-2025-04-16)$",
+ "created_at": "2025-04-16T23:26:54.132Z",
+ "updated_at": "2025-04-16T23:26:54.132Z",
+ "prices": {
+ "input": 10e-6,
+ "input_cached_tokens": 2.5e-6,
+ "input_cache_read": 2.5e-6,
+ "output": 40e-6,
+ "output_reasoning_tokens": 40e-6,
+ "output_reasoning": 40e-6
+ },
+ "tokenizer_config": null,
+ "tokenizer_id": null
+ },
+ {
+ "id": "cm7wqrs1327124dhjtb95w8f81",
+ "model_name": "o4-mini",
+ "match_pattern": "(?i)^(o4-mini)$",
+ "created_at": "2025-04-16T23:26:54.132Z",
+ "updated_at": "2025-04-16T23:26:54.132Z",
+ "prices": {
+ "input": 1.1e-6,
+ "input_cached_tokens": 0.275e-6,
+ "input_cache_read": 0.275e-6,
+ "output": 4.4e-6,
+ "output_reasoning_tokens": 4.4e-6,
+ "output_reasoning": 4.4e-6
+ },
+ "tokenizer_config": null,
+ "tokenizer_id": null
+ },
+ {
+ "id": "cm7zqrs1327124dhjtb95w8f82",
+ "model_name": "o4-mini-2025-04-16",
+ "match_pattern": "(?i)^(o4-mini-2025-04-16)$",
+ "created_at": "2025-04-16T23:26:54.132Z",
+ "updated_at": "2025-04-16T23:26:54.132Z",
+ "prices": {
+ "input": 1.1e-6,
+ "input_cached_tokens": 0.275e-6,
+ "input_cache_read": 0.275e-6,
+ "output": 4.4e-6,
+ "output_reasoning_tokens": 4.4e-6,
+ "output_reasoning": 4.4e-6
+ },
+ "tokenizer_config": null,
+ "tokenizer_id": null
}
]