Documentation Index
Fetch the complete documentation index at: https://platform.minimax.io/docs/llms.txt
Use this file to discover all available pages before exploring further.
Install OpenCode
- Use
curl to install the OpenCode
curl -fsSL https://opencode.ai/install | bash
- Use
npm to install the OpenCode
For more information, please refer to the OpenCode website
Use Built-in MiniMax-M2.7 Model
Run Authentication Command
Select Provider
When prompted to select a provider, search and select MiniMax(minimax.io)
Enter API Key
When prompted, enter your MiniMax API Key
Start Using
Return to the command line and enter opencode to start using MiniMax-M2.7
Alternative Configuration Method:
Edit Configuration File
Edit the OpenCode configuration file located at ~/.config/opencode/opencode.json, and add the following configuration:Important: Clear Anthropic Environment Variables Before ConfigurationBefore configuring, ensure you clear the following Anthropic-related environment variables to avoid conflicts with MiniMax API:
ANTHROPIC_AUTH_TOKEN
ANTHROPIC_BASE_URL
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"minimax": {
"npm": "@ai-sdk/anthropic",
"options": {
"baseURL": "https://api.minimax.io/anthropic/v1",
"apiKey": "<MINIMAX_API_KEY> (Optional)"
},
"models": {
"MiniMax-M2.7": {
"name": "MiniMax-M2.7"
}
}
}
}
}
Start OpenCode
Navigate to your project directory and start opencodecd /path/to/your/project
opencode
Select Model
Enter /models, select the “MiniMax-M2.7” model to start using it in OpenCode