diff --git a/lib/constants.ts b/lib/constants.ts index 552a3244..3f2de312 100644 --- a/lib/constants.ts +++ b/lib/constants.ts @@ -30,6 +30,8 @@ export const TIKTOKEN_MODEL_MAPPING: Record = { "gpt-4": "cl100k_base", "gpt-4o": "o200k_base", "gpt-4o-2024-05-13": "o200k_base", + "gpt-4o-mini": "o200k_base", + "gpt-4o-mini-2024-07-18": "o200k_base", }; export type LangTraceAttributes = LLMSpanAttributes & @@ -49,6 +51,14 @@ export interface CostTableEntry { // cost per 1000 tokens export const OPENAI_PRICING: Record = { + "gpt-4o-mini": { + input: 0.00015, + output: 0.0006, + }, + "gpt-4o-mini-2024-07-18": { + input: 0.00015, + output: 0.0006, + }, "gpt-4o": { input: 0.005, output: 0.015, diff --git a/lib/types/playground_types.ts b/lib/types/playground_types.ts index c3eb018b..d8e681b0 100644 --- a/lib/types/playground_types.ts +++ b/lib/types/playground_types.ts @@ -6,6 +6,8 @@ export interface Conversation { } export enum OpenAIModel { + "gpt-4o-mini" = "gpt-4o-mini", + "gpt-4o-mini-2024-07-18" = "gpt-4o-mini-2024-07-18", "gpt-4o" = "gpt-4o", "gpt-4o-2024-05-13" = "gpt-4o-2024-05-13", "gpt-4-turbo-preview" = "gpt-4-turbo-preview", @@ -31,6 +33,14 @@ export enum AnthropicModel { } export const openAIModels = [ + { + value: "gpt-4o-mini", + label: "GPT-4 Omni Mini", + }, + { + value: "gpt-4o-mini-2024-07-18", + label: "GPT-4 Omni Mini (2024-07-18)", + }, { value: "gpt-4o", label: "GPT-4 Omni",