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 GPT-5.1 models (#10206)

sxjeruafd3a47e3d51
diff --git a/packages/const/src/models.ts b/packages/const/src/models.ts
index 6ba9439ba21..920aea10edd 100644
--- a/packages/const/src/models.ts
+++ b/packages/const/src/models.ts
@@ -38,6 +38,8 @@ export const responsesAPIModels = new Set([
'gpt-5-codex',
'gpt-5-pro',
'gpt-5-pro-2025-10-06',
+ 'gpt-5.1-codex',
+ 'gpt-5.1-codex-mini',
]);
/**
diff --git a/packages/model-bank/src/aiModels/aihubmix.ts b/packages/model-bank/src/aiModels/aihubmix.ts
index 9ad5a867bc0..d42de79fc77 100644
--- a/packages/model-bank/src/aiModels/aihubmix.ts
+++ b/packages/model-bank/src/aiModels/aihubmix.ts
@@ -1,6 +1,112 @@
import { AIChatModelCard } from '../types/aiModel';
const aihubmixModels: AIChatModelCard[] = [
+ {
+ abilities: {
+ functionCall: true,
+ imageOutput: true,
+ reasoning: true,
+ search: true,
+ vision: true,
+ },
+ contextWindowTokens: 400_000,
+ description:
+ 'GPT-5.1 — 针对编码和 agent 任务优化的旗舰模型,支持可配置的推理强度与更长上下文。',
+ displayName: 'GPT-5.1',
+ enabled: true,
+ id: 'gpt-5.1',
+ maxOutput: 128_000,
+ pricing: {
+ units: [
+ { name: 'textInput', rate: 1.25, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textInput_cacheRead', rate: 0.125, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textOutput', rate: 10, strategy: 'fixed', unit: 'millionTokens' },
+ ],
+ },
+ releasedAt: '2025-11-13',
+ settings: {
+ extendParams: ['gpt5_1ReasoningEffort', 'textVerbosity'],
+ searchImpl: 'params',
+ },
+ type: 'chat',
+ },
+ {
+ abilities: {
+ functionCall: true,
+ vision: true,
+ },
+ contextWindowTokens: 128_000,
+ description: 'GPT-5.1 Chat:用于 ChatGPT 的 GPT-5.1 变体,适合聊天场景。',
+ displayName: 'GPT-5.1 Chat',
+ enabled: true,
+ id: 'gpt-5.1-chat-latest',
+ maxOutput: 16_384,
+ pricing: {
+ units: [
+ { name: 'textInput', rate: 1.25, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textInput_cacheRead', rate: 0.125, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textOutput', rate: 10, strategy: 'fixed', unit: 'millionTokens' },
+ ],
+ },
+ releasedAt: '2025-11-13',
+ type: 'chat',
+ },
+ {
+ abilities: {
+ functionCall: true,
+ imageOutput: true,
+ reasoning: true,
+ search: true,
+ vision: true,
+ },
+ contextWindowTokens: 400_000,
+ description:
+ 'GPT-5.1 Codex:针对 agentic 编码任务优化的 GPT-5.1 版本,可在 Responses API 中用于更复杂的代码/代理工作流。',
+ displayName: 'GPT-5.1 Codex',
+ id: 'gpt-5.1-codex',
+ maxOutput: 128_000,
+ pricing: {
+ units: [
+ { name: 'textInput', rate: 1.25, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textInput_cacheRead', rate: 0.125, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textOutput', rate: 10, strategy: 'fixed', unit: 'millionTokens' },
+ ],
+ },
+ releasedAt: '2025-11-13',
+ settings: {
+ extendParams: ['gpt5_1ReasoningEffort'],
+ searchImpl: 'params',
+ },
+ type: 'chat',
+ },
+ {
+ abilities: {
+ functionCall: true,
+ imageOutput: true,
+ reasoning: true,
+ search: true,
+ vision: true,
+ },
+ contextWindowTokens: 400_000,
+ description:
+ 'GPT-5.1 Codex mini:体积更小、成本更低的 Codex 变体,针对 agentic 编码任务进行了优化。',
+ displayName: 'GPT-5.1 Codex mini',
+ id: 'gpt-5.1-codex-mini',
+ maxOutput: 128_000,
+ pricing: {
+ units: [
+ { name: 'textInput', rate: 0.25, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textInput_cacheRead', rate: 0.025, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textOutput', rate: 2, strategy: 'fixed', unit: 'millionTokens' },
+ ],
+ },
+ releasedAt: '2025-11-13',
+ settings: {
+ extendParams: ['gpt5_1ReasoningEffort'],
+ searchImpl: 'params',
+ },
+ type: 'chat',
+ },
{
abilities: {
functionCall: true,
@@ -64,7 +170,6 @@ const aihubmixModels: AIChatModelCard[] = [
description:
'跨领域编码和代理任务的最佳模型。GPT-5 在准确性、速度、推理、上下文识别、结构化思维和问题解决方面实现了飞跃。',
displayName: 'GPT-5',
- enabled: true,
id: 'gpt-5',
maxOutput: 128_000,
pricing: {
@@ -144,7 +249,6 @@ const aihubmixModels: AIChatModelCard[] = [
description:
'ChatGPT 中使用的 GPT-5 模型。结合了强大的语言理解与生成能力,适合对话式交互应用。',
displayName: 'GPT-5 Chat',
- enabled: true,
id: 'gpt-5-chat-latest',
maxOutput: 128_000,
pricing: {
diff --git a/packages/model-bank/src/aiModels/openai.ts b/packages/model-bank/src/aiModels/openai.ts
index 4ae5798a533..24a3608b0e8 100644
--- a/packages/model-bank/src/aiModels/openai.ts
+++ b/packages/model-bank/src/aiModels/openai.ts
@@ -18,6 +18,112 @@ export const gptImage1ParamsSchema: ModelParamsSchema = {
};
export const openaiChatModels: AIChatModelCard[] = [
+ {
+ abilities: {
+ functionCall: true,
+ imageOutput: true,
+ reasoning: true,
+ search: true,
+ vision: true,
+ },
+ contextWindowTokens: 400_000,
+ description:
+ 'GPT-5.1 — 针对编码和 agent 任务优化的旗舰模型,支持可配置的推理强度与更长上下文。',
+ displayName: 'GPT-5.1',
+ enabled: true,
+ id: 'gpt-5.1',
+ maxOutput: 128_000,
+ pricing: {
+ units: [
+ { name: 'textInput', rate: 1.25, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textInput_cacheRead', rate: 0.125, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textOutput', rate: 10, strategy: 'fixed', unit: 'millionTokens' },
+ ],
+ },
+ releasedAt: '2025-11-13',
+ settings: {
+ extendParams: ['gpt5_1ReasoningEffort', 'textVerbosity'],
+ searchImpl: 'params',
+ },
+ type: 'chat',
+ },
+ {
+ abilities: {
+ functionCall: true,
+ vision: true,
+ },
+ contextWindowTokens: 128_000,
+ description: 'GPT-5.1 Chat:用于 ChatGPT 的 GPT-5.1 变体,适合聊天场景。',
+ displayName: 'GPT-5.1 Chat',
+ enabled: true,
+ id: 'gpt-5.1-chat-latest',
+ maxOutput: 16_384,
+ pricing: {
+ units: [
+ { name: 'textInput', rate: 1.25, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textInput_cacheRead', rate: 0.125, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textOutput', rate: 10, strategy: 'fixed', unit: 'millionTokens' },
+ ],
+ },
+ releasedAt: '2025-11-13',
+ type: 'chat',
+ },
+ {
+ abilities: {
+ functionCall: true,
+ imageOutput: true,
+ reasoning: true,
+ search: true,
+ vision: true,
+ },
+ contextWindowTokens: 400_000,
+ description:
+ 'GPT-5.1 Codex:针对 agentic 编码任务优化的 GPT-5.1 版本,可在 Responses API 中用于更复杂的代码/代理工作流。',
+ displayName: 'GPT-5.1 Codex',
+ id: 'gpt-5.1-codex',
+ maxOutput: 128_000,
+ pricing: {
+ units: [
+ { name: 'textInput', rate: 1.25, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textInput_cacheRead', rate: 0.125, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textOutput', rate: 10, strategy: 'fixed', unit: 'millionTokens' },
+ ],
+ },
+ releasedAt: '2025-11-13',
+ settings: {
+ extendParams: ['gpt5_1ReasoningEffort'],
+ searchImpl: 'params',
+ },
+ type: 'chat',
+ },
+ {
+ abilities: {
+ functionCall: true,
+ imageOutput: true,
+ reasoning: true,
+ search: true,
+ vision: true,
+ },
+ contextWindowTokens: 400_000,
+ description:
+ 'GPT-5.1 Codex mini:体积更小、成本更低的 Codex 变体,针对 agentic 编码任务进行了优化。',
+ displayName: 'GPT-5.1 Codex mini',
+ id: 'gpt-5.1-codex-mini',
+ maxOutput: 128_000,
+ pricing: {
+ units: [
+ { name: 'textInput', rate: 0.25, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textInput_cacheRead', rate: 0.025, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textOutput', rate: 2, strategy: 'fixed', unit: 'millionTokens' },
+ ],
+ },
+ releasedAt: '2025-11-13',
+ settings: {
+ extendParams: ['gpt5_1ReasoningEffort'],
+ searchImpl: 'params',
+ },
+ type: 'chat',
+ },
{
abilities: {
functionCall: true,
@@ -64,7 +170,7 @@ export const openaiChatModels: AIChatModelCard[] = [
},
releasedAt: '2024-09-15',
settings: {
- extendParams: ['gpt5ReasoningEffort', 'textVerbosity'],
+ extendParams: ['gpt5ReasoningEffort'],
searchImpl: 'params',
},
type: 'chat',
@@ -81,7 +187,6 @@ export const openaiChatModels: AIChatModelCard[] = [
description:
'跨领域编码和代理任务的最佳模型。GPT-5 在准确性、速度、推理、上下文识别、结构化思维和问题解决方面实现了飞跃。',
displayName: 'GPT-5',
- enabled: true,
id: 'gpt-5',
maxOutput: 128_000,
pricing: {
@@ -159,7 +264,6 @@ export const openaiChatModels: AIChatModelCard[] = [
description:
'ChatGPT 中使用的 GPT-5 模型。结合了强大的语言理解与生成能力,适合对话式交互应用。',
displayName: 'GPT-5 Chat',
- enabled: true,
id: 'gpt-5-chat-latest',
maxOutput: 128_000,
pricing: {
diff --git a/packages/model-bank/src/aiModels/qwen.ts b/packages/model-bank/src/aiModels/qwen.ts
index 5e2de2056b1..65c69a82673 100644
--- a/packages/model-bank/src/aiModels/qwen.ts
+++ b/packages/model-bank/src/aiModels/qwen.ts
@@ -1016,6 +1016,71 @@ const qwenChatModels: AIChatModelCard[] = [
id: 'qwen3-max',
maxOutput: 65_536,
organization: 'Qwen',
+ pricing: {
+ currency: 'CNY',
+ units: [
+ {
+ lookup: {
+ prices: {
+ '[0, 0.032]': 3.2 * 0.2,
+ '[0.032, 0.128]': 6.4 * 0.2,
+ '[0.128, infinity]': 9.6 * 0.2,
+ },
+ pricingParams: ['textInputRange'],
+ },
+ name: 'textInput_cacheRead',
+ strategy: 'lookup',
+ unit: 'millionTokens',
+ },
+ {
+ lookup: {
+ prices: {
+ '[0, 0.032]': 3.2,
+ '[0.032, 0.128]': 6.4,
+ '[0.128, infinity]': 9.6,
+ },
+ pricingParams: ['textInputRange'],
+ },
+ name: 'textInput',
+ strategy: 'lookup',
+ unit: 'millionTokens',
+ },
+ {
+ lookup: {
+ prices: {
+ '[0, 0.032]': 12.8,
+ '[0.032, 0.128]': 25.6,
+ '[0.128, infinity]': 38.4,
+ },
+ pricingParams: ['textInputRange'],
+ },
+ name: 'textOutput',
+ strategy: 'lookup',
+ unit: 'millionTokens',
+ },
+ ],
+ },
+ releasedAt: '2025-09-23',
+ settings: {
+ searchImpl: 'params',
+ },
+ type: 'chat',
+ },
+ {
+ abilities: {
+ functionCall: true,
+ reasoning: true,
+ search: true,
+ },
+ config: {
+ deploymentName: 'qwen3-max-preview', // 其支持上下文缓存
+ },
+ contextWindowTokens: 262_144,
+ description: '通义千问系列效果最好的模型,适合复杂、多步骤的任务。预览版已支持思考。',
+ displayName: 'Qwen3 Max Preview',
+ id: 'qwen3-max-preview',
+ maxOutput: 65_536,
+ organization: 'Qwen',
pricing: {
currency: 'CNY',
units: [
@@ -1060,8 +1125,9 @@ const qwenChatModels: AIChatModelCard[] = [
},
],
},
- releasedAt: '2025-09-23',
+ releasedAt: '2025-10-30',
settings: {
+ extendParams: ['enableReasoning', 'reasoningBudgetToken'],
searchImpl: 'params',
},
type: 'chat',
@@ -1260,8 +1326,8 @@ const qwenChatModels: AIChatModelCard[] = [
},
{
abilities: {
- vision: true,
reasoning: true,
+ vision: true,
},
contextWindowTokens: 131_072,
description:
@@ -1287,7 +1353,8 @@ const qwenChatModels: AIChatModelCard[] = [
vision: true,
},
contextWindowTokens: 131_072,
- description: 'Qwen3 VL 30B 非思考模式(Instruct),面向普通指令跟随场景,保持较高的多模态理解与生成能力。',
+ description:
+ 'Qwen3 VL 30B 非思考模式(Instruct),面向普通指令跟随场景,保持较高的多模态理解与生成能力。',
displayName: 'Qwen3 VL 30B A3B Instruct',
id: 'qwen3-vl-30b-a3b-instruct',
maxOutput: 32_768,
@@ -1303,8 +1370,8 @@ const qwenChatModels: AIChatModelCard[] = [
},
{
abilities: {
- vision: true,
reasoning: true,
+ vision: true,
},
contextWindowTokens: 131_072,
description: 'Qwen3 VL 8B 思考模式,面向轻量级多模态推理与交互场景,保留长上下文理解能力。',
@@ -1342,11 +1409,12 @@ const qwenChatModels: AIChatModelCard[] = [
},
{
abilities: {
- vision: true,
reasoning: true,
+ vision: true,
},
contextWindowTokens: 131_072,
- description: 'Qwen3 VL 235B A22B 思考模式(开源版),针对高难度强推理与长视频理解场景,提供顶尖的视觉+文本推理能力。',
+ description:
+ 'Qwen3 VL 235B A22B 思考模式(开源版),针对高难度强推理与长视频理解场景,提供顶尖的视觉+文本推理能力。',
displayName: 'Qwen3 VL 235B A22B Thinking',
id: 'qwen3-vl-235b-a22b-thinking',
maxOutput: 32_768,
@@ -1368,7 +1436,8 @@ const qwenChatModels: AIChatModelCard[] = [
vision: true,
},
contextWindowTokens: 131_072,
- description: 'Qwen3 VL 235B A22B 非思考模式(Instruct),适用于非思考指令场景,保持强大的视觉理解能力。',
+ description:
+ 'Qwen3 VL 235B A22B 非思考模式(Instruct),适用于非思考指令场景,保持强大的视觉理解能力。',
displayName: 'Qwen3 VL 235B A22B Instruct',
id: 'qwen3-vl-235b-a22b-instruct',
maxOutput: 32_768,
diff --git a/packages/model-bank/src/types/aiModel.ts b/packages/model-bank/src/types/aiModel.ts
index 592ac79b433..0b7bfdfc0d9 100644
--- a/packages/model-bank/src/types/aiModel.ts
+++ b/packages/model-bank/src/types/aiModel.ts
@@ -234,6 +234,7 @@ export type ExtendParamsType =
| 'disableContextCaching'
| 'reasoningEffort'
| 'gpt5ReasoningEffort'
+ | 'gpt5_1ReasoningEffort'
| 'textVerbosity'
| 'thinking'
| 'thinkingBudget'
diff --git a/packages/types/src/agent/chatConfig.ts b/packages/types/src/agent/chatConfig.ts
index 340b3175115..2286e73643e 100644
--- a/packages/types/src/agent/chatConfig.ts
+++ b/packages/types/src/agent/chatConfig.ts
@@ -32,6 +32,7 @@ export interface LobeAgentChatConfig {
reasoningBudgetToken?: number;
reasoningEffort?: 'low' | 'medium' | 'high';
gpt5ReasoningEffort?: 'minimal' | 'low' | 'medium' | 'high';
+ gpt5_1ReasoningEffort?: 'none' | 'low' | 'medium' | 'high';
/**
* 输出文本详细程度控制
*/
@@ -66,6 +67,7 @@ export interface LobeAgentChatConfig {
export const AgentChatConfigSchema = z.object({
autoCreateTopicThreshold: z.number().default(2),
+ disableContextCaching: z.boolean().optional(),
displayMode: z.enum(['chat', 'docs']).optional(),
enableAutoCreateTopic: z.boolean().optional(),
enableCompressHistory: z.boolean().optional(),
@@ -74,8 +76,11 @@ export const AgentChatConfigSchema = z.object({
enableReasoning: z.boolean().optional(),
enableReasoningEffort: z.boolean().optional(),
enableStreaming: z.boolean().optional(),
+ gpt5ReasoningEffort: z.enum(['minimal', 'low', 'medium', 'high']).optional(),
+ gpt5_1ReasoningEffort: z.enum(['none', 'low', 'medium', 'high']).optional(),
historyCount: z.number().optional(),
reasoningBudgetToken: z.number().optional(),
+ reasoningEffort: z.enum(['low', 'medium', 'high']).optional(),
searchFCModel: z
.object({
model: z.string(),
@@ -84,4 +89,8 @@ export const AgentChatConfigSchema = z.object({
.optional(),
searchMode: z.enum(['off', 'on', 'auto']).optional(),
textVerbosity: z.enum(['low', 'medium', 'high']).optional(),
+ thinking: z.enum(['disabled', 'auto', 'enabled']).optional(),
+ thinkingBudget: z.number().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 8c9634b43d2..be9d052a758 100644
--- a/src/features/ChatInput/ActionBar/Model/ControlsForm.tsx
+++ b/src/features/ChatInput/ActionBar/Model/ControlsForm.tsx
@@ -12,6 +12,7 @@ import { aiModelSelectors, useAiInfraStore } from '@/store/aiInfra';
import ContextCachingSwitch from './ContextCachingSwitch';
import GPT5ReasoningEffortSlider from './GPT5ReasoningEffortSlider';
+import GPT51ReasoningEffortSlider from './GPT51ReasoningEffortSlider';
import ReasoningEffortSlider from './ReasoningEffortSlider';
import ReasoningTokenSlider from './ReasoningTokenSlider';
import TextVerbositySlider from './TextVerbositySlider';
@@ -119,6 +120,17 @@ const ControlsForm = memo(() => {
paddingBottom: 0,
},
},
+ {
+ children: <GPT51ReasoningEffortSlider />,
+ desc: 'reasoning_effort',
+ label: t('extendParams.reasoningEffort.title'),
+ layout: 'horizontal',
+ minWidth: undefined,
+ name: 'gpt5_1ReasoningEffort',
+ style: {
+ paddingBottom: 0,
+ },
+ },
{
children: <TextVerbositySlider />,
desc: 'text_verbosity',
diff --git a/src/features/ChatInput/ActionBar/Model/GPT51ReasoningEffortSlider.tsx b/src/features/ChatInput/ActionBar/Model/GPT51ReasoningEffortSlider.tsx
new file mode 100644
index 00000000000..fed0e87d618
--- /dev/null
+++ b/src/features/ChatInput/ActionBar/Model/GPT51ReasoningEffortSlider.tsx
@@ -0,0 +1,58 @@
+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 GPT51ReasoningEffortSlider = memo(() => {
+ const [config, updateAgentChatConfig] = useAgentStore((s) => [
+ agentChatConfigSelectors.currentChatConfig(s),
+ s.updateAgentChatConfig,
+ ]);
+
+ const gpt5_1ReasoningEffort = config.gpt5_1ReasoningEffort || 'none'; // Default to 'none' if not set
+
+ const marks = {
+ 0: 'none',
+ 1: 'low',
+ 2: 'medium',
+ 3: 'high',
+ };
+
+ const effortValues = ['none', 'low', 'medium', 'high'];
+ const indexValue = effortValues.indexOf(gpt5_1ReasoningEffort);
+ const currentValue = indexValue === -1 ? 0 : indexValue;
+
+ const updateGPT51ReasoningEffort = useCallback(
+ (value: number) => {
+ const effort = effortValues[value] as 'none' | 'low' | 'medium' | 'high';
+ updateAgentChatConfig({ gpt5_1ReasoningEffort: effort });
+ },
+ [updateAgentChatConfig],
+ );
+
+ return (
+ <Flexbox
+ align={'center'}
+ gap={12}
+ horizontal
+ paddingInline={'0 20px'}
+ style={{ minWidth: 200, width: '100%' }}
+ >
+ <Flexbox flex={1}>
+ <Slider
+ marks={marks}
+ max={3}
+ min={0}
+ onChange={updateGPT51ReasoningEffort}
+ step={1}
+ tooltip={{ open: false }}
+ value={currentValue}
+ />
+ </Flexbox>
+ </Flexbox>
+ );
+});
+
+export default GPT51ReasoningEffortSlider;
diff --git a/src/services/chat/index.ts b/src/services/chat/index.ts
index 5ad7d258f10..18595f34944 100644
--- a/src/services/chat/index.ts
+++ b/src/services/chat/index.ts
@@ -174,6 +174,13 @@ class ChatService {
extendParams.reasoning_effort = chatConfig.gpt5ReasoningEffort;
}
+ if (
+ modelExtendParams!.includes('gpt5_1ReasoningEffort') &&
+ chatConfig.gpt5_1ReasoningEffort
+ ) {
+ extendParams.reasoning_effort = chatConfig.gpt5_1ReasoningEffort;
+ }
+
if (modelExtendParams!.includes('textVerbosity') && chatConfig.textVerbosity) {
extendParams.verbosity = chatConfig.textVerbosity;
}