🤯 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.
TypeScript agentagent-collaborationagent-harnessloop-engineeringmcppersonal-assistantproactive-agentskillssuper-agenttask-management
💄 style: add Gemini 3.7 Flash & GLM-5.3 model support (#18289)
sxjeru14ec086c2211
diff --git a/apps/server/src/modules/AgentRuntime/adapters/serverCallLlmContextHints.test.ts b/apps/server/src/modules/AgentRuntime/adapters/serverCallLlmContextHints.test.tsindex 85da42ffcfe..c4d34ef183d 100644--- a/apps/server/src/modules/AgentRuntime/adapters/serverCallLlmContextHints.test.ts+++ b/apps/server/src/modules/AgentRuntime/adapters/serverCallLlmContextHints.test.ts@@ -51,6 +51,13 @@ beforeEach(() => {providerId: 'deepseek',settings: { extendParams: ['deepseekV4ReasoningEffort'] },},+ {+ abilities: {},+ displayName: 'DeepSeek V4 Flash',+ id: 'deepseek-v4-flash',+ providerId: 'deepseek',+ settings: { extendParams: ['deepseekV4GAReasoningEffort'] },+ },{abilities: {},displayName: 'GPT-4o Mini',@@ -200,6 +207,40 @@ describe('resolveServerCallLlmContextHints - model-instance reasoning config', (expect(hints.resolvedExtendParams).toEqual({ thinking: { type: 'disabled' } });});+ it('should derive the DeepSeek V4 GA thinking opt-out from the instance config', async () => {+ getModelReasoningConfigMock.mockResolvedValue({ deepseekV4GAReasoningEffort: 'none' });++ const hints = await resolveServerCallLlmContextHints({+ ctx: createCtx({ chatConfig: { deepseekV4GAReasoningEffort: 'high' } }),+ llmPayload,+ model: 'deepseek-v4-flash',+ provider: 'deepseek',+ });++ expect(hints.shouldReplayAssistantReasoning).toBe(false);+ expect(hints.resolvedExtendParams).toEqual({ thinking: { type: 'disabled' } });+ });++ /**+ * Replay-off is not the official 400. A leftover preview `none` on a GA-only+ * card still suppresses replay today, but `applyModelExtendParams` ignores+ * that leftover so thinking stays on and the payload builder emits the+ * whitespace placeholder rather than omitting the thinking field.+ */+ it('does not disable thinking for leftover preview none on a GA-only card', async () => {+ getModelReasoningConfigMock.mockResolvedValue({ deepseekV4ReasoningEffort: 'none' });++ const hints = await resolveServerCallLlmContextHints({+ ctx: createCtx({ chatConfig: {} }),+ llmPayload,+ model: 'deepseek-v4-flash',+ provider: 'deepseek',+ });++ expect(hints.shouldReplayAssistantReasoning).toBe(false);+ expect(hints.resolvedExtendParams?.thinking).not.toEqual({ type: 'disabled' });+ });+it('should keep DeepSeek V4 forced reasoning replay when no opt-out is saved', async () => {const hints = await resolveServerCallLlmContextHints({ctx: createCtx({ chatConfig: {} }),diff --git a/apps/server/src/modules/AgentRuntime/adapters/serverCallLlmContextHints.ts b/apps/server/src/modules/AgentRuntime/adapters/serverCallLlmContextHints.tsindex 0a2089701cb..20468aaed14 100644--- a/apps/server/src/modules/AgentRuntime/adapters/serverCallLlmContextHints.ts+++ b/apps/server/src/modules/AgentRuntime/adapters/serverCallLlmContextHints.ts@@ -171,13 +171,16 @@ export const resolveServerCallLlmContextHints = async ({// visible text (controlled replay: ~30% answer-in-thinking with the// placeholder vs ~2.5% when the genuine reasoning is replayed). The only// opt-out is a V4 model whose thinking the user explicitly disabled via- // `deepseekV4ReasoningEffort: 'none'`. That flag is V4-specific and may- // linger on an agent after switching models, so it must NOT suppress- // replay for `deepseek-reasoner`, which is thinking-only and always- // forces reasoning history in the payload builder — suppressing it there- // would reintroduce the 400/answer-hidden behavior.+ // `deepseekV4ReasoningEffort` / `deepseekV4GAReasoningEffort` `'none'`.+ // Those flags are V4-specific and may linger on an agent after switching+ // models, so they must NOT suppress replay for `deepseek-reasoner`, which+ // is thinking-only and always forces reasoning history in the payload+ // builder — suppressing it there would reintroduce the 400/answer-hidden+ // behavior.const deepseekV4ThinkingDisabled =- isDeepSeekV4FamilyModel(model) && effectiveChatConfig?.deepseekV4ReasoningEffort === 'none';+ isDeepSeekV4FamilyModel(model) &&+ (effectiveChatConfig?.deepseekV4GAReasoningEffort === 'none' ||+ effectiveChatConfig?.deepseekV4ReasoningEffort === 'none');const deepseekForcesPreserveThinking =isDeepSeekThinkingEligibleModel(model) && !deepseekV4ThinkingDisabled;const modelForcesPreserveThinking = kimiForcesPreserveThinking || deepseekForcesPreserveThinking;diff --git a/locales/en-US/modelProvider.json b/locales/en-US/modelProvider.jsonindex 0b22efc5cda..9fe93e06245 100644--- a/locales/en-US/modelProvider.json+++ b/locales/en-US/modelProvider.json@@ -223,6 +223,7 @@"providerModels.item.modelConfig.displayName.title": "Model Display Name","providerModels.item.modelConfig.extendParams.extra": "Choose extended parameters supported by the model. Hover an option to preview controls. Incorrect configs may cause request failures.","providerModels.item.modelConfig.extendParams.options.codexMaxReasoningEffort.hint": "For Codex models; controls reasoning intensity.",+ "providerModels.item.modelConfig.extendParams.options.deepseekV4GAReasoningEffort.hint": "For DeepSeek V4 GA thinking mode; controls reasoning intensity. Adds a `low` tier on top of the original V4 levels. `high` is the default, `max` unlocks the deepest reasoning used by complex agent workflows.","providerModels.item.modelConfig.extendParams.options.deepseekV4ReasoningEffort.hint": "For DeepSeek V4 thinking mode; controls reasoning intensity. `high` is the default, `max` unlocks the deepest reasoning used by complex agent workflows.","providerModels.item.modelConfig.extendParams.options.disableContextCaching.hint": "For Claude models; can lower cost and speed up responses.","providerModels.item.modelConfig.extendParams.options.effort.hint": "For Claude Opus 4.6; controls effort level (low/medium/high/max).",diff --git a/locales/zh-CN/modelProvider.json b/locales/zh-CN/modelProvider.jsonindex ecf32143932..f0dcdd7fe9b 100644--- a/locales/zh-CN/modelProvider.json+++ b/locales/zh-CN/modelProvider.json@@ -223,13 +223,14 @@"providerModels.item.modelConfig.displayName.title": "模型展示名称","providerModels.item.modelConfig.extendParams.extra": "选择模型支持的扩展参数。将鼠标悬停在选项上可预览控制项。配置错误可能导致请求失败。","providerModels.item.modelConfig.extendParams.options.codexMaxReasoningEffort.hint": "适用于 Codex 模型;控制推理强度。",+ "providerModels.item.modelConfig.extendParams.options.deepseekV4GAReasoningEffort.hint": "适用于 DeepSeek V4 GA 思维模式;在原有 V4 档位基础上增加 `low`,用于控制推理强度。`high` 为默认值,`max` 可启用更深层次的推理,适用于复杂的智能体工作流程。","providerModels.item.modelConfig.extendParams.options.deepseekV4ReasoningEffort.hint": "适用于 DeepSeek V4 思维模式;用于控制推理强度。`high` 为默认值,`max` 可启用更深层次的推理,适用于复杂的智能体工作流程。","providerModels.item.modelConfig.extendParams.options.disableContextCaching.hint": "适用于 Claude 模型;可降低成本并加快响应速度。","providerModels.item.modelConfig.extendParams.options.effort.hint": "适用于 Claude Opus 4.6;控制努力程度(低/中/高/最大)。","providerModels.item.modelConfig.extendParams.options.enableAdaptiveThinking.hint": "适用于 Claude Opus 4.6;切换自适应思维的开启或关闭。","providerModels.item.modelConfig.extendParams.options.enableReasoning.hint": "适用于 Claude、DeepSeek 及其他推理模型;可启用更深层次的思考能力。","providerModels.item.modelConfig.extendParams.options.glm5_2ReasoningEffort.hint": "适用于 GLM-5.2;提供 High 和 Max 两档推理强度控制。",- "providerModels.item.modelConfig.extendParams.options.glm5_3ReasoningEffort.hint": "对于GLM-5.3;通过低、高和最大级别控制推理努力。思考无法被禁用。",+ "providerModels.item.modelConfig.extendParams.options.glm5_3ReasoningEffort.hint": "适用于 GLM-5.3;提供 Low、High 和 Max 三档推理强度控制,不支持关闭思考。","providerModels.item.modelConfig.extendParams.options.gpt5ReasoningEffort.hint": "适用于 GPT-5 系列;控制推理强度。","providerModels.item.modelConfig.extendParams.options.gpt5_1ReasoningEffort.hint": "适用于 GPT-5.1 系列;控制推理强度。","providerModels.item.modelConfig.extendParams.options.gpt5_2ProReasoningEffort.hint": "适用于 GPT-5.2 Pro 系列;控制推理强度。",diff --git a/packages/locales/src/default/modelProvider.ts b/packages/locales/src/default/modelProvider.tsindex 89e2beed80e..815f5e8f661 100644--- a/packages/locales/src/default/modelProvider.ts+++ b/packages/locales/src/default/modelProvider.ts@@ -292,6 +292,8 @@ export default {'For Hy3 models; controls reasoning intensity. no_think (ultra-fast response), low (quick reasoning), and high (deep reasoning)—to accommodate varying latency and depth requirements, from high-frequency interactions to complex engineering tasks.','providerModels.item.modelConfig.extendParams.options.ring2_6ReasoningEffort.hint':'For Ring 2.6 series; controls reasoning intensity.',+ 'providerModels.item.modelConfig.extendParams.options.deepseekV4GAReasoningEffort.hint':+ 'For DeepSeek V4 GA thinking mode; controls reasoning intensity. Adds a `low` tier on top of the original V4 levels. `high` is the default, `max` unlocks the deepest reasoning used by complex agent workflows.','providerModels.item.modelConfig.extendParams.options.deepseekV4ReasoningEffort.hint':'For DeepSeek V4 thinking mode; controls reasoning intensity. `high` is the default, `max` unlocks the deepest reasoning used by complex agent workflows.','providerModels.item.modelConfig.extendParams.options.imageAspectRatio.hint':diff --git a/packages/model-bank/src/aiModels/deepseek.ts b/packages/model-bank/src/aiModels/deepseek.tsindex a0350a50017..76375c0888f 100644--- a/packages/model-bank/src/aiModels/deepseek.ts+++ b/packages/model-bank/src/aiModels/deepseek.ts@@ -19,16 +19,15 @@ const deepseekChatModels: AIChatModelCard[] = [maxOutput: 393_216,pricing: {currency: 'CNY',- // Official cache-hit input price is permanently reduced to 1/10 of the launch price.units: [- { name: 'textInput_cacheRead', rate: 0.02, strategy: 'fixed', unit: 'millionTokens' },- { name: 'textInput', rate: 1, strategy: 'fixed', unit: 'millionTokens' },- { name: 'textOutput', rate: 2, strategy: 'fixed', unit: 'millionTokens' },+ { name: 'textInput_cacheRead', rate: 0.05, strategy: 'fixed', unit: 'millionTokens' },+ { name: 'textInput', rate: 1.5, strategy: 'fixed', unit: 'millionTokens' },+ { name: 'textOutput', rate: 4.5, strategy: 'fixed', unit: 'millionTokens' },],},- releasedAt: '2026-04-24',+ releasedAt: '2026-07-31',settings: {- extendParams: ['deepseekV4ReasoningEffort'],+ extendParams: ['deepseekV4GAReasoningEffort'],},type: 'chat',},@@ -49,17 +48,15 @@ const deepseekChatModels: AIChatModelCard[] = [maxOutput: 393_216,pricing: {currency: 'CNY',- // Official cache-hit input price is permanently reduced to 1/10 of the launch price.- // DeepSeek V4 Pro limited-time 75% off discount is valid until 2026-05-05 23:59 Beijing time.units: [- { name: 'textInput_cacheRead', rate: 0.025, strategy: 'fixed', unit: 'millionTokens' },- { name: 'textInput', rate: 3, strategy: 'fixed', unit: 'millionTokens' },- { name: 'textOutput', rate: 6, strategy: 'fixed', unit: 'millionTokens' },+ { name: 'textInput_cacheRead', rate: 0.15, strategy: 'fixed', unit: 'millionTokens' },+ { name: 'textInput', rate: 4.5, strategy: 'fixed', unit: 'millionTokens' },+ { name: 'textOutput', rate: 13.5, strategy: 'fixed', unit: 'millionTokens' },],},- releasedAt: '2026-04-24',+ releasedAt: '2026-08-13',settings: {- extendParams: ['deepseekV4ReasoningEffort'],+ extendParams: ['deepseekV4GAReasoningEffort'],},type: 'chat',},diff --git a/packages/model-bank/src/aiModels/google.ts b/packages/model-bank/src/aiModels/google.tsindex 6df41bef727..fc996e6bb8d 100644--- a/packages/model-bank/src/aiModels/google.ts+++ b/packages/model-bank/src/aiModels/google.ts@@ -79,7 +79,7 @@ const googleChatModels: AIChatModelCard[] = [vision: true,},contextWindowTokens: 1_048_576 + 65_536,- description: 'Points to gemini-3.6-flash',+ description: 'Points to gemini-3.7-flash',displayName: 'Gemini Flash Latest',family: 'gemini',id: 'gemini-flash-latest',@@ -103,7 +103,7 @@ const googleChatModels: AIChatModelCard[] = [},settings: {disabledParams: ['temperature', 'top_p'],- extendParams: ['thinkingLevel', 'urlContext'],+ extendParams: ['thinkingLevel3', 'urlContext'],searchImpl: 'params',searchProvider: 'google',},@@ -150,6 +150,54 @@ 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.7 Flash is the next iteration in the Gemini 3 series of highly-capable, natively multimodal, reasoning models, with support for computer use and file search.',+ displayName: 'Gemini 3.7 Flash',+ enabled: true,+ family: 'gemini',+ generation: 'gemini-3.7',+ id: 'gemini-3.7-flash',+ knowledgeCutoff: '2026-03',+ maxOutput: 65_536,+ // Introductory pricing, in effect through 2026-12-31. From 2027-01-01 standard rates apply:+ // input 1.5 / output 7.5 / cacheRead 0.15 / cacheWrite lookup { '1h': 1 } (per million tokens).+ // See https://ai.google.dev/gemini-api/docs/pricing+ pricing: {+ units: [+ { name: 'textInput_cacheRead', rate: 0.075, strategy: 'fixed', unit: 'millionTokens' },+ { name: 'textInput', rate: 0.75, strategy: 'fixed', unit: 'millionTokens' },+ { name: 'imageInput', rate: 0.75, strategy: 'fixed', unit: 'millionTokens' },+ { name: 'videoInput', rate: 0.75, strategy: 'fixed', unit: 'millionTokens' },+ { name: 'audioInput', rate: 0.75, strategy: 'fixed', unit: 'millionTokens' },+ { name: 'textOutput', rate: 3.75, strategy: 'fixed', unit: 'millionTokens' },+ {+ lookup: { prices: { '1h': 0.5 }, pricingParams: ['ttl'] },+ name: 'textInput_cacheWrite',+ strategy: 'lookup',+ unit: 'millionTokens',+ },+ ],+ },+ releasedAt: '2026-08-13',+ settings: {+ disabledParams: ['temperature', 'top_p'],+ extendParams: ['thinkingLevel3', 'urlContext'],+ searchImpl: 'params',+ searchProvider: 'google',+ },+ type: 'chat',+ },{abilities: {audio: true,@@ -164,22 +212,24 @@ const googleChatModels: AIChatModelCard[] = [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,+ // Introductory pricing, in effect through 2026-12-31. From 2027-01-01 standard rates apply:+ // input 1.5 / output 7.5 / cacheRead 0.15 / cacheWrite lookup { '1h': 1 } (per million tokens).+ // See https://ai.google.dev/gemini-api/docs/pricingpricing: {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' },+ { name: 'textInput_cacheRead', rate: 0.075, strategy: 'fixed', unit: 'millionTokens' },+ { name: 'textInput', rate: 0.75, strategy: 'fixed', unit: 'millionTokens' },+ { name: 'imageInput', rate: 0.75, strategy: 'fixed', unit: 'millionTokens' },+ { name: 'videoInput', rate: 0.75, strategy: 'fixed', unit: 'millionTokens' },+ { name: 'audioInput', rate: 0.75, strategy: 'fixed', unit: 'millionTokens' },+ { name: 'textOutput', rate: 3.75, strategy: 'fixed', unit: 'millionTokens' },{- lookup: { prices: { '1h': 1 }, pricingParams: ['ttl'] },+ lookup: { prices: { '1h': 0.5 }, pricingParams: ['ttl'] },name: 'textInput_cacheWrite',strategy: 'lookup',unit: 'millionTokens',@@ -328,7 +378,6 @@ const googleChatModels: AIChatModelCard[] = [description:"Gemini 3.1 Flash Image (Nano Banana 2) is Google's fastest native image generation model with thinking support, conversational image generation and editing.",displayName: 'Nano Banana 2',- enabled: true,family: 'gemini',generation: 'gemini-3.1',id: 'gemini-3.1-flash-image-preview',diff --git a/packages/model-bank/src/aiModels/vertexai.ts b/packages/model-bank/src/aiModels/vertexai.tsindex ea64ee03433..c152a2bc8f8 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/modelsconst 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.7 Flash is the next iteration in the Gemini 3 series of highly-capable, natively multimodal, reasoning models, with support for computer use and file search.',+ displayName: 'Gemini 3.7 Flash',+ enabled: true,+ family: 'gemini',+ generation: 'gemini-3.7',+ id: 'gemini-3.7-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-08-13',+ settings: {+ disabledParams: ['temperature', 'top_p'],+ extendParams: ['thinkingLevel3', 'urlContext'],+ searchImpl: 'params',+ searchProvider: 'google',+ },+ type: 'chat',+ },{abilities: {audio: true,@@ -18,7 +63,6 @@ const vertexaiChatModels: AIChatModelCard[] = [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',diff --git a/packages/model-bank/src/aiModels/zhipu.ts b/packages/model-bank/src/aiModels/zhipu.tsindex f50f2924e4d..2c4253f1301 100644--- a/packages/model-bank/src/aiModels/zhipu.ts+++ b/packages/model-bank/src/aiModels/zhipu.ts@@ -8,6 +8,67 @@ import {// ref: https://docs.bigmodel.cn/cn/guide/start/model-overviewconst zhipuChatModels: AIChatModelCard[] = [+ {+ abilities: {+ functionCall: true,+ reasoning: true,+ search: true,+ structuredOutput: true,+ },+ contextWindowTokens: 1_048_576,+ description:+ 'Zhipu’s latest flagship model. Built on the same base as GLM-5.2, it scales post-training with tens of times more long-horizon task environments and substantially longer training cycles. Coding experience improves by about 50% over the previous generation, ranking first among open-source models on Terminal Bench 3.0. It also shows strong cybersecurity capability, approaching Mythos 5 on white-box code review and vulnerability discovery.',+ displayName: 'GLM-5.3',+ enabled: true,+ family: 'glm',+ generation: 'glm-5.3',+ id: 'glm-5.3',+ maxOutput: 131_072,+ pricing: {+ currency: 'CNY',+ units: [+ { name: 'textInput_cacheRead', rate: 2, strategy: 'fixed', unit: 'millionTokens' },+ { name: 'textInput', rate: 8, strategy: 'fixed', unit: 'millionTokens' },+ { name: 'textOutput', rate: 28, strategy: 'fixed', unit: 'millionTokens' },+ ],+ },+ releasedAt: '2026-08-14',+ settings: {+ extendParams: ['glm5_3ReasoningEffort'],+ searchImpl: 'params',+ },+ type: 'chat',+ },+ {+ abilities: {+ functionCall: true,+ reasoning: true,+ search: true,+ structuredOutput: true,+ },+ contextWindowTokens: 1_048_576,+ description:+ 'GLM-5.2 is Zhipu’s flagship model for the era of long-horizon tasks. It supports a solid 1M context window that can hold project-scale engineering context, with more stable long-horizon execution and more reliable adherence to engineering conventions. A single task can complete the full development path from requirements to multi-platform deployable artifacts.',+ displayName: 'GLM-5.2',+ family: 'glm',+ generation: 'glm-5.2',+ id: 'glm-5.2',+ maxOutput: 131_072,+ pricing: {+ currency: 'CNY',+ units: [+ { name: 'textInput_cacheRead', rate: 2, strategy: 'fixed', unit: 'millionTokens' },+ { name: 'textInput', rate: 8, strategy: 'fixed', unit: 'millionTokens' },+ { name: 'textOutput', rate: 28, strategy: 'fixed', unit: 'millionTokens' },+ ],+ },+ releasedAt: '2026-06-17',+ settings: {+ extendParams: ['enableReasoning', 'glm5_2ReasoningEffort'],+ searchImpl: 'params',+ },+ type: 'chat',+ },{abilities: {functionCall: true,@@ -18,7 +79,6 @@ const zhipuChatModels: AIChatModelCard[] = [description:'GLM-5.1 is Zhipu’s latest flagship model, aligned with Claude Opus 4.6 on overall and coding capabilities. It excels at long-horizon tasks, able to autonomously plan, execute, and iterate for up to 8 hours in a single task, making it an ideal foundation for Autonomous Agents and long-horizon Coding Agents.',displayName: 'GLM-5.1',- enabled: true,family: 'glm',generation: 'glm-5.1',id: 'glm-5.1',@@ -207,7 +267,6 @@ const zhipuChatModels: AIChatModelCard[] = [description:'GLM-5 is Zhipu’s next-generation flagship foundation model, purpose-built for Agentic Engineering. It delivers reliable productivity in complex systems engineering and long-horizon agentic tasks. In coding and agent capabilities, GLM-5 achieves state-of-the-art performance among open-source models. In real-world programming scenarios, its user experience approaches that of Claude Opus 4.5. It excels at complex systems engineering and long-horizon agent tasks, making it an ideal foundation model for general-purpose agent assistants.',displayName: 'GLM-5',- enabled: true,family: 'glm',generation: 'glm-5',id: 'glm-5',diff --git a/packages/model-bank/src/const/knowledgeCutoff.ts b/packages/model-bank/src/const/knowledgeCutoff.tsindex a6e5b7f4504..e875061c8d8 100644--- a/packages/model-bank/src/const/knowledgeCutoff.ts+++ b/packages/model-bank/src/const/knowledgeCutoff.ts@@ -88,6 +88,7 @@ export const MODEL_KNOWLEDGE_CUTOFFS: Record<string, string> = {'gemini-3.5-flash': '2025-01','gemini-3.5-flash-lite': '2026-03','gemini-3.6-flash': '2026-03',+ 'gemini-3.7-flash': '2026-03','gemma-4-26b-a4b-it': '2025-01','gemma-4-31b-it': '2025-01',diff --git a/packages/model-bank/src/types/aiModel.ts b/packages/model-bank/src/types/aiModel.tsindex 0f2395d7a9c..122846cbec2 100644--- a/packages/model-bank/src/types/aiModel.ts+++ b/packages/model-bank/src/types/aiModel.ts@@ -330,6 +330,7 @@ export const isAiModelVisible = (model: { visible?: boolean }) => model.visible*/export interface AiModelReasoningConfig {codexMaxReasoningEffort?: 'low' | 'medium' | 'high' | 'xhigh';+ deepseekV4GAReasoningEffort?: 'none' | 'low' | 'high' | 'max';deepseekV4ReasoningEffort?: 'none' | 'high' | 'max';effort?: 'low' | 'medium' | 'high' | 'max';glm5_2ReasoningEffort?: 'high' | 'max';@@ -354,6 +355,7 @@ export interface AiModelReasoningConfig {export const AiModelReasoningConfigSchema = z.object({codexMaxReasoningEffort: z.enum(['low', 'medium', 'high', 'xhigh']).optional(),+ deepseekV4GAReasoningEffort: z.enum(['none', 'low', 'high', 'max']).optional(),deepseekV4ReasoningEffort: z.enum(['none', 'high', 'max']).optional(),effort: z.enum(['low', 'medium', 'high', 'max']).optional(),glm5_2ReasoningEffort: z.enum(['high', 'max']).optional(),@@ -394,6 +396,7 @@ export const MODEL_REASONING_PARAM_LEVELS: {[K in keyof AiModelReasoningConfig]-?: readonly NonNullable<AiModelReasoningConfig[K]>[];} = {codexMaxReasoningEffort: ['low', 'medium', 'high', 'xhigh'],+ deepseekV4GAReasoningEffort: ['none', 'low', 'high', 'max'],deepseekV4ReasoningEffort: ['none', 'high', 'max'],effort: ['low', 'medium', 'high', 'max'],glm5_2ReasoningEffort: ['high', 'max'],@@ -425,6 +428,7 @@ export const MODEL_REASONING_PARAM_DEFAULTS: {[K in keyof AiModelReasoningConfig]-?: NonNullable<AiModelReasoningConfig[K]>;} = {codexMaxReasoningEffort: 'medium',+ deepseekV4GAReasoningEffort: 'high',deepseekV4ReasoningEffort: 'high',effort: 'high',glm5_2ReasoningEffort: 'max',@@ -476,6 +480,7 @@ export type ExtendParamsType =| 'enableAdaptiveThinking'| 'disableContextCaching'| 'effort'+ | 'deepseekV4GAReasoningEffort'| 'deepseekV4ReasoningEffort'| 'reasoningEffort'| 'reasoningMode'@@ -535,6 +540,7 @@ export const ExtendParamsTypeSchema = z.enum(['enableAdaptiveThinking','disableContextCaching','effort',+ 'deepseekV4GAReasoningEffort','deepseekV4ReasoningEffort','reasoningEffort','reasoningMode',diff --git a/packages/model-runtime/src/core/usageConverters/utils/computeChatCost.test.ts b/packages/model-runtime/src/core/usageConverters/utils/computeChatCost.test.tsindex f9a0fbe40a2..d83480bc838 100644--- a/packages/model-runtime/src/core/usageConverters/utils/computeChatCost.test.ts+++ b/packages/model-runtime/src/core/usageConverters/utils/computeChatCost.test.ts@@ -254,9 +254,9 @@ describe('computeChatPricing', () => {expect(pricing).toEqual({currency: 'CNY',units: [- { name: 'textInput_cacheRead', rate: 0.02, strategy: 'fixed', unit: 'millionTokens' },- { name: 'textInput', rate: 1, strategy: 'fixed', unit: 'millionTokens' },- { name: 'textOutput', rate: 2, strategy: 'fixed', unit: 'millionTokens' },+ { name: 'textInput_cacheRead', rate: 0.05, strategy: 'fixed', unit: 'millionTokens' },+ { name: 'textInput', rate: 1.5, strategy: 'fixed', unit: 'millionTokens' },+ { name: 'textOutput', rate: 4.5, strategy: 'fixed', unit: 'millionTokens' },],});});diff --git a/packages/model-runtime/src/providers/deepseek/chatPayload.test.ts b/packages/model-runtime/src/providers/deepseek/chatPayload.test.tsindex 82e383c1e5e..c54e2368d86 100644--- a/packages/model-runtime/src/providers/deepseek/chatPayload.test.ts+++ b/packages/model-runtime/src/providers/deepseek/chatPayload.test.ts@@ -54,6 +54,38 @@ describe('buildDeepSeekAnthropicPayload — thinking history normalization', ()// context-engine thinking part whose `thinking` key vanishes on JSON// serialization. DeepSeek's strict deserializer rejects it, so the part must// be dropped and replaced by the proven `' '` placeholder.+ /**+ * Official API 400s only when the thinking block is missing. Replay-off /+ * leftover preview `none` still go through this builder, which must keep a+ * whitespace thinking field rather than omit the part.+ */+ it('emits a whitespace thinking block for tool-call history when reasoning was stripped', async () => {+ const payload = await buildDeepSeekAnthropicPayload({+ messages: [+ { content: 'Search weather', role: 'user' },+ {+ content: '',+ role: 'assistant',+ tool_calls: [+ {+ function: { arguments: '{"city":"Beijing"}', name: 'get_weather' },+ id: 'call_1',+ type: 'function',+ },+ ],+ },+ { content: '{"temp":20}', role: 'tool', tool_call_id: 'call_1' },+ ],+ model: 'deepseek-v4-flash',+ thinking: { type: 'enabled' },+ } as any);++ const [assistant] = getAssistantMessages(payload);+ const thinkingParts = assistant.content.filter((p: any) => p.type === 'thinking');+ expect(thinkingParts).toEqual([{ thinking: ' ', type: 'thinking' }]);+ expect(payload.thinking).toMatchObject({ type: 'enabled' });+ });+it('drops signature-only thinking parts and falls back to the placeholder block', async () => {const payload = await buildDeepSeekAnthropicPayload({messages: [diff --git a/packages/model-runtime/src/utils/modelExtendParams.test.ts b/packages/model-runtime/src/utils/modelExtendParams.test.tsindex ec5c7021560..3ee1947ea9b 100644--- a/packages/model-runtime/src/utils/modelExtendParams.test.ts+++ b/packages/model-runtime/src/utils/modelExtendParams.test.ts@@ -54,6 +54,26 @@ describe('applyModelExtendParams', () => {expect(result.thinkingLevel).toBe('medium');});+ it('defaults Gemini 3.7 Flash thinkingLevel to medium (thinkingLevel3)', () => {+ const result = applyModelExtendParams({+ chatConfig: chatConfig({}),+ extendParams: ['thinkingLevel3', 'urlContext'],+ model: 'gemini-3.7-flash',+ });++ expect(result.thinkingLevel).toBe('medium');+ });++ it('honors an explicit Gemini 3.7 Flash thinkingLevel3 value', () => {+ const result = applyModelExtendParams({+ chatConfig: chatConfig({ thinkingLevel3: 'high' }),+ extendParams: ['thinkingLevel3', 'urlContext'],+ model: 'gemini-3.7-flash',+ });++ expect(result.thinkingLevel).toBe('high');+ });+it('defaults Gemini 3.6 Flash thinkingLevel to medium', () => {const result = applyModelExtendParams({chatConfig: chatConfig({}),@@ -247,6 +267,83 @@ describe('applyModelExtendParams', () => {});});+ it('enables thinking and sets reasoning_effort for deepseekV4GAReasoningEffort low', () => {+ const result = applyModelExtendParams({+ chatConfig: chatConfig({+ deepseekV4GAReasoningEffort: 'low',+ }),+ extendParams: ['deepseekV4GAReasoningEffort'],+ model: 'deepseek-v4-flash',+ });++ expect(result.reasoning_effort).toBe('low');+ expect(result.thinking).toEqual({+ type: 'enabled',+ });+ });++ it('disables thinking when deepseekV4GAReasoningEffort is none', () => {+ const result = applyModelExtendParams({+ chatConfig: chatConfig({+ deepseekV4GAReasoningEffort: 'none',+ }),+ extendParams: ['deepseekV4GAReasoningEffort'],+ model: 'deepseek-v4-flash',+ });++ expect(result.reasoning_effort).toBeUndefined();+ expect(result.thinking).toEqual({+ type: 'disabled',+ });+ });++ it('prefers deepseekV4GAReasoningEffort when both DeepSeek V4 params are declared', () => {+ const result = applyModelExtendParams({+ chatConfig: chatConfig({+ deepseekV4GAReasoningEffort: 'low',+ deepseekV4ReasoningEffort: 'max',+ }),+ extendParams: ['deepseekV4GAReasoningEffort', 'deepseekV4ReasoningEffort'],+ model: 'deepseek-v4-flash',+ });++ expect(result.reasoning_effort).toBe('low');+ expect(result.thinking).toEqual({+ type: 'enabled',+ });+ });++ /**+ * Official DeepSeek 400s only when a thinking-mode tool-call turn omits the+ * thinking block entirely. A leftover preview `none` on a GA-only card must+ * not flip thinking to disabled — the payload builder then keeps the+ * whitespace placeholder instead of dropping the field.+ */+ it('ignores leftover preview none when the card only declares the GA effort param', () => {+ const result = applyModelExtendParams({+ chatConfig: chatConfig({ deepseekV4ReasoningEffort: 'none' }),+ extendParams: ['deepseekV4GAReasoningEffort'],+ model: 'deepseek-v4-flash',+ });++ expect(result.thinking).toBeUndefined();+ expect(result.reasoning_effort).toBeUndefined();+ });++ it('keeps GA thinking on when leftover preview none is stored beside a GA high', () => {+ const result = applyModelExtendParams({+ chatConfig: chatConfig({+ deepseekV4GAReasoningEffort: 'high',+ deepseekV4ReasoningEffort: 'none',+ }),+ extendParams: ['deepseekV4GAReasoningEffort'],+ model: 'deepseek-v4-flash',+ });++ expect(result.reasoning_effort).toBe('high');+ expect(result.thinking).toEqual({ type: 'enabled' });+ });+it('respects Claude Sonnet 5 adaptive thinking default when unset', () => {const result = applyModelExtendParams({chatConfig: chatConfig({}),@@ -294,10 +391,19 @@ describe('resolveDefaultEnableAdaptiveThinkingForModel', () => {describe('resolveDefaultThinkingLevelForModel', () => {it('falls back to high without a model', () => {expect(resolveDefaultThinkingLevelForModel()).toBe('high');+ expect(resolveDefaultThinkingLevelForModel(undefined, 'thinkingLevel3')).toBe('high');+ expect(resolveDefaultThinkingLevelForModel(undefined, 'thinkingLevel4')).toBe('minimal');});it('uses per-model defaults', () => {expect(resolveDefaultThinkingLevelForModel('gemini-flash-latest')).toBe('medium');+ expect(resolveDefaultThinkingLevelForModel('gemini-flash-latest', 'thinkingLevel3')).toBe(+ 'medium',+ );+ expect(resolveDefaultThinkingLevelForModel('gemini-3.7-flash')).toBe('medium');+ expect(resolveDefaultThinkingLevelForModel('gemini-3.7-flash', 'thinkingLevel3')).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(diff --git a/packages/model-runtime/src/utils/modelExtendParams.ts b/packages/model-runtime/src/utils/modelExtendParams.tsindex d13d69f806e..57854739ac5 100644--- a/packages/model-runtime/src/utils/modelExtendParams.ts+++ b/packages/model-runtime/src/utils/modelExtendParams.ts@@ -85,7 +85,6 @@ 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',@@ -99,6 +98,7 @@ const MODEL_THINKING_LEVEL_DEFAULTS: Partial<> = {'gemini-flash-latest': {thinkingLevel: 'medium',+ thinkingLevel3: 'medium',},'gemini-flash-lite-latest': {thinkingLevel: 'minimal',@@ -107,6 +107,7 @@ const MODEL_THINKING_LEVEL_DEFAULTS: Partial<thinkingLevel: 'medium',},'gemini-3.7-flash': {+ thinkingLevel: 'medium',thinkingLevel3: 'medium',},'gemini-3.5-flash': {@@ -151,21 +152,16 @@ const isThinkingLevelExtendParam = (extendParam: ExtendParamsType,): extendParam is ThinkingLevelExtendParam => extendParam in DEFAULT_THINKING_LEVEL_BY_EXTEND_PARAM;-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];+export function resolveDefaultThinkingLevelForModel<+ T extends ThinkingLevelExtendParam = 'thinkingLevel',+>(model?: string, extendParam?: T): NonNullable<LobeAgentChatConfig[T]> {+ const param = (extendParam ?? 'thinkingLevel') as T;- return resolveThinkingLevelDefault(model, extendParam);+ if (!model) {+ return DEFAULT_THINKING_LEVEL_BY_EXTEND_PARAM[param] as NonNullable<LobeAgentChatConfig[T]>;+ }++ return resolveThinkingLevelDefault(model, param) as NonNullable<LobeAgentChatConfig[T]>;}/**@@ -359,23 +355,25 @@ export const applyModelExtendParams = (ctx: ApplyModelExtendParamsContext): Mode}// DeepSeek reasoning effort is reconciled last to avoid invalid combinations.- if (modelExtendParams.includes('deepseekV4ReasoningEffort')) {- const deepseekV4ReasoningEffort = chatConfig.deepseekV4ReasoningEffort;-- if (typeof deepseekV4ReasoningEffort === 'string') {- if (deepseekV4ReasoningEffort === 'none') {- delete extendParams.reasoning_effort;- extendParams.thinking = {- ...extendParams.thinking,- type: 'disabled',- };- } else {- extendParams.reasoning_effort = deepseekV4ReasoningEffort;- extendParams.thinking = {- ...extendParams.thinking,- type: 'enabled',- };- }+ const deepseekV4ReasoningEffort = modelExtendParams.includes('deepseekV4GAReasoningEffort')+ ? chatConfig.deepseekV4GAReasoningEffort+ : modelExtendParams.includes('deepseekV4ReasoningEffort')+ ? chatConfig.deepseekV4ReasoningEffort+ : undefined;++ if (typeof deepseekV4ReasoningEffort === 'string') {+ if (deepseekV4ReasoningEffort === 'none') {+ delete extendParams.reasoning_effort;+ extendParams.thinking = {+ ...extendParams.thinking,+ type: 'disabled',+ };+ } else {+ extendParams.reasoning_effort = deepseekV4ReasoningEffort;+ extendParams.thinking = {+ ...extendParams.thinking,+ type: 'enabled',+ };}}diff --git a/packages/types/src/agent/chatConfig.ts b/packages/types/src/agent/chatConfig.tsindex 0d14ce9469f..4fd5f1231e2 100644--- a/packages/types/src/agent/chatConfig.ts+++ b/packages/types/src/agent/chatConfig.ts@@ -32,6 +32,7 @@ export interface LobeAgentChatConfig extends AgentMemoryChatConfig, AgentSelfIte* Model ID to use for generating compression summaries*/compressionModelId?: string;+ deepseekV4GAReasoningEffort?: 'none' | 'low' | 'high' | 'max';deepseekV4ReasoningEffort?: 'none' | 'high' | 'max';/**@@ -239,6 +240,7 @@ export const SelfIterationChatConfigSchema = z.object({export const AgentChatConfigSchema = z.object({codexMaxReasoningEffort: z.enum(['low', 'medium', 'high', 'xhigh']).optional(),+ deepseekV4GAReasoningEffort: z.enum(['none', 'low', 'high', 'max']).optional(),deepseekV4ReasoningEffort: z.enum(['none', 'high', 'max']).optional(),compressionModelId: z.string().optional(),disableContextCaching: z.boolean().optional(),diff --git a/src/features/ModelSwitchPanel/components/ControlsForm/ControlsForm.tsx b/src/features/ModelSwitchPanel/components/ControlsForm/ControlsForm.tsxindex 042fc89642f..4d9809e6871 100644--- a/src/features/ModelSwitchPanel/components/ControlsForm/ControlsForm.tsx+++ b/src/features/ModelSwitchPanel/components/ControlsForm/ControlsForm.tsx@@ -22,7 +22,9 @@ import { aiModelSelectors, useAiInfraStore } from '@/store/aiInfra';import CodexMaxReasoningEffortSlider from './CodexMaxReasoningEffortSlider';import ContextCachingSwitch from './ContextCachingSwitch';-import DeepSeekReasoningEffortSlider from './DeepSeekReasoningEffortSlider';+import DeepSeekReasoningEffortSlider, {+ DeepSeekV4GAReasoningEffortSlider,+} from './DeepSeekReasoningEffortSlider';import EffortSlider from './EffortSlider';import GLM52ReasoningEffortSlider from './GLM52ReasoningEffortSlider';import GLM53ReasoningEffortSlider from './GLM53ReasoningEffortSlider';@@ -249,6 +251,16 @@ const ControlsForm = memo<ControlsFormProps>(paddingBottom: 0,},},+ {+ children: <DeepSeekV4GAReasoningEffortSlider />,+ label: t('extendParams.reasoningEffort.title'),+ layout: 'vertical',+ minWidth: undefined,+ name: 'deepseekV4GAReasoningEffort',+ style: {+ paddingBottom: 0,+ },+ },{children: <DeepSeekReasoningEffortSlider />,label: t('extendParams.reasoningEffort.title'),diff --git a/src/features/ModelSwitchPanel/components/ControlsForm/DeepSeekReasoningEffortSlider.tsx b/src/features/ModelSwitchPanel/components/ControlsForm/DeepSeekReasoningEffortSlider.tsxindex 63de646d5a4..10f2de6e87b 100644--- a/src/features/ModelSwitchPanel/components/ControlsForm/DeepSeekReasoningEffortSlider.tsx+++ b/src/features/ModelSwitchPanel/components/ControlsForm/DeepSeekReasoningEffortSlider.tsx@@ -2,10 +2,14 @@ import type { CreatedLevelSliderProps } from './createLevelSlider';import { createLevelSliderComponent } from './createLevelSlider';const DEEPSEEK_REASONING_EFFORT_LEVELS = ['none', 'high', 'max'] as const;+const DEEPSEEK_V4_GA_REASONING_EFFORT_LEVELS = ['none', 'low', 'high', 'max'] as const;type DeepSeekReasoningEffort = (typeof DEEPSEEK_REASONING_EFFORT_LEVELS)[number];+type DeepSeekV4GAReasoningEffort = (typeof DEEPSEEK_V4_GA_REASONING_EFFORT_LEVELS)[number];export type DeepSeekReasoningEffortSliderProps = CreatedLevelSliderProps<DeepSeekReasoningEffort>;+export type DeepSeekV4GAReasoningEffortSliderProps =+ CreatedLevelSliderProps<DeepSeekV4GAReasoningEffort>;const DeepSeekReasoningEffortSlider = createLevelSliderComponent<DeepSeekReasoningEffort>({configKey: 'deepseekV4ReasoningEffort',@@ -14,4 +18,12 @@ const DeepSeekReasoningEffortSlider = createLevelSliderComponent<DeepSeekReasonistyle: { minWidth: 180 },});+export const DeepSeekV4GAReasoningEffortSlider =+ createLevelSliderComponent<DeepSeekV4GAReasoningEffort>({+ configKey: 'deepseekV4GAReasoningEffort',+ defaultValue: 'high',+ levels: DEEPSEEK_V4_GA_REASONING_EFFORT_LEVELS,+ style: { minWidth: 220 },+ });+export default DeepSeekReasoningEffortSlider;diff --git a/src/features/Settings/provider/features/ModelList/CreateNewModelModal/ExtendParamsSelect.tsx b/src/features/Settings/provider/features/ModelList/CreateNewModelModal/ExtendParamsSelect.tsxindex 0013f30b6db..ff38dd22896 100644--- a/src/features/Settings/provider/features/ModelList/CreateNewModelModal/ExtendParamsSelect.tsx+++ b/src/features/Settings/provider/features/ModelList/CreateNewModelModal/ExtendParamsSelect.tsx@@ -6,7 +6,9 @@ import { memo, type ReactNode, type SyntheticEvent, useMemo } from 'react';import { Trans, useTranslation } from 'react-i18next';import CodexMaxReasoningEffortSlider from '@/features/ModelSwitchPanel/components/ControlsForm/CodexMaxReasoningEffortSlider';-import DeepSeekReasoningEffortSlider from '@/features/ModelSwitchPanel/components/ControlsForm/DeepSeekReasoningEffortSlider';+import DeepSeekReasoningEffortSlider, {+ DeepSeekV4GAReasoningEffortSlider,+} from '@/features/ModelSwitchPanel/components/ControlsForm/DeepSeekReasoningEffortSlider';import EffortSlider from '@/features/ModelSwitchPanel/components/ControlsForm/EffortSlider';import GLM52ReasoningEffortSlider from '@/features/ModelSwitchPanel/components/ControlsForm/GLM52ReasoningEffortSlider';import GLM53ReasoningEffortSlider from '@/features/ModelSwitchPanel/components/ControlsForm/GLM53ReasoningEffortSlider';@@ -79,6 +81,11 @@ const EXTEND_PARAMS_OPTIONS: ExtendParamsOption[] = [hintKey: 'providerModels.item.modelConfig.extendParams.options.effort.hint',key: 'effort',},+ {+ hintKey:+ 'providerModels.item.modelConfig.extendParams.options.deepseekV4GAReasoningEffort.hint',+ key: 'deepseekV4GAReasoningEffort',+ },{hintKey: 'providerModels.item.modelConfig.extendParams.options.deepseekV4ReasoningEffort.hint',key: 'deepseekV4ReasoningEffort',@@ -213,6 +220,7 @@ const EXTEND_PARAMS_OPTIONS: ExtendParamsOption[] = [// This allows reusing existing i18n translations instead of adding new onesconst TITLE_KEY_ALIASES: Partial<Record<ExtendParamsType, ExtendParamsType>> = {codexMaxReasoningEffort: 'reasoningEffort',+ deepseekV4GAReasoningEffort: 'reasoningEffort',deepseekV4ReasoningEffort: 'reasoningEffort',gpt5ReasoningEffort: 'reasoningEffort',gpt5_1ReasoningEffort: 'reasoningEffort',@@ -252,6 +260,11 @@ const PREVIEW_META: Partial<Record<ExtendParamsType, PreviewMeta>> = {previewWidth: 300,tag: 'reasoning_effort',},+ deepseekV4GAReasoningEffort: {+ labelSuffix: ' (DeepSeek V4 GA)',+ previewWidth: 280,+ tag: 'reasoning_effort',+ },deepseekV4ReasoningEffort: {labelSuffix: ' (DeepSeek V4)',previewWidth: 240,@@ -459,6 +472,7 @@ const ExtendParamsSelect = memo<ExtendParamsSelectProps>(({ value, onChange }) =const previewControls = useMemo<Partial<Record<ExtendParamsType, ReactNode>>>(() => ({codexMaxReasoningEffort: <CodexMaxReasoningEffortSlider value="medium" />,+ deepseekV4GAReasoningEffort: <DeepSeekV4GAReasoningEffortSlider value="high" />,deepseekV4ReasoningEffort: <DeepSeekReasoningEffortSlider value="high" />,disableContextCaching: <Switch checked disabled />,effort: <EffortSlider value="high" />,diff --git a/src/features/Settings/provider/features/ModelList/CreateNewModelModal/__tests__/ExtendParamsSelect.test.tsx b/src/features/Settings/provider/features/ModelList/CreateNewModelModal/__tests__/ExtendParamsSelect.test.tsxindex 464709c773a..a66d4e1cb34 100644--- a/src/features/Settings/provider/features/ModelList/CreateNewModelModal/__tests__/ExtendParamsSelect.test.tsx+++ b/src/features/Settings/provider/features/ModelList/CreateNewModelModal/__tests__/ExtendParamsSelect.test.tsx@@ -87,6 +87,7 @@ describe('ExtendParamsSelect', () => {it('should return the alias key when available', () => {expect(getTitleKey('gpt5ReasoningEffort')).toBe('reasoningEffort');expect(getTitleKey('glm5_2ReasoningEffort')).toBe('reasoningEffort');+ expect(getTitleKey('glm5_3ReasoningEffort')).toBe('reasoningEffort');expect(getTitleKey('thinkingLevel2')).toBe('thinkingLevel');});diff --git a/src/services/chat/mecha/modelParamsResolver.test.ts b/src/services/chat/mecha/modelParamsResolver.test.tsindex f96a6d25a1d..07e4293885e 100644--- a/src/services/chat/mecha/modelParamsResolver.test.ts+++ b/src/services/chat/mecha/modelParamsResolver.test.ts@@ -379,6 +379,67 @@ describe('resolveModelExtendParams', () => {});});+ describe('deepseekV4GAReasoningEffort param', () => {+ beforeEach(() => {+ vi.spyOn(aiModelSelectors.aiModelSelectors, 'isModelHasExtendParams').mockReturnValue(+ () => true,+ );+ vi.spyOn(aiModelSelectors.aiModelSelectors, 'modelExtendParams').mockReturnValue(() => [+ 'deepseekV4GAReasoningEffort',+ ]);+ });++ it('should enable thinking and set reasoning_effort for DeepSeek V4 GA when configured with a reasoning level', () => {+ mockModelReasoningConfig({ deepseekV4GAReasoningEffort: 'high' });++ const result = resolveModelExtendParams({+ chatConfig: {} as any,+ model: 'deepseek-v4-flash',+ provider: 'deepseek',+ });++ expect(result).toEqual({+ reasoning_effort: 'high',+ thinking: {+ type: 'enabled',+ },+ });+ });++ it('should enable thinking and set reasoning_effort to low for DeepSeek V4 GA', () => {+ mockModelReasoningConfig({ deepseekV4GAReasoningEffort: 'low' });++ const result = resolveModelExtendParams({+ chatConfig: {} as any,+ model: 'deepseek-v4-flash',+ provider: 'deepseek',+ });++ expect(result).toEqual({+ reasoning_effort: 'low',+ thinking: {+ type: 'enabled',+ },+ });+ });++ it('should disable thinking and omit reasoning_effort for DeepSeek V4 GA when configured as none', () => {+ mockModelReasoningConfig({ deepseekV4GAReasoningEffort: 'none' });++ const result = resolveModelExtendParams({+ chatConfig: {} as any,+ model: 'deepseek-v4-flash',+ provider: 'deepseek',+ });++ expect(result).toEqual({+ thinking: {+ type: 'disabled',+ },+ });+ });+ });+describe('gpt5ReasoningEffort param', () => {beforeEach(() => {vi.spyOn(aiModelSelectors.aiModelSelectors, 'isModelHasExtendParams').mockReturnValue(@@ -846,6 +907,28 @@ describe('thinking configuration', () => {expect(result.thinkingLevel).toBe('medium');});+ it('should use default thinkingLevel for gemini-3.7-flash when not configured', () => {+ const result = resolveModelExtendParams({+ chatConfig: {} as any,+ model: 'gemini-3.7-flash',+ provider: 'google',+ });++ expect(result.thinkingLevel).toBe('medium');+ });++ it('should set thinkingLevel from thinkingLevel3 config key for gemini-3.7-flash', () => {+ const result = resolveModelExtendParams({+ chatConfig: {+ thinkingLevel3: 'high',+ } as any,+ model: 'gemini-3.7-flash',+ provider: 'google',+ });++ expect(result.thinkingLevel).toBe('high');+ });+it('should not set thinkingLevel when thinkingLevel3 is not configured', () => {const result = resolveModelExtendParams({chatConfig: {} as any,@@ -1275,6 +1358,30 @@ describe('parameter precedence and conflicts', () => {});describe('reasoning effort variants precedence', () => {+ it('should prioritize deepseekV4GAReasoningEffort over deepseekV4ReasoningEffort when both are supported', () => {+ vi.spyOn(aiModelSelectors.aiModelSelectors, 'modelExtendParams').mockReturnValue(() => [+ 'deepseekV4GAReasoningEffort',+ 'deepseekV4ReasoningEffort',+ ]);+ mockModelReasoningConfig({+ deepseekV4GAReasoningEffort: 'low',+ deepseekV4ReasoningEffort: 'max',+ });++ const result = resolveModelExtendParams({+ chatConfig: {} as any,+ model: 'deepseek-v4-flash',+ provider: 'deepseek',+ });++ expect(result).toEqual({+ reasoning_effort: 'low',+ thinking: {+ type: 'enabled',+ },+ });+ });+it('should prioritize deepseekV4ReasoningEffort over generic reasoningEffort when both are supported', () => {vi.spyOn(aiModelSelectors.aiModelSelectors, 'modelExtendParams').mockReturnValue(() => ['deepseekV4ReasoningEffort',