From 3cd2b18800f6c93dd8fe8aa295bf3bfaaa7b51a9 Mon Sep 17 00:00:00 2001 From: monotykamary Date: Tue, 15 Apr 2025 08:34:39 +0700 Subject: [PATCH] fix(api): update cacheReadsPrice for OpenAI GPT-4.1 models (#2887) Set correct cacheReadsPrice (cached input price) for gpt-4.1, gpt-4.1 mini, and gpt-4.1 nano based on official OpenAI pricing. No changes to cacheWritesPrice as per current OpenAI documentation. This ensures prompt caching costs are accurately reflected for these models in cost calculations. --- src/shared/api.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/shared/api.ts b/src/shared/api.ts index b9984d72..95bbd267 100644 --- a/src/shared/api.ts +++ b/src/shared/api.ts @@ -613,6 +613,7 @@ export const openAiNativeModels = { supportsPromptCache: true, inputPrice: 2, outputPrice: 8, + cacheReadsPrice: 0.5, }, "gpt-4.1-mini": { maxTokens: 32_768, @@ -621,6 +622,7 @@ export const openAiNativeModels = { supportsPromptCache: true, inputPrice: 0.4, outputPrice: 1.6, + cacheReadsPrice: 0.1, }, "gpt-4.1-nano": { maxTokens: 32_768, @@ -629,6 +631,7 @@ export const openAiNativeModels = { supportsPromptCache: true, inputPrice: 0.1, outputPrice: 0.4, + cacheReadsPrice: 0.025, }, "o3-mini": { maxTokens: 100_000,