Skip to main content
Watch: I Built an AI App Without Leaving Databricks

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 Subscription Key.

    Terminal
    opencode auth login
  4. Step 4.

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

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.

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.