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.

✨ feat: add Gemini 3.7 Flash descriptions and runtime coverage (#18290)

YuTengjing5852e0974f01
diff --git a/locales/en-US/models.json b/locales/en-US/models.json
index c63dd75d3c5..a7dbba74cbb 100644
--- a/locales/en-US/models.json
+++ b/locales/en-US/models.json
@@ -830,6 +830,7 @@
"lobehub.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.",
"lobehub.gemini-3.5-flash.description": "Gemini's most intelligent model built for speed, combining frontier intelligence with superior search and grounding.",
"lobehub.gemini-3.6-flash.description": "Gemini 3.6 Flash balances speed with intelligence for strong agentic, coding, and multimodal performance with improved token efficiency.",
+ "lobehub.gemini-3.7-flash.description": "Gemini 3.7 Flash is Google's most capable Flash model, built for complex coding, agentic workflows, and reliable multi-step execution.",
"lobehub.glm-5.1.description": "Zai's latest flagship model, aligned with Claude Opus 4.6 on overall and coding capabilities. Excels at long-horizon tasks with autonomous work up to 8 hours, an ideal foundation for Autonomous Agents and long-horizon Coding Agents.",
"lobehub.glm-5.2.description": "GLM-5.2 is the first open-source model to approach the performance of the latest-generation Claude Opus released in the same period.",
"lobehub.gpt-4-turbo.description": "GPT-4 Turbo is a cost-effective multimodal model that balances accuracy and efficiency for real-time tasks.",
diff --git a/locales/zh-CN/models.json b/locales/zh-CN/models.json
index 3b7adb4aec7..86159a2f752 100644
--- a/locales/zh-CN/models.json
+++ b/locales/zh-CN/models.json
@@ -830,6 +830,7 @@
"lobehub.gemini-3.5-flash-lite.description": "Gemini 3.5 Flash-Lite 是谷歌最快、成本最低的 3.5 模型,专为高吞吐量智能代理任务、文档解析和多模态数据提取优化。",
"lobehub.gemini-3.5-flash.description": "Gemini 的最智能模型,专为速度而设计,结合前沿智能与卓越的搜索和基础能力。",
"lobehub.gemini-3.6-flash.description": "Gemini 3.6 Flash 在速度与智能之间实现平衡,适用于强大的智能代理、编码和多模态性能,并提高了令牌效率。",
+ "lobehub.gemini-3.7-flash.description": "Gemini 3.7 Flash 是 Google 最强的 Flash 模型,面向复杂编程、智能体工作流和可靠的多步执行。",
"lobehub.glm-5.1.description": "Zai 的最新旗舰模型,在整体和编码能力上与 Claude Opus 4.6 对齐。擅长长时间任务,支持长达 8 小时的自主工作,是自主代理和长时间编码代理的理想基础。",
"lobehub.glm-5.2.description": "GLM-5.2 是首个接近同期发布的最新一代 Claude Opus 性能的开源模型。",
"lobehub.gpt-4-turbo.description": "GPT-4 Turbo 是一个成本效益高的多模态模型,在实时任务中平衡了准确性和效率。",
diff --git a/packages/locales/src/lobehubOnlineModelDescriptions.test.ts b/packages/locales/src/lobehubOnlineModelDescriptions.test.ts
index 72eafbccc0a..306a81186a5 100644
--- a/packages/locales/src/lobehubOnlineModelDescriptions.test.ts
+++ b/packages/locales/src/lobehubOnlineModelDescriptions.test.ts
@@ -10,8 +10,7 @@ const zhCNDescriptions = zhCNModels as Record<string, string>;
const addedDescriptionKeys = [
'lobehub.gemini-3.1-flash-image.description',
'lobehub.gemini-3.1-flash-image:image.description',
- 'lobehub.gemini-3.1-flash-image-preview.description',
- 'lobehub.gemini-3.1-flash-image-preview:image.description',
+ 'lobehub.gemini-3.7-flash.description',
'lobehub.qwen3.8-max.description',
'lobehub.grok-4.6.description',
] as const;
diff --git a/packages/locales/src/lobehubOnlineModelDescriptions.ts b/packages/locales/src/lobehubOnlineModelDescriptions.ts
index ca2c0233680..ceb8a330c2a 100644
--- a/packages/locales/src/lobehubOnlineModelDescriptions.ts
+++ b/packages/locales/src/lobehubOnlineModelDescriptions.ts
@@ -60,10 +60,6 @@ export const lobeHubOnlineModelDescriptions = {
'Gemini 3.1 Flash Image (Nano Banana 2) delivers Pro-level image quality at Flash speed with multimodal chat support.',
'lobehub.gemini-3.1-flash-image.description':
'Gemini 3.1 Flash Image (Nano Banana 2) delivers Pro-level image quality at Flash speed with multimodal chat support.',
- 'lobehub.gemini-3.1-flash-image-preview:image.description':
- 'Gemini 3.1 Flash Image (Nano Banana 2) delivers Pro-level image quality at Flash speed with multimodal chat support.',
- 'lobehub.gemini-3.1-flash-image-preview.description':
- 'Gemini 3.1 Flash Image (Nano Banana 2) delivers Pro-level image quality at Flash speed with multimodal chat support.',
'lobehub.gemini-3.1-flash-lite-image:image.description':
"Gemini 3.1 Flash Lite Image (Nano Banana 2 Lite) is Google's fastest and most cost-efficient image generation model, built for high-volume generation and editing.",
'lobehub.gemini-3.1-flash-lite-image.description':
@@ -76,6 +72,8 @@ export const lobeHubOnlineModelDescriptions = {
"Gemini's most intelligent model built for speed, combining frontier intelligence with superior search and grounding.",
'lobehub.gemini-3.6-flash.description':
'Gemini 3.6 Flash balances speed with intelligence for strong agentic, coding, and multimodal performance with improved token efficiency.',
+ 'lobehub.gemini-3.7-flash.description':
+ "Gemini 3.7 Flash is Google's most capable Flash model, built for complex coding, agentic workflows, and reliable multi-step execution.",
'lobehub.glm-5.1.description':
"Zai's latest flagship model, aligned with Claude Opus 4.6 on overall and coding capabilities. Excels at long-horizon tasks with autonomous work up to 8 hours, an ideal foundation for Autonomous Agents and long-horizon Coding Agents.",
'lobehub.glm-5.2.description':
diff --git a/packages/model-runtime/src/providers/google/index.test.ts b/packages/model-runtime/src/providers/google/index.test.ts
index 63e1aa8293f..29cde49ca93 100644
--- a/packages/model-runtime/src/providers/google/index.test.ts
+++ b/packages/model-runtime/src/providers/google/index.test.ts
@@ -315,6 +315,7 @@ describe('LobeGoogleAI', () => {
it.each([
['gemini-3.6-flash', 'medium'],
+ ['gemini-3.7-flash', 'medium'],
['gemini-3.5-flash-lite', 'minimal'],
] as const)('should omit deprecated generation config for %s', async (model, thinkingLevel) => {
await instance.chat({
@@ -337,7 +338,7 @@ describe('LobeGoogleAI', () => {
});
});
- it.each(['gemini-3.6-flash', 'gemini-3.5-flash-lite'])(
+ it.each(['gemini-3.6-flash', 'gemini-3.7-flash', 'gemini-3.5-flash-lite'])(
'should drop assistant prefill turns for %s',
async (model) => {
await instance.chat({
@@ -944,6 +945,7 @@ describe('thinkingConfig includeThoughts logic', () => {
describe('sampling params compatibility', () => {
it.each([
'gemini-3.6-flash',
+ 'gemini-3.7-flash',
'gemini-3.5-flash-lite',
'gemini-flash-latest',
'gemini-flash-lite-latest',
diff --git a/packages/model-runtime/src/providers/google/modelId.test.ts b/packages/model-runtime/src/providers/google/modelId.test.ts
index b2345353e9a..92641f385e8 100644
--- a/packages/model-runtime/src/providers/google/modelId.test.ts
+++ b/packages/model-runtime/src/providers/google/modelId.test.ts
@@ -69,6 +69,7 @@ describe('modelId', () => {
['gemini-3.5-flash', false],
['gemini-3.5-flash-lite', true],
['gemini-3.6-flash', true],
+ ['gemini-3.7-flash', true],
['gemini-flash-latest', true],
['gemini-flash-lite-latest', true],
['google/gemini-4-flash', true],
diff --git a/packages/model-runtime/src/providers/google/thinkingResolver.test.ts b/packages/model-runtime/src/providers/google/thinkingResolver.test.ts
index 466f1dc9af9..70364d41aa1 100644
--- a/packages/model-runtime/src/providers/google/thinkingResolver.test.ts
+++ b/packages/model-runtime/src/providers/google/thinkingResolver.test.ts
@@ -41,6 +41,7 @@ describe('thinkingResolver', () => {
'gemini-2.5-flash',
'gemini-2.5-flash-preview',
'gemini-3.6-flash',
+ 'gemini-3.7-flash',
'gemini-3.5-flash',
'gemini-3-flash',
'gemini-3.0-flash',
@@ -92,6 +93,7 @@ describe('thinkingResolver', () => {
'gemini-flash-latest',
'gemini-flash-lite-latest',
'gemini-3.6-flash',
+ 'gemini-3.7-flash',
'gemini-3.5-flash',
'gemini-3.5-flash-lite',
'gemini-3-pro',
diff --git a/packages/model-runtime/src/utils/modelExtendParams.test.ts b/packages/model-runtime/src/utils/modelExtendParams.test.ts
index 40aa634e21f..c9ddc4ccd93 100644
--- a/packages/model-runtime/src/utils/modelExtendParams.test.ts
+++ b/packages/model-runtime/src/utils/modelExtendParams.test.ts
@@ -64,6 +64,16 @@ describe('applyModelExtendParams', () => {
expect(result.thinkingLevel).toBe('medium');
});
+ it('defaults Gemini 3.7 Flash thinkingLevel to medium (thinkingLevel3, no minimal)', () => {
+ const result = applyModelExtendParams({
+ chatConfig: chatConfig({}),
+ extendParams: ['thinkingLevel3', 'urlContext'],
+ model: 'gemini-3.7-flash',
+ });
+
+ expect(result.thinkingLevel).toBe('medium');
+ });
+
it('honors an explicit Gemini 3.6 Flash thinkingLevel value', () => {
const result = applyModelExtendParams({
chatConfig: chatConfig({ thinkingLevel: 'low' }),
@@ -268,6 +278,9 @@ describe('resolveDefaultThinkingLevelForModel', () => {
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.7-flash', 'thinkingLevel3')).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 aeb78d479cf..df91acde18b 100644
--- a/packages/model-runtime/src/utils/modelExtendParams.ts
+++ b/packages/model-runtime/src/utils/modelExtendParams.ts
@@ -85,6 +85,7 @@ type ThinkingLevelExtendParam =
'thinkingLevel' | 'thinkingLevel2' | 'thinkingLevel3' | 'thinkingLevel4';
type ThinkingLevelValue = NonNullable<LobeAgentChatConfig['thinkingLevel']>;
+type ThinkingLevel3Value = Extract<ThinkingLevelValue, 'high' | 'low' | 'medium'>;
const DEFAULT_THINKING_LEVEL_BY_EXTEND_PARAM = {
thinkingLevel: 'high',
@@ -105,6 +106,9 @@ const MODEL_THINKING_LEVEL_DEFAULTS: Partial<
'gemini-3.6-flash': {
thinkingLevel: 'medium',
},
+ 'gemini-3.7-flash': {
+ thinkingLevel3: 'medium',
+ },
'gemini-3.5-flash': {
thinkingLevel: 'medium',
},
@@ -147,11 +151,22 @@ const isThinkingLevelExtendParam = (
extendParam: ExtendParamsType,
): extendParam is ThinkingLevelExtendParam => extendParam in DEFAULT_THINKING_LEVEL_BY_EXTEND_PARAM;
-export const resolveDefaultThinkingLevelForModel = (model?: string): ThinkingLevelValue => {
- if (!model) return DEFAULT_THINKING_LEVEL_BY_EXTEND_PARAM.thinkingLevel;
+export function resolveDefaultThinkingLevelForModel(
+ model: string | undefined,
+ extendParam: 'thinkingLevel3',
+): ThinkingLevel3Value;
+export function resolveDefaultThinkingLevelForModel(
+ model?: string,
+ extendParam?: Exclude<ThinkingLevelExtendParam, 'thinkingLevel3'>,
+): ThinkingLevelValue;
+export function resolveDefaultThinkingLevelForModel(
+ model?: string,
+ extendParam: ThinkingLevelExtendParam = 'thinkingLevel',
+): ThinkingLevelValue {
+ if (!model) return DEFAULT_THINKING_LEVEL_BY_EXTEND_PARAM[extendParam];
- return resolveThinkingLevelDefault(model, 'thinkingLevel');
-};
+ return resolveThinkingLevelDefault(model, extendParam);
+}
/**
* Returns `true` for models that ship adaptive thinking on, `undefined` when the model has
diff --git a/src/features/ModelSwitchPanel/components/ControlsForm/ControlsForm.tsx b/src/features/ModelSwitchPanel/components/ControlsForm/ControlsForm.tsx
index f5ef8196ff2..a0ab0bb37ca 100644
--- a/src/features/ModelSwitchPanel/components/ControlsForm/ControlsForm.tsx
+++ b/src/features/ModelSwitchPanel/components/ControlsForm/ControlsForm.tsx
@@ -154,6 +154,7 @@ const ControlsForm = memo<ControlsFormProps>(
const gpt52ReasoningEffortDefaultValue = model === 'gpt-5.5' ? 'medium' : 'none';
const thinkingLevelDefaultValue = resolveDefaultThinkingLevelForModel(model);
+ const thinkingLevel3DefaultValue = resolveDefaultThinkingLevelForModel(model, 'thinkingLevel3');
// Show descriptions as a question-mark tooltip beside the label, matching
// the ControlRow items rendered above this form in the params panel.
@@ -512,7 +513,7 @@ const ControlsForm = memo<ControlsFormProps>(
},
},
{
- children: <ThinkingLevel3Slider />,
+ children: <ThinkingLevel3Slider defaultValue={thinkingLevel3DefaultValue} />,
label: t('extendParams.thinkingLevel.title'),
layout: 'vertical',
minWidth: undefined,
diff --git a/src/services/chat/mecha/modelParamsResolver.test.ts b/src/services/chat/mecha/modelParamsResolver.test.ts
index 9572548abe3..f96a6d25a1d 100644
--- a/src/services/chat/mecha/modelParamsResolver.test.ts
+++ b/src/services/chat/mecha/modelParamsResolver.test.ts
@@ -732,6 +732,20 @@ describe('thinking configuration', () => {
expect(result.thinkingLevel).toBe('medium');
});
+ it('should default Gemini 3.7 Flash to medium via thinkingLevel3', () => {
+ vi.spyOn(aiModelSelectors.aiModelSelectors, 'modelExtendParams').mockReturnValue(() => [
+ 'thinkingLevel3',
+ ]);
+
+ const result = resolveModelExtendParams({
+ chatConfig: {} as any,
+ model: 'gemini-3.7-flash',
+ provider: 'google',
+ });
+
+ expect(result.thinkingLevel).toBe('medium');
+ });
+
it('should reuse thinkingLevel for Gemini 3.1 Flash-Lite models', () => {
const result = resolveModelExtendParams({
chatConfig: {