Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

💄 style: add new Gemini 3.6 Flash and 3.5 Flash-Lite models (#17433)

sxjeru121ee3149f2a
diff --git a/locales/en-US/models.json b/locales/en-US/models.json
index 98c82f7ff0f..a97c18065f3 100644
--- a/locales/en-US/models.json
+++ b/locales/en-US/models.json
@@ -544,8 +544,8 @@
"gemini-3.5-flash-lite.description": "Gemini 3.5 Flash-Lite is Google's fastest, lowest-cost 3.5 model, optimized for high-throughput agentic tasks, document parsing, and multimodal data extraction.",
"gemini-3.5-flash.description": "Gemini's most intelligent model built for speed, combining frontier intelligence with superior search and grounding.",
"gemini-3.6-flash.description": "Gemini 3.6 Flash balances speed with intelligence for strong agentic, coding, and multimodal performance with improved token efficiency.",
- "gemini-flash-latest.description": "Points to gemini-3-flash-preview",
- "gemini-flash-lite-latest.description": "Points to gemini-3.1-flash-lite",
+ "gemini-flash-latest.description": "Points to gemini-3.6-flash",
+ "gemini-flash-lite-latest.description": "Points to gemini-3.5-flash-lite",
"gemini-pro-latest.description": "Points to gemini-3.1-pro-preview",
"gemma-7b-it.description": "Gemma 7B is cost-effective for small to mid-scale tasks.",
"gemma2-9b-it.description": "Gemma 2 9B is optimized for specific tasks and tool integration.",
diff --git a/locales/zh-CN/models.json b/locales/zh-CN/models.json
index 8bd78c3d189..d4ea0461df3 100644
--- a/locales/zh-CN/models.json
+++ b/locales/zh-CN/models.json
@@ -544,8 +544,8 @@
"gemini-3.5-flash-lite.description": "Gemini 3.5 Flash-Lite 是 Google 最快、成本最低的 3.5 模型,专为高吞吐量代理任务、文档解析和多模态数据提取而优化。",
"gemini-3.5-flash.description": "Gemini 的最智能模型,专为速度而设计,结合前沿智能与卓越的搜索和基础能力。",
"gemini-3.6-flash.description": "Gemini 3.6 Flash 结合速度与智能,提供强大的自主性、编程能力和多模态性能,同时提升了令牌效率。",
- "gemini-flash-latest.description": "指向 gemini-3-flash-preview",
- "gemini-flash-lite-latest.description": "指向 gemini-3.1-flash-lite",
+ "gemini-flash-latest.description": "指向 gemini-3.6-flash",
+ "gemini-flash-lite-latest.description": "指向 gemini-3.5-flash-lite",
"gemini-pro-latest.description": "指向 gemini-3.1-pro-preview",
"gemma-7b-it.description": "Gemma 7B 是一款适用于中小规模任务的高性价比模型。",
"gemma2-9b-it.description": "Gemma 2 9B 针对特定任务与工具集成进行了优化。",
diff --git a/packages/model-bank/src/aiModels/__tests__/index.test.ts b/packages/model-bank/src/aiModels/__tests__/index.test.ts
index 982ffea685a..8b00065a2d8 100644
--- a/packages/model-bank/src/aiModels/__tests__/index.test.ts
+++ b/packages/model-bank/src/aiModels/__tests__/index.test.ts
@@ -112,3 +112,31 @@ describe('ChatGPT subscription models', () => {
).toBe(true);
});
});
+
+describe('Google rolling model aliases', () => {
+ it('tracks the current Flash and Flash-Lite model versions', () => {
+ const googleModels = LOBE_DEFAULT_MODEL_LIST.filter((model) => model.providerId === 'google');
+ const flashLatest = googleModels.find((model) => model.id === 'gemini-flash-latest');
+ const flash = googleModels.find((model) => model.id === 'gemini-3.6-flash');
+ const flashLiteLatest = googleModels.find((model) => model.id === 'gemini-flash-lite-latest');
+ const flashLite = googleModels.find((model) => model.id === 'gemini-3.5-flash-lite');
+
+ expect(flashLatest).toEqual(
+ expect.objectContaining({
+ description: 'Points to gemini-3.6-flash',
+ knowledgeCutoff: '2026-03',
+ }),
+ );
+ expect(flashLatest?.pricing).toEqual(flash?.pricing);
+ expect(flashLatest?.settings?.disabledParams).toEqual(['temperature', 'top_p']);
+
+ expect(flashLiteLatest).toEqual(
+ expect.objectContaining({
+ description: 'Points to gemini-3.5-flash-lite',
+ knowledgeCutoff: '2026-03',
+ }),
+ );
+ expect(flashLiteLatest?.pricing).toEqual(flashLite?.pricing);
+ expect(flashLiteLatest?.settings?.disabledParams).toEqual(['temperature', 'top_p']);
+ });
+});
diff --git a/packages/model-bank/src/aiModels/google.ts b/packages/model-bank/src/aiModels/google.ts
index af80f5b7a02..a92bf82502a 100644
--- a/packages/model-bank/src/aiModels/google.ts
+++ b/packages/model-bank/src/aiModels/google.ts
@@ -74,24 +74,35 @@ const googleChatModels: AIChatModelCard[] = [
functionCall: true,
reasoning: true,
search: true,
+ structuredOutput: true,
video: true,
vision: true,
},
contextWindowTokens: 1_048_576 + 65_536,
- description: 'Points to gemini-3-flash-preview',
+ description: 'Points to gemini-3.6-flash',
displayName: 'Gemini Flash Latest',
family: 'gemini',
id: 'gemini-flash-latest',
- knowledgeCutoff: '2025-01',
+ knowledgeCutoff: '2026-03',
maxOutput: 65_536,
pricing: {
units: [
- { name: 'textInput_cacheRead', rate: 0.075, strategy: 'fixed', unit: 'millionTokens' },
- { name: 'textInput', rate: 0.3, strategy: 'fixed', unit: 'millionTokens' },
- { name: 'textOutput', rate: 2.5, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textInput_cacheRead', rate: 0.15, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textInput', rate: 1.5, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'imageInput', rate: 1.5, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'videoInput', rate: 1.5, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'audioInput', rate: 1.5, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textOutput', rate: 7.5, strategy: 'fixed', unit: 'millionTokens' },
+ {
+ lookup: { prices: { '1h': 1 }, pricingParams: ['ttl'] },
+ name: 'textInput_cacheWrite',
+ strategy: 'lookup',
+ unit: 'millionTokens',
+ },
],
},
settings: {
+ disabledParams: ['temperature', 'top_p'],
extendParams: ['thinkingLevel', 'urlContext'],
searchImpl: 'params',
searchProvider: 'google',
@@ -104,24 +115,80 @@ const googleChatModels: AIChatModelCard[] = [
functionCall: true,
reasoning: true,
search: true,
+ structuredOutput: true,
video: true,
vision: true,
},
contextWindowTokens: 1_048_576 + 65_536,
- description: 'Points to gemini-3.1-flash-lite',
+ description: 'Points to gemini-3.5-flash-lite',
displayName: 'Gemini Flash-Lite Latest',
family: 'gemini',
id: 'gemini-flash-lite-latest',
- knowledgeCutoff: '2025-01',
+ knowledgeCutoff: '2026-03',
maxOutput: 65_536,
pricing: {
units: [
- { name: 'textInput_cacheRead', rate: 0.025, strategy: 'fixed', unit: 'millionTokens' },
- { name: 'textInput', rate: 0.1, strategy: 'fixed', unit: 'millionTokens' },
- { name: 'textOutput', rate: 0.4, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textInput_cacheRead', rate: 0.03, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textInput', rate: 0.3, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'imageInput', rate: 0.3, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'videoInput', rate: 0.3, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'audioInput', rate: 0.3, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textOutput', rate: 2.5, strategy: 'fixed', unit: 'millionTokens' },
+ {
+ lookup: { prices: { '1h': 1 }, pricingParams: ['ttl'] },
+ name: 'textInput_cacheWrite',
+ strategy: 'lookup',
+ unit: 'millionTokens',
+ },
],
},
settings: {
+ disabledParams: ['temperature', 'top_p'],
+ extendParams: ['thinkingLevel', 'urlContext'],
+ searchImpl: 'params',
+ searchProvider: 'google',
+ },
+ type: 'chat',
+ },
+ {
+ abilities: {
+ audio: true,
+ functionCall: true,
+ reasoning: true,
+ search: true,
+ structuredOutput: true,
+ video: true,
+ vision: true,
+ },
+ contextWindowTokens: 1_048_576 + 65_536,
+ description:
+ 'Gemini 3.6 Flash balances speed with intelligence for agentic and multimodal tasks, with lower output cost than 3.5 Flash.',
+ displayName: 'Gemini 3.6 Flash',
+ enabled: true,
+ family: 'gemini',
+ generation: 'gemini-3.6',
+ id: 'gemini-3.6-flash',
+ knowledgeCutoff: '2026-03',
+ maxOutput: 65_536,
+ pricing: {
+ units: [
+ { name: 'textInput_cacheRead', rate: 0.15, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textInput', rate: 1.5, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'imageInput', rate: 1.5, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'videoInput', rate: 1.5, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'audioInput', rate: 1.5, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textOutput', rate: 7.5, strategy: 'fixed', unit: 'millionTokens' },
+ {
+ lookup: { prices: { '1h': 1 }, pricingParams: ['ttl'] },
+ name: 'textInput_cacheWrite',
+ strategy: 'lookup',
+ unit: 'millionTokens',
+ },
+ ],
+ },
+ releasedAt: '2026-07-21',
+ settings: {
+ disabledParams: ['temperature', 'top_p'],
extendParams: ['thinkingLevel', 'urlContext'],
searchImpl: 'params',
searchProvider: 'google',
@@ -142,7 +209,6 @@ const googleChatModels: AIChatModelCard[] = [
description:
"Gemini's most intelligent model built for speed, combining frontier intelligence with superior search and grounding.",
displayName: 'Gemini 3.5 Flash',
- enabled: true,
family: 'gemini',
generation: 'gemini-3.5',
id: 'gemini-3.5-flash',
@@ -172,6 +238,51 @@ const googleChatModels: AIChatModelCard[] = [
},
type: 'chat',
},
+ {
+ abilities: {
+ audio: true,
+ functionCall: true,
+ reasoning: true,
+ search: true,
+ structuredOutput: true,
+ video: true,
+ vision: true,
+ },
+ contextWindowTokens: 1_048_576 + 65_536,
+ description:
+ "Gemini 3.5 Flash-Lite is Google's fastest, most cost-efficient 3.5 model for high-throughput agentic tasks, document parsing, and simple data extraction.",
+ displayName: 'Gemini 3.5 Flash-Lite',
+ enabled: true,
+ family: 'gemini',
+ generation: 'gemini-3.5',
+ id: 'gemini-3.5-flash-lite',
+ knowledgeCutoff: '2026-03',
+ maxOutput: 65_536,
+ pricing: {
+ units: [
+ { name: 'textInput_cacheRead', rate: 0.03, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textInput', rate: 0.3, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'imageInput', rate: 0.3, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'videoInput', rate: 0.3, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'audioInput', rate: 0.3, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textOutput', rate: 2.5, strategy: 'fixed', unit: 'millionTokens' },
+ {
+ lookup: { prices: { '1h': 1 }, pricingParams: ['ttl'] },
+ name: 'textInput_cacheWrite',
+ strategy: 'lookup',
+ unit: 'millionTokens',
+ },
+ ],
+ },
+ releasedAt: '2026-07-21',
+ settings: {
+ disabledParams: ['temperature', 'top_p'],
+ extendParams: ['thinkingLevel', 'urlContext'],
+ searchImpl: 'params',
+ searchProvider: 'google',
+ },
+ type: 'chat',
+ },
{
abilities: {
imageOutput: true,
@@ -346,7 +457,6 @@ const googleChatModels: AIChatModelCard[] = [
description:
"Gemini 3.1 Flash-Lite is Google's most cost-efficient multimodal model, optimized for high-volume agentic tasks, translation, and data processing.",
displayName: 'Gemini 3.1 Flash-Lite',
- enabled: true,
family: 'gemini',
generation: 'gemini-3.1',
id: 'gemini-3.1-flash-lite',
diff --git a/packages/model-bank/src/aiModels/vertexai.ts b/packages/model-bank/src/aiModels/vertexai.ts
index aa2f3e7064e..ea64ee03433 100644
--- a/packages/model-bank/src/aiModels/vertexai.ts
+++ b/packages/model-bank/src/aiModels/vertexai.ts
@@ -4,6 +4,51 @@ import { imagenGenParameters } from './google';
// ref: https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models
const vertexaiChatModels: AIChatModelCard[] = [
+ {
+ abilities: {
+ audio: true,
+ functionCall: true,
+ reasoning: true,
+ search: true,
+ structuredOutput: true,
+ video: true,
+ vision: true,
+ },
+ contextWindowTokens: 1_048_576 + 65_536,
+ description:
+ 'Gemini 3.6 Flash balances speed with intelligence for agentic and multimodal tasks, with lower output cost than 3.5 Flash.',
+ displayName: 'Gemini 3.6 Flash',
+ enabled: true,
+ family: 'gemini',
+ generation: 'gemini-3.6',
+ id: 'gemini-3.6-flash',
+ knowledgeCutoff: '2026-03',
+ maxOutput: 65_536,
+ pricing: {
+ units: [
+ { name: 'textInput_cacheRead', rate: 0.15, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textInput', rate: 1.5, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'imageInput', rate: 1.5, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'videoInput', rate: 1.5, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'audioInput', rate: 1.5, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textOutput', rate: 7.5, strategy: 'fixed', unit: 'millionTokens' },
+ {
+ lookup: { prices: { '1h': 1 }, pricingParams: ['ttl'] },
+ name: 'textInput_cacheWrite',
+ strategy: 'lookup',
+ unit: 'millionTokens',
+ },
+ ],
+ },
+ releasedAt: '2026-07-21',
+ settings: {
+ disabledParams: ['temperature', 'top_p'],
+ extendParams: ['thinkingLevel', 'urlContext'],
+ searchImpl: 'params',
+ searchProvider: 'google',
+ },
+ type: 'chat',
+ },
{
abilities: {
audio: true,
@@ -18,7 +63,6 @@ const vertexaiChatModels: AIChatModelCard[] = [
description:
"Gemini's most intelligent model built for speed, combining frontier intelligence with superior search and grounding.",
displayName: 'Gemini 3.5 Flash',
- enabled: true,
family: 'gemini',
generation: 'gemini-3.5',
id: 'gemini-3.5-flash',
@@ -48,6 +92,51 @@ const vertexaiChatModels: AIChatModelCard[] = [
},
type: 'chat',
},
+ {
+ abilities: {
+ audio: true,
+ functionCall: true,
+ reasoning: true,
+ search: true,
+ structuredOutput: true,
+ video: true,
+ vision: true,
+ },
+ contextWindowTokens: 1_048_576 + 65_536,
+ description:
+ "Gemini 3.5 Flash-Lite is Google's fastest, most cost-efficient 3.5 model for high-throughput agentic tasks, document parsing, and simple data extraction.",
+ displayName: 'Gemini 3.5 Flash-Lite',
+ enabled: true,
+ family: 'gemini',
+ generation: 'gemini-3.5',
+ id: 'gemini-3.5-flash-lite',
+ knowledgeCutoff: '2026-03',
+ maxOutput: 65_536,
+ pricing: {
+ units: [
+ { name: 'textInput_cacheRead', rate: 0.03, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textInput', rate: 0.3, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'imageInput', rate: 0.3, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'videoInput', rate: 0.3, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'audioInput', rate: 0.3, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textOutput', rate: 2.5, strategy: 'fixed', unit: 'millionTokens' },
+ {
+ lookup: { prices: { '1h': 1 }, pricingParams: ['ttl'] },
+ name: 'textInput_cacheWrite',
+ strategy: 'lookup',
+ unit: 'millionTokens',
+ },
+ ],
+ },
+ releasedAt: '2026-07-21',
+ settings: {
+ disabledParams: ['temperature', 'top_p'],
+ extendParams: ['thinkingLevel', 'urlContext'],
+ searchImpl: 'params',
+ searchProvider: 'google',
+ },
+ type: 'chat',
+ },
{
abilities: {
imageOutput: true,
@@ -188,7 +277,6 @@ const vertexaiChatModels: AIChatModelCard[] = [
description:
"Gemini 3.1 Flash-Lite is Google's most cost-efficient multimodal model, optimized for high-volume agentic tasks, translation, and data processing.",
displayName: 'Gemini 3.1 Flash-Lite',
- enabled: true,
family: 'gemini',
generation: 'gemini-3.1',
id: 'gemini-3.1-flash-lite',
diff --git a/packages/model-bank/src/const/knowledgeCutoff.ts b/packages/model-bank/src/const/knowledgeCutoff.ts
index bfd9c8e3054..ac58e2b93dc 100644
--- a/packages/model-bank/src/const/knowledgeCutoff.ts
+++ b/packages/model-bank/src/const/knowledgeCutoff.ts
@@ -85,6 +85,8 @@ export const MODEL_KNOWLEDGE_CUTOFFS: Record<string, string> = {
'gemini-3.1-flash-lite': '2025-01',
'gemini-3.1-pro': '2025-01',
'gemini-3.5-flash': '2025-01',
+ 'gemini-3.5-flash-lite': '2026-03',
+ 'gemini-3.6-flash': '2026-03',
'gemma-4-26b-a4b-it': '2025-01',
'gemma-4-31b-it': '2025-01',
diff --git a/packages/model-runtime/src/providers/google/index.test.ts b/packages/model-runtime/src/providers/google/index.test.ts
index 53270bae2d8..feb2210a279 100644
--- a/packages/model-runtime/src/providers/google/index.test.ts
+++ b/packages/model-runtime/src/providers/google/index.test.ts
@@ -126,10 +126,10 @@ describe('LobeGoogleAI', () => {
expect(request.model).toBe('gemini-3.6-flash');
expect(request.config).toMatchObject({
- temperature: undefined,
thinkingConfig: { thinkingBudget: undefined, thinkingLevel: 'medium' },
- topP: undefined,
});
+ expect(request.config).not.toHaveProperty('temperature');
+ expect(request.config).not.toHaveProperty('topP');
expect(request.contents).toMatchObject([
{ parts: [{ text: 'Hello' }], role: 'user' },
{
@@ -810,6 +810,41 @@ describe('thinkingConfig includeThoughts logic', () => {
});
});
+describe('sampling params compatibility', () => {
+ it.each([
+ 'gemini-3.6-flash',
+ 'gemini-3.5-flash-lite',
+ 'gemini-flash-latest',
+ 'gemini-flash-lite-latest',
+ ])('omits temperature and topP for %s', async (model) => {
+ await instance.chat({
+ messages: [{ content: 'Hello', role: 'user' }],
+ model,
+ temperature: 0.7,
+ top_p: 0.8,
+ });
+
+ const callArgs = (instance['client'].models.generateContentStream as any).mock.calls[0];
+ const config = callArgs[0].config;
+ expect(config).not.toHaveProperty('temperature');
+ expect(config).not.toHaveProperty('topP');
+ });
+
+ it('keeps sampling params for models without the restriction', async () => {
+ await instance.chat({
+ messages: [{ content: 'Hello', role: 'user' }],
+ model: 'gemini-3.5-pro',
+ temperature: 0.7,
+ top_p: 0.8,
+ });
+
+ const callArgs = (instance['client'].models.generateContentStream as any).mock.calls[0];
+ const config = callArgs[0].config;
+ expect(config.temperature).toBe(0.7);
+ expect(config.topP).toBe(0.8);
+ });
+});
+
describe('buildGoogleToolsWithSearch', () => {
it('should include imageSearch searchTypes for models in modelsWithImageSearch when search is enabled', async () => {
const mockStream = new ReadableStream({
diff --git a/packages/model-runtime/src/providers/google/index.ts b/packages/model-runtime/src/providers/google/index.ts
index 98e063570ab..58ab94013b4 100644
--- a/packages/model-runtime/src/providers/google/index.ts
+++ b/packages/model-runtime/src/providers/google/index.ts
@@ -218,11 +218,14 @@ export class LobeGoogleAI implements LobeRuntimeAI {
systemInstruction: shouldDisableGoogleSystemInstruction(model)
? undefined
: (payload.system as string),
- temperature: shouldOmitDeprecatedGenerationParams
- ? undefined
- : isImageResponseModel
- ? Math.min(payload.temperature ?? 1, 1)
- : payload.temperature,
+ ...(shouldOmitDeprecatedGenerationParams
+ ? {}
+ : {
+ temperature: isImageResponseModel
+ ? Math.min(payload.temperature ?? 1, 1)
+ : payload.temperature,
+ topP: payload.top_p,
+ }),
thinkingConfig: shouldDisableGoogleThinkingConfig(model)
? undefined
: normalizeThinkingConfig(thinkingConfig),
@@ -233,7 +236,6 @@ export class LobeGoogleAI implements LobeRuntimeAI {
? { includeServerSideToolInvocations: true }
: undefined,
tools,
- topP: shouldOmitDeprecatedGenerationParams ? undefined : payload.top_p,
};
const inputStartAt = Date.now();
diff --git a/packages/model-runtime/src/providers/google/modelId.test.ts b/packages/model-runtime/src/providers/google/modelId.test.ts
index 4e2a6d5dd3a..39addfcb144 100644
--- a/packages/model-runtime/src/providers/google/modelId.test.ts
+++ b/packages/model-runtime/src/providers/google/modelId.test.ts
@@ -69,6 +69,8 @@ describe('modelId', () => {
['gemini-3.5-flash', false],
['gemini-3.5-flash-lite', true],
['gemini-3.6-flash', true],
+ ['gemini-flash-latest', true],
+ ['gemini-flash-lite-latest', true],
['google/gemini-4-flash', true],
])('detects modern generation config requirements for %s', (model, expected) => {
expect(shouldOmitDeprecatedGoogleGenerationParams(model)).toBe(expected);
diff --git a/packages/model-runtime/src/providers/google/modelId.ts b/packages/model-runtime/src/providers/google/modelId.ts
index 75049555b71..5c0df831078 100644
--- a/packages/model-runtime/src/providers/google/modelId.ts
+++ b/packages/model-runtime/src/providers/google/modelId.ts
@@ -28,6 +28,11 @@ const SAFETY_OFF_MODELS = new Set(['gemini-2.0-flash-exp']);
// https://ai.google.dev/gemini-api/docs/generate-content/latest-model
const MODELS_WITH_DEPRECATED_GENERATION_PARAMS = new Set(['gemini-3.5-flash-lite']);
+const ALIASES_WITH_DEPRECATED_GENERATION_PARAMS = new Set([
+ 'gemini-flash-latest',
+ 'gemini-flash-lite-latest',
+]);
+
const IMAGE_RESPONSE_MODEL_ALIASES = new Set(['gemini-2.0-flash-exp', 'nano-banana-pro-preview']);
const LOBE_IMAGE_MODEL_ID_SUFFIX = ':image';
@@ -206,6 +211,7 @@ export const shouldOmitDeprecatedGoogleGenerationParams = (model: string): boole
return (
(!!normalizedModelId && MODELS_WITH_DEPRECATED_GENERATION_PARAMS.has(normalizedModelId)) ||
+ (!!normalizedModelId && ALIASES_WITH_DEPRECATED_GENERATION_PARAMS.has(normalizedModelId)) ||
isGeminiVersionAtLeast(model, 3, 6)
);
};
diff --git a/packages/model-runtime/src/providers/google/thinkingResolver.test.ts b/packages/model-runtime/src/providers/google/thinkingResolver.test.ts
index f6e20609666..466f1dc9af9 100644
--- a/packages/model-runtime/src/providers/google/thinkingResolver.test.ts
+++ b/packages/model-runtime/src/providers/google/thinkingResolver.test.ts
@@ -40,6 +40,7 @@ describe('thinkingResolver', () => {
it.each([
'gemini-2.5-flash',
'gemini-2.5-flash-preview',
+ 'gemini-3.6-flash',
'gemini-3.5-flash',
'gemini-3-flash',
'gemini-3.0-flash',
@@ -55,6 +56,7 @@ describe('thinkingResolver', () => {
it.each([
'gemini-2.5-flash-lite',
'gemini-2.5-flash-lite-preview',
+ 'gemini-3.5-flash-lite',
'gemini-3-flash-lite',
'flash-lite-latest',
])('should return "flashLite" for %s', (model) => {
@@ -86,7 +88,12 @@ describe('thinkingResolver', () => {
});
it.each([
+ 'gemini-pro-latest',
+ 'gemini-flash-latest',
+ 'gemini-flash-lite-latest',
+ 'gemini-3.6-flash',
'gemini-3.5-flash',
+ 'gemini-3.5-flash-lite',
'gemini-3-pro',
'gemini-3-pro-preview',
'gemini-3-flash',
@@ -546,7 +553,15 @@ describe('resolveGoogleThinkingBudget', () => {
*/
describe('thinkingBudget and thinkingLevel mutual exclusivity', () => {
describe('Gemini 3.0+ models (supports thinkingLevel)', () => {
- const models = ['gemini-3-pro', 'gemini-3-flash', 'gemini-3.0-pro-preview', 'gemma-4-31b-it'];
+ const models = [
+ 'gemini-pro-latest',
+ 'gemini-flash-latest',
+ 'gemini-flash-lite-latest',
+ 'gemini-3-pro',
+ 'gemini-3-flash',
+ 'gemini-3.0-pro-preview',
+ 'gemma-4-31b-it',
+ ];
it.each(models)('%s: should use thinkingLevel only when set', (model) => {
const result = resolveGoogleThinkingConfig(model, { thinkingLevel: 'high' });
diff --git a/packages/model-runtime/src/providers/google/thinkingResolver.ts b/packages/model-runtime/src/providers/google/thinkingResolver.ts
index 40eb2740ae4..015dd0c0212 100644
--- a/packages/model-runtime/src/providers/google/thinkingResolver.ts
+++ b/packages/model-runtime/src/providers/google/thinkingResolver.ts
@@ -1,4 +1,4 @@
-import { isGemini3OrAbove, parseGoogleModelId } from './modelId';
+import { isGemini3OrAbove, normalizeGoogleModelId, parseGoogleModelId } from './modelId';
/**
* Google Gemini Thinking Resolver
@@ -59,6 +59,12 @@ const THINKING_BUDGET_CONSTRAINTS = {
FLASH_LITE_MAX: 24_576,
} as const;
+const GEMINI_THINKING_LEVEL_ALIASES = new Set([
+ 'gemini-flash-latest',
+ 'gemini-flash-lite-latest',
+ 'gemini-pro-latest',
+]);
+
// ============================================================================
// Helper Functions
// ============================================================================
@@ -110,6 +116,9 @@ export const getGoogleThinkingModelCategory = (model?: string): GoogleThinkingMo
export const isGemini3Model = (model?: string): boolean => {
if (!model) return false;
+ const normalizedModelId = normalizeGoogleModelId(model);
+ if (normalizedModelId && GEMINI_THINKING_LEVEL_ALIASES.has(normalizedModelId)) return true;
+
const parsed = parseGoogleModelId(model);
return (
diff --git a/packages/model-runtime/src/utils/modelExtendParams.test.ts b/packages/model-runtime/src/utils/modelExtendParams.test.ts
index a6e5de0128c..9bf5ce9c817 100644
--- a/packages/model-runtime/src/utils/modelExtendParams.test.ts
+++ b/packages/model-runtime/src/utils/modelExtendParams.test.ts
@@ -228,6 +228,9 @@ describe('resolveDefaultThinkingLevelForModel', () => {
});
it('uses per-model defaults', () => {
+ expect(resolveDefaultThinkingLevelForModel('gemini-flash-latest')).toBe('medium');
+ expect(resolveDefaultThinkingLevelForModel('gemini-flash-lite-latest')).toBe('minimal');
+ expect(resolveDefaultThinkingLevelForModel('gemini-3.6-flash')).toBe('medium');
expect(resolveDefaultThinkingLevelForModel('gemini-3.5-flash')).toBe('medium');
expect(resolveDefaultThinkingLevelForModel('gemini-3.5-flash-lite')).toBe('minimal');
expect(resolveDefaultThinkingLevelForModel('gemini-3.1-flash-lite')).toBe('minimal');
diff --git a/packages/model-runtime/src/utils/modelExtendParams.ts b/packages/model-runtime/src/utils/modelExtendParams.ts
index 527c52217a8..f601eee0e92 100644
--- a/packages/model-runtime/src/utils/modelExtendParams.ts
+++ b/packages/model-runtime/src/utils/modelExtendParams.ts
@@ -40,12 +40,18 @@ const DEFAULT_THINKING_LEVEL_BY_EXTEND_PARAM = {
const MODEL_THINKING_LEVEL_DEFAULTS: Partial<
Record<string, Partial<Record<ThinkingLevelExtendParam, ThinkingLevelValue>>>
> = {
- 'gemini-3.5-flash': {
+ 'gemini-flash-latest': {
thinkingLevel: 'medium',
},
+ 'gemini-flash-lite-latest': {
+ thinkingLevel: 'minimal',
+ },
'gemini-3.6-flash': {
thinkingLevel: 'medium',
},
+ 'gemini-3.5-flash': {
+ thinkingLevel: 'medium',
+ },
'gemini-3.5-flash-lite': {
thinkingLevel: 'minimal',
},