All Products
Search
Document Center

Alibaba Cloud Model Studio:OpenCode

Last Updated:Apr 30, 2026

Configure and use the Alibaba Cloud Model Studio Token Plan Team Edition in OpenCode.

Install OpenCode

  1. Install or update Node.js (v18.0 or later).

  2. Run the following command in a terminal to install OpenCode.

    npm install -g opencode-ai

    Run the following command in the terminal. If a version number is returned, the installation is successful.

    opencode -v

Configure the Token Plan Team Edition

Create and open the configuration file opencode.json at one of the following paths:

  • macOS / Linux: ~/.config/opencode/opencode.json

  • Windows: C:\Users\<Your-Username>\.config\opencode\opencode.json

Add the following configuration to the file. Key configuration items:

  • Base URL: https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1. Do not use endpoints from other plans.

  • API Key: Replace YOUR_API_KEY with the dedicated API Key for the Token Plan Team Edition.

After saving the configuration file, exit and restart OpenCode for the new configuration to take effect.

{
    "$schema": "https://opencode.ai/config.json",
    "provider": {
        "bailian-token-plan": {
            "npm": "@ai-sdk/openai-compatible",
            "name": "Model Studio Token Plan Team Edition",
            "options": {
                "baseURL": "https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",
                "apiKey": "YOUR_API_KEY"
            },
            "models": {
                "qwen3.6-plus": {
                    "name": "Qwen3.6 Plus",
                    "modalities": {
                        "input": ["text", "image"],
                        "output": ["text"]
                    },
                    "options": {
                        "thinking": {
                            "type": "enabled",
                            "budgetTokens": 8192
                        }
                    },
                    "limit": {
                        "context": 1000000,
                        "output": 65536
                    }
                },
                "MiniMax-M2.5": {
                    "name": "MiniMax M2.5",
                    "modalities": {
                        "input": ["text"],
                        "output": ["text"]
                    },
                    "limit": {
                        "context": 196608,
                        "output": 24576
                    }
                },
                "glm-5": {
                    "name": "GLM-5",
                    "modalities": {
                        "input": ["text"],
                        "output": ["text"]
                    },
                    "options": {
                        "thinking": {
                            "type": "enabled",
                            "budgetTokens": 8192
                        }
                    },
                    "limit": {
                        "context": 202752,
                        "output": 16384
                    }
                },
                "deepseek-v3.2": {
                    "name": "DeepSeek V3.2",
                    "modalities": {
                        "input": ["text"],
                        "output": ["text"]
                    },
                    "limit": {
                        "context": 131072,
                        "output": 16384
                    }
                }
            }
        }
    }
}
Note

budgetTokens controls the maximum token budget for the model's thinking process. Setting this value too low may cause the thinking process to be interrupted.

Use OpenCode

Run the following command in the terminal to start OpenCode.

opencode

In the command line, enter /models, search for Model Studio Token Plan Team Edition, select a model, and start using it.

Note

Image generation models use a separate API and must be integrated through extension mechanisms. See Integrate multimodal generation models.

FAQ

See FAQ.