From a8cbc68c3e2339b211848608b0b0385b6dbd00c8 Mon Sep 17 00:00:00 2001 From: Frad LEE Date: Fri, 6 Mar 2026 20:52:28 +0800 Subject: [PATCH] feat(registry): add gemini 3.1 flash lite preview - Add model to GetGeminiModels() - Add model to GetGeminiVertexModels() - Add model to GetGeminiCLIModels() - Add model to GetAIStudioModels() - Add to AntigravityModelConfig with thinking levels - Update gemini-3-flash-preview description Registers the new lightweight Gemini model across all provider endpoints for cost-effective high-volume usage scenarios. Co-Authored-By: Claude Sonnet 4.6 --- .../registry/model_definitions_static_data.go | 63 ++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) diff --git a/internal/registry/model_definitions_static_data.go b/internal/registry/model_definitions_static_data.go index f7925c88..750aa4b4 100644 --- a/internal/registry/model_definitions_static_data.go +++ b/internal/registry/model_definitions_static_data.go @@ -208,12 +208,27 @@ func GetGeminiModels() []*ModelInfo { Name: "models/gemini-3-flash-preview", Version: "3.0", DisplayName: "Gemini 3 Flash Preview", - Description: "Gemini 3 Flash Preview", + Description: "Our most intelligent model built for speed, combining frontier intelligence with superior search and grounding.", InputTokenLimit: 1048576, OutputTokenLimit: 65536, SupportedGenerationMethods: []string{"generateContent", "countTokens", "createCachedContent", "batchGenerateContent"}, Thinking: &ThinkingSupport{Min: 128, Max: 32768, ZeroAllowed: false, DynamicAllowed: true, Levels: []string{"minimal", "low", "medium", "high"}}, }, + { + ID: "gemini-3.1-flash-lite-preview", + Object: "model", + Created: 1776288000, + OwnedBy: "google", + Type: "gemini", + Name: "models/gemini-3.1-flash-lite-preview", + Version: "3.1", + DisplayName: "Gemini 3.1 Flash Lite Preview", + Description: "Our smallest and most cost effective model, built for at scale usage.", + InputTokenLimit: 1048576, + OutputTokenLimit: 65536, + SupportedGenerationMethods: []string{"generateContent", "countTokens", "createCachedContent", "batchGenerateContent"}, + Thinking: &ThinkingSupport{Min: 128, Max: 32768, ZeroAllowed: false, DynamicAllowed: true, Levels: []string{"minimal", "high"}}, + }, { ID: "gemini-3-pro-image-preview", Object: "model", @@ -324,6 +339,21 @@ func GetGeminiVertexModels() []*ModelInfo { SupportedGenerationMethods: []string{"generateContent", "countTokens", "createCachedContent", "batchGenerateContent"}, Thinking: &ThinkingSupport{Min: 128, Max: 32768, ZeroAllowed: false, DynamicAllowed: true, Levels: []string{"low", "high"}}, }, + { + ID: "gemini-3.1-flash-lite-preview", + Object: "model", + Created: 1776288000, + OwnedBy: "google", + Type: "gemini", + Name: "models/gemini-3.1-flash-lite-preview", + Version: "3.1", + DisplayName: "Gemini 3.1 Flash Lite Preview", + Description: "Our smallest and most cost effective model, built for at scale usage.", + InputTokenLimit: 1048576, + OutputTokenLimit: 65536, + SupportedGenerationMethods: []string{"generateContent", "countTokens", "createCachedContent", "batchGenerateContent"}, + Thinking: &ThinkingSupport{Min: 128, Max: 32768, ZeroAllowed: false, DynamicAllowed: true, Levels: []string{"minimal", "high"}}, + }, { ID: "gemini-3-pro-image-preview", Object: "model", @@ -496,6 +526,21 @@ func GetGeminiCLIModels() []*ModelInfo { SupportedGenerationMethods: []string{"generateContent", "countTokens", "createCachedContent", "batchGenerateContent"}, Thinking: &ThinkingSupport{Min: 128, Max: 32768, ZeroAllowed: false, DynamicAllowed: true, Levels: []string{"minimal", "low", "medium", "high"}}, }, + { + ID: "gemini-3.1-flash-lite-preview", + Object: "model", + Created: 1776288000, + OwnedBy: "google", + Type: "gemini", + Name: "models/gemini-3.1-flash-lite-preview", + Version: "3.1", + DisplayName: "Gemini 3.1 Flash Lite Preview", + Description: "Our smallest and most cost effective model, built for at scale usage.", + InputTokenLimit: 1048576, + OutputTokenLimit: 65536, + SupportedGenerationMethods: []string{"generateContent", "countTokens", "createCachedContent", "batchGenerateContent"}, + Thinking: &ThinkingSupport{Min: 128, Max: 32768, ZeroAllowed: false, DynamicAllowed: true, Levels: []string{"minimal", "high"}}, + }, } } @@ -592,6 +637,21 @@ func GetAIStudioModels() []*ModelInfo { SupportedGenerationMethods: []string{"generateContent", "countTokens", "createCachedContent", "batchGenerateContent"}, Thinking: &ThinkingSupport{Min: 128, Max: 32768, ZeroAllowed: false, DynamicAllowed: true}, }, + { + ID: "gemini-3.1-flash-lite-preview", + Object: "model", + Created: 1776288000, + OwnedBy: "google", + Type: "gemini", + Name: "models/gemini-3.1-flash-lite-preview", + Version: "3.1", + DisplayName: "Gemini 3.1 Flash Lite Preview", + Description: "Our smallest and most cost effective model, built for at scale usage.", + InputTokenLimit: 1048576, + OutputTokenLimit: 65536, + SupportedGenerationMethods: []string{"generateContent", "countTokens", "createCachedContent", "batchGenerateContent"}, + Thinking: &ThinkingSupport{Min: 128, Max: 32768, ZeroAllowed: false, DynamicAllowed: true, Levels: []string{"minimal", "high"}}, + }, { ID: "gemini-pro-latest", Object: "model", @@ -968,6 +1028,7 @@ func GetAntigravityModelConfig() map[string]*AntigravityModelConfig { "gemini-3.1-pro-high": {Thinking: &ThinkingSupport{Min: 128, Max: 32768, ZeroAllowed: false, DynamicAllowed: true, Levels: []string{"low", "high"}}}, "gemini-3.1-pro-low": {Thinking: &ThinkingSupport{Min: 128, Max: 32768, ZeroAllowed: false, DynamicAllowed: true, Levels: []string{"low", "high"}}}, "gemini-3.1-flash-image": {Thinking: &ThinkingSupport{Min: 128, Max: 32768, ZeroAllowed: false, DynamicAllowed: true, Levels: []string{"minimal", "high"}}}, + "gemini-3.1-flash-lite-preview": {Thinking: &ThinkingSupport{Min: 128, Max: 32768, ZeroAllowed: false, DynamicAllowed: true, Levels: []string{"minimal", "high"}}}, "gemini-3-flash": {Thinking: &ThinkingSupport{Min: 128, Max: 32768, ZeroAllowed: false, DynamicAllowed: true, Levels: []string{"minimal", "low", "medium", "high"}}}, "claude-opus-4-6-thinking": {Thinking: &ThinkingSupport{Min: 1024, Max: 64000, ZeroAllowed: true, DynamicAllowed: true}, MaxCompletionTokens: 64000}, "claude-sonnet-4-6": {Thinking: &ThinkingSupport{Min: 1024, Max: 64000, ZeroAllowed: true, DynamicAllowed: true}, MaxCompletionTokens: 64000},