Skip to content

Commit dd174b9

Browse files
authored
Merge pull request #795 from RooVetGit/gemini_update
Add new Gemini models
2 parents d3f1098 + 49c21b6 commit dd174b9

File tree

3 files changed

+31
-2
lines changed

3 files changed

+31
-2
lines changed

.changeset/violet-paws-own.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"roo-cline": patch
3+
---
4+
5+
Add new Gemini models

src/api/providers/__tests__/gemini.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ describe("GeminiHandler", () => {
204204
geminiApiKey: "test-key",
205205
})
206206
const modelInfo = invalidHandler.getModel()
207-
expect(modelInfo.id).toBe("gemini-2.0-flash-thinking-exp-01-21") // Default model
207+
expect(modelInfo.id).toBe("gemini-2.0-flash-001") // Default model
208208
})
209209
})
210210
})

src/shared/api.ts

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,8 +429,32 @@ export const openAiModelInfoSaneDefaults: ModelInfo = {
429429
// Gemini
430430
// https://ai.google.dev/gemini-api/docs/models/gemini
431431
export type GeminiModelId = keyof typeof geminiModels
432-
export const geminiDefaultModelId: GeminiModelId = "gemini-2.0-flash-thinking-exp-01-21"
432+
export const geminiDefaultModelId: GeminiModelId = "gemini-2.0-flash-001"
433433
export const geminiModels = {
434+
"gemini-2.0-flash-001": {
435+
maxTokens: 8192,
436+
contextWindow: 1_048_576,
437+
supportsImages: true,
438+
supportsPromptCache: false,
439+
inputPrice: 0,
440+
outputPrice: 0,
441+
},
442+
"gemini-2.0-flash-lite-preview-02-05": {
443+
maxTokens: 8192,
444+
contextWindow: 1_048_576,
445+
supportsImages: true,
446+
supportsPromptCache: false,
447+
inputPrice: 0,
448+
outputPrice: 0,
449+
},
450+
"gemini-2.0-pro-exp-02-05": {
451+
maxTokens: 8192,
452+
contextWindow: 2_097_152,
453+
supportsImages: true,
454+
supportsPromptCache: false,
455+
inputPrice: 0,
456+
outputPrice: 0,
457+
},
434458
"gemini-2.0-flash-thinking-exp-01-21": {
435459
maxTokens: 65_536,
436460
contextWindow: 1_048_576,

0 commit comments

Comments
 (0)