All Products
Search
Document Center

Alibaba Cloud Model Studio:OpenCode

Last Updated:Mar 30, 2026

Set up and use Coding Plan in OpenCode.

Install OpenCode

  1. Install or update Node.js to version 18.0 or later.

  2. To install OpenCode, run:

    npm install -g opencode-ai

    To verify the installation:

    opencode -v

Set up Coding Plan

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

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

  • Windows: C:\Users\YourUsername\.config\opencode\opencode.json

Add the following settings to the file:

  • Base URL: https://coding-intl.dashscope.aliyuncs.com/apps/anthropic/v1. Do not use the general Model Studio endpoint.

    Note

    The Base URL must end with /v1. Otherwise, a 404 Not Found error is returned.

  • API Key: Replace YOUR_API_KEY with your dedicated API key for Asia Pacific SE 1 (Singapore) for the Coding Plan. The key format is sk-sp-xxx.

After saving, restart OpenCode to apply the changes.

{
    "$schema": "https://opencode.ai/config.json",
    "provider": {
        "bailian-coding-plan": {
            "npm": "@ai-sdk/anthropic",
            "name": "Model Studio Coding Plan",
            "options": {
                "baseURL": "https://coding-intl.dashscope.aliyuncs.com/apps/anthropic/v1",
                "apiKey": "YOUR_API_KEY"
            },
            "models": {
                "qwen3.5-plus": {
                    "name": "Qwen3.5 Plus",
                    "modalities": {
                        "input": ["text", "image"],
                        "output": ["text"]
                    },
                    "options": {
                        "thinking": {
                            "type": "enabled",
                            "budgetTokens": 8192
                        }
                    },
                    "limit": {
                        "context": 1000000,
                        "output": 65536
                    }
                },
                "qwen3-max-2026-01-23": {
                    "name": "Qwen3 Max 2026-01-23",
                    "modalities": {
                        "input": ["text"],
                        "output": ["text"]
                    },
                    "limit": {
                        "context": 262144,
                        "output": 32768
                    }
                },
                "qwen3-coder-next": {
                    "name": "Qwen3 Coder Next",
                    "modalities": {
                        "input": ["text"],
                        "output": ["text"]
                    },
                    "limit": {
                        "context": 262144,
                        "output": 65536
                    }
                },
                "qwen3-coder-plus": {
                    "name": "Qwen3 Coder Plus",
                    "modalities": {
                        "input": ["text"],
                        "output": ["text"]
                    },
                    "limit": {
                        "context": 1000000,
                        "output": 65536
                    }
                },
                "MiniMax-M2.5": {
                    "name": "MiniMax M2.5",
                    "modalities": {
                        "input": ["text"],
                        "output": ["text"]
                    },
                    "options": {
                        "thinking": {
                            "type": "enabled",
                            "budgetTokens": 8192
                        }
                    },
                    "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
                    }
                },
                "glm-4.7": {
                    "name": "GLM-4.7",
                    "modalities": {
                        "input": ["text"],
                        "output": ["text"]
                    },
                    "options": {
                        "thinking": {
                            "type": "enabled",
                            "budgetTokens": 8192
                        }
                    },
                    "limit": {
                        "context": 202752,
                        "output": 16384
                    }
                },
                "kimi-k2.5": {
                    "name": "Kimi K2.5",
                    "modalities": {
                        "input": ["text", "image"],
                        "output": ["text"]
                    },
                    "options": {
                        "thinking": {
                            "type": "enabled",
                            "budgetTokens": 8192
                        }
                    },
                    "limit": {
                        "context": 262144,
                        "output": 32768
                    }
                }
            }
        }
    }
}
Note

budgetTokens controls the maximum token budget for the model's thinking process. Setting it too low may interrupt the process.

For MiniMax-M2.5, the sum of budgetTokens and output must be less than or equal to 32768.

Usage

To start OpenCode, run:

opencode

Enter /models, search for Model Studio Coding Plan, and select a model.

image

image

FAQ

See the FAQ.