From 4717748ca56c21039fd0c32f9c8ad569b5f23756 Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Tue, 25 Nov 2025 18:23:02 +0530 Subject: [PATCH 1/6] add tool support for gemini 3 --- core/llm/toolSupport.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/llm/toolSupport.ts b/core/llm/toolSupport.ts index a101779b9..796bc78df 100644 --- a/core/llm/toolSupport.ts +++ b/core/llm/toolSupport.ts @@ -391,7 +391,7 @@ export function isRecommendedAgentModel(modelName: string): boolean { const recs: RegExp[][] = [ [/o[134]/], [/deepseek/, /r1|reasoner/], - [/gemini/, /2\.5/, /pro/], + [/gemini/, /2\.5|3/, /pro/], [/gpt-5/], [/claude/, /sonnet/, /3\.7|3-7|-4/], [/claude/, /opus/, /-4/], From 41ec623fd083a140601bfe5e68ebceb0444536e7 Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Tue, 25 Nov 2025 18:24:00 +0530 Subject: [PATCH 2/6] add in chat role --- docs/customize/model-roles/chat.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/customize/model-roles/chat.mdx b/docs/customize/model-roles/chat.mdx index ee175829f..d35256439 100644 --- a/docs/customize/model-roles/chat.mdx +++ b/docs/customize/model-roles/chat.mdx @@ -114,20 +114,20 @@ If you prefer to use a model from [xAI](../model-providers/more/xAI), then we re -### Gemini 2.0 Flash from Google +### Gemini 3 Pro from Google -If you prefer to use a model from [Google](../model-providers/top-level/gemini), then we recommend Gemini 2.0 Flash. +If you prefer to use a model from [Google](../model-providers/top-level/gemini), then we recommend Gemini 3 Pro. - Add the [Gemini 2.0 Flash block](https://hub.continue.dev/google/gemini-2.0-flash) from the hub + Add the [Gemini 3 Pro block](https://hub.continue.dev/google/gemini-3-pro-preview) from the hub ```yaml title="config.yaml" models: - - name: Gemini 2.0 Flash + - name: Gemini 3 Pro provider: gemini - model: gemini-2.0-flash + model: gemini-3-pro-preview apiKey: ``` From 1eb20d439078973598e8ec045e7844542697ad14 Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Tue, 25 Nov 2025 18:26:10 +0530 Subject: [PATCH 3/6] add config to addnewmodel --- gui/src/pages/AddNewModel/configs/models.ts | 14 ++++++++++++++ gui/src/pages/AddNewModel/configs/providers.ts | 1 + 2 files changed, 15 insertions(+) diff --git a/gui/src/pages/AddNewModel/configs/models.ts b/gui/src/pages/AddNewModel/configs/models.ts index c9e0c049f..813a97ed4 100644 --- a/gui/src/pages/AddNewModel/configs/models.ts +++ b/gui/src/pages/AddNewModel/configs/models.ts @@ -913,6 +913,20 @@ export const models: { [key: string]: ModelPackage } = { providerOptions: ["gemini"], isOpenSource: false, }, + gemini3ProPreview: { + title: "Gemini 3 Pro", + description: + "Google's latest Pro model with up to 64k output context. Best for complex tasks involving reasoning.", + params: { + title: "Gemini 3 Pro", + model: "gemini-3-pro-preview", + contextLength: 1_048_576, + apiKey: "", + }, + icon: "gemini.png", + providerOptions: ["gemini"], + isOpenSource: false, + }, c4aiAyaExpanse8B: { title: "C4AI Aya Expanse 8B", description: diff --git a/gui/src/pages/AddNewModel/configs/providers.ts b/gui/src/pages/AddNewModel/configs/providers.ts index f988ff805..3466fac92 100644 --- a/gui/src/pages/AddNewModel/configs/providers.ts +++ b/gui/src/pages/AddNewModel/configs/providers.ts @@ -599,6 +599,7 @@ Select the \`GPT-4o\` model below to complete your provider configuration, but n models.gemini20FlashLite, models.gemini20FlashImageGeneration, models.gemini25ProExp, + models.gemini3ProPreview, ], apiKeyUrl: "https://aistudio.google.com/app/apikey", }, From a8a19625b33cc2faa616c7aab61124a7e58a0bb8 Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Tue, 25 Nov 2025 18:28:57 +0530 Subject: [PATCH 4/6] add in cometapi --- core/llm/llms/CometAPI.ts | 3 ++- packages/llm-info/src/providers/cometapi.ts | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/core/llm/llms/CometAPI.ts b/core/llm/llms/CometAPI.ts index 8d5f584e7..666a8b98a 100644 --- a/core/llm/llms/CometAPI.ts +++ b/core/llm/llms/CometAPI.ts @@ -1,5 +1,5 @@ -import { LLMOptions } from "../../index.js"; import { allModelProviders } from "@continuedev/llm-info"; +import { LLMOptions } from "../../index.js"; import OpenAI from "./OpenAI.js"; /** @@ -204,6 +204,7 @@ class CometAPI extends OpenAI { "claude-3-5-haiku-latest", // Gemini series + "gemini-3-pro-preview", "gemini-2.5-pro", "gemini-2.5-flash", "gemini-2.5-flash-lite", diff --git a/packages/llm-info/src/providers/cometapi.ts b/packages/llm-info/src/providers/cometapi.ts index 441f5bd75..98df74272 100644 --- a/packages/llm-info/src/providers/cometapi.ts +++ b/packages/llm-info/src/providers/cometapi.ts @@ -135,6 +135,15 @@ export const CometAPI: ModelProvider = { }, // Gemini Series + { + model: "gemini-3-pro-preview", + displayName: "Gemini 3 Pro Preview", + contextLength: 2000000, + maxCompletionTokens: 8192, + description: + "Gemini flagship model with high precision multimodal capabilities.", + recommendedFor: ["chat"], + }, { model: "gemini-2.5-pro", displayName: "Gemini 2.5 Pro", From ecce71ce96dee3072d9a2141ec100e7cb7698adb Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Tue, 25 Nov 2025 18:30:25 +0530 Subject: [PATCH 5/6] add in llm info --- packages/llm-info/src/providers/gemini.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/llm-info/src/providers/gemini.ts b/packages/llm-info/src/providers/gemini.ts index 6a6944ba0..81606f189 100644 --- a/packages/llm-info/src/providers/gemini.ts +++ b/packages/llm-info/src/providers/gemini.ts @@ -3,11 +3,22 @@ import { AllMediaTypes, ModelProvider } from "../types.js"; // See https://ai.google.dev/gemini-api/docs/models export const Gemini: ModelProvider = { models: [ + { + model: "gemini-3-pro-preview", + displayName: "Gemini 3 Pro Preview", + description: + "Google's flagship frontier model with high precision multimodal capabilities.", + contextLength: 1048576, + maxCompletionTokens: 65536, + mediaTypes: AllMediaTypes, + regex: /gemini-3-pro-preview/i, + recommendedFor: ["chat"], + }, { model: "gemini-2.5-pro-preview-05-06", displayName: "Gemini 2.5 Pro Preview", description: - "Google's most advanced model with strong reasoning, multimodal capabilities, and advanced coding skills", + "Google's advanced model with strong reasoning, multimodal capabilities, and advanced coding skills", contextLength: 1048576, maxCompletionTokens: 65536, mediaTypes: AllMediaTypes, From ed0a6714ed960b4ab5bb1b3d0df45100b56c75ba Mon Sep 17 00:00:00 2001 From: Continue Date: Tue, 25 Nov 2025 13:08:25 +0000 Subject: [PATCH 6/6] test: add comprehensive tests for isRecommendedAgentModel function Added tests for Gemini 3 Pro model recognition and other agent models. Tests cover: - OpenAI o1/o3/o4 models - DeepSeek R1/Reasoner models - Gemini 2.5 and 3.x Pro models (including new gemini-3-pro-preview) - Claude Sonnet 3.7+ and Opus 4 models - xAI Grok Code models - Case insensitivity and edge cases Co-authored-by: nate --- core/llm/toolSupport.test.ts | 139 ++++++++++++++++++++++++++++++++++- 1 file changed, 138 insertions(+), 1 deletion(-) diff --git a/core/llm/toolSupport.test.ts b/core/llm/toolSupport.test.ts index 30056f85a..2f0f566e7 100644 --- a/core/llm/toolSupport.test.ts +++ b/core/llm/toolSupport.test.ts @@ -1,5 +1,5 @@ // core/llm/toolSupport.test.ts -import { PROVIDER_TOOL_SUPPORT } from "./toolSupport"; +import { PROVIDER_TOOL_SUPPORT, isRecommendedAgentModel } from "./toolSupport"; describe("PROVIDER_TOOL_SUPPORT", () => { describe("continue-proxy", () => { @@ -354,3 +354,140 @@ describe("PROVIDER_TOOL_SUPPORT", () => { }); }); }); + +describe("isRecommendedAgentModel", () => { + describe("OpenAI models", () => { + it("should return true for o1, o3, o4 models", () => { + expect(isRecommendedAgentModel("o1")).toBe(true); + expect(isRecommendedAgentModel("o1-preview")).toBe(true); + expect(isRecommendedAgentModel("o3")).toBe(true); + expect(isRecommendedAgentModel("o3-mini")).toBe(true); + expect(isRecommendedAgentModel("o4")).toBe(true); + }); + + it("should return true for GPT-5 models", () => { + expect(isRecommendedAgentModel("gpt-5")).toBe(true); + expect(isRecommendedAgentModel("gpt-5-turbo")).toBe(true); + }); + + it("should return false for GPT-4 models", () => { + expect(isRecommendedAgentModel("gpt-4")).toBe(false); + expect(isRecommendedAgentModel("gpt-4-turbo")).toBe(false); + }); + }); + + describe("DeepSeek models", () => { + it("should return true for DeepSeek R1/Reasoner models", () => { + expect(isRecommendedAgentModel("deepseek-r1")).toBe(true); + expect(isRecommendedAgentModel("deepseek-r1-0528")).toBe(true); + expect(isRecommendedAgentModel("deepseek-reasoner")).toBe(true); + }); + + it("should return false for non-reasoner DeepSeek models", () => { + expect(isRecommendedAgentModel("deepseek-chat")).toBe(false); + expect(isRecommendedAgentModel("deepseek-coder")).toBe(false); + }); + }); + + describe("Gemini models", () => { + it("should return true for Gemini 2.5 Pro models", () => { + expect(isRecommendedAgentModel("gemini-2.5-pro")).toBe(true); + expect(isRecommendedAgentModel("gemini-2.5-pro-preview")).toBe(true); + }); + + it("should return true for Gemini 3 Pro models", () => { + expect(isRecommendedAgentModel("gemini-3-pro-preview")).toBe(true); + expect(isRecommendedAgentModel("gemini-3-pro")).toBe(true); + }); + + it("should return false for Gemini Flash models", () => { + expect(isRecommendedAgentModel("gemini-2.5-flash")).toBe(false); + expect(isRecommendedAgentModel("gemini-3-flash")).toBe(false); + }); + + it("should return false for Gemini models without pro designation", () => { + expect(isRecommendedAgentModel("gemini-2.5")).toBe(false); + expect(isRecommendedAgentModel("gemini-3")).toBe(false); + }); + + it("should return false for older Gemini versions", () => { + expect(isRecommendedAgentModel("gemini-1.5-pro")).toBe(false); + expect(isRecommendedAgentModel("gemini-2.0-pro")).toBe(false); + }); + }); + + describe("Claude models", () => { + it("should return true for Claude Sonnet 3.7 and later models", () => { + expect(isRecommendedAgentModel("claude-3-7-sonnet")).toBe(true); + expect(isRecommendedAgentModel("claude-3.7-sonnet")).toBe(true); + expect(isRecommendedAgentModel("claude-sonnet-4")).toBe(true); + expect(isRecommendedAgentModel("claude-4-sonnet")).toBe(true); + }); + + it("should return true for Claude Opus 4 models", () => { + expect(isRecommendedAgentModel("claude-opus-4")).toBe(true); + }); + + it("should return true for Claude 4-5 models", () => { + expect(isRecommendedAgentModel("claude-4-5")).toBe(true); + }); + + it("should return false for Claude 3.5 Sonnet models", () => { + expect(isRecommendedAgentModel("claude-3-5-sonnet")).toBe(false); + expect(isRecommendedAgentModel("claude-3.5-sonnet")).toBe(false); + }); + + it("should return false for Claude Haiku models", () => { + expect(isRecommendedAgentModel("claude-3-7-haiku")).toBe(false); + expect(isRecommendedAgentModel("claude-3.7-haiku")).toBe(false); + }); + + it("should return false for older Claude models", () => { + expect(isRecommendedAgentModel("claude-3-opus")).toBe(false); + expect(isRecommendedAgentModel("claude-2")).toBe(false); + }); + }); + + describe("xAI models", () => { + it("should return true for Grok Code models", () => { + expect(isRecommendedAgentModel("grok-code")).toBe(true); + expect(isRecommendedAgentModel("grok-code-beta")).toBe(true); + }); + + it("should return false for non-code Grok models", () => { + expect(isRecommendedAgentModel("grok-3")).toBe(false); + expect(isRecommendedAgentModel("grok-4")).toBe(false); + }); + }); + + describe("case insensitivity", () => { + it("should handle uppercase model names", () => { + expect(isRecommendedAgentModel("GEMINI-3-PRO-PREVIEW")).toBe(true); + expect(isRecommendedAgentModel("CLAUDE-4-SONNET")).toBe(true); + expect(isRecommendedAgentModel("DEEPSEEK-R1")).toBe(true); + expect(isRecommendedAgentModel("O3-MINI")).toBe(true); + }); + + it("should handle mixed case model names", () => { + expect(isRecommendedAgentModel("Gemini-3-Pro")).toBe(true); + expect(isRecommendedAgentModel("Claude-Opus-4")).toBe(true); + expect(isRecommendedAgentModel("DeepSeek-Reasoner")).toBe(true); + }); + }); + + describe("edge cases", () => { + it("should return false for empty string", () => { + expect(isRecommendedAgentModel("")).toBe(false); + }); + + it("should return false for random strings", () => { + expect(isRecommendedAgentModel("random-model")).toBe(false); + expect(isRecommendedAgentModel("test")).toBe(false); + }); + + it("should return false for partial matches", () => { + expect(isRecommendedAgentModel("gemini-pro")).toBe(false); + expect(isRecommendedAgentModel("claude-sonnet")).toBe(false); + }); + }); +});