From 5e40b3022a9f46f0a8fc6ee4a4ae5ebea0c902f1 Mon Sep 17 00:00:00 2001 From: PR Bot Date: Mon, 16 Mar 2026 00:58:43 +0800 Subject: [PATCH 1/2] feat: add MiniMax as LLM provider Add MiniMax (api.minimax.io) as a fourth LLM provider option alongside Anthropic, OpenAI, and OpenRouter. MiniMax uses an OpenAI-compatible API, so it reuses the existing OpenAI adapter with no new dependencies. Changes: - config.ts: add "minimax" to provider union type and model defaults - llm/index.ts: add minimax case to createLLMProvider() factory - ui/pages/setup/LLMStep.tsx: add MiniMax to setup wizard provider list - ui/pages/Settings.tsx: add MiniMax to settings provider dropdown - README.md: document MiniMax in provider table and description --- README.md | 5 +++-- src/config.ts | 3 ++- src/llm/index.ts | 5 +++++ src/ui/pages/Settings.tsx | 1 + src/ui/pages/setup/LLMStep.tsx | 1 + 5 files changed, 12 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index cccdac8..cb54b50 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Opens `http://localhost:3777` with a setup wizard: 1. **Wallet** — detects your `mltl` wallet (auto-created on first run) 2. **Agent** — registers onchain with name, description, skills, and price -3. **LLM** — connects Anthropic, OpenAI, or OpenRouter (with a live test call) +3. **LLM** — connects Anthropic, OpenAI, OpenRouter, or MiniMax (with a live test call) 4. **Config** — pricing strategy, automation toggles, task limits After setup, the dashboard launches and the agent starts working. @@ -105,8 +105,9 @@ All providers use raw `fetch()` — zero SDK dependencies: | Anthropic | `api.anthropic.com/v1/messages` | `claude-sonnet-4-20250514` | | OpenAI | `api.openai.com/v1/chat/completions` | `gpt-4o` | | OpenRouter | `openrouter.ai/api/v1/chat/completions` | `openai/gpt-5.4` | +| MiniMax | `api.minimax.io/v1/chat/completions` | `MiniMax-M2.5` | -OpenAI and OpenRouter use a shared adapter that translates between Anthropic's native tool-use format and OpenAI's `tool_calls` format. +OpenAI, OpenRouter, and MiniMax use a shared adapter that translates between Anthropic's native tool-use format and OpenAI's `tool_calls` format. ## Self-Learning diff --git a/src/config.ts b/src/config.ts index 8a76bf3..d7a8b4b 100644 --- a/src/config.ts +++ b/src/config.ts @@ -3,7 +3,7 @@ import path from "node:path"; import os from "node:os"; export interface LLMConfig { - provider: "anthropic" | "openai" | "openrouter"; + provider: "anthropic" | "openai" | "openrouter" | "minimax"; model: string; apiKey: string; } @@ -118,6 +118,7 @@ export function initConfig(opts: { anthropic: "claude-sonnet-4-20250514", openai: "gpt-4o", openrouter: "anthropic/claude-sonnet-4-20250514", + minimax: "MiniMax-M2.5", }; const config: CashClawConfig = { diff --git a/src/llm/index.ts b/src/llm/index.ts index a798965..dcf000c 100644 --- a/src/llm/index.ts +++ b/src/llm/index.ts @@ -236,6 +236,11 @@ export function createLLMProvider(config: LLMConfig): LLMProvider { config, "https://openrouter.ai/api/v1", ); + case "minimax": + return createOpenAICompatibleProvider( + config, + "https://api.minimax.io/v1", + ); default: throw new Error(`Unknown LLM provider: ${config.provider}`); } diff --git a/src/ui/pages/Settings.tsx b/src/ui/pages/Settings.tsx index 634a3aa..64431d6 100644 --- a/src/ui/pages/Settings.tsx +++ b/src/ui/pages/Settings.tsx @@ -247,6 +247,7 @@ export function Settings() { + diff --git a/src/ui/pages/setup/LLMStep.tsx b/src/ui/pages/setup/LLMStep.tsx index c0cb633..3bd3a05 100644 --- a/src/ui/pages/setup/LLMStep.tsx +++ b/src/ui/pages/setup/LLMStep.tsx @@ -9,6 +9,7 @@ const PROVIDERS = [ { value: "anthropic", label: "ANTHROPIC", desc: "Claude models", model: "claude-sonnet-4-20250514" }, { value: "openai", label: "OPENAI", desc: "GPT-4o", model: "gpt-4o" }, { value: "openrouter", label: "OPENROUTER", desc: "Multi-provider", model: "openai/gpt-5.4" }, + { value: "minimax", label: "MINIMAX", desc: "MiniMax M2.5", model: "MiniMax-M2.5" }, ]; export function LLMStep({ onNext }: LLMStepProps) { From 6e5e3923680fdd07328148ebe95deef519eab486 Mon Sep 17 00:00:00 2001 From: PR Bot Date: Thu, 19 Mar 2026 02:19:05 +0800 Subject: [PATCH 2/2] feat: upgrade MiniMax default model to M2.7 - Update default MiniMax model from M2.5 to M2.7 in config, UI, and docs - MiniMax-M2.7 is the latest flagship model with enhanced reasoning and coding --- README.md | 2 +- src/config.ts | 2 +- src/ui/pages/setup/LLMStep.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index cb54b50..bbebd66 100644 --- a/README.md +++ b/README.md @@ -105,7 +105,7 @@ All providers use raw `fetch()` — zero SDK dependencies: | Anthropic | `api.anthropic.com/v1/messages` | `claude-sonnet-4-20250514` | | OpenAI | `api.openai.com/v1/chat/completions` | `gpt-4o` | | OpenRouter | `openrouter.ai/api/v1/chat/completions` | `openai/gpt-5.4` | -| MiniMax | `api.minimax.io/v1/chat/completions` | `MiniMax-M2.5` | +| MiniMax | `api.minimax.io/v1/chat/completions` | `MiniMax-M2.7` | OpenAI, OpenRouter, and MiniMax use a shared adapter that translates between Anthropic's native tool-use format and OpenAI's `tool_calls` format. diff --git a/src/config.ts b/src/config.ts index d7a8b4b..cd2ebe3 100644 --- a/src/config.ts +++ b/src/config.ts @@ -118,7 +118,7 @@ export function initConfig(opts: { anthropic: "claude-sonnet-4-20250514", openai: "gpt-4o", openrouter: "anthropic/claude-sonnet-4-20250514", - minimax: "MiniMax-M2.5", + minimax: "MiniMax-M2.7", }; const config: CashClawConfig = { diff --git a/src/ui/pages/setup/LLMStep.tsx b/src/ui/pages/setup/LLMStep.tsx index 3bd3a05..4f0a8e3 100644 --- a/src/ui/pages/setup/LLMStep.tsx +++ b/src/ui/pages/setup/LLMStep.tsx @@ -9,7 +9,7 @@ const PROVIDERS = [ { value: "anthropic", label: "ANTHROPIC", desc: "Claude models", model: "claude-sonnet-4-20250514" }, { value: "openai", label: "OPENAI", desc: "GPT-4o", model: "gpt-4o" }, { value: "openrouter", label: "OPENROUTER", desc: "Multi-provider", model: "openai/gpt-5.4" }, - { value: "minimax", label: "MINIMAX", desc: "MiniMax M2.5", model: "MiniMax-M2.5" }, + { value: "minimax", label: "MINIMAX", desc: "MiniMax M2.7", model: "MiniMax-M2.7" }, ]; export function LLMStep({ onNext }: LLMStepProps) {