Переглянути джерело

Add Gemini Flash 2.5 05-20 variants for the Vertex provider (#3758)

* feat(api): add gemini-2.5-flash-preview-05-20 model configuration

* feat(tests): update apiModelId to gemini-2.5-flash-preview-05-20 in ProviderSettingsManager tests in case the old version is deprecated

* chore: add changeset

* feat(api): update vertexModels to add gemini-2.5-flash-preview-05-20 variants

* chore: update changeset
Daniel 7 місяців тому
батько
коміт
27e47de3aa

+ 6 - 0
.changeset/clean-taxis-feel.md

@@ -0,0 +1,6 @@
+---
+"roo-cline": patch
+---
+
+Add support for `gemini-2.5-flash-preview-05-20` on the Vertex provider
+Add support for `gemini-2.5-flash-preview-05-20:thinking` on the Vertex provider

+ 1 - 1
src/core/config/__tests__/ProviderSettingsManager.test.ts

@@ -222,7 +222,7 @@ describe("ProviderSettingsManager", () => {
 
 			const newConfig: ProviderSettings = {
 				apiProvider: "vertex",
-				apiModelId: "gemini-2.5-flash-preview-04-17",
+				apiModelId: "gemini-2.5-flash-preview-05-20",
 				vertexKeyFile: "test-key-file",
 			}
 

+ 19 - 0
src/shared/api.ts

@@ -472,6 +472,25 @@ export const openRouterDefaultModelInfo: ModelInfo = {
 export type VertexModelId = keyof typeof vertexModels
 export const vertexDefaultModelId: VertexModelId = "claude-3-7-sonnet@20250219"
 export const vertexModels = {
+	"gemini-2.5-flash-preview-05-20:thinking": {
+		maxTokens: 65_535,
+		contextWindow: 1_048_576,
+		supportsImages: true,
+		supportsPromptCache: false,
+		inputPrice: 0.15,
+		outputPrice: 3.5,
+		thinking: true,
+		maxThinkingTokens: 24_576,
+	},
+	"gemini-2.5-flash-preview-05-20": {
+		maxTokens: 65_535,
+		contextWindow: 1_048_576,
+		supportsImages: true,
+		supportsPromptCache: false,
+		inputPrice: 0.15,
+		outputPrice: 0.6,
+		thinking: false,
+	},
 	"gemini-2.5-flash-preview-04-17:thinking": {
 		maxTokens: 65_535,
 		contextWindow: 1_048_576,