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: Fully support Gemini 3.0 model (#10292)

sxjeru6545ef863ceb
diff --git a/packages/model-bank/src/aiModels/aihubmix.ts b/packages/model-bank/src/aiModels/aihubmix.ts
index 3fbec6c1260..7a0c85291b4 100644
--- a/packages/model-bank/src/aiModels/aihubmix.ts
+++ b/packages/model-bank/src/aiModels/aihubmix.ts
@@ -986,6 +986,66 @@ const aihubmixModels: AIChatModelCard[] = [
},
type: 'chat',
},
+ {
+ abilities: {
+ functionCall: true,
+ reasoning: true,
+ search: true,
+ video: true,
+ vision: true,
+ },
+ contextWindowTokens: 1_048_576 + 65_536,
+ description:
+ 'Gemini 3 Pro 是 Google 最智能的模型,具有 SOTA 推理和多模式理解,以及强大的代理和氛围编码功能。',
+ displayName: 'Gemini 3 Pro Preview',
+ enabled: true,
+ id: 'gemini-3-pro-preview',
+ maxOutput: 65_536,
+ pricing: {
+ units: [
+ {
+ name: 'textInput_cacheRead',
+ strategy: 'tiered',
+ tiers: [
+ { rate: 0.2, upTo: 200_000 },
+ { rate: 0.4, upTo: 'infinity' },
+ ],
+ unit: 'millionTokens',
+ },
+ {
+ name: 'textInput',
+ strategy: 'tiered',
+ tiers: [
+ { rate: 2, upTo: 200_000 },
+ { rate: 4, upTo: 'infinity' },
+ ],
+ unit: 'millionTokens',
+ },
+ {
+ name: 'textOutput',
+ strategy: 'tiered',
+ tiers: [
+ { rate: 12, upTo: 200_000 },
+ { rate: 18, upTo: 'infinity' },
+ ],
+ unit: 'millionTokens',
+ },
+ {
+ lookup: { prices: { '1h': 4.5 }, pricingParams: ['ttl'] },
+ name: 'textInput_cacheWrite',
+ strategy: 'lookup',
+ unit: 'millionTokens',
+ },
+ ],
+ },
+ releasedAt: '2025-11-18',
+ settings: {
+ extendParams: ['thinkingLevel', 'urlContext'],
+ searchImpl: 'params',
+ searchProvider: 'google',
+ },
+ type: 'chat',
+ },
{
abilities: {
functionCall: true,
@@ -998,7 +1058,6 @@ const aihubmixModels: AIChatModelCard[] = [
description:
'Gemini 2.5 Pro 是 Google 最先进的思维模型,能够对代码、数学和STEM领域的复杂问题进行推理,以及使用长上下文分析大型数据集、代码库和文档。',
displayName: 'Gemini 2.5 Pro',
- enabled: true,
id: 'gemini-2.5-pro',
maxOutput: 65_536,
pricing: {
diff --git a/packages/model-bank/src/aiModels/google.ts b/packages/model-bank/src/aiModels/google.ts
index 7f8eeb88896..57a587f4b05 100644
--- a/packages/model-bank/src/aiModels/google.ts
+++ b/packages/model-bank/src/aiModels/google.ts
@@ -123,8 +123,8 @@ const googleChatModels: AIChatModelCard[] = [
},
contextWindowTokens: 1_048_576 + 65_536,
description:
- 'Gemini 3.0 Pro Preview 是 Google 最先进的思维模型,能够对代码、数学和STEM领域的复杂问题进行推理,以及使用长上下文分析大型数据集、代码库和文档。',
- displayName: 'Gemini 3.0 Pro Preview',
+ 'Gemini 3 Pro 是 全球最佳的多模态理解模型,也是 Google 迄今为止最强大的智能体和氛围编程模型,提供更丰富的视觉效果和更深层次的交互性,所有这些都建立在最先进的推理能力基础之上。',
+ displayName: 'Gemini 3 Pro Preview',
enabled: true,
id: 'gemini-3-pro-preview',
maxOutput: 65_536,
@@ -134,8 +134,8 @@ const googleChatModels: AIChatModelCard[] = [
name: 'textInput_cacheRead',
strategy: 'tiered',
tiers: [
- { rate: 0.20, upTo: 200_000 },
- { rate: 0.40, upTo: 'infinity' },
+ { rate: 0.2, upTo: 200_000 },
+ { rate: 0.4, upTo: 'infinity' },
],
unit: 'millionTokens',
},
@@ -143,8 +143,8 @@ const googleChatModels: AIChatModelCard[] = [
name: 'textInput',
strategy: 'tiered',
tiers: [
- { rate: 2.0, upTo: 200_000 },
- { rate: 4.0, upTo: 'infinity' },
+ { rate: 2, upTo: 200_000 },
+ { rate: 4, upTo: 'infinity' },
],
unit: 'millionTokens',
},
@@ -152,16 +152,22 @@ const googleChatModels: AIChatModelCard[] = [
name: 'textOutput',
strategy: 'tiered',
tiers: [
- { rate: 12.0, upTo: 200_000 },
- { rate: 18.0, upTo: 'infinity' },
+ { rate: 12, upTo: 200_000 },
+ { rate: 18, upTo: 'infinity' },
],
unit: 'millionTokens',
},
+ {
+ lookup: { prices: { '1h': 4.5 }, pricingParams: ['ttl'] },
+ name: 'textInput_cacheWrite',
+ strategy: 'lookup',
+ unit: 'millionTokens',
+ },
],
},
releasedAt: '2025-11-18',
settings: {
- extendParams: ['thinkingBudget', 'urlContext'],
+ extendParams: ['thinkingLevel', 'urlContext'],
searchImpl: 'params',
searchProvider: 'google',
},
@@ -211,6 +217,12 @@ const googleChatModels: AIChatModelCard[] = [
],
unit: 'millionTokens',
},
+ {
+ lookup: { prices: { '1h': 4.5 }, pricingParams: ['ttl'] },
+ name: 'textInput_cacheWrite',
+ strategy: 'lookup',
+ unit: 'millionTokens',
+ },
],
},
releasedAt: '2025-06-17',
@@ -383,34 +395,6 @@ const googleChatModels: AIChatModelCard[] = [
},
type: 'chat',
},
- {
- abilities: {
- functionCall: true,
- reasoning: true,
- search: true,
- video: true,
- vision: true,
- },
- contextWindowTokens: 1_048_576 + 65_536,
- description: 'Gemini 2.5 Flash Preview 是 Google 性价比最高的模型,提供全面的功能。',
- displayName: 'Gemini 2.5 Flash Preview 05-20',
- id: 'gemini-2.5-flash-preview-05-20',
- maxOutput: 65_536,
- pricing: {
- units: [
- { name: 'textInput_cacheRead', rate: 0.0375, strategy: 'fixed', unit: 'millionTokens' },
- { name: 'textInput', rate: 0.15, strategy: 'fixed', unit: 'millionTokens' },
- { name: 'textOutput', rate: 3.5, strategy: 'fixed', unit: 'millionTokens' },
- ],
- },
- releasedAt: '2025-05-20',
- settings: {
- extendParams: ['thinkingBudget', 'urlContext'],
- searchImpl: 'params',
- searchProvider: 'google',
- },
- type: 'chat',
- },
{
abilities: {
imageOutput: true,
@@ -514,35 +498,6 @@ const googleChatModels: AIChatModelCard[] = [
},
type: 'chat',
},
- {
- abilities: {
- functionCall: true,
- reasoning: true,
- search: true,
- video: true,
- vision: true,
- },
- contextWindowTokens: 1_048_576 + 65_536,
- description:
- 'Gemini 2.5 Flash-Lite Preview 是 Google 最小、性价比最高的模型,专为大规模使用而设计。',
- displayName: 'Gemini 2.5 Flash-Lite Preview 06-17',
- id: 'gemini-2.5-flash-lite-preview-06-17',
- 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' },
- ],
- },
- releasedAt: '2025-06-11',
- settings: {
- extendParams: ['thinkingBudget', 'urlContext'],
- searchImpl: 'params',
- searchProvider: 'google',
- },
- type: 'chat',
- },
{
abilities: {
functionCall: true,
@@ -597,26 +552,6 @@ const googleChatModels: AIChatModelCard[] = [
},
type: 'chat',
},
- {
- abilities: {
- imageOutput: true,
- vision: true,
- },
- contextWindowTokens: 32_768 + 8192,
- description: 'Gemini 2.0 Flash 预览模型,支持图像生成',
- displayName: 'Gemini 2.0 Flash Preview Image Generation',
- id: 'gemini-2.0-flash-preview-image-generation',
- maxOutput: 8192,
- pricing: {
- units: [
- { name: 'textInput', rate: 0.1, strategy: 'fixed', unit: 'millionTokens' },
- { name: 'textOutput', rate: 0.4, strategy: 'fixed', unit: 'millionTokens' },
- { name: 'imageGeneration', rate: 0.039, strategy: 'fixed', unit: 'image' },
- ],
- },
- releasedAt: '2025-05-07',
- type: 'chat',
- },
{
abilities: {
imageOutput: true,
diff --git a/packages/model-bank/src/aiModels/ollamacloud.ts b/packages/model-bank/src/aiModels/ollamacloud.ts
index 11ef2fedbde..ad639f5f789 100644
--- a/packages/model-bank/src/aiModels/ollamacloud.ts
+++ b/packages/model-bank/src/aiModels/ollamacloud.ts
@@ -5,12 +5,14 @@ const ollamaCloudModels: AIChatModelCard[] = [
abilities: {
functionCall: true,
reasoning: true,
+ vision: true,
},
- contextWindowTokens: 200_000,
- description: 'MiniMax M2 是专为编码和代理工作流程构建的高效大型语言模型。',
- displayName: 'MiniMax M2',
+ contextWindowTokens: 1_048_576,
+ description:
+ 'Gemini 3 Pro 是 Google 最智能的模型,具有 SOTA 推理和多模式理解,以及强大的代理和氛围编码功能。',
+ displayName: 'Gemini 3 Pro Preview',
enabled: true,
- id: 'minimax-m2',
+ id: 'gemini-3-pro-preview',
type: 'chat',
},
{
@@ -19,8 +21,7 @@ const ollamaCloudModels: AIChatModelCard[] = [
reasoning: true,
},
contextWindowTokens: 200_000,
- description:
- 'MiniMax M2 是专为编码和代理工作流程构建的高效大型语言模型。',
+ description: 'MiniMax M2 是专为编码和代理工作流程构建的高效大型语言模型。',
displayName: 'MiniMax M2',
enabled: true,
id: 'minimax-m2',
diff --git a/packages/model-bank/src/types/aiModel.ts b/packages/model-bank/src/types/aiModel.ts
index 5bf5fb3486a..db77f3196b9 100644
--- a/packages/model-bank/src/types/aiModel.ts
+++ b/packages/model-bank/src/types/aiModel.ts
@@ -242,6 +242,7 @@ export type ExtendParamsType =
| 'textVerbosity'
| 'thinking'
| 'thinkingBudget'
+ | 'thinkingLevel'
| 'urlContext';
export interface AiModelSettings {
diff --git a/packages/model-runtime/src/providers/google/index.ts b/packages/model-runtime/src/providers/google/index.ts
index aeab210440f..e4ffae69e10 100644
--- a/packages/model-runtime/src/providers/google/index.ts
+++ b/packages/model-runtime/src/providers/google/index.ts
@@ -194,7 +194,7 @@ export class LobeGoogleAI implements LobeRuntimeAI {
async chat(rawPayload: ChatStreamPayload, options?: ChatMethodOptions) {
try {
const payload = this.buildPayload(rawPayload);
- const { model, thinkingBudget } = payload;
+ const { model, thinkingBudget, thinkingLevel } = payload;
// https://ai.google.dev/gemini-api/docs/thinking#set-budget
const resolvedThinkingBudget = resolveModelThinkingBudget(model, thinkingBudget);
@@ -209,6 +209,11 @@ export class LobeGoogleAI implements LobeRuntimeAI {
thinkingBudget: resolvedThinkingBudget,
};
+ // Add thinkingLevel for 3.0 models
+ if (model?.toLowerCase().includes('-3-') && thinkingLevel) {
+ (thinkingConfig as any).thinkingLevel = thinkingLevel;
+ }
+
const contents = await buildGoogleMessages(payload.messages);
const controller = new AbortController();
diff --git a/packages/model-runtime/src/types/chat.ts b/packages/model-runtime/src/types/chat.ts
index cd5f3299dd6..024b52109eb 100644
--- a/packages/model-runtime/src/types/chat.ts
+++ b/packages/model-runtime/src/types/chat.ts
@@ -124,6 +124,10 @@ export interface ChatStreamPayload {
type: 'enabled' | 'disabled';
};
thinkingBudget?: number;
+ /**
+ * Thinking level for Gemini models (e.g., gemini-3.0-pro)
+ */
+ thinkingLevel?: 'low' | 'high';
tool_choice?: string;
tools?: ChatCompletionTool[];
/**
diff --git a/packages/types/src/agent/chatConfig.ts b/packages/types/src/agent/chatConfig.ts
index cc34ffb7815..30419c7ee06 100644
--- a/packages/types/src/agent/chatConfig.ts
+++ b/packages/types/src/agent/chatConfig.ts
@@ -38,6 +38,7 @@ export interface LobeAgentChatConfig {
*/
textVerbosity?: 'low' | 'medium' | 'high';
thinking?: 'disabled' | 'auto' | 'enabled';
+ thinkingLevel?: 'low' | 'high';
thinkingBudget?: number;
/**
* Disable context caching
@@ -91,6 +92,7 @@ export const AgentChatConfigSchema = z.object({
textVerbosity: z.enum(['low', 'medium', 'high']).optional(),
thinking: z.enum(['disabled', 'auto', 'enabled']).optional(),
thinkingBudget: z.number().optional(),
+ thinkingLevel: z.enum(['low', 'high']).optional(),
urlContext: z.boolean().optional(),
useModelBuiltinSearch: z.boolean().optional(),
});
diff --git a/src/features/ChatInput/ActionBar/Model/ControlsForm.tsx b/src/features/ChatInput/ActionBar/Model/ControlsForm.tsx
index be9d052a758..86fa800ddfc 100644
--- a/src/features/ChatInput/ActionBar/Model/ControlsForm.tsx
+++ b/src/features/ChatInput/ActionBar/Model/ControlsForm.tsx
@@ -17,6 +17,7 @@ import ReasoningEffortSlider from './ReasoningEffortSlider';
import ReasoningTokenSlider from './ReasoningTokenSlider';
import TextVerbositySlider from './TextVerbositySlider';
import ThinkingBudgetSlider from './ThinkingBudgetSlider';
+import ThinkingLevelSlider from './ThinkingLevelSlider';
import ThinkingSlider from './ThinkingSlider';
const ControlsForm = memo(() => {
@@ -177,6 +178,16 @@ const ControlsForm = memo(() => {
paddingBottom: 0,
},
},
+ {
+ children: <ThinkingLevelSlider />,
+ label: t('extendParams.thinkingLevel.title'),
+ layout: 'horizontal',
+ minWidth: undefined,
+ name: 'thinkingLevel',
+ style: {
+ paddingBottom: 0,
+ },
+ },
].filter(Boolean) as FormItemProps[];
return (
diff --git a/src/features/ChatInput/ActionBar/Model/ThinkingLevelSlider.tsx b/src/features/ChatInput/ActionBar/Model/ThinkingLevelSlider.tsx
new file mode 100644
index 00000000000..0e9463f1503
--- /dev/null
+++ b/src/features/ChatInput/ActionBar/Model/ThinkingLevelSlider.tsx
@@ -0,0 +1,56 @@
+import { Slider } from 'antd';
+import { memo, useCallback } from 'react';
+import { Flexbox } from 'react-layout-kit';
+
+import { useAgentStore } from '@/store/agent';
+import { agentChatConfigSelectors } from '@/store/agent/selectors';
+
+const ThinkingLevelSlider = memo(() => {
+ const [config, updateAgentChatConfig] = useAgentStore((s) => [
+ agentChatConfigSelectors.currentChatConfig(s),
+ s.updateAgentChatConfig,
+ ]);
+
+ const thinkingLevel = config.thinkingLevel || 'high'; // Default to 'high' if not set
+
+ const marks = {
+ 0: 'low',
+ 1: 'high',
+ };
+
+ const levelValues = ['low', 'high'];
+ const indexValue = levelValues.indexOf(thinkingLevel);
+ const currentValue = indexValue === -1 ? 1 : indexValue;
+
+ const updateThinkingLevel = useCallback(
+ (value: number) => {
+ const level = levelValues[value] as 'low' | 'high';
+ updateAgentChatConfig({ thinkingLevel: level });
+ },
+ [updateAgentChatConfig],
+ );
+
+ return (
+ <Flexbox
+ align={'center'}
+ gap={12}
+ horizontal
+ paddingInline={'0 20px'}
+ style={{ minWidth: 130, width: '100%' }} // 三项时宽度需改回 200
+ >
+ <Flexbox flex={1}>
+ <Slider
+ marks={marks}
+ max={1}
+ min={0}
+ onChange={updateThinkingLevel}
+ step={1}
+ tooltip={{ open: false }}
+ value={currentValue}
+ />
+ </Flexbox>
+ </Flexbox>
+ );
+});
+
+export default ThinkingLevelSlider;
diff --git a/src/locales/default/chat.ts b/src/locales/default/chat.ts
index 16e87089f05..9fcc0f781d2 100644
--- a/src/locales/default/chat.ts
+++ b/src/locales/default/chat.ts
@@ -66,6 +66,9 @@ export default {
thinking: {
title: '深度思考开关',
},
+ thinkingLevel: {
+ title: '思考水平',
+ },
title: '模型扩展功能',
urlContext: {
desc: '开启后将自动解析网页链接,以获取实际网页上下文内容',
diff --git a/src/services/chat/index.ts b/src/services/chat/index.ts
index 18595f34944..433e1ccd9e5 100644
--- a/src/services/chat/index.ts
+++ b/src/services/chat/index.ts
@@ -196,6 +196,10 @@ class ChatService {
extendParams.thinkingBudget = chatConfig.thinkingBudget;
}
+ if (modelExtendParams!.includes('thinkingLevel') && chatConfig.thinkingLevel) {
+ extendParams.thinkingLevel = chatConfig.thinkingLevel;
+ }
+
if (modelExtendParams!.includes('urlContext') && chatConfig.urlContext) {
extendParams.urlContext = chatConfig.urlContext;
}