Skip to main content
Watch: Anthropic Just Hit the Brakes on Its Next AI Model

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

  1. 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 opencode when setup finishes.

    Terminal
    npx -y mmx-cli@latest agent setup
  2. Step 2.

    Option 2 (manual): install OpenCode.

    Terminal
    curl -fsSL https://opencode.ai/install | bash
    # or: npm i -g opencode-ai
  3. 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.

    Terminal
    opencode auth login
  4. Step 4.

    Run opencode and 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.

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.

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.