Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

✨ feat: add new NVIDIA models and tweak the behavior of the enable thinking (#12533)

Hardy8855ac3b8a55
diff --git a/packages/model-bank/src/aiModels/nvidia.ts b/packages/model-bank/src/aiModels/nvidia.ts
index b077585a386..092a56be3ae 100644
--- a/packages/model-bank/src/aiModels/nvidia.ts
+++ b/packages/model-bank/src/aiModels/nvidia.ts
@@ -96,6 +96,88 @@ const nvidiaChatModels: AIChatModelCard[] = [
},
type: 'chat',
},
+ {
+ abilities: {
+ functionCall: true,
+ reasoning: true,
+ },
+ contextWindowTokens: 204_800,
+ description:
+ 'MiniMax-M2.1 is a compact, fast, cost-effective MoE model built for top-tier coding and agent performance.',
+ displayName: 'MiniMax-M2.1',
+ enabled: true,
+ id: 'minimaxai/minimax-m2.1',
+ maxOutput: 131_072,
+ type: 'chat',
+ },
+ {
+ abilities: {
+ functionCall: true,
+ reasoning: true,
+ },
+ contextWindowTokens: 131_072,
+ description:
+ 'DeepSeek V3.2 is a next-gen reasoning model with stronger complex reasoning and chain-of-thought capabilities.',
+ displayName: 'DeepSeek V3.2',
+ enabled: true,
+ id: 'deepseek-ai/deepseek-v3.2',
+ maxOutput: 65_536,
+ settings: {
+ extendParams: ['enableReasoning'],
+ },
+ type: 'chat',
+ },
+ {
+ abilities: {
+ functionCall: true,
+ reasoning: true,
+ },
+ contextWindowTokens: 200_000,
+ description:
+ 'GLM-4.7 is Zhipu latest flagship model, enhanced for Agentic Coding scenarios with improved coding capabilities.',
+ displayName: 'GLM-4.7',
+ enabled: true,
+ id: 'z-ai/glm4.7',
+ maxOutput: 131_072,
+ settings: {
+ extendParams: ['enableReasoning'],
+ },
+ type: 'chat',
+ },
+ {
+ abilities: {
+ functionCall: true,
+ reasoning: true,
+ },
+ contextWindowTokens: 200_000,
+ description:
+ "GLM-5 is Zhipu AI's new flagship foundation model for agent engineering, achieving open-source SOTA performance in coding and agent capabilities. It matches Claude Opus 4.5 in performance.",
+ displayName: 'GLM-5',
+ enabled: true,
+ id: 'z-ai/glm5',
+ maxOutput: 131_072,
+ settings: {
+ extendParams: ['enableReasoning'],
+ },
+ type: 'chat',
+ },
+ {
+ abilities: {
+ functionCall: true,
+ reasoning: true,
+ },
+ contextWindowTokens: 262_144,
+ description:
+ 'Kimi K2.5 is the most intelligent Kimi model to date, featuring native multimodal architecture.',
+ displayName: 'Kimi K2.5',
+ enabled: true,
+ id: 'moonshotai/kimi-k2.5',
+ maxOutput: 65_536,
+ settings: {
+ extendParams: ['enableReasoning'],
+ },
+ type: 'chat',
+ },
{
abilities: {
functionCall: true,
@@ -274,6 +356,39 @@ const nvidiaChatModels: AIChatModelCard[] = [
id: 'qwen/qwen2.5-coder-32b-instruct',
type: 'chat',
},
+ {
+ abilities: {
+ functionCall: true,
+ reasoning: true,
+ },
+ contextWindowTokens: 204_800,
+ description:
+ 'MiniMax-M2.5 is the latest large language model from MiniMax, featuring a Mixture-of-Experts (MoE) architecture with 229 billion total parameters. It achieves industry-leading performance in programming, agent tool calling, search tasks, and office scenarios.',
+ displayName: 'MiniMax-M2.5',
+ enabled: true,
+ id: 'minimaxai/minimax-m2.5',
+ maxOutput: 131_072,
+ type: 'chat',
+ },
+ {
+ abilities: {
+ functionCall: true,
+ reasoning: true,
+ vision: true,
+ video: true,
+ },
+ contextWindowTokens: 1_010_000,
+ description:
+ 'Supports text, image, and video inputs. For text-only tasks, its performance is comparable to Qwen3 Max, offering higher efficiency and lower cost. In multimodal capabilities, it delivers significant improvements over the Qwen3 VL series.',
+ displayName: 'Qwen3.5-397B-A17B',
+ enabled: true,
+ id: 'qwen/qwen3.5-397b-a17b',
+ maxOutput: 65_536,
+ settings: {
+ extendParams: ['enableReasoning'],
+ },
+ type: 'chat',
+ },
];
export const allModels = [...nvidiaChatModels];
diff --git a/packages/model-runtime/src/providers/nvidia/index.test.ts b/packages/model-runtime/src/providers/nvidia/index.test.ts
index 2def07d6d6b..25c1488e920 100644
--- a/packages/model-runtime/src/providers/nvidia/index.test.ts
+++ b/packages/model-runtime/src/providers/nvidia/index.test.ts
@@ -83,7 +83,7 @@ describe('LobeNvidiaAI - custom features', () => {
});
});
- it('should use enable_thinking and clear_thinking for GLM models when enabled', () => {
+ it('should use enable_thinking and clear_thinking for GLM models', () => {
const payload = {
model: 'z-ai/glm5',
messages: [{ role: 'user', content: 'test' }],
diff --git a/packages/model-runtime/src/providers/nvidia/index.ts b/packages/model-runtime/src/providers/nvidia/index.ts
index 9f1aa908809..207fbdf6a8b 100644
--- a/packages/model-runtime/src/providers/nvidia/index.ts
+++ b/packages/model-runtime/src/providers/nvidia/index.ts
@@ -8,6 +8,10 @@ import { processMultiProviderModelList } from '../../utils/modelParse';
// Ref: https://docs.z.ai/guides/capabilities/thinking-mode#preserved-thinking
const supportPreservedThinkingModels = new Set(['z-ai/glm4.7', 'z-ai/glm5']);
+// Models that use enable_thinking parameter (without clear_thinking)
+// Ref: NVIDIA NIM
+const enableThinkingModels = new Set(['qwen/qwen3.5-397b-a17b']);
+
export interface NvidiaModelCard {
id: string;
}
@@ -37,6 +41,8 @@ export const params = {
// Check if model uses preserved thinking (enable_thinking + clear_thinking)
const usePreservedThinking = model && supportPreservedThinkingModels.has(model);
+ // Check if model uses enable_thinking parameter (without clear_thinking)
+ const useEnableThinking = model && enableThinkingModels.has(model);
const chatTemplateKwargs: Record<string, any> = {};
@@ -46,6 +52,9 @@ export const params = {
// set clear_thinking to false to preserve reasoning content across turns
chatTemplateKwargs.enable_thinking = thinkingFlag;
chatTemplateKwargs.clear_thinking = false;
+ } else if (useEnableThinking) {
+ // Models using enable_thinking: use enable_thinking only
+ chatTemplateKwargs.enable_thinking = thinkingFlag;
} else {
// Other models: use thinking parameter
chatTemplateKwargs.thinking = thinkingFlag;