Setup guide - Documented by MiniMax
Use MiniMax in OpenCode
MiniMax documents OpenCode setup through OpenCode's built-in 'MiniMax Token Plan (minimax.io)' provider via opencode auth login, with an optional opencode.json model entry, or via the mmx-cli wizard.
Last verified 4 steps2 official sources
Steps
- Step 1.
Option 1 (one-click setup wizard): run the wizard and select OpenCode. It installs the official npm package, verifies its version, and sets a MiniMax default model. Run
opencodewhen setup finishes.Terminalnpx -y mmx-cli@latest agent setup - Step 2.
Option 2 (manual): install OpenCode.
Terminalcurl -fsSL https://opencode.ai/install | bash # or: npm i -g opencode-ai - Step 3.
Authenticate: run
opencode auth login, search and pick MiniMax Token Plan (minimax.io) (the provider name in OpenCode), and enter your M Plan API key.Terminalopencode auth login - Step 4.
Run
opencodeand select MiniMax-M3.1-Flash from the model list. If your version does not list it, add the following to ~/.config/opencode/opencode.json and run it again.JSON{ "$schema": "https://opencode.ai/config.json", "provider": { "minimax-coding-plan": { "models": { "MiniMax-M3.1-Flash": { "name": "MiniMax-M3.1-Flash", "limit": { "context": 524288, "output": 131072 } } } } } }
Caveats
- This path uses OpenCode's built-in MiniMax Token Plan provider (provider id minimax-coding-plan) with an M Plan API key; the base URL is handled by OpenCode, so none is configured manually.
- Both context and output are required inside limit; MiniMax notes leaving either out makes OpenCode fail validation and refuse to start.
- The 524288 context limit is MiniMax's recommended 512K client window; the model supports up to 1M.
More setup guides
Same tool, other providers
Related reading
- MiniMax M2.5 and M2.7 Retirement: How to Move to M3 Before November 18MiniMax closes M2.5 and M2.7 to new users on October 19, 2026 and retires them on November 18. Which model id to switch to, what it costs, and the exact API change.
- MiniMax H3: Omni-Modal Video, Native Audio, Open WeightsMiniMax H3 turns text, image, video and audio into video with native stereo sound. API from 0.80 CNY per second at 2K, and open weights are on Hugging Face.
- MiniMax M2.5 for Developers: The Anthropic-Compatible Budget Frontier ModelMiniMax M2.5 hits 80.2% on SWE-bench Verified and plugs into the Anthropic SDK with two environment variables. Here is what you need to know before switching.
- OpenCode Background Subagents: What v2.3.0 ChangesOpenCode v2.3.0 makes every subagent run in the background and defaults transcripts to low verbosity. What changed, what to set, and where it bites.
- OpenCode Cache Warming: What v2.2.7 Changed and When to Turn It OnOpenCode v2.2.7 makes cache warming time its pings from the model cache TTL. The config, the cost of idle pings, and when warming is a bad trade.
- T3 Code: Open-Source GUI for Claude Code and CodexT3 Code is a free, MIT-licensed desktop, web and mobile app that drives Claude Code, Codex, Cursor, OpenCode and more. What it is, how remote access works, and what to check first.
FAQ
How do I use MiniMax in OpenCode?
MiniMax documents OpenCode setup through OpenCode's built-in 'MiniMax Token Plan (minimax.io)' provider via opencode auth login, with an optional opencode.json model entry, or via the mmx-cli wizard.
Which MiniMax model ids work in OpenCode?
The official docs read for this guide list MiniMax-M3.1-Flash.
Is this an official MiniMax and OpenCode setup?
MiniMax documents this setup in its own docs. It was last checked against 2 official pages on November 8, 2026.
Sources
Last verified against 2 official pages.
- platform.minimax.iohttps://platform.minimax.io/docs/m-plan/opencode.md
- platform.minimax.iohttps://platform.minimax.io/docs/api-reference/text-openai-api.md
Newsletter
New models, set up the day they ship
One email per week. New model releases, the coding tools that support them and how to wire them up.