🤯 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 support for Nano Banana 2 (#12496)
sxjeru7d7af6b8cac1
diff --git a/locales/en-US/modelProvider.json b/locales/en-US/modelProvider.jsonindex ba5e8ab5d55..c2a975f9fe0 100644--- a/locales/en-US/modelProvider.json+++ b/locales/en-US/modelProvider.json@@ -224,15 +224,18 @@"providerModels.item.modelConfig.extendParams.options.gpt5_2ProReasoningEffort.hint": "For GPT-5.2 Pro series; controls reasoning intensity.","providerModels.item.modelConfig.extendParams.options.gpt5_2ReasoningEffort.hint": "For GPT-5.2 series; controls reasoning intensity.","providerModels.item.modelConfig.extendParams.options.imageAspectRatio.hint": "For Gemini image generation models; controls aspect ratio of generated images.",+ "providerModels.item.modelConfig.extendParams.options.imageAspectRatio2.hint": "For Nano Banana 2; controls aspect ratio of generated images (supports extra-wide 1:4, 4:1, 1:8, 8:1).","providerModels.item.modelConfig.extendParams.options.imageResolution.hint": "For Gemini 3 image generation models; controls resolution of generated images.",+ "providerModels.item.modelConfig.extendParams.options.imageResolution2.hint": "For Gemini 3.1 Flash Image model; controls resolution of generated images (supports 512px).","providerModels.item.modelConfig.extendParams.options.reasoningBudgetToken.hint": "For Claude, Qwen3 and similar; controls token budget for reasoning.","providerModels.item.modelConfig.extendParams.options.reasoningEffort.hint": "For OpenAI and other reasoning-capable models; controls reasoning effort.","providerModels.item.modelConfig.extendParams.options.textVerbosity.hint": "For GPT-5+ series; controls output verbosity.","providerModels.item.modelConfig.extendParams.options.thinking.hint": "For some Doubao models; allow model to decide whether to think deeply.","providerModels.item.modelConfig.extendParams.options.thinkingBudget.hint": "For Gemini series; controls thinking budget.",- "providerModels.item.modelConfig.extendParams.options.thinkingLevel.hint": "For Gemini 3 Flash Preview models; controls thinking depth.",- "providerModels.item.modelConfig.extendParams.options.thinkingLevel2.hint": "For Gemini 3 Pro Preview models; controls thinking depth.",- "providerModels.item.modelConfig.extendParams.options.thinkingLevel3.hint": "For Gemini 3.1 Pro Preview models; controls thinking depth with low/medium/high levels.",+ "providerModels.item.modelConfig.extendParams.options.thinkingLevel.hint": "For Gemini 3 Flash Preview model; controls thinking depth.",+ "providerModels.item.modelConfig.extendParams.options.thinkingLevel2.hint": "For Gemini 3 Pro Preview model; controls thinking depth.",+ "providerModels.item.modelConfig.extendParams.options.thinkingLevel3.hint": "For Gemini 3.1 Pro Preview model; controls thinking depth with low/medium/high levels.",+ "providerModels.item.modelConfig.extendParams.options.thinkingLevel4.hint": "For Gemini 3.1 Flash Image model; toggle thinking on/off.","providerModels.item.modelConfig.extendParams.options.urlContext.hint": "For Gemini series; supports providing URL context.","providerModels.item.modelConfig.extendParams.placeholder": "Select extended parameters to enable","providerModels.item.modelConfig.extendParams.previewFallback": "Preview unavailable",diff --git a/locales/zh-CN/modelProvider.json b/locales/zh-CN/modelProvider.jsonindex 245922f34e8..f60e61fbc85 100644--- a/locales/zh-CN/modelProvider.json+++ b/locales/zh-CN/modelProvider.json@@ -224,7 +224,9 @@"providerModels.item.modelConfig.extendParams.options.gpt5_2ProReasoningEffort.hint": "适用于 GPT-5.2 Pro 系列;控制推理强度。","providerModels.item.modelConfig.extendParams.options.gpt5_2ReasoningEffort.hint": "适用于 GPT-5.2 系列;控制推理强度。","providerModels.item.modelConfig.extendParams.options.imageAspectRatio.hint": "适用于 Gemini 图像生成模型;控制生成图像的宽高比。",+ "providerModels.item.modelConfig.extendParams.options.imageAspectRatio2.hint": "适用于 Nano Banana 2;控制生成图像的宽高比(支持超宽 1:4、4:1、1:8、8:1)。","providerModels.item.modelConfig.extendParams.options.imageResolution.hint": "适用于 Gemini 3 图像生成模型;控制生成图像的分辨率。",+ "providerModels.item.modelConfig.extendParams.options.imageResolution2.hint": "适用于 Gemini 3.1 Flash Image 模型;控制生成图像的分辨率(支持 512px)。","providerModels.item.modelConfig.extendParams.options.reasoningBudgetToken.hint": "适用于 Claude、Qwen3 等模型;控制用于推理的 Token 预算。","providerModels.item.modelConfig.extendParams.options.reasoningEffort.hint": "适用于 OpenAI 及其他具备推理能力的模型;控制推理力度。","providerModels.item.modelConfig.extendParams.options.textVerbosity.hint": "适用于 GPT-5+ 系列;控制输出内容的详尽程度。",@@ -233,6 +235,7 @@"providerModels.item.modelConfig.extendParams.options.thinkingLevel.hint": "适用于 Gemini 3 Flash 预览模型;控制思考深度。","providerModels.item.modelConfig.extendParams.options.thinkingLevel2.hint": "适用于 Gemini 3 Pro 预览模型;控制思考深度。","providerModels.item.modelConfig.extendParams.options.thinkingLevel3.hint": "适用于 Gemini 3.1 Pro 预览模型;通过低/中/高等级控制思维深度。",+ "providerModels.item.modelConfig.extendParams.options.thinkingLevel4.hint": "适用于 Gemini 3.1 Flash Image 模型;开关思考能力。","providerModels.item.modelConfig.extendParams.options.urlContext.hint": "适用于 Gemini 系列;支持提供 URL 上下文。","providerModels.item.modelConfig.extendParams.placeholder": "选择要启用的扩展参数","providerModels.item.modelConfig.extendParams.previewFallback": "无法预览",diff --git a/packages/model-bank/src/aiModels/aihubmix.ts b/packages/model-bank/src/aiModels/aihubmix.tsindex b1bff5cc5ce..a849f35dab6 100644--- a/packages/model-bank/src/aiModels/aihubmix.ts+++ b/packages/model-bank/src/aiModels/aihubmix.ts@@ -1158,6 +1158,36 @@ const aihubmixModels: AIChatModelCard[] = [},type: 'chat',},+ {+ abilities: {+ imageOutput: true,+ reasoning: true,+ search: true,+ vision: true,+ },+ contextWindowTokens: 131_072 + 32_768,+ 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,+ id: 'gemini-3.1-flash-image-preview',+ maxOutput: 32_768,+ pricing: {+ approximatePricePerImage: 0.067,+ units: [+ { name: 'imageOutput', rate: 60, strategy: 'fixed', unit: 'millionTokens' },+ { name: 'textInput', rate: 0.25, strategy: 'fixed', unit: 'millionTokens' },+ { name: 'textOutput', rate: 1.5, strategy: 'fixed', unit: 'millionTokens' },+ ],+ },+ releasedAt: '2026-02-26',+ settings: {+ extendParams: ['imageAspectRatio2', 'imageResolution2', 'thinkingLevel4'],+ searchImpl: 'params',+ searchProvider: 'google',+ },+ type: 'chat',+ },{abilities: {functionCall: true,diff --git a/packages/model-bank/src/aiModels/google.ts b/packages/model-bank/src/aiModels/google.tsindex ed163dd9214..ea72be3c391 100644--- a/packages/model-bank/src/aiModels/google.ts+++ b/packages/model-bank/src/aiModels/google.ts@@ -113,6 +113,36 @@ const googleChatModels: AIChatModelCard[] = [},type: 'chat',},+ {+ abilities: {+ imageOutput: true,+ reasoning: true,+ search: true,+ vision: true,+ },+ contextWindowTokens: 131_072 + 32_768,+ 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,+ id: 'gemini-3.1-flash-image-preview',+ maxOutput: 32_768,+ pricing: {+ approximatePricePerImage: 0.067,+ units: [+ { name: 'imageOutput', rate: 60, strategy: 'fixed', unit: 'millionTokens' },+ { name: 'textInput', rate: 0.25, strategy: 'fixed', unit: 'millionTokens' },+ { name: 'textOutput', rate: 1.5, strategy: 'fixed', unit: 'millionTokens' },+ ],+ },+ releasedAt: '2026-02-26',+ settings: {+ extendParams: ['imageAspectRatio2', 'imageResolution2', 'thinkingLevel4'],+ searchImpl: 'params',+ searchProvider: 'google',+ },+ type: 'chat',+ },{abilities: {functionCall: true,@@ -853,6 +883,8 @@ const NANO_BANANA_ASPECT_RATIOS = ['21:9', // 1584x672 / 3168x1344 / 6336x2688];+const NANO_BANANA_2_ASPECT_RATIOS = [...NANO_BANANA_ASPECT_RATIOS, '1:4', '4:1', '1:8', '8:1'];+export const nanoBananaParameters: ModelParamsSchema = {aspectRatio: {default: '1:1',@@ -879,7 +911,40 @@ export const nanoBananaProParameters: ModelParamsSchema = {},};+export const nanoBanana2Parameters: ModelParamsSchema = {+ aspectRatio: {+ default: '1:1',+ enum: NANO_BANANA_2_ASPECT_RATIOS,+ },+ imageUrls: {+ default: [],+ },+ prompt: { default: '' },+ resolution: {+ default: '1K',+ enum: ['512px', '1K', '2K', '4K'],+ },+};+const googleImageModels: AIImageModelCard[] = [+ {+ displayName: 'Nano Banana 2',+ id: 'gemini-3.1-flash-image-preview:image',+ type: 'image',+ enabled: true,+ 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.",+ releasedAt: '2026-02-26',+ parameters: nanoBanana2Parameters,+ pricing: {+ approximatePricePerImage: 0.067,+ units: [+ { name: 'imageOutput', rate: 60, strategy: 'fixed', unit: 'millionTokens' },+ { name: 'textInput', rate: 0.25, strategy: 'fixed', unit: 'millionTokens' },+ { name: 'textOutput', rate: 1.5, strategy: 'fixed', unit: 'millionTokens' },+ ],+ },+ },{displayName: 'Nano Banana Pro',id: 'gemini-3-pro-image-preview:image',diff --git a/packages/model-bank/src/aiModels/modelscope.ts b/packages/model-bank/src/aiModels/modelscope.tsindex 21c1e6c27c4..337142ec36c 100644--- a/packages/model-bank/src/aiModels/modelscope.ts+++ b/packages/model-bank/src/aiModels/modelscope.ts@@ -26,13 +26,35 @@ const modelscopeChatModels: AIChatModelCard[] = [reasoning: true,},contextWindowTokens: 131_072,- description:- 'DeepSeek V3.2 uses a hybrid reasoning architecture and supports both thinking and non-thinking modes.',displayName: 'DeepSeek V3.2',enabled: true,id: 'deepseek-ai/DeepSeek-V3.2',type: 'chat',},+ {+ abilities: {+ functionCall: true,+ reasoning: true,+ },+ contextWindowTokens: 131_072,+ description:+ 'DeepSeek V3.2 Exp uses a hybrid reasoning architecture and supports both thinking and non-thinking modes.',+ displayName: 'DeepSeek V3.2 Exp',+ id: 'deepseek-ai/DeepSeek-V3.2-Exp',+ type: 'chat',+ },+ {+ abilities: {+ functionCall: true,+ reasoning: true,+ },+ contextWindowTokens: 131_072,+ description:+ 'DeepSeek V3.1 uses a hybrid reasoning architecture and supports both thinking and non-thinking modes.',+ displayName: 'DeepSeek V3.1',+ id: 'deepseek-ai/DeepSeek-V3.1',+ type: 'chat',+ },{abilities: {functionCall: true,diff --git a/packages/model-bank/src/aiModels/openai.ts b/packages/model-bank/src/aiModels/openai.tsindex feaa763b7bc..f6f031b5844 100644--- a/packages/model-bank/src/aiModels/openai.ts+++ b/packages/model-bank/src/aiModels/openai.ts@@ -164,7 +164,7 @@ export const openaiChatModels: AIChatModelCard[] = [},releasedAt: '2025-11-13',settings: {- extendParams: ['gpt5_1ReasoningEffort'],+ extendParams: ['reasoningEffort'],searchImpl: 'params',},type: 'chat',@@ -191,7 +191,7 @@ export const openaiChatModels: AIChatModelCard[] = [},releasedAt: '2025-11-13',settings: {- extendParams: ['gpt5_1ReasoningEffort'],+ extendParams: ['reasoningEffort'],searchImpl: 'params',},type: 'chat',diff --git a/packages/model-bank/src/aiModels/qwen.ts b/packages/model-bank/src/aiModels/qwen.tsindex 4c53ea667f9..66dea5b20e5 100644--- a/packages/model-bank/src/aiModels/qwen.ts+++ b/packages/model-bank/src/aiModels/qwen.ts@@ -11,44 +11,20 @@ const qwenChatModels: AIChatModelCard[] = [},contextWindowTokens: 262_144,description:- 'Qwen3.5 397B A17B is a large-scale open model in the Qwen series, delivering excellent performance in complex reasoning, knowledge QA, and coding. It supports thinking mode for highly complex tasks.',- displayName: 'Qwen3.5 397B A17B',- id: 'qwen3.5-397b-a17b',- maxOutput: 65_536,+ 'Kimi K2.5 is the most capable Kimi model, delivering open-source SOTA in agent tasks, coding, and vision understanding. It supports multimodal inputs and both thinking and non-thinking modes.',+ displayName: 'Kimi K2.5',+ id: 'kimi-k2.5',+ maxOutput: 32_768,organization: 'Qwen',pricing: {currency: 'CNY',units: [- {- lookup: {- prices: {- '[0, 0.128]': 1.2,- '[0.128, 0.256]': 3,- },- pricingParams: ['textInputRange'],- },- name: 'textInput',- strategy: 'lookup',- unit: 'millionTokens',- },- {- lookup: {- prices: {- '[0, 0.128]': 7.2,- '[0.128, 0.256]': 18,- },- pricingParams: ['textInputRange'],- },- name: 'textOutput',- strategy: 'lookup',- unit: 'millionTokens',- },+ { name: 'textInput', rate: 4, strategy: 'fixed', unit: 'millionTokens' },+ { name: 'textOutput', rate: 21, strategy: 'fixed', unit: 'millionTokens' },],},- releasedAt: '2026-02-15',settings: {extendParams: ['enableReasoning', 'reasoningBudgetToken'],- searchImpl: 'params',},type: 'chat',},@@ -56,24 +32,23 @@ const qwenChatModels: AIChatModelCard[] = [abilities: {functionCall: true,reasoning: true,- vision: true,+ search: true,},- contextWindowTokens: 262_144,+ contextWindowTokens: 204_800,description:- 'Kimi K2.5 is the most capable Kimi model, delivering open-source SOTA in agent tasks, coding, and vision understanding. It supports multimodal inputs and both thinking and non-thinking modes.',- displayName: 'Kimi K2.5',- id: 'kimi-k2.5',- maxOutput: 32_768,- organization: 'Qwen',+ 'MiniMax-M2.5 is a flagship open-source large model from MiniMax, focusing on solving complex real-world tasks. Its core strengths are multi-language programming capabilities and the ability to solve complex tasks as an Agent.',+ displayName: 'MiniMax-M2.5',+ id: 'MiniMax-M2.5',+ maxOutput: 131_072,pricing: {currency: 'CNY',units: [- { name: 'textInput', rate: 4, strategy: 'fixed', unit: 'millionTokens' },- { name: 'textOutput', rate: 21, strategy: 'fixed', unit: 'millionTokens' },+ { name: 'textInput', rate: 2.1, strategy: 'fixed', unit: 'millionTokens' },+ { name: 'textOutput', rate: 8.4, strategy: 'fixed', unit: 'millionTokens' },],},settings: {- extendParams: ['enableReasoning', 'reasoningBudgetToken'],+ searchImpl: 'params',},type: 'chat',},@@ -206,6 +181,31 @@ const qwenChatModels: AIChatModelCard[] = [},{abilities: {+ functionCall: true,+ reasoning: true,+ search: true,+ },+ contextWindowTokens: 131_072,+ description:+ 'deepseek-v3.2 introduces sparse attention mechanism, aiming to improve training and inference efficiency when processing long texts, priced lower than deepseek-v3.1.',+ displayName: 'DeepSeek V3.2',+ id: 'deepseek-v3.2',+ maxOutput: 65_536,+ pricing: {+ currency: 'CNY',+ units: [+ { name: 'textInput', rate: 2, strategy: 'fixed', unit: 'millionTokens' },+ { name: 'textOutput', rate: 3, strategy: 'fixed', unit: 'millionTokens' },+ ],+ },+ settings: {+ extendParams: ['enableReasoning', 'reasoningBudgetToken'],+ },+ type: 'chat',+ },+ {+ abilities: {+ functionCall: true,reasoning: true,search: true,},@@ -229,6 +229,7 @@ const qwenChatModels: AIChatModelCard[] = [},{abilities: {+ functionCall: true,reasoning: true,search: true,},@@ -789,7 +790,7 @@ const qwenChatModels: AIChatModelCard[] = [abilities: {functionCall: true,reasoning: true,- vision: true+ vision: true,},contextWindowTokens: 262_144,description:@@ -1645,10 +1646,11 @@ const qwenChatModels: AIChatModelCard[] = [currency: 'CNY',units: [{ name: 'textInput', rate: 1.8, strategy: 'fixed', unit: 'millionTokens' },+ { name: 'audioInput', rate: 15.8, strategy: 'fixed', unit: 'millionTokens' },+ { name: 'imageInput', rate: 3.3, strategy: 'fixed', unit: 'millionTokens' },{ name: 'textOutput', rate: 6.9, strategy: 'fixed', unit: 'millionTokens' },],},- releasedAt: '2025-09-15',settings: {extendParams: ['enableReasoning', 'reasoningBudgetToken'],},diff --git a/packages/model-bank/src/aiModels/vertexai.ts b/packages/model-bank/src/aiModels/vertexai.tsindex fc5f7879bf6..20a6e779ffc 100644--- a/packages/model-bank/src/aiModels/vertexai.ts+++ b/packages/model-bank/src/aiModels/vertexai.ts@@ -3,6 +3,36 @@ import { imagenGenParameters, nanoBananaParameters } from './google';// ref: https://cloud.google.com/vertex-ai/generative-ai/docs/learn/modelsconst vertexaiChatModels: AIChatModelCard[] = [+ {+ abilities: {+ imageOutput: true,+ reasoning: true,+ search: true,+ vision: true,+ },+ contextWindowTokens: 131_072 + 32_768,+ 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,+ id: 'gemini-3.1-flash-image-preview',+ maxOutput: 32_768,+ pricing: {+ approximatePricePerImage: 0.067,+ units: [+ { name: 'imageOutput', rate: 60, strategy: 'fixed', unit: 'millionTokens' },+ { name: 'textInput', rate: 0.25, strategy: 'fixed', unit: 'millionTokens' },+ { name: 'textOutput', rate: 1.5, strategy: 'fixed', unit: 'millionTokens' },+ ],+ },+ releasedAt: '2026-02-26',+ settings: {+ extendParams: ['imageAspectRatio2', 'imageResolution2', 'thinkingLevel4'],+ searchImpl: 'params',+ searchProvider: 'google',+ },+ type: 'chat',+ },{abilities: {functionCall: true,@@ -183,6 +213,7 @@ const vertexaiChatModels: AIChatModelCard[] = [},releasedAt: '2025-11-20',settings: {+ extendParams: ['thinkingBudget'],searchImpl: 'params',searchProvider: 'google',},diff --git a/packages/model-bank/src/aiModels/zhipu.ts b/packages/model-bank/src/aiModels/zhipu.tsindex b4a5bfa883d..231d7e5c0f6 100644--- a/packages/model-bank/src/aiModels/zhipu.ts+++ b/packages/model-bank/src/aiModels/zhipu.ts@@ -4,96 +4,6 @@ import { type AIChatModelCard, type AIImageModelCard } from '../types/aiModel';// ref: https://docs.bigmodel.cn/cn/guide/start/model-overviewconst zhipuChatModels: AIChatModelCard[] = [- {- abilities: {- functionCall: true,- reasoning: true,- search: true,- vision: true,- },- contextWindowTokens: 131_072,- description:- 'GLM-4.6V is an important iteration of the GLM series in the multimodal direction. It increases the training context window to 128k tokens, achieves SOTA in visual understanding accuracy among models of similar parameter scale, and for the first time natively integrates Function Call (tool calling) capability into a vision model within the model architecture, bridging the path from "visual perception" to "executable actions". It provides a unified technical foundation for multimodal Agents in real business scenarios.',- displayName: 'GLM-4.6V',- enabled: true,- id: 'glm-4.6v',- maxOutput: 32_768,- pricing: {- currency: 'CNY',- units: [- {- lookup: {- prices: {- '[0, 0.032]': 0.2,- '[0.032, infinity]': 0.4,- },- pricingParams: ['textInput'],- },- name: 'textInput_cacheRead',- strategy: 'lookup',- unit: 'millionTokens',- },- {- lookup: {- prices: {- '[0, 0.032]': 1,- '[0.032, infinity]': 2,- },- pricingParams: ['textInput'],- },- name: 'textInput',- strategy: 'lookup',- unit: 'millionTokens',- },- {- lookup: {- prices: {- '[0, 0.032]': 3,- '[0.032, infinity]': 6,- },- pricingParams: ['textInput'],- },- name: 'textOutput',- strategy: 'lookup',- unit: 'millionTokens',- },- { name: 'textInput_cacheWrite', rate: 0, strategy: 'fixed', unit: 'millionTokens' },- ],- },- settings: {- extendParams: ['enableReasoning'],- searchImpl: 'params',- },- type: 'chat',- },- {- abilities: {- functionCall: true,- reasoning: true,- search: true,- vision: true,- },- contextWindowTokens: 131_072,- description:- 'GLM-4.6V-Flash is the free version of GLM-4.6V, an important iteration of the GLM series in the multimodal direction, supporting the toggle of thinking mode on or off.',- displayName: 'GLM-4.6V-Flash',- enabled: true,- id: 'glm-4.6v-flash',- maxOutput: 32_768,- pricing: {- currency: 'CNY',- units: [- { name: 'textInput_cacheRead', rate: 0, strategy: 'fixed', unit: 'millionTokens' },- { name: 'textInput', rate: 0, strategy: 'fixed', unit: 'millionTokens' },- { name: 'textOutput', rate: 0, strategy: 'fixed', unit: 'millionTokens' },- ],- },- settings: {- extendParams: ['enableReasoning'],- searchImpl: 'params',- },- type: 'chat',- },{abilities: {functionCall: true,diff --git a/packages/model-bank/src/types/aiModel.ts b/packages/model-bank/src/types/aiModel.tsindex 2fc234a05e2..f7f68ba2c44 100644--- a/packages/model-bank/src/types/aiModel.ts+++ b/packages/model-bank/src/types/aiModel.ts@@ -256,8 +256,11 @@ export type ExtendParamsType =| 'thinkingLevel'| 'thinkingLevel2'| 'thinkingLevel3'+ | 'thinkingLevel4'| 'imageAspectRatio'+ | 'imageAspectRatio2'| 'imageResolution'+ | 'imageResolution2'| 'urlContext';export interface AiModelSettings {@@ -286,8 +289,11 @@ export const ExtendParamsTypeSchema = z.enum(['thinkingLevel','thinkingLevel2','thinkingLevel3',+ 'thinkingLevel4','imageAspectRatio',+ 'imageAspectRatio2','imageResolution',+ 'imageResolution2','urlContext',]);diff --git a/packages/model-runtime/src/providers/google/index.ts b/packages/model-runtime/src/providers/google/index.tsindex 66e1ca1afda..357263eb4b6 100644--- a/packages/model-runtime/src/providers/google/index.ts+++ b/packages/model-runtime/src/providers/google/index.ts@@ -198,7 +198,9 @@ export class LobeGoogleAI implements LobeRuntimeAI {systemInstruction: modelsDisableInstuction.has(model)? undefined: (payload.system as string),- temperature: payload.temperature,+ temperature: modelsWithModalities.has(model)+ ? Math.min(payload.temperature ?? 1, 1)+ : payload.temperature,thinkingConfig:modelsDisableInstuction.has(model) || model.toLowerCase().includes('learnlm')? undefineddiff --git a/packages/types/src/agent/chatConfig.ts b/packages/types/src/agent/chatConfig.tsindex 709ca97535d..dd2135b61e8 100644--- a/packages/types/src/agent/chatConfig.ts+++ b/packages/types/src/agent/chatConfig.ts@@ -1,7 +1,7 @@import { z } from 'zod';import { type SearchMode } from '../search';-import { type UserMemoryEffort } from '../user/settings/memory';+import { type UserMemoryEffort } from '../user/settings/memory';import { type LocalSystemConfig } from './agentConfig';export interface WorkingModel {@@ -79,10 +79,18 @@ export interface LobeAgentChatConfig extends AgentMemoryChatConfig {* Image aspect ratio for image generation models*/imageAspectRatio?: string;+ /**+ * Image aspect ratio for Nano Banana 2 (supports extra-wide 1:4, 4:1, 1:8, 8:1)+ */+ imageAspectRatio2?: string;/*** Image resolution for image generation models*/imageResolution?: '1K' | '2K' | '4K';+ /**+ * Image resolution for image generation models (with 512px support)+ */+ imageResolution2?: '512px' | '1K' | '2K' | '4K';inputTemplate?: string;/*** Local System configuration (desktop only)@@ -104,6 +112,7 @@ export interface LobeAgentChatConfig extends AgentMemoryChatConfig {thinkingLevel?: 'minimal' | 'low' | 'medium' | 'high';thinkingLevel2?: 'low' | 'high';thinkingLevel3?: 'low' | 'medium' | 'high';+ thinkingLevel4?: 'minimal' | 'high';/*** Maximum length for tool execution result content (in characters)* This prevents context overflow when sending tool results back to LLM@@ -154,7 +163,9 @@ export const AgentChatConfigSchema = zgpt5_2ReasoningEffort: z.enum(['none', 'low', 'medium', 'high', 'xhigh']).optional(),historyCount: z.number().optional(),imageAspectRatio: z.string().optional(),+ imageAspectRatio2: z.string().optional(),imageResolution: z.enum(['1K', '2K', '4K']).optional(),+ imageResolution2: z.enum(['512px', '1K', '2K', '4K']).optional(),localSystem: LocalSystemConfigSchema.optional(),reasoningBudgetToken: z.number().optional(),reasoningEffort: z.enum(['low', 'medium', 'high']).optional(),@@ -171,6 +182,7 @@ export const AgentChatConfigSchema = zthinkingLevel: z.enum(['minimal', 'low', 'medium', 'high']).optional(),thinkingLevel2: z.enum(['low', 'high']).optional(),thinkingLevel3: z.enum(['low', 'medium', 'high']).optional(),+ thinkingLevel4: z.enum(['minimal', 'high']).optional(),toolResultMaxLength: z.number().default(6000),urlContext: z.boolean().optional(),useModelBuiltinSearch: z.boolean().optional(),diff --git a/src/app/[variants]/(main)/settings/provider/features/ModelList/CreateNewModelModal/ExtendParamsSelect.tsx b/src/app/[variants]/(main)/settings/provider/features/ModelList/CreateNewModelModal/ExtendParamsSelect.tsxindex d3d6af8955a..12e9d26aa73 100644--- a/src/app/[variants]/(main)/settings/provider/features/ModelList/CreateNewModelModal/ExtendParamsSelect.tsx+++ b/src/app/[variants]/(main)/settings/provider/features/ModelList/CreateNewModelModal/ExtendParamsSelect.tsx@@ -10,7 +10,9 @@ import GPT5ReasoningEffortSlider from '@/features/ModelSwitchPanel/components/Coimport GPT51ReasoningEffortSlider from '@/features/ModelSwitchPanel/components/ControlsForm/GPT51ReasoningEffortSlider';import GPT52ProReasoningEffortSlider from '@/features/ModelSwitchPanel/components/ControlsForm/GPT52ProReasoningEffortSlider';import GPT52ReasoningEffortSlider from '@/features/ModelSwitchPanel/components/ControlsForm/GPT52ReasoningEffortSlider';+import ImageAspectRatio2Select from '@/features/ModelSwitchPanel/components/ControlsForm/ImageAspectRatio2Select';import ImageAspectRatioSelect from '@/features/ModelSwitchPanel/components/ControlsForm/ImageAspectRatioSelect';+import ImageResolution2Slider from '@/features/ModelSwitchPanel/components/ControlsForm/ImageResolution2Slider';import ImageResolutionSlider from '@/features/ModelSwitchPanel/components/ControlsForm/ImageResolutionSlider';import ReasoningEffortSlider from '@/features/ModelSwitchPanel/components/ControlsForm/ReasoningEffortSlider';import ReasoningTokenSlider from '@/features/ModelSwitchPanel/components/ControlsForm/ReasoningTokenSlider';@@ -18,6 +20,7 @@ import TextVerbositySlider from '@/features/ModelSwitchPanel/components/Controlsimport ThinkingBudgetSlider from '@/features/ModelSwitchPanel/components/ControlsForm/ThinkingBudgetSlider';import ThinkingLevel2Slider from '@/features/ModelSwitchPanel/components/ControlsForm/ThinkingLevel2Slider';import ThinkingLevel3Slider from '@/features/ModelSwitchPanel/components/ControlsForm/ThinkingLevel3Slider';+import ThinkingLevel4Slider from '@/features/ModelSwitchPanel/components/ControlsForm/ThinkingLevel4Slider';import ThinkingLevelSlider from '@/features/ModelSwitchPanel/components/ControlsForm/ThinkingLevelSlider';import ThinkingSlider from '@/features/ModelSwitchPanel/components/ControlsForm/ThinkingSlider';@@ -91,6 +94,10 @@ const EXTEND_PARAMS_OPTIONS: ExtendParamsOption[] = [hintKey: 'providerModels.item.modelConfig.extendParams.options.thinkingLevel3.hint',key: 'thinkingLevel3',},+ {+ hintKey: 'providerModels.item.modelConfig.extendParams.options.thinkingLevel4.hint',+ key: 'thinkingLevel4',+ },{hintKey: 'providerModels.item.modelConfig.extendParams.options.urlContext.hint',key: 'urlContext',@@ -99,10 +106,18 @@ const EXTEND_PARAMS_OPTIONS: ExtendParamsOption[] = [hintKey: 'providerModels.item.modelConfig.extendParams.options.imageAspectRatio.hint',key: 'imageAspectRatio',},+ {+ hintKey: 'providerModels.item.modelConfig.extendParams.options.imageAspectRatio2.hint',+ key: 'imageAspectRatio2',+ },{hintKey: 'providerModels.item.modelConfig.extendParams.options.imageResolution.hint',key: 'imageResolution',},+ {+ hintKey: 'providerModels.item.modelConfig.extendParams.options.imageResolution2.hint',+ key: 'imageResolution2',+ },];// Map variant keys to their base i18n title key (synced with ControlsForm.tsx)@@ -112,8 +127,10 @@ const TITLE_KEY_ALIASES: Partial<Record<ExtendParamsType, ExtendParamsType>> = {gpt5_1ReasoningEffort: 'reasoningEffort',gpt5_2ProReasoningEffort: 'reasoningEffort',gpt5_2ReasoningEffort: 'reasoningEffort',+ imageAspectRatio2: 'imageAspectRatio',thinkingLevel2: 'thinkingLevel',thinkingLevel3: 'thinkingLevel',+ thinkingLevel4: 'thinkingLevel',};type PreviewMeta = {@@ -141,7 +158,9 @@ const PREVIEW_META: Partial<Record<ExtendParamsType, PreviewMeta>> = {},gpt5_2ReasoningEffort: { labelSuffix: ' (GPT-5.2)', previewWidth: 300, tag: 'reasoning_effort' },imageAspectRatio: { labelSuffix: '', previewWidth: 350, tag: 'aspect_ratio' },+ imageAspectRatio2: { labelSuffix: ' (Nano Banana 2)', previewWidth: 350, tag: 'aspect_ratio' },imageResolution: { labelSuffix: '', previewWidth: 250, tag: 'resolution' },+ imageResolution2: { labelSuffix: ' (512px+)', previewWidth: 280, tag: 'resolution' },reasoningBudgetToken: { previewWidth: 350, tag: 'thinking.budget_tokens' },reasoningEffort: { previewWidth: 250, tag: 'reasoning_effort' },textVerbosity: { labelSuffix: '', previewWidth: 250, tag: 'text_verbosity' },@@ -150,6 +169,7 @@ const PREVIEW_META: Partial<Record<ExtendParamsType, PreviewMeta>> = {thinkingLevel: { labelSuffix: ' (3 Flash)', previewWidth: 280, tag: 'thinkingLevel' },thinkingLevel2: { labelSuffix: ' (3 Pro)', previewWidth: 200, tag: 'thinkingLevel' },thinkingLevel3: { labelSuffix: ' (Gemini 3.1)', previewWidth: 200, tag: 'thinkingLevel' },+ thinkingLevel4: { labelSuffix: ' (Nano Banana 2)', previewWidth: 200, tag: 'thinkingLevel' },urlContext: { labelSuffix: ' (Gemini)', previewWidth: 400, tag: 'urlContext' },};@@ -242,7 +262,9 @@ const ExtendParamsSelect = memo<ExtendParamsSelectProps>(({ value, onChange }) =gpt5_2ProReasoningEffort: <GPT52ProReasoningEffortSlider value="medium" />,gpt5_2ReasoningEffort: <GPT52ReasoningEffortSlider value="none" />,imageAspectRatio: <ImageAspectRatioSelect value="1:1" />,+ imageAspectRatio2: <ImageAspectRatio2Select value="1:1" />,imageResolution: <ImageResolutionSlider value="1K" />,+ imageResolution2: <ImageResolution2Slider value="1K" />,reasoningBudgetToken: <ReasoningTokenSlider defaultValue={1 * 1024} />,reasoningEffort: <ReasoningEffortSlider value="medium" />,textVerbosity: <TextVerbositySlider value="medium" />,@@ -251,6 +273,7 @@ const ExtendParamsSelect = memo<ExtendParamsSelectProps>(({ value, onChange }) =thinkingLevel: <ThinkingLevelSlider value="high" />,thinkingLevel2: <ThinkingLevel2Slider value="high" />,thinkingLevel3: <ThinkingLevel3Slider value="high" />,+ thinkingLevel4: <ThinkingLevel4Slider value="minimal" />,urlContext: <Switch checked disabled />,}),[],diff --git a/src/features/Conversation/Messages/components/Extras/Usage/UsageDetail/tokens.ts b/src/features/Conversation/Messages/components/Extras/Usage/UsageDetail/tokens.tsindex e2e0f20895b..930b88e2bda 100644--- a/src/features/Conversation/Messages/components/Extras/Usage/UsageDetail/tokens.ts+++ b/src/features/Conversation/Messages/components/Extras/Usage/UsageDetail/tokens.ts@@ -21,12 +21,16 @@ export const getDetailsToken = (usage: ModelUsage, modelCard?: LobeDefaultAiModeconst outputImageTokens = usage.outputImageTokens || (usage as any).imageTokens || 0;- const outputTextTokens = usage.outputTextTokens- ? usage.outputTextTokens- : totalOutputTokens -- outputReasoningTokens -- (usage.outputAudioTokens || 0) -- outputImageTokens;+ const outputTextTokens =+ typeof usage.outputTextTokens === 'number'+ ? usage.outputTextTokens+ : Math.max(+ 0,+ totalOutputTokens -+ outputReasoningTokens -+ (usage.outputAudioTokens || 0) -+ outputImageTokens,+ );const inputWriteCacheTokens = usage.inputWriteCacheTokens || 0;const inputCacheTokens = usage.inputCachedTokens || (usage as any).cachedTokens || 0;diff --git a/src/features/ModelSwitchPanel/components/ControlsForm/ControlsForm.tsx b/src/features/ModelSwitchPanel/components/ControlsForm/ControlsForm.tsxindex a06899cd57e..a2676dbba36 100644--- a/src/features/ModelSwitchPanel/components/ControlsForm/ControlsForm.tsx+++ b/src/features/ModelSwitchPanel/components/ControlsForm/ControlsForm.tsx@@ -17,7 +17,9 @@ import GPT5ReasoningEffortSlider from './GPT5ReasoningEffortSlider';import GPT51ReasoningEffortSlider from './GPT51ReasoningEffortSlider';import GPT52ProReasoningEffortSlider from './GPT52ProReasoningEffortSlider';import GPT52ReasoningEffortSlider from './GPT52ReasoningEffortSlider';+import ImageAspectRatio2Select from './ImageAspectRatio2Select';import ImageAspectRatioSelect from './ImageAspectRatioSelect';+import ImageResolution2Slider from './ImageResolution2Slider';import ImageResolutionSlider from './ImageResolutionSlider';import ReasoningEffortSlider from './ReasoningEffortSlider';import ReasoningTokenSlider from './ReasoningTokenSlider';@@ -25,6 +27,7 @@ import TextVerbositySlider from './TextVerbositySlider';import ThinkingBudgetSlider from './ThinkingBudgetSlider';import ThinkingLevel2Slider from './ThinkingLevel2Slider';import ThinkingLevel3Slider from './ThinkingLevel3Slider';+import ThinkingLevel4Slider from './ThinkingLevel4Slider';import ThinkingLevelSlider from './ThinkingLevelSlider';import ThinkingSlider from './ThinkingSlider';@@ -281,6 +284,17 @@ const ControlsForm = memo<ControlsFormProps>(({ model: modelProp, provider: prov},desc: 'thinkingLevel',},+ {+ children: <ThinkingLevel4Slider />,+ label: t('extendParams.thinkingLevel.title'),+ layout: 'horizontal',+ minWidth: undefined,+ name: 'thinkingLevel4',+ style: {+ paddingBottom: 0,+ },+ desc: 'thinkingLevel',+ },{children: <ImageAspectRatioSelect />,label: t('extendParams.imageAspectRatio.title'),@@ -292,6 +306,17 @@ const ControlsForm = memo<ControlsFormProps>(({ model: modelProp, provider: prov},desc: 'aspectRatio',},+ {+ children: <ImageAspectRatio2Select />,+ label: t('extendParams.imageAspectRatio.title'),+ layout: 'horizontal',+ minWidth: undefined,+ name: 'imageAspectRatio2',+ style: {+ paddingBottom: 0,+ },+ desc: 'aspectRatio',+ },{children: <ImageResolutionSlider />,label: t('extendParams.imageResolution.title'),@@ -303,6 +328,17 @@ const ControlsForm = memo<ControlsFormProps>(({ model: modelProp, provider: prov},desc: 'imageSize',},+ {+ children: <ImageResolution2Slider />,+ label: t('extendParams.imageResolution.title'),+ layout: 'horizontal',+ minWidth: undefined,+ name: 'imageResolution2',+ style: {+ paddingBottom: 0,+ },+ desc: 'imageSize',+ },].filter(Boolean) as FormItemProps[];return (diff --git a/src/features/ModelSwitchPanel/components/ControlsForm/ImageAspectRatio2Select.tsx b/src/features/ModelSwitchPanel/components/ControlsForm/ImageAspectRatio2Select.tsxnew file mode 100644index 00000000000..041fe21607d--- /dev/null+++ b/src/features/ModelSwitchPanel/components/ControlsForm/ImageAspectRatio2Select.tsx@@ -0,0 +1,95 @@+import { Select } from 'antd';+import { memo, useMemo } from 'react';++import { useAgentId } from '@/features/ChatInput/hooks/useAgentId';+import { useUpdateAgentConfig } from '@/features/ChatInput/hooks/useUpdateAgentConfig';+import { useAgentStore } from '@/store/agent';+import { chatConfigByIdSelectors } from '@/store/agent/selectors';++const NANO_BANANA_2_ASPECT_RATIOS = [+ '1:1', // 1024x1024 / 2048x2048 / 4096x4096+ '2:3', // 848x1264 / 1696x2528 / 3392x5056+ '3:2', // 1264x848 / 2528x1696 / 5056x3392+ '3:4', // 896x1200 / 1792x2400 / 3584x4800+ '4:3', // 1200x896 / 2400x1792 / 4800x3584+ '4:5', // 928x1152 / 1856x2304 / 3712x4608+ '5:4', // 1152x928 / 2304x1856 / 4608x3712+ '9:16', // 768x1376 / 1536x2752 / 3072x5504+ '16:9', // 1376x768 / 2752x1536 / 5504x3072+ '21:9', // 1584x672 / 3168x1344 / 6336x2688+ '1:4', // ultra-tall portrait+ '4:1', // ultra-wide landscape+ '1:8', // extreme portrait+ '8:1', // extreme landscape+] as const;++type AspectRatio2 = (typeof NANO_BANANA_2_ASPECT_RATIOS)[number];++export interface ImageAspectRatio2SelectProps {+ defaultValue?: AspectRatio2;+ onChange?: (value: AspectRatio2) => void;+ value?: AspectRatio2;+}++// Inner pure UI component - no store hooks, safe for preview+const ImageAspectRatio2SelectInner = memo<{+ onChange: (_value: AspectRatio2) => void;+ value: AspectRatio2;+}>(({ value, onChange }) => {+ const options = useMemo(+ () =>+ NANO_BANANA_2_ASPECT_RATIOS.map((ratio) => ({+ label: ratio,+ value: ratio,+ })),+ [],+ );++ return (+ <Select+ options={options}+ style={{ height: 32, marginRight: 10, width: 75 }}+ value={value}+ onChange={(v: string) => onChange(v as AspectRatio2)}+ />+ );+});++// Store-connected component - uses agent store hooks+const ImageAspectRatio2SelectWithStore = memo<{ defaultValue: AspectRatio2 }>(+ ({ defaultValue }) => {+ const agentId = useAgentId();+ const { updateAgentChatConfig } = useUpdateAgentConfig();+ const config = useAgentStore((s) => chatConfigByIdSelectors.getChatConfigById(agentId)(s));++ const storeValue = (config.imageAspectRatio2 as AspectRatio2) || defaultValue;++ const handleChange = (ratio: AspectRatio2) => {+ updateAgentChatConfig({ imageAspectRatio2: ratio });+ };++ return <ImageAspectRatio2SelectInner value={storeValue} onChange={handleChange} />;+ },+);++// Main exported component - chooses between controlled and store mode+const ImageAspectRatio2Select = memo<ImageAspectRatio2SelectProps>(+ ({ value: controlledValue, onChange: controlledOnChange, defaultValue = '1:1' }) => {+ const isControlled = controlledValue !== undefined || controlledOnChange !== undefined;++ if (isControlled) {+ // Controlled mode: use props only, no store access+ return (+ <ImageAspectRatio2SelectInner+ value={controlledValue ?? defaultValue}+ onChange={controlledOnChange ?? (() => {})}+ />+ );+ }++ // Uncontrolled mode: use store+ return <ImageAspectRatio2SelectWithStore defaultValue={defaultValue} />;+ },+);++export default ImageAspectRatio2Select;diff --git a/src/features/ModelSwitchPanel/components/ControlsForm/ImageResolution2Slider.tsx b/src/features/ModelSwitchPanel/components/ControlsForm/ImageResolution2Slider.tsxnew file mode 100644index 00000000000..1589b102d04--- /dev/null+++ b/src/features/ModelSwitchPanel/components/ControlsForm/ImageResolution2Slider.tsx@@ -0,0 +1,16 @@+import { type CreatedLevelSliderProps } from './createLevelSlider';+import { createLevelSliderComponent } from './createLevelSlider';++const IMAGE_RESOLUTIONS_2 = ['512px', '1K', '2K', '4K'] as const;+type ImageResolution2 = (typeof IMAGE_RESOLUTIONS_2)[number];++export type ImageResolution2SliderProps = CreatedLevelSliderProps<ImageResolution2>;++const ImageResolution2Slider = createLevelSliderComponent<ImageResolution2>({+ configKey: 'imageResolution',+ defaultValue: '1K',+ levels: IMAGE_RESOLUTIONS_2,+ style: { minWidth: 190 },+});++export default ImageResolution2Slider;diff --git a/src/features/ModelSwitchPanel/components/ControlsForm/ThinkingLevel4Slider.tsx b/src/features/ModelSwitchPanel/components/ControlsForm/ThinkingLevel4Slider.tsxnew file mode 100644index 00000000000..f80b41ecae0--- /dev/null+++ b/src/features/ModelSwitchPanel/components/ControlsForm/ThinkingLevel4Slider.tsx@@ -0,0 +1,16 @@+import { type CreatedLevelSliderProps } from './createLevelSlider';+import { createLevelSliderComponent } from './createLevelSlider';++const THINKING_LEVELS_4 = ['minimal', 'high'] as const;+type ThinkingLevel4 = (typeof THINKING_LEVELS_4)[number];++export type ThinkingLevel4SliderProps = CreatedLevelSliderProps<ThinkingLevel4>;++const ThinkingLevel4Slider = createLevelSliderComponent<ThinkingLevel4>({+ configKey: 'thinkingLevel',+ defaultValue: 'minimal',+ levels: THINKING_LEVELS_4,+ style: { minWidth: 110 },+});++export default ThinkingLevel4Slider;diff --git a/src/locales/default/modelProvider.ts b/src/locales/default/modelProvider.tsindex 3db2d739ba7..2c9a6bf327b 100644--- a/src/locales/default/modelProvider.ts+++ b/src/locales/default/modelProvider.ts@@ -263,8 +263,12 @@ export default {'For GPT-5.2 series; controls reasoning intensity.','providerModels.item.modelConfig.extendParams.options.imageAspectRatio.hint':'For Gemini image generation models; controls aspect ratio of generated images.',+ 'providerModels.item.modelConfig.extendParams.options.imageAspectRatio2.hint':+ 'For Nano Banana 2; controls aspect ratio of generated images (supports extra-wide 1:4, 4:1, 1:8, 8:1).','providerModels.item.modelConfig.extendParams.options.imageResolution.hint':'For Gemini 3 image generation models; controls resolution of generated images.',+ 'providerModels.item.modelConfig.extendParams.options.imageResolution2.hint':+ 'For Gemini 3.1 Flash Image models; controls resolution of generated images (supports 512px).','providerModels.item.modelConfig.extendParams.options.reasoningBudgetToken.hint':'For Claude, Qwen3 and similar; controls token budget for reasoning.','providerModels.item.modelConfig.extendParams.options.reasoningEffort.hint':@@ -281,6 +285,8 @@ export default {'For Gemini 3 Pro Preview models; controls thinking depth.','providerModels.item.modelConfig.extendParams.options.thinkingLevel3.hint':'For Gemini 3.1 Pro Preview models; controls thinking depth with low/medium/high levels.',+ 'providerModels.item.modelConfig.extendParams.options.thinkingLevel4.hint':+ 'For Gemini 3.1 Flash Image models; toggle thinking on/off.','providerModels.item.modelConfig.extendParams.options.urlContext.hint':'For Gemini series; supports providing URL context.','providerModels.item.modelConfig.extendParams.placeholder':diff --git a/src/services/chat/mecha/modelParamsResolver.ts b/src/services/chat/mecha/modelParamsResolver.tsindex c03a3bb96d7..71e20c4674b 100644--- a/src/services/chat/mecha/modelParamsResolver.ts+++ b/src/services/chat/mecha/modelParamsResolver.ts@@ -152,6 +152,10 @@ export const resolveModelExtendParams = (ctx: ModelParamsContext): ModelExtendPaextendParams.thinkingLevel = chatConfig.thinkingLevel3;}+ if (modelExtendParams.includes('thinkingLevel4') && chatConfig.thinkingLevel4) {+ extendParams.thinkingLevel = chatConfig.thinkingLevel4;+ }+// URL contextif (modelExtendParams.includes('urlContext') && chatConfig.urlContext) {extendParams.urlContext = chatConfig.urlContext;@@ -162,9 +166,17 @@ export const resolveModelExtendParams = (ctx: ModelParamsContext): ModelExtendPaextendParams.imageAspectRatio = chatConfig.imageAspectRatio;}+ if (modelExtendParams.includes('imageAspectRatio2') && chatConfig.imageAspectRatio2) {+ extendParams.imageAspectRatio = chatConfig.imageAspectRatio2;+ }+if (modelExtendParams.includes('imageResolution') && chatConfig.imageResolution) {extendParams.imageResolution = chatConfig.imageResolution;}+ if (modelExtendParams.includes('imageResolution2') && chatConfig.imageResolution2) {+ extendParams.imageResolution = chatConfig.imageResolution2;+ }+return extendParams;};