From c844786a7f33a17276031f9cb09281d69cc8d264 Mon Sep 17 00:00:00 2001 From: DarkSky <25152247+darkskygit@users.noreply.github.com> Date: Wed, 18 Jun 2025 12:42:19 +0800 Subject: [PATCH] chore(server): bump gemini to ga version (#12845) ## Summary by CodeRabbit - **Chores** - Updated Gemini model identifiers from preview versions to their latest stable versions across prompts and provider configurations. This ensures continued compatibility and access to the latest Gemini 2.5 Flash and Pro models. No changes to user-facing features or prompt content. --- .../src/__tests__/mocks/copilot.mock.ts | 2 +- .../src/plugins/copilot/prompt/prompts.ts | 32 +++++++++---------- .../copilot/providers/gemini/generative.ts | 4 +-- .../copilot/providers/gemini/vertex.ts | 4 +-- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/packages/backend/server/src/__tests__/mocks/copilot.mock.ts b/packages/backend/server/src/__tests__/mocks/copilot.mock.ts index b5d5a2c1e..c736f85bd 100644 --- a/packages/backend/server/src/__tests__/mocks/copilot.mock.ts +++ b/packages/backend/server/src/__tests__/mocks/copilot.mock.ts @@ -94,7 +94,7 @@ export class MockCopilotProvider extends OpenAIProvider { ], }, { - id: 'gemini-2.5-flash-preview-05-20', + id: 'gemini-2.5-flash', capabilities: [ { input: [ModelInputType.Text, ModelInputType.Image], diff --git a/packages/backend/server/src/plugins/copilot/prompt/prompts.ts b/packages/backend/server/src/plugins/copilot/prompt/prompts.ts index e18917e34..39c9e5400 100644 --- a/packages/backend/server/src/plugins/copilot/prompt/prompts.ts +++ b/packages/backend/server/src/plugins/copilot/prompt/prompts.ts @@ -303,7 +303,7 @@ const textActions: Prompt[] = [ { name: 'Transcript audio', action: 'Transcript audio', - model: 'gemini-2.5-flash-preview-05-20', + model: 'gemini-2.5-flash', messages: [ { role: 'system', @@ -539,7 +539,7 @@ A concise paragraph that captures the article's main argument and key conclusion { name: 'Explain this code', action: 'Explain this code', - model: 'gemini-2.5-flash-preview-05-20', + model: 'gemini-2.5-flash', messages: [ { role: 'system', @@ -590,7 +590,7 @@ A concise paragraph that captures the article's main argument and key conclusion { name: 'Translate to', action: 'Translate', - model: 'gemini-2.5-flash-preview-05-20', + model: 'gemini-2.5-flash', messages: [ { role: 'system', @@ -714,7 +714,7 @@ You are an assistant helping find actions of meeting summary. Use this format, r { name: 'Write an article about this', action: 'Write an article about this', - model: 'gemini-2.5-flash-preview-05-20', + model: 'gemini-2.5-flash', messages: [ { role: 'system', @@ -806,7 +806,7 @@ You are an assistant helping find actions of meeting summary. Use this format, r { name: 'Write a poem about this', action: 'Write a poem about this', - model: 'gemini-2.5-flash-preview-05-20', + model: 'gemini-2.5-flash', messages: [ { role: 'system', @@ -855,7 +855,7 @@ You are an assistant helping find actions of meeting summary. Use this format, r { name: 'Write a blog post about this', action: 'Write a blog post about this', - model: 'gemini-2.5-flash-preview-05-20', + model: 'gemini-2.5-flash', messages: [ { role: 'system', @@ -906,7 +906,7 @@ You are an assistant helping find actions of meeting summary. Use this format, r { name: 'Write outline', action: 'Write outline', - model: 'gemini-2.5-flash-preview-05-20', + model: 'gemini-2.5-flash', messages: [ { role: 'system', @@ -980,7 +980,7 @@ You are an assistant helping find actions of meeting summary. Use this format, r { name: 'Brainstorm ideas about this', action: 'Brainstorm ideas about this', - model: 'gemini-2.5-flash-preview-05-20', + model: 'gemini-2.5-flash', messages: [ { role: 'system', @@ -1074,7 +1074,7 @@ You are an assistant helping find actions of meeting summary. Use this format, r { name: 'Improve writing for it', action: 'Improve writing for it', - model: 'gemini-2.5-flash-preview-05-20', + model: 'gemini-2.5-flash', messages: [ { role: 'system', @@ -1146,7 +1146,7 @@ The output must be perfect. Adherence to every detail of these instructions is n { name: 'Fix spelling for it', action: 'Fix spelling for it', - model: 'gemini-2.5-flash-preview-05-20', + model: 'gemini-2.5-flash', messages: [ { role: 'system', @@ -1300,7 +1300,7 @@ If there are items in the content that can be used as to-do tasks, please refer { name: 'Create headings', action: 'Create headings', - model: 'gemini-2.5-flash-preview-05-20', + model: 'gemini-2.5-flash', messages: [ { role: 'system', @@ -1408,7 +1408,7 @@ When sent new notes, respond ONLY with the contents of the html file.`, { name: 'Make it longer', action: 'Make it longer', - model: 'gemini-2.5-flash-preview-05-20', + model: 'gemini-2.5-flash', messages: [ { role: 'system', @@ -1433,7 +1433,7 @@ When sent new notes, respond ONLY with the contents of the html file.`, { name: 'Make it shorter', action: 'Make it shorter', - model: 'gemini-2.5-flash-preview-05-20', + model: 'gemini-2.5-flash', messages: [ { role: 'system', @@ -1458,7 +1458,7 @@ When sent new notes, respond ONLY with the contents of the html file.`, { name: 'Continue writing', action: 'Continue writing', - model: 'gemini-2.5-flash-preview-05-20', + model: 'gemini-2.5-flash', messages: [ { role: 'system', @@ -1654,8 +1654,8 @@ const CHAT_PROMPT: Omit = { 'claude-sonnet-4-20250514', 'claude-3-7-sonnet-20250219', 'claude-3-5-sonnet-20241022', - 'gemini-2.5-flash-preview-05-20', - 'gemini-2.5-pro-preview-06-05', + 'gemini-2.5-flash', + 'gemini-2.5-pro', 'claude-opus-4@20250514', 'claude-sonnet-4@20250514', 'claude-3-7-sonnet@20250219', diff --git a/packages/backend/server/src/plugins/copilot/providers/gemini/generative.ts b/packages/backend/server/src/plugins/copilot/providers/gemini/generative.ts index 33b9266aa..a05336513 100644 --- a/packages/backend/server/src/plugins/copilot/providers/gemini/generative.ts +++ b/packages/backend/server/src/plugins/copilot/providers/gemini/generative.ts @@ -32,7 +32,7 @@ export class GeminiGenerativeProvider extends GeminiProvider { readonly models = [ { name: 'Gemini 2.5 Flash', - id: 'gemini-2.5-flash-preview-05-20', + id: 'gemini-2.5-flash', capabilities: [ { input: [ @@ -29,7 +29,7 @@ export class GeminiVertexProvider extends GeminiProvider { }, { name: 'Gemini 2.5 Pro', - id: 'gemini-2.5-pro-preview-06-05', + id: 'gemini-2.5-pro', capabilities: [ { input: [