mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-30 11:21:07 +00:00
* feat(minimax): add image generation and TTS providers, trim TUI model list Register MiniMax image-01 and speech-2.8 models as plugin providers for the image_generate and TTS tools. Both resolve CN/global base URLs from the configured model endpoint origin. - Image generation: base64 response, aspect-ratio support, image-to-image via subject_reference, registered for minimax and minimax-portal - TTS: speech-2.8-turbo (default) and speech-2.8-hd, hex-encoded audio, voice listing via get_voice API, telephony PCM support - Add MiniMax to TTS auto-detection cascade (after ElevenLabs, before Microsoft) and TTS config section - Remove MiniMax-VL-01, M2, M2.1, M2.5 and variants from TUI picker; keep M2.7 and M2.7-highspeed only (backend routing unchanged) * feat(minimax): trim legacy model catalog to M2.7 only Cherry-picked from temp/feat/minimax-trim-legacy-models (949ed28). Removes MiniMax-VL-01, M2, M2.1, M2.5 and variants from the model catalog, model order, modern model matchers, OAuth config, docs, and tests. Keeps only M2.7 and M2.7-highspeed. Conflicts resolved: - provider-catalog.ts: removed MINIMAX_TUI_MODELS filter (no longer needed since source array is now M2.7-only) - index.ts: kept image generation + speech provider registrations (added by this branch), moved media understanding registrations earlier (as intended by the cherry-picked commit) * fix(minimax): update discovery contract test to reflect M2.7-only catalog Cherry-picked from temp/feat/minimax-trim-legacy-models (2c750cb). * feat(minimax): add web search provider and register in plugin entry * fix(minimax): resolve OAuth credentials for TTS speech provider * MiniMax: remove web search and TTS providers * fix(minimax): throw on empty images array after generation failure * feat(minimax): add image generation provider and trim catalog to M2.7 (#54487) (thanks @liyuan97) --------- Co-authored-by: tars90percent <tars@minimaxi.com> Co-authored-by: George Zhang <georgezhangtj97@gmail.com>
161 lines
5.0 KiB
Markdown
161 lines
5.0 KiB
Markdown
---
|
||
summary: "Use MiniMax models in OpenClaw"
|
||
read_when:
|
||
- You want MiniMax models in OpenClaw
|
||
- You need MiniMax setup guidance
|
||
title: "MiniMax"
|
||
---
|
||
|
||
# MiniMax
|
||
|
||
OpenClaw's MiniMax provider defaults to **MiniMax M2.7**.
|
||
|
||
## Model lineup
|
||
|
||
- `MiniMax-M2.7`: default hosted text model.
|
||
- `MiniMax-M2.7-highspeed`: faster M2.7 text tier.
|
||
|
||
## Choose a setup
|
||
|
||
### MiniMax OAuth (Coding Plan) - recommended
|
||
|
||
**Best for:** quick setup with MiniMax Coding Plan via OAuth, no API key required.
|
||
|
||
Enable the bundled OAuth plugin and authenticate:
|
||
|
||
```bash
|
||
openclaw plugins enable minimax # skip if already loaded.
|
||
openclaw gateway restart # restart if gateway is already running
|
||
openclaw onboard --auth-choice minimax-portal
|
||
```
|
||
|
||
You will be prompted to select an endpoint:
|
||
|
||
- **Global** - International users (`api.minimax.io`)
|
||
- **CN** - Users in China (`api.minimaxi.com`)
|
||
|
||
See [MiniMax plugin README](https://github.com/openclaw/openclaw/tree/main/extensions/minimax) for details.
|
||
|
||
### MiniMax M2.7 (API key)
|
||
|
||
**Best for:** hosted MiniMax with Anthropic-compatible API.
|
||
|
||
Configure via CLI:
|
||
|
||
- Run `openclaw configure`
|
||
- Select **Model/auth**
|
||
- Choose a **MiniMax** auth option
|
||
|
||
```json5
|
||
{
|
||
env: { MINIMAX_API_KEY: "sk-..." },
|
||
agents: { defaults: { model: { primary: "minimax/MiniMax-M2.7" } } },
|
||
models: {
|
||
mode: "merge",
|
||
providers: {
|
||
minimax: {
|
||
baseUrl: "https://api.minimax.io/anthropic",
|
||
apiKey: "${MINIMAX_API_KEY}",
|
||
api: "anthropic-messages",
|
||
models: [
|
||
{
|
||
id: "MiniMax-M2.7",
|
||
name: "MiniMax M2.7",
|
||
reasoning: true,
|
||
input: ["text"],
|
||
cost: { input: 0.3, output: 1.2, cacheRead: 0.03, cacheWrite: 0.12 },
|
||
contextWindow: 200000,
|
||
maxTokens: 8192,
|
||
},
|
||
{
|
||
id: "MiniMax-M2.7-highspeed",
|
||
name: "MiniMax M2.7 Highspeed",
|
||
reasoning: true,
|
||
input: ["text"],
|
||
cost: { input: 0.3, output: 1.2, cacheRead: 0.03, cacheWrite: 0.12 },
|
||
contextWindow: 200000,
|
||
maxTokens: 8192,
|
||
},
|
||
],
|
||
},
|
||
},
|
||
},
|
||
}
|
||
```
|
||
|
||
### MiniMax M2.7 as fallback (example)
|
||
|
||
**Best for:** keep your strongest latest-generation model as primary, fail over to MiniMax M2.7.
|
||
Example below uses Opus as a concrete primary; swap to your preferred latest-gen primary model.
|
||
|
||
```json5
|
||
{
|
||
env: { MINIMAX_API_KEY: "sk-..." },
|
||
agents: {
|
||
defaults: {
|
||
models: {
|
||
"anthropic/claude-opus-4-6": { alias: "primary" },
|
||
"minimax/MiniMax-M2.7": { alias: "minimax" },
|
||
},
|
||
model: {
|
||
primary: "anthropic/claude-opus-4-6",
|
||
fallbacks: ["minimax/MiniMax-M2.7"],
|
||
},
|
||
},
|
||
},
|
||
}
|
||
```
|
||
|
||
## Configure via `openclaw configure`
|
||
|
||
Use the interactive config wizard to set MiniMax without editing JSON:
|
||
|
||
1. Run `openclaw configure`.
|
||
2. Select **Model/auth**.
|
||
3. Choose a **MiniMax** auth option.
|
||
4. Pick your default model when prompted.
|
||
|
||
## Configuration options
|
||
|
||
- `models.providers.minimax.baseUrl`: prefer `https://api.minimax.io/anthropic` (Anthropic-compatible); `https://api.minimax.io/v1` is optional for OpenAI-compatible payloads.
|
||
- `models.providers.minimax.api`: prefer `anthropic-messages`; `openai-completions` is optional for OpenAI-compatible payloads.
|
||
- `models.providers.minimax.apiKey`: MiniMax API key (`MINIMAX_API_KEY`).
|
||
- `models.providers.minimax.models`: define `id`, `name`, `reasoning`, `contextWindow`, `maxTokens`, `cost`.
|
||
- `agents.defaults.models`: alias models you want in the allowlist.
|
||
- `models.mode`: keep `merge` if you want to add MiniMax alongside built-ins.
|
||
|
||
## Notes
|
||
|
||
- Model refs are `minimax/<model>`.
|
||
- Default text model: `MiniMax-M2.7`.
|
||
- Alternate text model: `MiniMax-M2.7-highspeed`.
|
||
- Coding Plan usage API: `https://api.minimaxi.com/v1/api/openplatform/coding_plan/remains` (requires a coding plan key).
|
||
- Update pricing values in `models.json` if you need exact cost tracking.
|
||
- Referral link for MiniMax Coding Plan (10% off): [https://platform.minimax.io/subscribe/coding-plan?code=DbXJTRClnb&source=link](https://platform.minimax.io/subscribe/coding-plan?code=DbXJTRClnb&source=link)
|
||
- See [/concepts/model-providers](/concepts/model-providers) for provider rules.
|
||
- Use `openclaw models list` and `openclaw models set minimax/MiniMax-M2.7` to switch.
|
||
|
||
## Troubleshooting
|
||
|
||
### "Unknown model: minimax/MiniMax-M2.7"
|
||
|
||
This usually means the **MiniMax provider isn’t configured** (no provider entry
|
||
and no MiniMax auth profile/env key found). A fix for this detection is in
|
||
**2026.1.12**. Fix by:
|
||
|
||
- Upgrading to **2026.1.12** (or run from source `main`), then restarting the gateway.
|
||
- Running `openclaw configure` and selecting a **MiniMax** auth option, or
|
||
- Adding the `models.providers.minimax` block manually, or
|
||
- Setting `MINIMAX_API_KEY` (or a MiniMax auth profile) so the provider can be injected.
|
||
|
||
Make sure the model id is **case‑sensitive**:
|
||
|
||
- `minimax/MiniMax-M2.7`
|
||
- `minimax/MiniMax-M2.7-highspeed`
|
||
|
||
Then recheck with:
|
||
|
||
```bash
|
||
openclaw models list
|
||
```
|