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: OpenAI models in AiHubMix use Responses API (#9251)

sxjeru8636fe45e335
diff --git a/packages/model-bank/src/aiModels/aihubmix.ts b/packages/model-bank/src/aiModels/aihubmix.ts
index 67c95fe6644..599ae67200f 100644
--- a/packages/model-bank/src/aiModels/aihubmix.ts
+++ b/packages/model-bank/src/aiModels/aihubmix.ts
@@ -1,6 +1,33 @@
import { AIChatModelCard } from '../types/aiModel';
const aihubmixModels: AIChatModelCard[] = [
+ {
+ abilities: {
+ functionCall: true,
+ reasoning: true,
+ search: true,
+ vision: true,
+ },
+ contextWindowTokens: 400_000,
+ description:
+ 'GPT-5 Codex 是一个针对 Codex 或类似环境中的代理编码任务优化的 GPT-5 版本。',
+ displayName: 'GPT-5 Codex',
+ id: 'gpt-5-codex',
+ maxOutput: 128_000,
+ pricing: {
+ units: [
+ { name: 'textInput', rate: 1.25, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textOutput', rate: 10, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textInput_cacheRead', rate: 0.125, strategy: 'fixed', unit: 'millionTokens' },
+ ],
+ },
+ releasedAt: '2024-09-15',
+ settings: {
+ extendParams: ['gpt5ReasoningEffort', 'textVerbosity'],
+ searchImpl: 'params',
+ },
+ type: 'chat',
+ },
{
abilities: {
functionCall: true,
@@ -323,6 +350,53 @@ const aihubmixModels: AIChatModelCard[] = [
},
type: 'chat',
},
+ {
+ abilities: {
+ functionCall: true,
+ search: true,
+ vision: true,
+ },
+ contextWindowTokens: 2_000_000,
+ description:
+ '我们很高兴发布 Grok 4 Fast,这是我们在成本效益推理模型方面的最新进展。',
+ displayName: 'Grok 4 Fast (Non-Reasoning)',
+ id: 'grok-4-fast-non-reasoning',
+ pricing: {
+ units: [
+ { name: 'textInput', rate: 0.2, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textOutput', rate: 0.5, strategy: 'fixed', unit: 'millionTokens' },
+ ],
+ },
+ releasedAt: '2025-09-09',
+ settings: {
+ searchImpl: 'params',
+ },
+ type: 'chat',
+ },
+ {
+ abilities: {
+ functionCall: true,
+ reasoning: true,
+ search: true,
+ vision: true,
+ },
+ contextWindowTokens: 2_000_000,
+ description:
+ '我们很高兴发布 Grok 4 Fast,这是我们在成本效益推理模型方面的最新进展。',
+ displayName: 'Grok 4 Fast',
+ id: 'grok-4-fast-reasoning',
+ pricing: {
+ units: [
+ { name: 'textInput', rate: 0.2, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textOutput', rate: 0.5, strategy: 'fixed', unit: 'millionTokens' },
+ ],
+ },
+ releasedAt: '2025-09-09',
+ settings: {
+ searchImpl: 'params',
+ },
+ type: 'chat',
+ },
{
abilities: {
functionCall: true,
@@ -709,7 +783,6 @@ const aihubmixModels: AIChatModelCard[] = [
contextWindowTokens: 1_048_576 + 65_536,
description: 'Gemini 2.5 Flash 是 Google 性价比最高的模型,提供全面的功能。',
displayName: 'Gemini 2.5 Flash',
- enabled: true,
id: 'gemini-2.5-flash',
maxOutput: 65_536,
pricing: {
diff --git a/packages/model-bank/src/aiModels/novita.ts b/packages/model-bank/src/aiModels/novita.ts
index 40b244469b9..16857f7c441 100644
--- a/packages/model-bank/src/aiModels/novita.ts
+++ b/packages/model-bank/src/aiModels/novita.ts
@@ -4,13 +4,47 @@ import { AIChatModelCard } from '../types/aiModel';
const novitaChatModels: AIChatModelCard[] = [
{
abilities: {
+ vision: true,
functionCall: true,
+ },
+ contextWindowTokens: 131_072,
+ displayName: 'Qwen3 VL 235B A22B Instruct',
+ id: 'qwen/qwen3-vl-235b-a22b-instruct',
+ maxOutput: 32_768,
+ pricing: {
+ units: [
+ { name: 'textInput', rate: 0.3, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textOutput', rate: 3, strategy: 'fixed', unit: 'millionTokens' },
+ ],
+ },
+ type: 'chat',
+ },
+ {
+ abilities: {
+ vision: true,
reasoning: true,
},
- contextWindowTokens: 65_536,
+ contextWindowTokens: 131_072,
+ displayName: 'Qwen3 VL 235B A22B Thinking',
+ id: 'qwen/qwen3-vl-235b-a22b-thinking',
+ maxOutput: 32_768,
+ pricing: {
+ units: [
+ { name: 'textInput', rate: 0.3, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textOutput', rate: 3, strategy: 'fixed', unit: 'millionTokens' },
+ ],
+ },
+ type: 'chat',
+ },
+ {
+ abilities: {
+ functionCall: true,
+ reasoning: true,
+ },
+ contextWindowTokens: 131_072,
displayName: 'Qwen3 Next 80B A3B Thinking',
id: 'qwen/qwen3-next-80b-a3b-thinking',
- maxOutput: 65_536,
+ maxOutput: 32_768,
pricing: {
units: [
{ name: 'textInput', rate: 0.15, strategy: 'fixed', unit: 'millionTokens' },
@@ -23,10 +57,10 @@ const novitaChatModels: AIChatModelCard[] = [
abilities: {
functionCall: true,
},
- contextWindowTokens: 65_536,
+ contextWindowTokens: 131_072,
displayName: 'Qwen3 Next 80B A3B Instruct',
id: 'qwen/qwen3-next-80b-a3b-instruct',
- maxOutput: 65_536,
+ maxOutput: 32_768,
pricing: {
units: [
{ name: 'textInput', rate: 0.15, strategy: 'fixed', unit: 'millionTokens' },
@@ -71,10 +105,28 @@ const novitaChatModels: AIChatModelCard[] = [
functionCall: true,
reasoning: true,
},
- contextWindowTokens: 163_840,
- displayName: 'DeepSeek V3.1',
+ contextWindowTokens: 131_072,
+ displayName: 'DeepSeek V3.1 Terminus',
enabled: true,
+ id: 'deepseek/deepseek-v3.1-terminus',
+ maxOutput: 65_536,
+ pricing: {
+ units: [
+ { name: 'textInput', rate: 0.27, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textOutput', rate: 1, strategy: 'fixed', unit: 'millionTokens' },
+ ],
+ },
+ type: 'chat',
+ },
+ {
+ abilities: {
+ functionCall: true,
+ reasoning: true,
+ },
+ contextWindowTokens: 131_072,
+ displayName: 'DeepSeek V3.1',
id: 'deepseek/deepseek-v3.1',
+ maxOutput: 32_768,
pricing: {
units: [
{ name: 'textInput', rate: 0.27, strategy: 'fixed', unit: 'millionTokens' },
@@ -188,6 +240,7 @@ const novitaChatModels: AIChatModelCard[] = [
contextWindowTokens: 131_072,
displayName: 'Qwen3 235B A22b Thinking 2507',
id: 'qwen/qwen3-235b-a22b-thinking-2507',
+ maxOutput: 32_768,
pricing: {
units: [
{ name: 'textInput', rate: 0.3, strategy: 'fixed', unit: 'millionTokens' },
@@ -272,6 +325,23 @@ const novitaChatModels: AIChatModelCard[] = [
},
type: 'chat',
},
+ {
+ abilities: {
+ functionCall: true,
+ reasoning: true,
+ },
+ contextWindowTokens: 131_072,
+ displayName: 'ERNIE 4.5 21B A3B Thinking',
+ id: 'baidu/ernie-4.5-21B-a3b-thingking',
+ maxOutput: 65_536,
+ pricing: {
+ units: [
+ { name: 'textInput', rate: 0.07, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textOutput', rate: 0.28, strategy: 'fixed', unit: 'millionTokens' },
+ ],
+ },
+ type: 'chat',
+ },
{
abilities: {
reasoning: true,
@@ -576,19 +646,6 @@ const novitaChatModels: AIChatModelCard[] = [
},
type: 'chat',
},
- {
- contextWindowTokens: 16_000,
- description: 'Dolphin Mixtral 8x22B 是一款为指令遵循、对话和编程设计的模型。',
- displayName: 'Dolphin Mixtral 8x22B',
- id: 'cognitivecomputations/dolphin-mixtral-8x22b',
- pricing: {
- units: [
- { name: 'textInput', rate: 0.9, strategy: 'fixed', unit: 'millionTokens' },
- { name: 'textOutput', rate: 0.9, strategy: 'fixed', unit: 'millionTokens' },
- ],
- },
- type: 'chat',
- },
{
contextWindowTokens: 8192,
description: 'Hermes 2 Pro Llama 3 8B 是 Nous Hermes 2的升级版本,包含最新的内部开发的数据集。',
@@ -665,6 +722,7 @@ const novitaChatModels: AIChatModelCard[] = [
contextWindowTokens: 163_840,
displayName: 'Deepseek R1 0528',
id: 'deepseek/deepseek-r1-0528',
+ maxOutput: 32_768,
pricing: {
units: [
{ name: 'textInput', rate: 0.7, strategy: 'fixed', unit: 'millionTokens' },
@@ -723,9 +781,10 @@ const novitaChatModels: AIChatModelCard[] = [
abilities: {
reasoning: true,
},
- contextWindowTokens: 64_000,
+ contextWindowTokens: 32_768,
displayName: 'Deepseek R1 Distill Qwen 14B',
id: 'deepseek/deepseek-r1-distill-qwen-14b',
+ maxOutput: 16_384,
pricing: {
units: [
{ name: 'textInput', rate: 0.15, strategy: 'fixed', unit: 'millionTokens' },
diff --git a/packages/model-bank/src/aiModels/openai.ts b/packages/model-bank/src/aiModels/openai.ts
index e32918f562e..0be35620b42 100644
--- a/packages/model-bank/src/aiModels/openai.ts
+++ b/packages/model-bank/src/aiModels/openai.ts
@@ -18,6 +18,33 @@ export const gptImage1ParamsSchema: ModelParamsSchema = {
};
export const openaiChatModels: AIChatModelCard[] = [
+ {
+ abilities: {
+ functionCall: true,
+ reasoning: true,
+ search: true,
+ vision: true,
+ },
+ contextWindowTokens: 400_000,
+ description:
+ 'GPT-5 Codex 是一个针对 Codex 或类似环境中的代理编码任务优化的 GPT-5 版本。',
+ displayName: 'GPT-5 Codex',
+ id: 'gpt-5-codex',
+ maxOutput: 128_000,
+ pricing: {
+ units: [
+ { name: 'textInput', rate: 1.25, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textOutput', rate: 10, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textInput_cacheRead', rate: 0.125, strategy: 'fixed', unit: 'millionTokens' },
+ ],
+ },
+ releasedAt: '2024-09-15',
+ settings: {
+ extendParams: ['gpt5ReasoningEffort', 'textVerbosity'],
+ searchImpl: 'params',
+ },
+ type: 'chat',
+ },
{
abilities: {
functionCall: true,
@@ -100,7 +127,6 @@ export const openaiChatModels: AIChatModelCard[] = [
},
{
abilities: {
- reasoning: true,
vision: true,
},
contextWindowTokens: 400_000,
@@ -466,30 +492,6 @@ export const openaiChatModels: AIChatModelCard[] = [
},
type: 'chat',
},
- {
- abilities: {
- functionCall: true,
- //search: true,
- },
- contextWindowTokens: 128_000,
- description: 'GPT-4o mini Audio 模型,支持音频输入输出',
- displayName: 'GPT-4o mini Audio',
- id: 'gpt-4o-mini-audio-preview',
- maxOutput: 16_384,
- pricing: {
- units: [
- { name: 'textInput', rate: 0.15, strategy: 'fixed', unit: 'millionTokens' },
- { name: 'textOutput', rate: 0.6, strategy: 'fixed', unit: 'millionTokens' },
- ],
- },
- releasedAt: '2024-12-17',
- /*
- settings: {
- searchImpl: 'params',
- },
- */
- type: 'chat',
- },
{
abilities: {
functionCall: true,
@@ -583,15 +585,37 @@ export const openaiChatModels: AIChatModelCard[] = [
},
type: 'chat',
},
+ {
+ abilities: {
+ functionCall: true,
+ },
+ contextWindowTokens: 128_000,
+ description:
+ 'GPT Audio 是面向音频输入输出的通用聊天模型,支持在 Chat Completions API 中使用音频 I/O。',
+ displayName: 'GPT Audio',
+ id: 'gpt-audio',
+ maxOutput: 16_384,
+ pricing: {
+ units: [
+ { name: 'textInput', rate: 2.5, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textOutput', rate: 10, strategy: 'fixed', unit: 'millionTokens' },
+
+ { name: 'audioInput', rate: 40, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'audioOutput', rate: 80, strategy: 'fixed', unit: 'millionTokens' },
+ ],
+ },
+ releasedAt: '2025-08-28',
+ type: 'chat',
+ },
{
abilities: {
functionCall: true,
//search: true,
},
contextWindowTokens: 128_000,
- description: 'GPT-4o Audio 模型,支持音频输入输出',
- displayName: 'GPT-4o Audio',
- id: 'gpt-4o-audio-preview',
+ description: 'GPT-4o Audio Preview 模型,支持音频输入输出',
+ displayName: 'GPT-4o Audio Preview',
+ id: 'gpt-4o-audio-preview', // deprecated on 2025-10-10
maxOutput: 16_384,
pricing: {
units: [
@@ -607,6 +631,30 @@ export const openaiChatModels: AIChatModelCard[] = [
*/
type: 'chat',
},
+ {
+ abilities: {
+ functionCall: true,
+ //search: true,
+ },
+ contextWindowTokens: 128_000,
+ description: 'GPT-4o mini Audio 模型,支持音频输入输出',
+ displayName: 'GPT-4o mini Audio',
+ id: 'gpt-4o-mini-audio-preview',
+ maxOutput: 16_384,
+ pricing: {
+ units: [
+ { name: 'textInput', rate: 0.15, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textOutput', rate: 0.6, strategy: 'fixed', unit: 'millionTokens' },
+ ],
+ },
+ releasedAt: '2024-12-17',
+ /*
+ settings: {
+ searchImpl: 'params',
+ },
+ */
+ type: 'chat',
+ },
{
abilities: {
vision: true,
@@ -992,6 +1040,35 @@ export const openaiImageModels: AIImageModelCard[] = [
enabled: true,
id: 'gpt-image-1',
parameters: gptImage1ParamsSchema,
+ pricing: {
+ units: [
+ { name: 'textInput', rate: 5, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textInput_cacheRead', rate: 1.25, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'imageInput', rate: 10, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'imageInput_cacheRead', rate: 2.5, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'imageOutput', rate: 40, strategy: 'fixed', unit: 'millionTokens' },
+ {
+ lookup: {
+ prices: {
+ low_1024x1024: 0.011,
+ low_1024x1536: 0.016,
+ low_1536x1024: 0.016,
+ medium_1024x1024: 0.042,
+ medium_1024x1536: 0.063,
+ medium_1536x1024: 0.063,
+ high_1024x1024: 0.167,
+ high_1024x1536: 0.25,
+ high_1536x1024: 0.25,
+ },
+ pricingParams: ['quality', 'size'],
+ },
+ name: 'imageGeneration',
+ strategy: 'lookup',
+ unit: 'image',
+ },
+ ],
+ },
+ resolutions: ['1024x1024', '1024x1536', '1536x1024'],
type: 'image',
},
{
@@ -1065,6 +1142,33 @@ export const openaiImageModels: AIImageModelCard[] = [
// GPT-4o 和 GPT-4o-mini 实时模型
export const openaiRealtimeModels: AIRealtimeModelCard[] = [
+ {
+ abilities: {
+ functionCall: true,
+ vision: true,
+ },
+ contextWindowTokens: 32_000,
+ description: '通用实时模型,支持文本与音频的实时输入输出,并支持图像输入。',
+ displayName: 'GPT Realtime',
+ id: 'gpt-realtime',
+ maxOutput: 4_096,
+ pricing: {
+ units: [
+ { name: 'audioInput', rate: 32, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'audioOutput', rate: 64, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'audioInput_cacheRead', rate: 0.4, strategy: 'fixed', unit: 'millionTokens' },
+
+ { name: 'textInput', rate: 4, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textOutput', rate: 16, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textInput_cacheRead', rate: 0.4, strategy: 'fixed', unit: 'millionTokens' },
+
+ { name: 'imageInput', rate: 5, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'imageInput_cacheRead', rate: 0.5, strategy: 'fixed', unit: 'millionTokens' },
+ ],
+ },
+ releasedAt: '2025-08-28',
+ type: 'realtime',
+ },
{
contextWindowTokens: 16_000,
description: 'GPT-4o 实时版本,支持音频和文本实时输入输出',
@@ -1107,7 +1211,7 @@ export const openaiRealtimeModels: AIRealtimeModelCard[] = [
contextWindowTokens: 16_000,
description: 'GPT-4o 实时版本,支持音频和文本实时输入输出',
displayName: 'GPT-4o Realtime 241001',
- id: 'gpt-4o-realtime-preview-2024-10-01', // deprecated on 2025-09-10
+ id: 'gpt-4o-realtime-preview-2024-10-01', // deprecated on 2025-10-10
maxOutput: 4096,
pricing: {
units: [
diff --git a/packages/model-bank/src/aiModels/qwen.ts b/packages/model-bank/src/aiModels/qwen.ts
index b9f2c65cd17..6e2180f48ef 100644
--- a/packages/model-bank/src/aiModels/qwen.ts
+++ b/packages/model-bank/src/aiModels/qwen.ts
@@ -3,12 +3,64 @@ import { AIChatModelCard, AIImageModelCard } from '../types/aiModel';
// https://help.aliyun.com/zh/model-studio/models?spm=a2c4g.11186623
const qwenChatModels: AIChatModelCard[] = [
+ {
+ abilities: {
+ vision: true,
+ reasoning: true,
+ },
+ config: {
+ deploymentName: 'qwen3-vl-plus',
+ },
+ contextWindowTokens: 262_144,
+ description:
+ '通义千问VL是具有视觉(图像)理解能力的文本生成模型,不仅能进行OCR(图片文字识别),还能进一步总结和推理,例如从商品照片中提取属性,根据习题图进行解题等。',
+ displayName: 'Qwen3 VL Plus',
+ id: 'qwen3-vl-plus',
+ maxOutput: 32_768,
+ organization: 'Qwen',
+ pricing: {
+ currency: 'CNY',
+ units: [
+ {
+ lookup: {
+ prices: {
+ '[0, 32_000]': 1,
+ '[32_000, 128_000]': 1.5,
+ '[128_000, infinity]': 3,
+ },
+ pricingParams: ['textInputRange'],
+ },
+ name: 'textInput',
+ strategy: 'lookup',
+ unit: 'millionTokens',
+ },
+ {
+ lookup: {
+ prices: {
+ '[0, 32_000]': 10,
+ '[32_000, 128_000]': 15,
+ '[128_000, infinity]': 30,
+ },
+ pricingParams: ['textInputRange'],
+ },
+ name: 'textOutput',
+ strategy: 'lookup',
+ unit: 'millionTokens',
+ },
+ ],
+ },
+ releasedAt: '2025-09-23',
+ settings: {
+ extendParams: ['enableReasoning', 'reasoningBudgetToken'],
+ },
+ type: 'chat',
+ },
{
abilities: {
reasoning: true,
},
contextWindowTokens: 131_072,
- description: 'DeepSeek-V3.1 模型为混合推理架构模型,同时支持思考模式与非思考模式。',
+ description: 'DeepSeek V3.1 模型为混合推理架构模型,同时支持思考模式与非思考模式。',
displayName: 'DeepSeek V3.1',
id: 'deepseek-v3.1',
maxOutput: 65_536,
@@ -139,9 +191,9 @@ const qwenChatModels: AIChatModelCard[] = [
functionCall: true,
},
config: {
- deploymentName: 'qwen3-coder-plus',
+ deploymentName: 'qwen3-coder-plus', // 其支持上下文缓存
},
- contextWindowTokens: 1_048_576,
+ contextWindowTokens: 1_000_000,
description:
'通义千问代码模型。最新的 Qwen3-Coder 系列模型是基于 Qwen3 的代码生成模型,具有强大的Coding Agent能力,擅长工具调用和环境交互,能够实现自主编程,代码能力卓越的同时兼具通用能力。',
displayName: 'Qwen3 Coder Plus',
@@ -151,9 +203,48 @@ const qwenChatModels: AIChatModelCard[] = [
pricing: {
currency: 'CNY',
units: [
- { name: 'textInput_cacheRead', rate: 6 * 0.2, strategy: 'fixed', unit: 'millionTokens' }, // tokens 32K ~ 128K
- { name: 'textInput', rate: 6, strategy: 'fixed', unit: 'millionTokens' },
- { name: 'textOutput', rate: 24, strategy: 'fixed', unit: 'millionTokens' },
+ {
+ lookup: {
+ prices: {
+ '[0, 32_000]': 0.8,
+ '[32_000, 128_000]': 1.2,
+ '[128_000, 256_000]': 2,
+ '[256_000, infinity]': 4,
+ },
+ pricingParams: ['textInputRange'],
+ },
+ name: 'textInput_cacheRead',
+ strategy: 'lookup',
+ unit: 'millionTokens',
+ },
+ {
+ lookup: {
+ prices: {
+ '[0, 32_000]': 4,
+ '[32_000, 128_000]': 6,
+ '[128_000, 256_000]': 10,
+ '[256_000, infinity]': 20,
+ },
+ pricingParams: ['textInputRange'],
+ },
+ name: 'textInput',
+ strategy: 'lookup',
+ unit: 'millionTokens',
+ },
+ {
+ lookup: {
+ prices: {
+ '[0, 32_000]': 16,
+ '[32_000, 128_000]': 24,
+ '[128_000, 256_000]': 40,
+ '[256_000, infinity]': 200,
+ },
+ pricingParams: ['textInputRange'],
+ },
+ name: 'textOutput',
+ strategy: 'lookup',
+ unit: 'millionTokens',
+ },
],
},
releasedAt: '2025-07-22',
@@ -738,17 +829,16 @@ const qwenChatModels: AIChatModelCard[] = [
search: true,
},
config: {
- deploymentName: 'qwen3-max-preview',
+ deploymentName: 'qwen3-max', // 其支持上下文缓存
},
contextWindowTokens: 262_144,
description:
- '通义千问3系列Max模型Preview版本,相较2.5系列整体通用能力有大幅度提升,中英文通用文本理解能力、复杂指令遵循能力、主观开放任务能力、多语言能力、工具调用能力均显著增强;模型知识幻觉更少。',
- displayName: 'Qwen3 Max Preview',
+ '通义千问3系列Max模型,相较2.5系列整体通用能力有大幅度提升,中英文通用文本理解能力、复杂指令遵循能力、主观开放任务能力、多语言能力、工具调用能力均显著增强;模型知识幻觉更少。最新的qwen3-max模型:相较qwen3-max-preview版本,在智能体编程与工具调用方向进行了专项升级。本次发布的正式版模型达到领域SOTA水平,适配场景更加复杂的智能体需求。',
+ displayName: 'Qwen3 Max',
enabled: true,
- id: 'qwen3-max-preview',
- maxOutput: 32_768,
+ id: 'qwen3-max',
+ maxOutput: 65_536,
organization: 'Qwen',
- /* eslint-disable sort-keys-fix/sort-keys-fix */
pricing: {
currency: 'CNY',
units: [
@@ -793,8 +883,7 @@ const qwenChatModels: AIChatModelCard[] = [
},
],
},
- /* eslint-enable sort-keys-fix/sort-keys-fix */
- releasedAt: '2025-09-05',
+ releasedAt: '2025-09-23',
settings: {
searchImpl: 'params',
},
diff --git a/packages/model-bank/src/aiModels/siliconcloud.ts b/packages/model-bank/src/aiModels/siliconcloud.ts
index 76dee27cdc8..b3fd23a5a1c 100644
--- a/packages/model-bank/src/aiModels/siliconcloud.ts
+++ b/packages/model-bank/src/aiModels/siliconcloud.ts
@@ -2,6 +2,45 @@ import { AIChatModelCard, AIImageModelCard } from '../types/aiModel';
// https://siliconflow.cn/zh-cn/models
const siliconcloudChatModels: AIChatModelCard[] = [
+ {
+ abilities: {
+ functionCall: true,
+ reasoning: true,
+ },
+ contextWindowTokens: 256_000,
+ description:
+ 'Qwen3-Next-80B-A3B-Thinking 是由阿里巴巴通义千问团队发布的、专为复杂推理任务设计的下一代基础模型。它基于创新的 Qwen3-Next 架构,该架构融合了混合注意力机制(Gated DeltaNet 与 Gated Attention)和高稀疏度混合专家(MoE)结构,旨在实现极致的训练与推理效率。作为一个总参数达 800 亿的稀疏模型,它在推理时仅激活约 30 亿参数,大幅降低了计算成本,在处理超过 32K tokens 的长上下文任务时,吞吐量比 Qwen3-32B 模型高出 10 倍以上。此“Thinking”版本专为执行数学证明、代码综合、逻辑分析和规划等高难度多步任务而优化,并默认以结构化的“思维链”形式输出推理过程。在性能上,它不仅超越了 Qwen3-32B-Thinking 等成本更高的模型,还在多个基准测试中优于 Gemini-2.5-Flash-Thinking。',
+ displayName: 'Qwen3 Next 80B A3B Thinking',
+ id: 'Qwen/Qwen3-Next-80B-A3B-Thinking',
+ pricing: {
+ currency: 'CNY',
+ units: [
+ { name: 'textInput', rate: 1, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textOutput', rate: 4, strategy: 'fixed', unit: 'millionTokens' },
+ ],
+ },
+ releasedAt: '2025-09-10',
+ type: 'chat',
+ },
+ {
+ abilities: {
+ functionCall: true,
+ },
+ contextWindowTokens: 131_072,
+ description:
+ 'Qwen3-Next-80B-A3B-Instruct 是由阿里巴巴通义千问团队发布的下一代基础模型。它基于全新的 Qwen3-Next 架构,旨在实现极致的训练和推理效率。该模型采用了创新的混合注意力机制(Gated DeltaNet 和 Gated Attention)、高稀疏度混合专家(MoE)结构以及多项训练稳定性优化。作为一个拥有 800 亿总参数的稀疏模型,它在推理时仅需激活约 30 亿参数,从而大幅降低了计算成本,并在处理超过 32K tokens 的长上下文任务时,推理吞吐量比 Qwen3-32B 模型高出 10 倍以上。此模型为指令微调版本,专为通用任务设计,不支持思维链(Thinking)模式。在性能上,它与通义千问的旗舰模型 Qwen3-235B 在部分基准测试中表现相当,尤其在超长上下文任务中展现出明显优势。',
+ displayName: 'Qwen3 Next 80B A3B Instruct',
+ id: 'Qwen/Qwen3-Next-80B-A3B-Instruct',
+ pricing: {
+ currency: 'CNY',
+ units: [
+ { name: 'textInput', rate: 1, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textOutput', rate: 4, strategy: 'fixed', unit: 'millionTokens' },
+ ],
+ },
+ releasedAt: '2025-09-10',
+ type: 'chat',
+ },
{
abilities: {
functionCall: true,
@@ -47,13 +86,52 @@ const siliconcloudChatModels: AIChatModelCard[] = [
},
type: 'chat',
},
+ {
+ abilities: {
+ functionCall: true,
+ reasoning: true,
+ },
+ contextWindowTokens: 131_072,
+ description:
+ 'Ring-flash-2.0 是一个基于 Ling-flash-2.0-base 深度优化的高性能思考模型。它采用混合专家(MoE)架构,总参数量为 100B,但在每次推理中仅激活 6.1B 参数。该模型通过独创的 icepop 算法,解决了 MoE 大模型在强化学习(RL)训练中的不稳定性难题,使其复杂推理能力在长周期训练中得以持续提升。Ring-flash-2.0 在数学竞赛、代码生成和逻辑推理等多个高难度基准测试中取得了显著突破,其性能不仅超越了 40B 参数规模以下的顶尖稠密模型,还能媲美更大规模的开源 MoE 模型及闭源的高性能思考模型。尽管该模型专注于复杂推理,它在创意写作等任务上也表现出色。此外,得益于其高效的架构设计,Ring-flash-2.0 在提供强大性能的同时,也实现了高速推理,显著降低了思考模型在高并发场景下的部署成本。',
+ displayName: 'Ring Flash 2.0',
+ id: 'inclusionAI/Ring-flash-2.0',
+ pricing: {
+ currency: 'CNY',
+ units: [
+ { name: 'textInput', rate: 1, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textOutput', rate: 4, strategy: 'fixed', unit: 'millionTokens' },
+ ],
+ },
+ releasedAt: '2025-09-19',
+ type: 'chat',
+ },
{
abilities: {
functionCall: true,
},
contextWindowTokens: 131_072,
description:
- 'Ling-mini-2.0 是一款基于 MoE 架构的小尺寸高性能大语言模型。它拥有 16B 总参数,但每个 token 仅激活 1.4B(non-embedding 789M),从而实现了极高的生成速度。得益于高效的 MoE 设计与大规模高质量训练数据,尽管激活参数仅为 1.4B,Ling-mini-2.0 依然在下游任务中展现出可媲美 10B 以下 dense LLM 及更大规模 MoE 模型的顶尖性能',
+ 'Ling-flash-2.0 是由蚂蚁集团百灵团队发布的 Ling 2.0 架构系列的第三款模型。它是一款混合专家(MoE)模型,总参数规模达到 1000 亿,但每个 token 仅激活 61 亿参数(非词向量激活 48 亿)。 作为一个轻量级配置的模型,Ling-flash-2.0 在多个权威评测中展现出媲美甚至超越 400 亿级别稠密(Dense)模型及更大规模 MoE 模型的性能。该模型旨在通过极致的架构设计与训练策略,在“大模型等于大参数”的共识下探索高效能的路径。',
+ displayName: 'Ling Flash 2.0',
+ id: 'inclusionAI/Ling-flash-2.0',
+ pricing: {
+ currency: 'CNY',
+ units: [
+ { name: 'textInput', rate: 1, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textOutput', rate: 4, strategy: 'fixed', unit: 'millionTokens' },
+ ],
+ },
+ releasedAt: '2025-09-17',
+ type: 'chat',
+ },
+ {
+ abilities: {
+ functionCall: true,
+ },
+ contextWindowTokens: 131_072,
+ description:
+ 'Ling-mini-2.0 是一款基于 MoE 架构的小尺寸高性能大语言模型。它拥有 16B 总参数,但每个 token 仅激活 1.4B(non-embedding 789M),从而实现了极高的生成速度。得益于高效的 MoE 设计与大规模高质量训练数据,尽管激活参数仅为 1.4B,Ling-mini-2.0 依然在下游任务中展现出可媲美 10B 以下 dense LLM 及更大规模 MoE 模型的顶尖性能。',
displayName: 'Ling Mini 2.0',
id: 'inclusionAI/Ling-mini-2.0',
pricing: {
@@ -294,44 +372,6 @@ const siliconcloudChatModels: AIChatModelCard[] = [
releasedAt: '2025-09-05',
type: 'chat',
},
- {
- abilities: {
- functionCall: true,
- },
- contextWindowTokens: 131_072,
- description:
- 'Kimi K2 是一款具备超强代码和 Agent 能力的 MoE 架构基础模型,总参数 1T,激活参数 32B。在通用知识推理、编程、数学、Agent 等主要类别的基准性能测试中,K2 模型的性能超过其他主流开源模型。',
- displayName: 'Kimi K2 0711',
- id: 'moonshotai/Kimi-K2-Instruct',
- pricing: {
- currency: 'CNY',
- units: [
- { name: 'textInput', rate: 4, strategy: 'fixed', unit: 'millionTokens' },
- { name: 'textOutput', rate: 16, strategy: 'fixed', unit: 'millionTokens' },
- ],
- },
- releasedAt: '2025-07-11',
- type: 'chat',
- },
- {
- abilities: {
- functionCall: true,
- },
- contextWindowTokens: 131_072,
- description:
- 'Kimi K2 是一款具备超强代码和 Agent 能力的 MoE 架构基础模型,总参数 1T,激活参数 32B。在通用知识推理、编程、数学、Agent 等主要类别的基准性能测试中,K2 模型的性能超过其他主流开源模型。',
- displayName: 'Kimi K2 0711 (Pro)',
- id: 'Pro/moonshotai/Kimi-K2-Instruct',
- pricing: {
- currency: 'CNY',
- units: [
- { name: 'textInput', rate: 4, strategy: 'fixed', unit: 'millionTokens' },
- { name: 'textOutput', rate: 16, strategy: 'fixed', unit: 'millionTokens' },
- ],
- },
- releasedAt: '2025-07-11',
- type: 'chat',
- },
{
abilities: {
reasoning: true,
diff --git a/packages/model-bank/src/aiModels/volcengine.ts b/packages/model-bank/src/aiModels/volcengine.ts
index b324668d18b..55623c149f4 100644
--- a/packages/model-bank/src/aiModels/volcengine.ts
+++ b/packages/model-bank/src/aiModels/volcengine.ts
@@ -9,7 +9,7 @@ const doubaoChatModels: AIChatModelCard[] = [
reasoning: true,
},
config: {
- deploymentName: 'deepseek-v3-1-250821',
+ deploymentName: 'deepseek-v3-1-terminus',
},
contextWindowTokens: 131_072,
description:
diff --git a/packages/model-bank/src/aiModels/xai.ts b/packages/model-bank/src/aiModels/xai.ts
index 345f14311e5..1489770849a 100644
--- a/packages/model-bank/src/aiModels/xai.ts
+++ b/packages/model-bank/src/aiModels/xai.ts
@@ -2,6 +2,89 @@ import { AIChatModelCard, AIImageModelCard } from '../types/aiModel';
// https://docs.x.ai/docs/models
const xaiChatModels: AIChatModelCard[] = [
+ {
+ abilities: {
+ functionCall: true,
+ search: true,
+ vision: true,
+ },
+ contextWindowTokens: 2_000_000,
+ description:
+ '我们很高兴发布 Grok 4 Fast,这是我们在成本效益推理模型方面的最新进展。',
+ displayName: 'Grok 4 Fast (Non-Reasoning)',
+ enabled: true,
+ id: 'grok-4-fast-non-reasoning',
+ pricing: {
+ units: [
+ { name: 'textInput_cacheRead', rate: 0.05, strategy: 'fixed', unit: 'millionTokens' },
+ {
+ name: 'textInput',
+ strategy: 'tiered',
+ tiers: [
+ { rate: 0.2, upTo: 0.128 },
+ { rate: 0.4, upTo: 'infinity' },
+ ],
+ unit: 'millionTokens',
+ },
+ {
+ name: 'textOutput',
+ strategy: 'tiered',
+ tiers: [
+ { rate: 0.5, upTo: 0.128 },
+ { rate: 1, upTo: 'infinity' },
+ ],
+ unit: 'millionTokens',
+ },
+ ],
+ },
+ releasedAt: '2025-09-09',
+ settings: {
+ searchImpl: 'params',
+ },
+ type: 'chat',
+ },
+ {
+ abilities: {
+ functionCall: true,
+ reasoning: true,
+ search: true,
+ vision: true,
+ },
+ contextWindowTokens: 2_000_000,
+ description:
+ '我们很高兴发布 Grok 4 Fast,这是我们在成本效益推理模型方面的最新进展。',
+ displayName: 'Grok 4 Fast',
+ enabled: true,
+ id: 'grok-4-fast-reasoning',
+ pricing: {
+ units: [
+ { name: 'textInput_cacheRead', rate: 0.05, strategy: 'fixed', unit: 'millionTokens' },
+ {
+ name: 'textInput',
+ strategy: 'tiered',
+ tiers: [
+ { rate: 0.2, upTo: 0.128 },
+ { rate: 0.4, upTo: 'infinity' },
+ ],
+ unit: 'millionTokens',
+ },
+ {
+ name: 'textOutput',
+ strategy: 'tiered',
+ tiers: [
+ { rate: 0.5, upTo: 0.128 },
+ { rate: 1, upTo: 'infinity' },
+ ],
+ unit: 'millionTokens',
+ },
+ ],
+ },
+ releasedAt: '2025-09-09',
+ settings: {
+ searchImpl: 'params',
+ },
+ type: 'chat',
+ },
{
abilities: {
functionCall: true,
@@ -21,8 +104,8 @@ const xaiChatModels: AIChatModelCard[] = [
},
releasedAt: '2025-08-27',
// settings: {
- // reasoning_effort is not supported by grok-code. Specifying reasoning_effort parameter will get an error response.
- // extendParams: ['reasoningEffort'],
+ // reasoning_effort is not supported by grok-code. Specifying reasoning_effort parameter will get an error response.
+ // extendParams: ['reasoningEffort'],
// },
type: 'chat',
},
@@ -110,7 +193,6 @@ const xaiChatModels: AIChatModelCard[] = [
description:
'轻量级模型,回话前会先思考。运行快速、智能,适用于不需要深层领域知识的逻辑任务,并能获取原始的思维轨迹。',
displayName: 'Grok 3 Mini',
- enabled: true,
id: 'grok-3-mini',
pricing: {
units: [
diff --git a/packages/model-bank/src/types/aiModel.ts b/packages/model-bank/src/types/aiModel.ts
index 7f7975bfed5..3f57ee82ffb 100644
--- a/packages/model-bank/src/types/aiModel.ts
+++ b/packages/model-bank/src/types/aiModel.ts
@@ -133,6 +133,8 @@ export type PricingUnitName =
// Image-based pricing units
| 'imageGeneration' // for image generation models
+ | 'imageInput'
+ | 'imageInput_cacheRead'
| 'imageOutput';
export type PricingUnitType =
diff --git a/packages/model-runtime/src/const/models.ts b/packages/model-runtime/src/const/models.ts
index 6d5773cf8e0..37419995563 100644
--- a/packages/model-runtime/src/const/models.ts
+++ b/packages/model-runtime/src/const/models.ts
@@ -35,6 +35,7 @@ export const responsesAPIModels = new Set([
'codex-mini-latest',
'computer-use-preview',
'computer-use-preview-2025-03-11',
+ 'gpt-5-codex',
]);
/**
diff --git a/packages/model-runtime/src/core/openaiCompatibleFactory/index.test.ts b/packages/model-runtime/src/core/openaiCompatibleFactory/index.test.ts
index 610a90d1971..07bd232a048 100644
--- a/packages/model-runtime/src/core/openaiCompatibleFactory/index.test.ts
+++ b/packages/model-runtime/src/core/openaiCompatibleFactory/index.test.ts
@@ -955,6 +955,59 @@ describe('LobeOpenAICompatibleFactory', () => {
expect(customTransformHandler).toHaveBeenCalledWith(mockResponse);
});
+ describe('responses routing', () => {
+ it('should route to Responses API when chatCompletion.useResponse is true', async () => {
+ const LobeMockProviderUseResponses = createOpenAICompatibleRuntime({
+ baseURL: 'https://api.test.com/v1',
+ chatCompletion: {
+ useResponse: true,
+ },
+ provider: ModelProvider.OpenAI,
+ });
+
+ const inst = new LobeMockProviderUseResponses({ apiKey: 'test' });
+
+ // mock responses.create to return a stream-like with tee
+ const prod = new ReadableStream();
+ const debug = new ReadableStream();
+ const mockResponsesCreate = vi
+ .spyOn(inst['client'].responses, 'create')
+ .mockResolvedValue({ tee: () => [prod, debug] } as any);
+
+ await inst.chat({ messages: [{ content: 'hi', role: 'user' }], model: 'any-model', temperature: 0 });
+
+ expect(mockResponsesCreate).toHaveBeenCalled();
+ });
+
+ it('should route to Responses API when model matches useResponseModels', async () => {
+ const LobeMockProviderUseResponseModels = createOpenAICompatibleRuntime({
+ baseURL: 'https://api.test.com/v1',
+ chatCompletion: {
+ useResponseModels: ['special-model', /special-\w+/],
+ },
+ provider: ModelProvider.OpenAI,
+ });
+ const inst = new LobeMockProviderUseResponseModels({ apiKey: 'test' });
+ const spy = vi.spyOn(inst['client'].responses, 'create');
+ // Prevent hanging by mocking normal chat completion stream
+ vi.spyOn(inst['client'].chat.completions, 'create').mockResolvedValue(new ReadableStream() as any);
+
+ // First invocation: model contains the string
+ spy.mockResolvedValueOnce({ tee: () => [new ReadableStream(), new ReadableStream()] } as any);
+ await inst.chat({ messages: [{ content: 'hi', role: 'user' }], model: 'prefix-special-model-suffix', temperature: 0 });
+ expect(spy).toHaveBeenCalledTimes(1);
+
+ // Second invocation: model matches the RegExp
+ spy.mockResolvedValueOnce({ tee: () => [new ReadableStream(), new ReadableStream()] } as any);
+ await inst.chat({ messages: [{ content: 'hi', role: 'user' }], model: 'special-xyz', temperature: 0 });
+ expect(spy).toHaveBeenCalledTimes(2);
+
+ // Third invocation: model does not match any useResponseModels patterns
+ await inst.chat({ messages: [{ content: 'hi', role: 'user' }], model: 'unrelated-model', temperature: 0 });
+ expect(spy).toHaveBeenCalledTimes(2); // Ensure no additional calls were made
+ });
+ });
+
describe('DEBUG', () => {
it('should call debugStream and return StreamingTextResponse when DEBUG_OPENROUTER_CHAT_COMPLETION is 1', async () => {
// Arrange
diff --git a/packages/model-runtime/src/core/openaiCompatibleFactory/index.ts b/packages/model-runtime/src/core/openaiCompatibleFactory/index.ts
index 9dc0bc73909..23241d13d8b 100644
--- a/packages/model-runtime/src/core/openaiCompatibleFactory/index.ts
+++ b/packages/model-runtime/src/core/openaiCompatibleFactory/index.ts
@@ -91,6 +91,15 @@ interface OpenAICompatibleFactoryOptions<T extends Record<string, any> = any> {
data: OpenAI.ChatCompletion,
) => ReadableStream<OpenAI.ChatCompletionChunk>;
noUserId?: boolean;
+ /**
+ * If true, route chat requests to Responses API path directly
+ */
+ useResponse?: boolean;
+ /**
+ * Allow only some models to use Responses API by simple matching.
+ * If any string appears in model id or RegExp matches, Responses API is used.
+ */
+ useResponseModels?: Array<string | RegExp>;
};
constructorOptions?: ConstructorOptions<T>;
createImage?: (
@@ -174,16 +183,42 @@ export const createOpenAICompatibleRuntime = <T extends Record<string, any> = an
async chat({ responseMode, ...payload }: ChatStreamPayload, options?: ChatMethodOptions) {
try {
const inputStartAt = Date.now();
+
+ // 工厂级 Responses API 路由控制(支持实例覆盖)
+ const modelId = (payload as any).model as string | undefined;
+ const shouldUseResponses = (() => {
+ const instanceChat = ((this._options as any).chatCompletion || {}) as {
+ useResponse?: boolean;
+ useResponseModels?: Array<string | RegExp>;
+ };
+ const flagUseResponse =
+ instanceChat.useResponse ?? (chatCompletion ? chatCompletion.useResponse : undefined);
+ const flagUseResponseModels =
+ instanceChat.useResponseModels ?? chatCompletion?.useResponseModels;
+
+ if (!chatCompletion && !instanceChat) return false;
+ if (flagUseResponse) return true;
+ if (!modelId || !flagUseResponseModels?.length) return false;
+ return flagUseResponseModels.some((m: string | RegExp) =>
+ typeof m === 'string' ? modelId.includes(m) : (m as RegExp).test(modelId),
+ );
+ })();
+
+ let processedPayload: any = payload;
+ if (shouldUseResponses) {
+ processedPayload = { ...payload, apiMode: 'responses' } as any;
+ }
+
+ // 再进行工厂级处理
const postPayload = chatCompletion?.handlePayload
- ? chatCompletion.handlePayload(payload, this._options)
+ ? chatCompletion.handlePayload(processedPayload, this._options)
: ({
- ...payload,
- stream: payload.stream ?? true,
+ ...processedPayload,
+ stream: processedPayload.stream ?? true,
} as OpenAI.ChatCompletionCreateParamsStreaming);
- // new openai Response API
if ((postPayload as any).apiMode === 'responses') {
- return this.handleResponseAPIMode(payload, options);
+ return this.handleResponseAPIMode(processedPayload, options);
}
const messages = await convertOpenAIMessages(postPayload.messages);
@@ -197,7 +232,7 @@ export const createOpenAICompatibleRuntime = <T extends Record<string, any> = an
};
if (customClient?.createChatCompletionStream) {
- response = customClient.createChatCompletionStream(this.client, payload, this) as any;
+ response = customClient.createChatCompletionStream(this.client, processedPayload, this) as any;
} else {
const finalPayload = {
...postPayload,
diff --git a/packages/model-runtime/src/providers/aihubmix/index.ts b/packages/model-runtime/src/providers/aihubmix/index.ts
index bba60a43e08..ecf2a4d49ec 100644
--- a/packages/model-runtime/src/providers/aihubmix/index.ts
+++ b/packages/model-runtime/src/providers/aihubmix/index.ts
@@ -15,16 +15,6 @@ export interface AiHubMixModelCard {
const baseURL = 'https://aihubmix.com';
-const handlePayload = (payload: ChatStreamPayload) => {
- if (
- responsesAPIModels.has(payload.model) ||
- payload.model.includes('gpt-') ||
- /^o\d/.test(payload.model)
- ) {
- return { ...payload, apiMode: 'responses' } as any;
- }
- return payload as any;
-};
export const LobeAiHubMixAI = createRouterRuntime({
debug: {
@@ -75,7 +65,11 @@ export const LobeAiHubMixAI = createRouterRuntime({
options: {
baseURL: urlJoin(baseURL, '/v1'),
chatCompletion: {
- handlePayload,
+ useResponseModels: [
+ ...Array.from(responsesAPIModels),
+ /gpt-\d(?!\d)/,
+ /^o\d/,
+ ],
},
},
},
diff --git a/packages/model-runtime/src/providers/qwen/index.ts b/packages/model-runtime/src/providers/qwen/index.ts
index 018b93f9828..73fd3ce49ff 100644
--- a/packages/model-runtime/src/providers/qwen/index.ts
+++ b/packages/model-runtime/src/providers/qwen/index.ts
@@ -32,18 +32,18 @@ export const LobeQwenAI = createOpenAICompatibleRuntime({
...rest,
...(model.includes('-thinking')
? {
- enable_thinking: true,
+ enable_thinking: true,
+ thinking_budget:
+ thinking?.budget_tokens === 0 ? 0 : thinking?.budget_tokens || undefined,
+ }
+ : ['qwen3', 'qwen-turbo', 'qwen-plus', 'deepseek-v3.1'].some((keyword) =>
+ model.toLowerCase().includes(keyword),
+ )
+ ? {
+ enable_thinking: thinking !== undefined ? thinking.type === 'enabled' : false,
thinking_budget:
thinking?.budget_tokens === 0 ? 0 : thinking?.budget_tokens || undefined,
}
- : ['qwen3', 'qwen-turbo', 'qwen-plus', 'deepseek-v3.1'].some((keyword) =>
- model.toLowerCase().includes(keyword),
- )
- ? {
- enable_thinking: thinking !== undefined ? thinking.type === 'enabled' : false,
- thinking_budget:
- thinking?.budget_tokens === 0 ? 0 : thinking?.budget_tokens || undefined,
- }
: {}),
frequency_penalty: undefined,
model,
@@ -59,11 +59,11 @@ export const LobeQwenAI = createOpenAICompatibleRuntime({
: undefined,
...(model.startsWith('qvq') || model.startsWith('qwen-vl')
? {
- top_p: top_p !== undefined && top_p > 0 && top_p <= 1 ? top_p : undefined,
- }
+ top_p: top_p !== undefined && top_p > 0 && top_p <= 1 ? top_p : undefined,
+ }
: {
- top_p: top_p !== undefined && top_p > 0 && top_p < 1 ? top_p : undefined,
- }),
+ top_p: top_p !== undefined && top_p > 0 && top_p < 1 ? top_p : undefined,
+ }),
...(enabledSearch && {
enable_search: enabledSearch,
search_options: {
diff --git a/packages/model-runtime/src/utils/modelParse.ts b/packages/model-runtime/src/utils/modelParse.ts
index 946548f554b..ddf59df74e7 100644
--- a/packages/model-runtime/src/utils/modelParse.ts
+++ b/packages/model-runtime/src/utils/modelParse.ts
@@ -26,11 +26,21 @@ export const MODEL_LIST_CONFIGS = {
reasoningKeywords: ['thinking', '-2.5-'],
visionKeywords: ['gemini', 'learnlm'],
},
+ inclusionai: {
+ functionCallKeywords: ['ling-'],
+ reasoningKeywords: ['ring-'],
+ visionKeywords: ['ming-'],
+ },
llama: {
functionCallKeywords: ['llama-3.2', 'llama-3.3', 'llama-4'],
reasoningKeywords: [],
visionKeywords: ['llava'],
},
+ longcat: {
+ functionCallKeywords: ['longcat'],
+ reasoningKeywords: ['thinking'],
+ visionKeywords: [],
+ },
moonshot: {
functionCallKeywords: ['moonshot', 'kimi'],
reasoningKeywords: ['thinking'],
@@ -68,7 +78,7 @@ export const MODEL_LIST_CONFIGS = {
},
xai: {
functionCallKeywords: ['grok'],
- reasoningKeywords: ['mini', 'grok-4', 'grok-code-fast'],
+ reasoningKeywords: ['mini', 'grok-4', 'grok-code-fast', '!non-reasoning'],
visionKeywords: ['vision', 'grok-4'],
},
zeroone: {
@@ -87,7 +97,9 @@ export const MODEL_OWNER_DETECTION_CONFIG = {
anthropic: ['claude'],
deepseek: ['deepseek'],
google: ['gemini', 'imagen'],
+ inclusionai: ['ling-', 'ming-', 'ring-'],
llama: ['llama', 'llava'],
+ longcat: ['longcat'],
moonshot: ['moonshot', 'kimi'],
openai: ['o1', 'o3', 'o4', 'gpt-'],
qwen: ['qwen', 'qwq', 'qvq'],
diff --git a/src/config/modelProviders/nvidia.ts b/src/config/modelProviders/nvidia.ts
index f291dc04a15..6666d99c22e 100644
--- a/src/config/modelProviders/nvidia.ts
+++ b/src/config/modelProviders/nvidia.ts
@@ -10,6 +10,7 @@ const Nvidia: ModelProviderCard = {
modelsUrl: 'https://build.nvidia.com/models',
name: 'Nvidia',
settings: {
+ disableBrowserRequest: true, // CORS error
proxyUrl: {
placeholder: 'https://integrate.api.nvidia.com/v1',
},