Skip to content

Commit 7fe8d12

Browse files
monotykamarymrubens
authored andcommitted
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.
1 parent 1eb29be commit 7fe8d12

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/shared/api.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -754,6 +754,7 @@ export const openAiNativeModels = {
754754
supportsPromptCache: true,
755755
inputPrice: 2,
756756
outputPrice: 8,
757+
cacheReadsPrice: 0.5,
757758
},
758759
"gpt-4.1-mini": {
759760
maxTokens: 32_768,
@@ -762,6 +763,7 @@ export const openAiNativeModels = {
762763
supportsPromptCache: true,
763764
inputPrice: 0.4,
764765
outputPrice: 1.6,
766+
cacheReadsPrice: 0.1,
765767
},
766768
"gpt-4.1-nano": {
767769
maxTokens: 32_768,
@@ -770,6 +772,7 @@ export const openAiNativeModels = {
770772
supportsPromptCache: true,
771773
inputPrice: 0.1,
772774
outputPrice: 0.4,
775+
cacheReadsPrice: 0.025,
773776
},
774777
"o3-mini": {
775778
maxTokens: 100_000,

0 commit comments

Comments
 (0)