From a5d396df1f74c307dc20397c361e4399549cd6cd Mon Sep 17 00:00:00 2001 From: octo-patch <266937838+octo-patch@users.noreply.github.com> Date: Tue, 15 Sep 2026 09:08:05 +0800 Subject: [PATCH] Add MiniMax provider preset --- README.md | 3 ++- lib/providers.mjs | 1 + tests/backend.test.mjs | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 815be3f..4127e34 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ App-owned runtimes, provider settings, chat history, attachments, caches, and lo | Feature | Details | |---|---| | **Official Claude Code** | Uses Anthropic's official CLI and Agent SDK — no replacement agent engine | -| **9 AI Providers** | NVIDIA NIM · DeepSeek · OpenRouter · Google Gemini · Anthropic · OpenAI · Ollama · LM Studio · Custom API | +| **10 AI Providers** | NVIDIA NIM · DeepSeek · MiniMax · OpenRouter · Google Gemini · Anthropic · OpenAI · Ollama · LM Studio · Custom API | | **Portable Runtime** | Node.js, Claude Code, caches, settings, and app data stay in the project folder | | **Studio Dashboard** | Streaming chat, Markdown, code highlighting, compact tool steps, approvals, attachments, and diagnostics | | **Shared Claude History** | GUI and portable terminal sessions use real Claude Code conversation IDs and can resume the same history | @@ -123,6 +123,7 @@ Pressing Enter selects the dashboard. |---|---|---| | **NVIDIA NIM** | Chat Completions adapter | [build.nvidia.com](https://build.nvidia.com) | | **DeepSeek** | Anthropic-compatible API | [platform.deepseek.com](https://platform.deepseek.com) | +| **MiniMax** | Chat Completions adapter | [platform.minimax.io](https://platform.minimax.io) | | **OpenRouter** | Anthropic-compatible API | [openrouter.ai](https://openrouter.ai) | | **Google Gemini** | Chat Completions adapter | [aistudio.google.com](https://aistudio.google.com) | | **Anthropic Claude** | Native Messages API / terminal login | [console.anthropic.com](https://console.anthropic.com) | diff --git a/lib/providers.mjs b/lib/providers.mjs index 872cd34..a25f53f 100644 --- a/lib/providers.mjs +++ b/lib/providers.mjs @@ -9,6 +9,7 @@ export const PROVIDERS = { deepseek: { name: 'DeepSeek', short: 'DS', description: 'Direct Anthropic-compatible API', transport: 'anthropic', baseUrl: 'https://api.deepseek.com/anthropic', modelsUrl: 'https://api.deepseek.com/models' }, nvidia: { name: 'NVIDIA NIM', short: 'NV', description: 'Cloud inference · local adapter', transport: 'openai', baseUrl: 'https://integrate.api.nvidia.com/v1' }, gemini: { name: 'Google Gemini', short: 'GE', description: 'Google AI · local adapter', transport: 'openai', baseUrl: 'https://generativelanguage.googleapis.com/v1beta/openai' }, + minimax: { name: 'MiniMax', short: 'MM', description: 'MiniMax · OpenAI-compatible API', transport: 'openai', baseUrl: 'https://api.minimax.io/v1', modelsUrl: 'https://api.minimax.io/v1/models', defaultModel: 'MiniMax-M3', endpoints: [{ region: 'global_en', baseUrl: 'https://api.minimax.io/v1', anthropicBaseUrl: 'https://api.minimax.io/anthropic', docsRoot: 'https://platform.minimax.io/docs' }, { region: 'cn_zh', baseUrl: 'https://api.minimaxi.com/v1', anthropicBaseUrl: 'https://api.minimaxi.com/anthropic', docsRoot: 'https://platform.minimaxi.com/docs' }] }, openai: { name: 'OpenAI', short: 'OA', description: 'Chat Completions · local adapter', transport: 'openai', baseUrl: 'https://api.openai.com/v1' }, ollama: { name: 'Ollama', short: 'OL', description: 'Local models · offline inference', transport: 'anthropic', baseUrl: 'http://127.0.0.1:11434', local: true }, lmstudio: { name: 'LM Studio', short: 'LM', description: 'Your local model server', transport: 'anthropic', baseUrl: 'http://127.0.0.1:1234', local: true }, diff --git a/tests/backend.test.mjs b/tests/backend.test.mjs index 9b1b0b3..0a8cfc4 100644 --- a/tests/backend.test.mjs +++ b/tests/backend.test.mjs @@ -16,8 +16,8 @@ const { pickWorkspace }=await import('../lib/workspace-picker.mjs'); const { nativeSessionId }=await import('../lib/native-sessions.mjs'); test.after(()=>rmSync(temp,{recursive:true,force:true})); const profile={provider:'custom',model:'test-model',auth:'api',baseUrl:'http://127.0.0.1:9099/v1',key:'test-secret-not-real'}; -test('all nine providers and safe configuration round trips',()=>{ - assert.equal(Object.keys(PROVIDERS).length,9);saveProfile({...profile,contextWindow:128000}); +test('all ten providers and safe configuration round trips',()=>{ + assert.equal(Object.keys(PROVIDERS).length,10);assert.equal(PROVIDERS.minimax.defaultModel,'MiniMax-M3');assert.equal(PROVIDERS.minimax.baseUrl,'https://api.minimax.io/v1');assert.equal(PROVIDERS.minimax.endpoints[1].baseUrl,'https://api.minimaxi.com/v1');saveProfile({...profile,contextWindow:128000}); assert.equal(readConfig().profiles.custom.contextWindow,128000);assert.throws(()=>saveProfile({...profile,contextWindow:100}),/Context window/); assert.equal(readConfig().profiles.custom.key,profile.key);assert.equal(publicConfig().profiles.custom.hasKey,true);assert.equal(publicConfig().profiles.custom.key,undefined); saveProfile({...profile,key:undefined,model:'next'});assert.equal(readConfig().profiles.custom.key,profile.key);saveProfile(profile);