diff --git a/README.md b/README.md index beba84ac..26c89c38 100644 --- a/README.md +++ b/README.md @@ -193,7 +193,7 @@ Flowpilot sits directly in the editor. Describe a system, paste source code, upl | Provider | Default model | Why use it | | ------------------- | ------------------------------------------ | ----------------------------------------------- | | 🦙 **Ollama (local)** | `llama3.2` | **Fully offline.** No key, no network, no cost. | -| Google Gemini | `gemini-2.5-flash-lite` | Free tier available, fast, browser-safe | +| Google Gemini | `gemini-3.5-flash-lite` | Free tier available, fast, browser-safe | | OpenAI | `gpt-5-mini` | Best reasoning for complex architectures | | Anthropic Claude | `claude-sonnet-4-6` | Excellent code and system understanding | | Groq | `meta-llama/llama-4-scout-17b-16e-instruct`| Fastest open-source inference available | diff --git a/public/locales/de/translation.json b/public/locales/de/translation.json index dd3b6117..040befd4 100644 --- a/public/locales/de/translation.json +++ b/public/locales/de/translation.json @@ -952,12 +952,27 @@ "category": "Legacy", "badge": "New" }, - "gemini-2.5-flash-lite": { - "label": "2.5 Flash Lite", + "gemini-3.5-flash-lite": { + "label": "3.5 Flash Lite", "hint": "Fastest · Free tier default", "category": "Speed", "badge": "Default" }, + "gemini-3.5-flash": { + "label": "3.5 Flash", + "hint": "Best price/performance balance", + "category": "Speed" + }, + "gemini-3.5-pro": { + "label": "3.5 Pro", + "hint": "Most powerful · Multimodal", + "category": "Reasoning" + }, + "gemini-2.5-flash-lite": { + "label": "2.5 Flash Lite", + "hint": "Legacy · unavailable to new API keys", + "category": "Legacy" + }, "gemini-2.5-flash": { "label": "2.5 Flash", "hint": "Best price/performance balance", diff --git a/public/locales/en/translation.json b/public/locales/en/translation.json index b0b7559d..4f672c86 100644 --- a/public/locales/en/translation.json +++ b/public/locales/en/translation.json @@ -1019,12 +1019,27 @@ }, "models": { "gemini": { - "gemini-2.5-flash-lite": { - "label": "2.5 Flash Lite", + "gemini-3.5-flash-lite": { + "label": "3.5 Flash Lite", "hint": "Fastest · Free tier default", "category": "Speed", "badge": "Default" }, + "gemini-3.5-flash": { + "label": "3.5 Flash", + "hint": "Best price/performance balance", + "category": "Speed" + }, + "gemini-3.5-pro": { + "label": "3.5 Pro", + "hint": "Most powerful · Multimodal", + "category": "Reasoning" + }, + "gemini-2.5-flash-lite": { + "label": "2.5 Flash Lite", + "hint": "Legacy · unavailable to new API keys", + "category": "Legacy" + }, "gemini-2.5-flash": { "label": "2.5 Flash", "hint": "Best price/performance balance", diff --git a/public/locales/es/translation.json b/public/locales/es/translation.json index 160d5730..ef20191e 100644 --- a/public/locales/es/translation.json +++ b/public/locales/es/translation.json @@ -952,12 +952,27 @@ "category": "Legacy", "badge": "New" }, - "gemini-2.5-flash-lite": { - "label": "2.5 Flash Lite", + "gemini-3.5-flash-lite": { + "label": "3.5 Flash Lite", "hint": "Fastest · Free tier default", "category": "Speed", "badge": "Default" }, + "gemini-3.5-flash": { + "label": "3.5 Flash", + "hint": "Best price/performance balance", + "category": "Speed" + }, + "gemini-3.5-pro": { + "label": "3.5 Pro", + "hint": "Most powerful · Multimodal", + "category": "Reasoning" + }, + "gemini-2.5-flash-lite": { + "label": "2.5 Flash Lite", + "hint": "Legacy · unavailable to new API keys", + "category": "Legacy" + }, "gemini-2.5-flash": { "label": "2.5 Flash", "hint": "Best price/performance balance", diff --git a/public/locales/fr/translation.json b/public/locales/fr/translation.json index 2b2b240d..c790c050 100644 --- a/public/locales/fr/translation.json +++ b/public/locales/fr/translation.json @@ -952,12 +952,27 @@ "category": "Legacy", "badge": "New" }, - "gemini-2.5-flash-lite": { - "label": "2.5 Flash Lite", + "gemini-3.5-flash-lite": { + "label": "3.5 Flash Lite", "hint": "Fastest · Free tier default", "category": "Speed", "badge": "Default" }, + "gemini-3.5-flash": { + "label": "3.5 Flash", + "hint": "Best price/performance balance", + "category": "Speed" + }, + "gemini-3.5-pro": { + "label": "3.5 Pro", + "hint": "Most powerful · Multimodal", + "category": "Reasoning" + }, + "gemini-2.5-flash-lite": { + "label": "2.5 Flash Lite", + "hint": "Legacy · unavailable to new API keys", + "category": "Legacy" + }, "gemini-2.5-flash": { "label": "2.5 Flash", "hint": "Best price/performance balance", diff --git a/public/locales/ja/translation.json b/public/locales/ja/translation.json index 23d26220..ab465476 100644 --- a/public/locales/ja/translation.json +++ b/public/locales/ja/translation.json @@ -952,12 +952,27 @@ "category": "Legacy", "badge": "New" }, - "gemini-2.5-flash-lite": { - "label": "2.5 Flash Lite", + "gemini-3.5-flash-lite": { + "label": "3.5 Flash Lite", "hint": "Fastest · Free tier default", "category": "Speed", "badge": "Default" }, + "gemini-3.5-flash": { + "label": "3.5 Flash", + "hint": "Best price/performance balance", + "category": "Speed" + }, + "gemini-3.5-pro": { + "label": "3.5 Pro", + "hint": "Most powerful · Multimodal", + "category": "Reasoning" + }, + "gemini-2.5-flash-lite": { + "label": "2.5 Flash Lite", + "hint": "Legacy · unavailable to new API keys", + "category": "Legacy" + }, "gemini-2.5-flash": { "label": "2.5 Flash", "hint": "Best price/performance balance", diff --git a/public/locales/tr/translation.json b/public/locales/tr/translation.json index 8155085e..15599ccb 100644 --- a/public/locales/tr/translation.json +++ b/public/locales/tr/translation.json @@ -939,12 +939,27 @@ }, "models": { "gemini": { - "gemini-2.5-flash-lite": { - "label": "2.5 Flash Lite", + "gemini-3.5-flash-lite": { + "label": "3.5 Flash Lite", "hint": "En hızlı · Ücretsiz katman varsayılanı", "category": "Hız", "badge": "Varsayılan" }, + "gemini-3.5-flash": { + "label": "3.5 Flash", + "hint": "En iyi fiyat/performans dengesi", + "category": "Hız" + }, + "gemini-3.5-pro": { + "label": "3.5 Pro", + "hint": "En güçlü · Çok modlu", + "category": "Akıl Yürütme" + }, + "gemini-2.5-flash-lite": { + "label": "2.5 Flash Lite", + "hint": "Eski · yeni API anahtarlarında kullanılamaz", + "category": "Eski" + }, "gemini-2.5-flash": { "label": "2.5 Flash", "hint": "En iyi fiyat/performans dengesi", diff --git a/public/locales/zh/translation.json b/public/locales/zh/translation.json index cd9e2c7d..ba600d8a 100644 --- a/public/locales/zh/translation.json +++ b/public/locales/zh/translation.json @@ -952,12 +952,27 @@ "category": "Legacy", "badge": "New" }, - "gemini-2.5-flash-lite": { - "label": "2.5 Flash Lite", + "gemini-3.5-flash-lite": { + "label": "3.5 Flash Lite", "hint": "Fastest · Free tier default", "category": "Speed", "badge": "Default" }, + "gemini-3.5-flash": { + "label": "3.5 Flash", + "hint": "Best price/performance balance", + "category": "Speed" + }, + "gemini-3.5-pro": { + "label": "3.5 Pro", + "hint": "Most powerful · Multimodal", + "category": "Reasoning" + }, + "gemini-2.5-flash-lite": { + "label": "2.5 Flash Lite", + "hint": "Legacy · unavailable to new API keys", + "category": "Legacy" + }, "gemini-2.5-flash": { "label": "2.5 Flash", "hint": "Best price/performance balance", diff --git a/src/config/aiProviders.test.ts b/src/config/aiProviders.test.ts index f4fc9719..505bfd7b 100644 --- a/src/config/aiProviders.test.ts +++ b/src/config/aiProviders.test.ts @@ -24,6 +24,14 @@ describe('aiProviders config consistency', () => { expect(riskIds).toEqual(providerIds); }); + it('defaults the Gemini dropdown to the current flash-lite model', () => { + // Google retired gemini-2.5-flash-lite for new API keys, so the default + // that the model dropdown falls back to has to be the 3.5 replacement. + expect(DEFAULT_MODELS.gemini).toBe('gemini-3.5-flash-lite'); + expect(PROVIDERS.find((provider) => provider.id === 'gemini')?.defaultModel).toBe('gemini-3.5-flash-lite'); + expect(PROVIDER_MODELS.gemini[0].id).toBe('gemini-3.5-flash-lite'); + }); + it('provides default base urls for all non-gemini and non-claude providers', () => { const required = PROVIDERS .map((provider) => provider.id) diff --git a/src/config/aiProviders.ts b/src/config/aiProviders.ts index 6e463449..dd1e8230 100644 --- a/src/config/aiProviders.ts +++ b/src/config/aiProviders.ts @@ -12,7 +12,7 @@ export const PROVIDER_BASE_URLS: Record = { - gemini: 'gemini-2.5-flash-lite', + gemini: 'gemini-3.5-flash-lite', openai: 'gpt-5-mini', claude: 'claude-sonnet-4-6', groq: 'meta-llama/llama-4-scout-17b-16e-instruct', @@ -159,6 +159,9 @@ export const PROVIDERS: ProviderMeta[] = [ export const PROVIDER_MODELS: Record = { gemini: [ + { id: 'gemini-3.5-flash-lite', translateKey: 'gemini-3.5-flash-lite' }, + { id: 'gemini-3.5-flash', translateKey: 'gemini-3.5-flash' }, + { id: 'gemini-3.5-pro', translateKey: 'gemini-3.5-pro' }, { id: 'gemini-2.5-flash-lite', translateKey: 'gemini-2.5-flash-lite' }, { id: 'gemini-2.5-flash', translateKey: 'gemini-2.5-flash' }, { id: 'gemini-2.5-pro', translateKey: 'gemini-2.5-pro' }, diff --git a/src/i18n/locales/de/translation.json b/src/i18n/locales/de/translation.json index dd3b6117..040befd4 100644 --- a/src/i18n/locales/de/translation.json +++ b/src/i18n/locales/de/translation.json @@ -952,12 +952,27 @@ "category": "Legacy", "badge": "New" }, - "gemini-2.5-flash-lite": { - "label": "2.5 Flash Lite", + "gemini-3.5-flash-lite": { + "label": "3.5 Flash Lite", "hint": "Fastest · Free tier default", "category": "Speed", "badge": "Default" }, + "gemini-3.5-flash": { + "label": "3.5 Flash", + "hint": "Best price/performance balance", + "category": "Speed" + }, + "gemini-3.5-pro": { + "label": "3.5 Pro", + "hint": "Most powerful · Multimodal", + "category": "Reasoning" + }, + "gemini-2.5-flash-lite": { + "label": "2.5 Flash Lite", + "hint": "Legacy · unavailable to new API keys", + "category": "Legacy" + }, "gemini-2.5-flash": { "label": "2.5 Flash", "hint": "Best price/performance balance", diff --git a/src/i18n/locales/en/translation.json b/src/i18n/locales/en/translation.json index b0b7559d..4f672c86 100644 --- a/src/i18n/locales/en/translation.json +++ b/src/i18n/locales/en/translation.json @@ -1019,12 +1019,27 @@ }, "models": { "gemini": { - "gemini-2.5-flash-lite": { - "label": "2.5 Flash Lite", + "gemini-3.5-flash-lite": { + "label": "3.5 Flash Lite", "hint": "Fastest · Free tier default", "category": "Speed", "badge": "Default" }, + "gemini-3.5-flash": { + "label": "3.5 Flash", + "hint": "Best price/performance balance", + "category": "Speed" + }, + "gemini-3.5-pro": { + "label": "3.5 Pro", + "hint": "Most powerful · Multimodal", + "category": "Reasoning" + }, + "gemini-2.5-flash-lite": { + "label": "2.5 Flash Lite", + "hint": "Legacy · unavailable to new API keys", + "category": "Legacy" + }, "gemini-2.5-flash": { "label": "2.5 Flash", "hint": "Best price/performance balance", diff --git a/src/i18n/locales/es/translation.json b/src/i18n/locales/es/translation.json index 160d5730..ef20191e 100644 --- a/src/i18n/locales/es/translation.json +++ b/src/i18n/locales/es/translation.json @@ -952,12 +952,27 @@ "category": "Legacy", "badge": "New" }, - "gemini-2.5-flash-lite": { - "label": "2.5 Flash Lite", + "gemini-3.5-flash-lite": { + "label": "3.5 Flash Lite", "hint": "Fastest · Free tier default", "category": "Speed", "badge": "Default" }, + "gemini-3.5-flash": { + "label": "3.5 Flash", + "hint": "Best price/performance balance", + "category": "Speed" + }, + "gemini-3.5-pro": { + "label": "3.5 Pro", + "hint": "Most powerful · Multimodal", + "category": "Reasoning" + }, + "gemini-2.5-flash-lite": { + "label": "2.5 Flash Lite", + "hint": "Legacy · unavailable to new API keys", + "category": "Legacy" + }, "gemini-2.5-flash": { "label": "2.5 Flash", "hint": "Best price/performance balance", diff --git a/src/i18n/locales/fr/translation.json b/src/i18n/locales/fr/translation.json index 2b2b240d..c790c050 100644 --- a/src/i18n/locales/fr/translation.json +++ b/src/i18n/locales/fr/translation.json @@ -952,12 +952,27 @@ "category": "Legacy", "badge": "New" }, - "gemini-2.5-flash-lite": { - "label": "2.5 Flash Lite", + "gemini-3.5-flash-lite": { + "label": "3.5 Flash Lite", "hint": "Fastest · Free tier default", "category": "Speed", "badge": "Default" }, + "gemini-3.5-flash": { + "label": "3.5 Flash", + "hint": "Best price/performance balance", + "category": "Speed" + }, + "gemini-3.5-pro": { + "label": "3.5 Pro", + "hint": "Most powerful · Multimodal", + "category": "Reasoning" + }, + "gemini-2.5-flash-lite": { + "label": "2.5 Flash Lite", + "hint": "Legacy · unavailable to new API keys", + "category": "Legacy" + }, "gemini-2.5-flash": { "label": "2.5 Flash", "hint": "Best price/performance balance", diff --git a/src/i18n/locales/ja/translation.json b/src/i18n/locales/ja/translation.json index 23d26220..ab465476 100644 --- a/src/i18n/locales/ja/translation.json +++ b/src/i18n/locales/ja/translation.json @@ -952,12 +952,27 @@ "category": "Legacy", "badge": "New" }, - "gemini-2.5-flash-lite": { - "label": "2.5 Flash Lite", + "gemini-3.5-flash-lite": { + "label": "3.5 Flash Lite", "hint": "Fastest · Free tier default", "category": "Speed", "badge": "Default" }, + "gemini-3.5-flash": { + "label": "3.5 Flash", + "hint": "Best price/performance balance", + "category": "Speed" + }, + "gemini-3.5-pro": { + "label": "3.5 Pro", + "hint": "Most powerful · Multimodal", + "category": "Reasoning" + }, + "gemini-2.5-flash-lite": { + "label": "2.5 Flash Lite", + "hint": "Legacy · unavailable to new API keys", + "category": "Legacy" + }, "gemini-2.5-flash": { "label": "2.5 Flash", "hint": "Best price/performance balance", diff --git a/src/i18n/locales/tr/translation.json b/src/i18n/locales/tr/translation.json index 8155085e..15599ccb 100644 --- a/src/i18n/locales/tr/translation.json +++ b/src/i18n/locales/tr/translation.json @@ -939,12 +939,27 @@ }, "models": { "gemini": { - "gemini-2.5-flash-lite": { - "label": "2.5 Flash Lite", + "gemini-3.5-flash-lite": { + "label": "3.5 Flash Lite", "hint": "En hızlı · Ücretsiz katman varsayılanı", "category": "Hız", "badge": "Varsayılan" }, + "gemini-3.5-flash": { + "label": "3.5 Flash", + "hint": "En iyi fiyat/performans dengesi", + "category": "Hız" + }, + "gemini-3.5-pro": { + "label": "3.5 Pro", + "hint": "En güçlü · Çok modlu", + "category": "Akıl Yürütme" + }, + "gemini-2.5-flash-lite": { + "label": "2.5 Flash Lite", + "hint": "Eski · yeni API anahtarlarında kullanılamaz", + "category": "Eski" + }, "gemini-2.5-flash": { "label": "2.5 Flash", "hint": "En iyi fiyat/performans dengesi", diff --git a/src/i18n/locales/zh/translation.json b/src/i18n/locales/zh/translation.json index cd9e2c7d..ba600d8a 100644 --- a/src/i18n/locales/zh/translation.json +++ b/src/i18n/locales/zh/translation.json @@ -952,12 +952,27 @@ "category": "Legacy", "badge": "New" }, - "gemini-2.5-flash-lite": { - "label": "2.5 Flash Lite", + "gemini-3.5-flash-lite": { + "label": "3.5 Flash Lite", "hint": "Fastest · Free tier default", "category": "Speed", "badge": "Default" }, + "gemini-3.5-flash": { + "label": "3.5 Flash", + "hint": "Best price/performance balance", + "category": "Speed" + }, + "gemini-3.5-pro": { + "label": "3.5 Pro", + "hint": "Most powerful · Multimodal", + "category": "Reasoning" + }, + "gemini-2.5-flash-lite": { + "label": "2.5 Flash Lite", + "hint": "Legacy · unavailable to new API keys", + "category": "Legacy" + }, "gemini-2.5-flash": { "label": "2.5 Flash", "hint": "Best price/performance balance", diff --git a/src/services/geminiService.ts b/src/services/geminiService.ts index cc9b42f7..7625e8c6 100644 --- a/src/services/geminiService.ts +++ b/src/services/geminiService.ts @@ -2,7 +2,7 @@ import { GoogleGenAI } from "@google/genai"; import { getGeminiSystemInstruction } from './geminiSystemInstruction'; /** Default Gemini model — keep in sync with DEFAULT_MODELS in aiService.ts */ -const GEMINI_DEFAULT_MODEL = 'gemini-2.5-flash-lite'; +const GEMINI_DEFAULT_MODEL = 'gemini-3.5-flash-lite'; export interface ChatMessage { role: 'user' | 'model';