From b2e4623559253e3f17915aaa45632a5b1d31536d Mon Sep 17 00:00:00 2001 From: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com> Date: Wed, 5 Feb 2025 10:49:55 -0800 Subject: [PATCH] Add new gemini models (#1656) * Update gemini models * Update changeset --- .changeset/funny-peas-call.md | 5 +++++ src/shared/api.ts | 38 +++++++++++++++++++++++++---------- 2 files changed, 32 insertions(+), 11 deletions(-) create mode 100644 .changeset/funny-peas-call.md diff --git a/.changeset/funny-peas-call.md b/.changeset/funny-peas-call.md new file mode 100644 index 0000000000..e60dc5ca5b --- /dev/null +++ b/.changeset/funny-peas-call.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +Add new gemini models diff --git a/src/shared/api.ts b/src/shared/api.ts index 6c03d8b9f1..18b287d20f 100644 --- a/src/shared/api.ts +++ b/src/shared/api.ts @@ -244,8 +244,24 @@ export const openAiModelInfoSaneDefaults: ModelInfo = { // Gemini // https://ai.google.dev/gemini-api/docs/models/gemini export type GeminiModelId = keyof typeof geminiModels -export const geminiDefaultModelId: GeminiModelId = "gemini-2.0-flash-thinking-exp-1219" +export const geminiDefaultModelId: GeminiModelId = "gemini-2.0-flash-001" export const geminiModels = { + "gemini-2.0-flash-001": { + maxTokens: 8192, + contextWindow: 1_048_576, + supportsImages: true, + supportsPromptCache: false, + inputPrice: 0, + outputPrice: 0, + }, + "gemini-2.0-flash-lite-preview-02-05": { + maxTokens: 8192, + contextWindow: 1_048_576, + supportsImages: true, + supportsPromptCache: false, + inputPrice: 0, + outputPrice: 0, + }, "gemini-2.0-pro-exp-02-05": { maxTokens: 8192, contextWindow: 2_097_152, @@ -255,7 +271,7 @@ export const geminiModels = { outputPrice: 0, }, "gemini-2.0-flash-thinking-exp-01-21": { - maxTokens: 65536, + maxTokens: 65_536, contextWindow: 1_048_576, supportsImages: true, supportsPromptCache: false, @@ -278,14 +294,6 @@ export const geminiModels = { inputPrice: 0, outputPrice: 0, }, - "gemini-exp-1206": { - maxTokens: 8192, - contextWindow: 2_097_152, - supportsImages: true, - supportsPromptCache: false, - inputPrice: 0, - outputPrice: 0, - }, "gemini-1.5-flash-002": { maxTokens: 8192, contextWindow: 1_048_576, @@ -326,6 +334,14 @@ export const geminiModels = { inputPrice: 0, outputPrice: 0, }, + "gemini-exp-1206": { + maxTokens: 8192, + contextWindow: 2_097_152, + supportsImages: true, + supportsPromptCache: false, + inputPrice: 0, + outputPrice: 0, + }, } as const satisfies Record // OpenAI Native @@ -506,4 +522,4 @@ export const liteLlmModelInfoSaneDefaults: ModelInfo = { supportsPromptCache: false, inputPrice: 0, outputPrice: 0, -} +} \ No newline at end of file