Skip to Content
aicentos

MiniMax Code

Connect aicentos in MiniMax Code (mcode) — add an OpenAI-compatible provider with provider add

Last updated:

MiniMax Code is MiniMax's official coding CLI (command mcode), with a built-in TUI, headless execution, ACP, and a TypeScript SDK. It supports BYOK: mcode provider add can attach any OpenAI-compatible endpoint.

Prerequisites

First create a dedicated key for MiniMax Code in the console (naming it minimax-code is recommended), then install:

curl -fsSL https://filecdn.minimax.chat/public/install.sh | bash

npm works too:

npm install -g @minimax-ai/code@latest
mcode --version

Configuration to fill in

FieldValue
provider nameYour choice, for example aicentos
--base-urlhttps://aicentos.com/v1
--api-formatopenai-completions
--modelA model name from the Model Gallery in the console
--api-key-envMCODE_PROVIDER_API_KEY

Setup steps

One command registers the provider and switches over to it:

export MCODE_PROVIDER_API_KEY="sk-your-API-Key"

mcode provider add \
  --name aicentos \
  --base-url https://aicentos.com/v1 \
  --api-format openai-completions \
  --model your-model-name \
  --api-key-env MCODE_PROVIDER_API_KEY \
  --use

--use means switch to this provider right after registering it. It writes the configuration into the custom_provider section of the current profile's config.yaml (the default data directory is ~/.minimax); the equivalent form:

custom_provider:
  aicentos:
    options:
      apiKey: sk-your-API-Key
      baseURL: https://aicentos.com/v1
    models:
      your-model-name: {}

Note that the key here is baseURL (capital URL), not base-url.

Test

mcode exec "Introduce yourself in one sentence"

A response from headless means the configuration is in effect. Then run one real task in the TUI, and finally check usage back in the console.

Notes

  • Custom models need the context and output limits given explicitly (--context-limit, --output-limit); otherwise it trims by the default values and long files are easily truncated.
  • The one-line install script does not support Alpine / musl; use npm in such environments.
  • When relaying through the Anthropic-compatible protocol, requests still carry x-api-key; if the upstream only accepts Authorization, you need to add a translation layer yourself.
  • Providers are stored per profile, so after switching profiles, re-confirm which one is in effect.