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: Update GPT-5.2 models (#10749)

sxjeru044612791065
diff --git a/packages/model-bank/src/aiModels/aihubmix.ts b/packages/model-bank/src/aiModels/aihubmix.ts
index 8569c14c076..773c37c1608 100644
--- a/packages/model-bank/src/aiModels/aihubmix.ts
+++ b/packages/model-bank/src/aiModels/aihubmix.ts
@@ -1,6 +1,80 @@
import { AIChatModelCard } from '../types/aiModel';
const aihubmixModels: AIChatModelCard[] = [
+ {
+ abilities: {
+ functionCall: true,
+ reasoning: true,
+ search: true,
+ structuredOutput: true,
+ vision: true,
+ },
+ contextWindowTokens: 400_000,
+ description: 'GPT-5.2 — 面向编码与 agentic 工作流的旗舰模型,提供更强推理与长上下文能力。',
+ displayName: 'GPT-5.2',
+ enabled: true,
+ id: 'gpt-5.2',
+ maxOutput: 128_000,
+ pricing: {
+ units: [
+ { name: 'textInput', rate: 1.75, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textInput_cacheRead', rate: 0.175, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textOutput', rate: 14, strategy: 'fixed', unit: 'millionTokens' },
+ ],
+ },
+ releasedAt: '2025-12-11',
+ settings: {
+ extendParams: ['gpt5_1ReasoningEffort', 'textVerbosity'],
+ searchImpl: 'params',
+ },
+ type: 'chat',
+ },
+ {
+ abilities: {
+ functionCall: true,
+ reasoning: true,
+ search: true,
+ vision: true,
+ },
+ contextWindowTokens: 400_000,
+ description:
+ 'GPT-5.2 pro:更聪明、更精确的 GPT-5.2 版本(Responses API Only),适合高难度问题与更长的多轮推理。',
+ displayName: 'GPT-5.2 pro',
+ id: 'gpt-5.2-pro',
+ maxOutput: 128_000,
+ pricing: {
+ units: [
+ { name: 'textInput', rate: 21, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textOutput', rate: 168, strategy: 'fixed', unit: 'millionTokens' },
+ ],
+ },
+ releasedAt: '2025-12-11',
+ settings: {
+ searchImpl: 'params',
+ },
+ type: 'chat',
+ },
+ {
+ abilities: {
+ functionCall: true,
+ vision: true,
+ },
+ contextWindowTokens: 128_000,
+ description: 'GPT-5.2 Chat:ChatGPT 使用的 GPT-5.2 变体(chat-latest),用于体验最新对话改进。',
+ displayName: 'GPT-5.2 Chat',
+ enabled: true,
+ id: 'gpt-5.2-chat-latest',
+ maxOutput: 16_384,
+ pricing: {
+ units: [
+ { name: 'textInput', rate: 1.75, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textInput_cacheRead', rate: 0.175, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textOutput', rate: 14, strategy: 'fixed', unit: 'millionTokens' },
+ ],
+ },
+ releasedAt: '2025-12-11',
+ type: 'chat',
+ },
{
abilities: {
functionCall: true,
@@ -13,7 +87,6 @@ const aihubmixModels: AIChatModelCard[] = [
description:
'GPT-5.1 — 针对编码和 agent 任务优化的旗舰模型,支持可配置的推理强度与更长上下文。',
displayName: 'GPT-5.1',
- enabled: true,
id: 'gpt-5.1',
maxOutput: 128_000,
pricing: {
@@ -38,7 +111,6 @@ const aihubmixModels: AIChatModelCard[] = [
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: {
diff --git a/packages/model-bank/src/aiModels/ollamacloud.ts b/packages/model-bank/src/aiModels/ollamacloud.ts
index ac2d6eec67d..0a435bb5e41 100644
--- a/packages/model-bank/src/aiModels/ollamacloud.ts
+++ b/packages/model-bank/src/aiModels/ollamacloud.ts
@@ -1,6 +1,17 @@
import { AIChatModelCard } from '../types/aiModel';
const ollamaCloudModels: AIChatModelCard[] = [
+ {
+ abilities: {
+ functionCall: true,
+ },
+ contextWindowTokens: 262_144,
+ description:
+ 'Devstral 2 123B 模型,擅长使用工具探索代码库、编辑多个文件并为软件工程代理提供支持。',
+ displayName: 'Devstral 2',
+ id: 'devstral-2:123b',
+ type: 'chat',
+ },
{
abilities: {
functionCall: true,
diff --git a/packages/model-bank/src/aiModels/openai.ts b/packages/model-bank/src/aiModels/openai.ts
index 398fa4bf197..76050b78448 100644
--- a/packages/model-bank/src/aiModels/openai.ts
+++ b/packages/model-bank/src/aiModels/openai.ts
@@ -21,7 +21,80 @@ export const openaiChatModels: AIChatModelCard[] = [
{
abilities: {
functionCall: true,
- imageOutput: true,
+ reasoning: true,
+ search: true,
+ structuredOutput: true,
+ vision: true,
+ },
+ contextWindowTokens: 400_000,
+ description: 'GPT-5.2 — 面向编码与 agentic 工作流的旗舰模型,提供更强推理与长上下文能力。',
+ displayName: 'GPT-5.2',
+ enabled: true,
+ id: 'gpt-5.2',
+ maxOutput: 128_000,
+ pricing: {
+ units: [
+ { name: 'textInput', rate: 1.75, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textInput_cacheRead', rate: 0.175, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textOutput', rate: 14, strategy: 'fixed', unit: 'millionTokens' },
+ ],
+ },
+ releasedAt: '2025-12-11',
+ settings: {
+ extendParams: ['gpt5_1ReasoningEffort', 'textVerbosity'],
+ searchImpl: 'params',
+ },
+ type: 'chat',
+ },
+ {
+ abilities: {
+ functionCall: true,
+ reasoning: true,
+ search: true,
+ vision: true,
+ },
+ contextWindowTokens: 400_000,
+ description:
+ 'GPT-5.2 pro:更聪明、更精确的 GPT-5.2 版本(Responses API Only),适合高难度问题与更长的多轮推理。',
+ displayName: 'GPT-5.2 pro',
+ id: 'gpt-5.2-pro',
+ maxOutput: 128_000,
+ pricing: {
+ units: [
+ { name: 'textInput', rate: 21, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textOutput', rate: 168, strategy: 'fixed', unit: 'millionTokens' },
+ ],
+ },
+ releasedAt: '2025-12-11',
+ settings: {
+ searchImpl: 'params',
+ },
+ type: 'chat',
+ },
+ {
+ abilities: {
+ functionCall: true,
+ vision: true,
+ },
+ contextWindowTokens: 128_000,
+ description: 'GPT-5.2 Chat:ChatGPT 使用的 GPT-5.2 变体(chat-latest),用于体验最新对话改进。',
+ displayName: 'GPT-5.2 Chat',
+ enabled: true,
+ id: 'gpt-5.2-chat-latest',
+ maxOutput: 16_384,
+ pricing: {
+ units: [
+ { name: 'textInput', rate: 1.75, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textInput_cacheRead', rate: 0.175, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textOutput', rate: 14, strategy: 'fixed', unit: 'millionTokens' },
+ ],
+ },
+ releasedAt: '2025-12-11',
+ type: 'chat',
+ },
+ {
+ abilities: {
+ functionCall: true,
reasoning: true,
search: true,
vision: true,
@@ -30,7 +103,6 @@ export const openaiChatModels: AIChatModelCard[] = [
description:
'GPT-5.1 — 针对编码和 agent 任务优化的旗舰模型,支持可配置的推理强度与更长上下文。',
displayName: 'GPT-5.1',
- enabled: true,
id: 'gpt-5.1',
maxOutput: 128_000,
pricing: {
@@ -55,7 +127,6 @@ export const openaiChatModels: AIChatModelCard[] = [
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: {
@@ -71,7 +142,6 @@ export const openaiChatModels: AIChatModelCard[] = [
{
abilities: {
functionCall: true,
- imageOutput: true,
reasoning: true,
search: true,
vision: true,
@@ -99,7 +169,6 @@ export const openaiChatModels: AIChatModelCard[] = [
{
abilities: {
functionCall: true,
- imageOutput: true,
reasoning: true,
search: true,
vision: true,
diff --git a/packages/model-bank/src/aiModels/zenmux.ts b/packages/model-bank/src/aiModels/zenmux.ts
index 346cd475fdd..fca59de2d17 100644
--- a/packages/model-bank/src/aiModels/zenmux.ts
+++ b/packages/model-bank/src/aiModels/zenmux.ts
@@ -8,6 +8,80 @@ const zenmuxChatModels: AIChatModelCard[] = [
id: 'zenmux/auto',
type: 'chat',
},
+ {
+ abilities: {
+ functionCall: true,
+ reasoning: true,
+ search: true,
+ structuredOutput: true,
+ vision: true,
+ },
+ contextWindowTokens: 400_000,
+ description: 'GPT-5.2 — 面向编码与 agentic 工作流的旗舰模型,提供更强推理与长上下文能力。',
+ displayName: 'GPT-5.2',
+ enabled: true,
+ id: 'gpt-5.2',
+ maxOutput: 128_000,
+ pricing: {
+ units: [
+ { name: 'textInput', rate: 1.75, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textInput_cacheRead', rate: 0.175, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textOutput', rate: 14, strategy: 'fixed', unit: 'millionTokens' },
+ ],
+ },
+ releasedAt: '2025-12-11',
+ settings: {
+ extendParams: ['gpt5_1ReasoningEffort', 'textVerbosity'],
+ searchImpl: 'params',
+ },
+ type: 'chat',
+ },
+ {
+ abilities: {
+ functionCall: true,
+ reasoning: true,
+ search: true,
+ vision: true,
+ },
+ contextWindowTokens: 400_000,
+ description:
+ 'GPT-5.2 pro:更聪明、更精确的 GPT-5.2 版本(Responses API Only),适合高难度问题与更长的多轮推理。',
+ displayName: 'GPT-5.2 pro',
+ id: 'gpt-5.2-pro',
+ maxOutput: 128_000,
+ pricing: {
+ units: [
+ { name: 'textInput', rate: 21, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textOutput', rate: 168, strategy: 'fixed', unit: 'millionTokens' },
+ ],
+ },
+ releasedAt: '2025-12-11',
+ settings: {
+ searchImpl: 'params',
+ },
+ type: 'chat',
+ },
+ {
+ abilities: {
+ functionCall: true,
+ vision: true,
+ },
+ contextWindowTokens: 128_000,
+ description: 'GPT-5.2 Chat:ChatGPT 使用的 GPT-5.2 变体(chat-latest),用于体验最新对话改进。',
+ displayName: 'GPT-5.2 Chat',
+ enabled: true,
+ id: 'gpt-5.2-chat-latest',
+ maxOutput: 16_384,
+ pricing: {
+ units: [
+ { name: 'textInput', rate: 1.75, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textInput_cacheRead', rate: 0.175, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textOutput', rate: 14, strategy: 'fixed', unit: 'millionTokens' },
+ ],
+ },
+ releasedAt: '2025-12-11',
+ type: 'chat',
+ },
{
abilities: {
functionCall: true,
diff --git a/packages/model-runtime/src/const/models.ts b/packages/model-runtime/src/const/models.ts
index 58cf204b8a5..607998a5647 100644
--- a/packages/model-runtime/src/const/models.ts
+++ b/packages/model-runtime/src/const/models.ts
@@ -40,6 +40,8 @@ export const responsesAPIModels = new Set([
'gpt-5-pro-2025-10-06',
'gpt-5.1-codex',
'gpt-5.1-codex-mini',
+ 'gpt-5.2-pro-2025-12-11',
+ 'gpt-5.2-pro',
]);
/**
diff --git a/packages/model-runtime/src/core/contextBuilders/openai.ts b/packages/model-runtime/src/core/contextBuilders/openai.ts
index d59d6a18484..4774ee719c5 100644
--- a/packages/model-runtime/src/core/contextBuilders/openai.ts
+++ b/packages/model-runtime/src/core/contextBuilders/openai.ts
@@ -136,6 +136,10 @@ export const pruneReasoningPayload = (payload: ChatStreamPayload) => {
const shouldStream = !disableStreamModels.has(payload.model);
const { stream_options, ...cleanedPayload } = payload as any;
+ // When reasoning_effort is 'none', allow user-defined temperature/top_p
+ const effort = payload.reasoning?.effort || payload.reasoning_effort;
+ const isEffortNone = effort === 'none';
+
return {
...cleanedPayload,
frequency_penalty: 0,
@@ -152,8 +156,8 @@ export const pruneReasoningPayload = (payload: ChatStreamPayload) => {
stream: shouldStream,
// Only include stream_options when stream is enabled
...(shouldStream && stream_options && { stream_options }),
- temperature: 1,
- top_p: 1,
+ temperature: isEffortNone ? payload.temperature : 1,
+ top_p: isEffortNone ? payload.top_p : 1,
};
};