Skip to content

Commit 5e40b30

Browse files
author
PR Bot
committed
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
1 parent fb5974e commit 5e40b30

5 files changed

Lines changed: 12 additions & 3 deletions

File tree

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Opens `http://localhost:3777` with a setup wizard:
2525

2626
1. **Wallet** — detects your `mltl` wallet (auto-created on first run)
2727
2. **Agent** — registers onchain with name, description, skills, and price
28-
3. **LLM** — connects Anthropic, OpenAI, or OpenRouter (with a live test call)
28+
3. **LLM** — connects Anthropic, OpenAI, OpenRouter, or MiniMax (with a live test call)
2929
4. **Config** — pricing strategy, automation toggles, task limits
3030

3131
After setup, the dashboard launches and the agent starts working.
@@ -105,8 +105,9 @@ All providers use raw `fetch()` — zero SDK dependencies:
105105
| Anthropic | `api.anthropic.com/v1/messages` | `claude-sonnet-4-20250514` |
106106
| OpenAI | `api.openai.com/v1/chat/completions` | `gpt-4o` |
107107
| OpenRouter | `openrouter.ai/api/v1/chat/completions` | `openai/gpt-5.4` |
108+
| MiniMax | `api.minimax.io/v1/chat/completions` | `MiniMax-M2.5` |
108109

109-
OpenAI and OpenRouter use a shared adapter that translates between Anthropic's native tool-use format and OpenAI's `tool_calls` format.
110+
OpenAI, OpenRouter, and MiniMax use a shared adapter that translates between Anthropic's native tool-use format and OpenAI's `tool_calls` format.
110111

111112
## Self-Learning
112113

src/config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import path from "node:path";
33
import os from "node:os";
44

55
export interface LLMConfig {
6-
provider: "anthropic" | "openai" | "openrouter";
6+
provider: "anthropic" | "openai" | "openrouter" | "minimax";
77
model: string;
88
apiKey: string;
99
}
@@ -118,6 +118,7 @@ export function initConfig(opts: {
118118
anthropic: "claude-sonnet-4-20250514",
119119
openai: "gpt-4o",
120120
openrouter: "anthropic/claude-sonnet-4-20250514",
121+
minimax: "MiniMax-M2.5",
121122
};
122123

123124
const config: CashClawConfig = {

src/llm/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,11 @@ export function createLLMProvider(config: LLMConfig): LLMProvider {
236236
config,
237237
"https://openrouter.ai/api/v1",
238238
);
239+
case "minimax":
240+
return createOpenAICompatibleProvider(
241+
config,
242+
"https://api.minimax.io/v1",
243+
);
239244
default:
240245
throw new Error(`Unknown LLM provider: ${config.provider}`);
241246
}

src/ui/pages/Settings.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ export function Settings() {
247247
<option value="anthropic">Anthropic</option>
248248
<option value="openai">OpenAI</option>
249249
<option value="openrouter">OpenRouter</option>
250+
<option value="minimax">MiniMax</option>
250251
</select>
251252
</Field>
252253
<Field label="Model">

src/ui/pages/setup/LLMStep.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ const PROVIDERS = [
99
{ value: "anthropic", label: "ANTHROPIC", desc: "Claude models", model: "claude-sonnet-4-20250514" },
1010
{ value: "openai", label: "OPENAI", desc: "GPT-4o", model: "gpt-4o" },
1111
{ value: "openrouter", label: "OPENROUTER", desc: "Multi-provider", model: "openai/gpt-5.4" },
12+
{ value: "minimax", label: "MINIMAX", desc: "MiniMax M2.5", model: "MiniMax-M2.5" },
1213
];
1314

1415
export function LLMStep({ onNext }: LLMStepProps) {

0 commit comments

Comments
 (0)