From 8ad4d192329172bd034707866d69a5acbffe6f15 Mon Sep 17 00:00:00 2001 From: octo-patch Date: Sun, 15 Mar 2026 23:42:30 +0000 Subject: [PATCH] feat: add MiniMax model support with temperature clamping Add MiniMax (M2.5 / M2.5-highspeed) as a tested model provider: - Add model-specific patch in utils.ts: clamp temperature to (0, 1] since MiniMax API rejects temperature=0, and remove unsupported parallel_tool_calls parameter - Add MiniMax to the tested models list on the Models documentation page - Add MiniMax configuration example alongside existing providers --- packages/llms/src/utils.ts | 9 +++++++++ packages/website/src/pages/docs/features/models/page.tsx | 8 ++++++++ 2 files changed, 17 insertions(+) diff --git a/packages/llms/src/utils.ts b/packages/llms/src/utils.ts index 8e3908a..7a6c838 100644 --- a/packages/llms/src/utils.ts +++ b/packages/llms/src/utils.ts @@ -93,6 +93,15 @@ export function modelPatch(body: Record) { body.reasoning_effort = 'minimal' } + if (modelName.startsWith('minimax')) { + debug('Applying MiniMax patch: clamp temperature to (0, 1]') + // MiniMax API rejects temperature = 0; clamp to a small positive value + body.temperature = Math.max(body.temperature || 0, 0.01) + if (body.temperature > 1) body.temperature = 1 + // MiniMax does not support parallel_tool_calls + delete body.parallel_tool_calls + } + return body } diff --git a/packages/website/src/pages/docs/features/models/page.tsx b/packages/website/src/pages/docs/features/models/page.tsx index 339e30d..15f2ef8 100644 --- a/packages/website/src/pages/docs/features/models/page.tsx +++ b/packages/website/src/pages/docs/features/models/page.tsx @@ -34,6 +34,7 @@ const MODEL_GROUPS: Record = { 'claude-sonnet-3.5', ], xAI: ['grok-4.1-fast', 'grok-4', 'grok-code-fast'], + MiniMax: ['MiniMax-M2.5', 'MiniMax-M2.5-highspeed'], MoonshotAI: ['kimi-k2.5'], 'Z.AI': ['glm-5', 'glm-4.7'], } @@ -121,6 +122,13 @@ const pageAgent = new PageAgent({ model: 'qwen3.5-plus' }); +// MiniMax +const pageAgent = new PageAgent({ + baseURL: 'https://api.minimax.io/v1', + apiKey: 'your-minimax-api-key', + model: 'MiniMax-M2.5' +}); + // Self-hosted models (e.g., Ollama) const pageAgent = new PageAgent({ baseURL: 'http://localhost:11434/v1',