From ff50a47b5b456a86f78e20119d4f24c6546b1aac Mon Sep 17 00:00:00 2001 From: Shariq Riaz Date: Sat, 24 May 2025 15:38:45 +0400 Subject: [PATCH] feat: enable prompt caching for gemini-2.5-flash-preview-05-20 (#3907) * feat: enable prompt caching for gemini-2.5-flash-preview-05-20 * feat: Add cache pricing for gemini-2.5-flash-preview-05-20 models --- src/shared/api.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/shared/api.ts b/src/shared/api.ts index e336d5ce23..b18c795e61 100644 --- a/src/shared/api.ts +++ b/src/shared/api.ts @@ -529,7 +529,7 @@ export const vertexModels = { maxTokens: 65_535, contextWindow: 1_048_576, supportsImages: true, - supportsPromptCache: false, + supportsPromptCache: true, inputPrice: 0.15, outputPrice: 3.5, maxThinkingTokens: 24_576, @@ -540,7 +540,7 @@ export const vertexModels = { maxTokens: 65_535, contextWindow: 1_048_576, supportsImages: true, - supportsPromptCache: false, + supportsPromptCache: true, inputPrice: 0.15, outputPrice: 0.6, }, @@ -772,9 +772,11 @@ export const geminiModels = { maxTokens: 65_535, contextWindow: 1_048_576, supportsImages: true, - supportsPromptCache: false, + supportsPromptCache: true, inputPrice: 0.15, outputPrice: 3.5, + cacheReadsPrice: 0.0375, + cacheWritesPrice: 1.0, maxThinkingTokens: 24_576, supportsReasoningBudget: true, requiredReasoningBudget: true, @@ -783,9 +785,11 @@ export const geminiModels = { maxTokens: 65_535, contextWindow: 1_048_576, supportsImages: true, - supportsPromptCache: false, + supportsPromptCache: true, inputPrice: 0.15, outputPrice: 0.6, + cacheReadsPrice: 0.0375, + cacheWritesPrice: 1.0, }, "gemini-2.5-pro-exp-03-25": { maxTokens: 65_535,