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 Subscription Key.Terminalopencode auth login - Step 4.
Run
opencodeand select MiniMax-M3.1-Flash-Preview 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-Preview": { "name": "MiniMax-M3.1-Flash-Preview", "limit": { "context": 524288 } } } } } }
Caveats
- This path uses OpenCode's built-in MiniMax Token Plan provider (provider id minimax-coding-plan) with an M Plan Subscription Key; the base URL is handled by OpenCode, so none is configured manually.
- MiniMax-M3.1-Flash-Preview is available only through M Plan and MiniMax Code for now. A pay-as-you-go path in OpenCode is not documented on the MiniMax page.
- 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.
- 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.
- OpenCode Hacked: What the Console Breach Means for Your API KeysOpenCode disclosed a breach of its Console that may have exposed provider keys. Who is affected, what to rotate today, and why hosted key gateways are the real risk.
- OpenCode 2: How to Upgrade From v1 Without Breaking Your SetupOpenCode 2 upgrade from v1: what the migration guide says breaks (plugins, server API, TUI config), what carries over, and a safe checklist before you switch.
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-Preview.
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 October 17, 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.