From 45299a9aea98933d864573c2cbfcb370869aeba4 Mon Sep 17 00:00:00 2001 From: Peter Dave Hello Date: Wed, 26 Mar 2025 01:07:10 +0800 Subject: [PATCH] Fix the supportsPromptCache value for OpenAI models (#1923) Reference: - https://platform.openai.com/docs/models --- .changeset/mighty-bikes-applaud.md | 5 +++++ src/shared/api.ts | 18 +++++++++--------- 2 files changed, 14 insertions(+), 9 deletions(-) create mode 100644 .changeset/mighty-bikes-applaud.md diff --git a/.changeset/mighty-bikes-applaud.md b/.changeset/mighty-bikes-applaud.md new file mode 100644 index 0000000000..e731f19ed6 --- /dev/null +++ b/.changeset/mighty-bikes-applaud.md @@ -0,0 +1,5 @@ +--- +"roo-cline": patch +--- + +Fix the supportsPromptCache value for OpenAI models diff --git a/src/shared/api.ts b/src/shared/api.ts index a4eb382ef7..fbadd46505 100644 --- a/src/shared/api.ts +++ b/src/shared/api.ts @@ -855,7 +855,7 @@ export const openAiNativeModels = { maxTokens: 100_000, contextWindow: 200_000, supportsImages: false, - supportsPromptCache: false, + supportsPromptCache: true, inputPrice: 1.1, outputPrice: 4.4, reasoningEffort: "medium", @@ -864,7 +864,7 @@ export const openAiNativeModels = { maxTokens: 100_000, contextWindow: 200_000, supportsImages: false, - supportsPromptCache: false, + supportsPromptCache: true, inputPrice: 1.1, outputPrice: 4.4, reasoningEffort: "high", @@ -873,7 +873,7 @@ export const openAiNativeModels = { maxTokens: 100_000, contextWindow: 200_000, supportsImages: false, - supportsPromptCache: false, + supportsPromptCache: true, inputPrice: 1.1, outputPrice: 4.4, reasoningEffort: "low", @@ -882,7 +882,7 @@ export const openAiNativeModels = { maxTokens: 100_000, contextWindow: 200_000, supportsImages: true, - supportsPromptCache: false, + supportsPromptCache: true, inputPrice: 15, outputPrice: 60, }, @@ -890,7 +890,7 @@ export const openAiNativeModels = { maxTokens: 32_768, contextWindow: 128_000, supportsImages: true, - supportsPromptCache: false, + supportsPromptCache: true, inputPrice: 15, outputPrice: 60, }, @@ -898,7 +898,7 @@ export const openAiNativeModels = { maxTokens: 65_536, contextWindow: 128_000, supportsImages: true, - supportsPromptCache: false, + supportsPromptCache: true, inputPrice: 1.1, outputPrice: 4.4, }, @@ -906,7 +906,7 @@ export const openAiNativeModels = { maxTokens: 16_384, contextWindow: 128_000, supportsImages: true, - supportsPromptCache: false, + supportsPromptCache: true, inputPrice: 75, outputPrice: 150, }, @@ -914,7 +914,7 @@ export const openAiNativeModels = { maxTokens: 16_384, contextWindow: 128_000, supportsImages: true, - supportsPromptCache: false, + supportsPromptCache: true, inputPrice: 2.5, outputPrice: 10, }, @@ -922,7 +922,7 @@ export const openAiNativeModels = { maxTokens: 16_384, contextWindow: 128_000, supportsImages: true, - supportsPromptCache: false, + supportsPromptCache: true, inputPrice: 0.15, outputPrice: 0.6, },