OpenCode adalah alat coding AI open source. Siapkan dan gunakan Coding Plan dengan OpenCode.
Install OpenCode
Instal atau perbarui Node.js (versi 18.0 atau lebih baru).
Di terminal Anda, instal OpenCode:
npm install -g opencode-aiVerifikasi instalasi. Jika nomor versi muncul, instalasi telah berhasil:
opencode -v
Set up Coding Plan
Buat dan buka file konfigurasi opencode.json di salah satu jalur berikut:
macOS atau Linux:
~/.config/opencode/opencode.jsonWindows:
C:\Users\<username>\.config\opencode\opencode.json
Tambahkan hal berikut:
baseURL: Atur kehttps://coding-intl.dashscope.aliyuncs.com/apps/anthropic/v1. Jangan gunakan titik akhir Model Studio umum.apiKey: GantiYOUR_API_KEYdengan API key Coding Plan Anda, dalam formatsk-sp-xxx.
Simpan file konfigurasi tersebut. Mulai ulang OpenCode untuk menerapkan pengaturan.
{
"$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
}
}
}
}
}
}Pengaturan budgetTokens mengontrol batas maksimum token untuk proses berpikir model. Menetapkannya terlalu rendah dapat mengganggu proses penalaran model.
Untuk MiniMax-M2.5, jumlahbudgetTokensdanoutputtidak boleh melebihi 32.768.
Use OpenCode
Di terminal Anda, jalankan OpenCode:
opencodeKetik /models, cari Model Studio Coding Plan, lalu pilih model untuk mulai menggunakannya.


FAQ
Lihat FAQ.