Gunakan model Alibaba Cloud Model Studio di OpenCode.
Mulai Cepat
- 1
Hubungkan penyedia
Jalankanopencode, masukkan/connect, pilih penyedia untuk paket penagihan Anda, lalu masukkan kunci API:- Token Plan
- Bayar sesuai penggunaan
- Coding Plan
Pilih Alibaba Token Plan (China) dan masukkan Token Plan API key sesuai edisi Anda:- Token Plan Personal Edition: Buat atau lihat API Key
- Token Plan Team Edition: Tetapkan kursi dan dapatkan API Key
Pilih Alibaba (China) dan masukkan kunci API Model Studio.Pilih Alibaba Coding Plan (China) dan masukkan kunci API Coding Plan. - 2
Pilih model
Masukkan/modelsdan pilih model yang Anda inginkan. - 3
Verifikasi
Jalankan perintah berikut untuk memverifikasi:Copyopencode run "Hello"
Konfigurasikan dengan File Konfigurasi
Selain opsi di atas, Anda juga dapat terhubung menggunakan file konfigurasi.- 1
Buka atau buat file konfigurasi
- macOS / Linux:
~/.config/opencode/opencode.json - Windows:
C:\Users\<username>\.config\opencode\opencode.json
- macOS / Linux:
- 2
Tulis konfigurasi
GantiYOUR_API_KEYdengan kunci API untuk paket Anda.- Token Plan Edisi Personal
- Token Plan Edisi Tim
- Bayar sesuai penggunaan
- Coding Plan
Copy{ "$schema": "https://opencode.ai/config.json", "provider": { "bailian-token-plan": { "npm": "@ai-sdk/anthropic", "name": "Alibaba Cloud Model Studio", "options": { "baseURL": "https://token-plan.ap-southeast-1.maas.aliyuncs.com/apps/anthropic/v1", "apiKey": "YOUR_API_KEY" }, "models": { "auto": { "name": "Auto", "modalities": { "input": [ "text" ], "output": [ "text" ] }, "limit": { "context": 1000000, "output": 393216 } }, "qwen4-max-preview": { "name": "Qwen4.0 Max Preview", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] }, "limit": { "context": 1000000, "output": 131072 } }, "qwen4-max": { "name": "Qwen4 Max", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] }, "limit": { "context": 1000000, "output": 262144 } }, "qwen3.8-max": { "name": "Qwen3.8 Max", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] }, "limit": { "context": 1000000, "output": 131072 } }, "qwen3.8-flash": { "name": "Qwen3.8 Flash", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] }, "limit": { "context": 1000000, "output": 131072 } }, "qwen3.7-max": { "name": "Qwen3.7 Max", "modalities": { "input": [ "text" ], "output": [ "text" ] }, "limit": { "context": 1000000, "output": 65536 } }, "qwen3.7-plus": { "name": "Qwen3.7 Plus", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] }, "limit": { "context": 1000000, "output": 65536 } }, "qwen3.6-flash": { "name": "Qwen3.6 Flash", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] }, "limit": { "context": 1000000, "output": 65536 } }, "deepseek-v4.1-flash": { "name": "DeepSeek V4.1 Flash", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] }, "limit": { "context": 1000000, "output": 65536 } }, "deepseek-v4.1-flash-1017": { "name": "DeepSeek V4.1 Flash 1017", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] }, "limit": { "context": 1000000, "output": 65536 } }, "deepseek-v4-pro": { "name": "DeepSeek V4 Pro", "modalities": { "input": [ "text" ], "output": [ "text" ] }, "limit": { "context": 1000000, "output": 65536 } }, "deepseek-v4-pro-0813": { "name": "DeepSeek V4 Pro 0813", "modalities": { "input": [ "text" ], "output": [ "text" ] }, "limit": { "context": 1000000, "output": 65536 } }, "deepseek-v4-flash-0731": { "name": "DeepSeek V4 Flash 0731", "modalities": { "input": [ "text" ], "output": [ "text" ] }, "limit": { "context": 1000000, "output": 65536 } }, "glm-5.3": { "name": "GLM-5.3", "modalities": { "input": [ "text" ], "output": [ "text" ] }, "limit": { "context": 202752, "output": 16384 } }, "glm-5.2": { "name": "GLM-5.2", "modalities": { "input": [ "text" ], "output": [ "text" ] }, "limit": { "context": 202752, "output": 16384 } } } } } }Copy{ "$schema": "https://opencode.ai/config.json", "provider": { "bailian-token-plan": { "npm": "@ai-sdk/anthropic", "name": "Alibaba Cloud Model Studio", "options": { "baseURL": "https://token-plan.ap-southeast-1.maas.aliyuncs.com/apps/anthropic/v1", "apiKey": "YOUR_API_KEY" }, "models": { "auto": { "name": "Auto", "modalities": { "input": [ "text" ], "output": [ "text" ] }, "limit": { "context": 1000000, "output": 393216 } }, "qwen4-max-preview": { "name": "Qwen4.0 Max Preview", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] }, "limit": { "context": 1000000, "output": 131072 } }, "qwen4-max": { "name": "Qwen4 Max", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] }, "limit": { "context": 1000000, "output": 262144 } }, "qwen3.8-max": { "name": "Qwen3.8 Max", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] }, "limit": { "context": 1000000, "output": 131072 } }, "qwen3.8-flash": { "name": "Qwen3.8 Flash", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] }, "limit": { "context": 1000000, "output": 131072 } }, "qwen3.7-max": { "name": "Qwen3.7 Max", "modalities": { "input": [ "text" ], "output": [ "text" ] }, "limit": { "context": 1000000, "output": 65536 } }, "qwen3.7-plus": { "name": "Qwen3.7 Plus", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] }, "limit": { "context": 1000000, "output": 65536 } }, "qwen3.6-plus": { "name": "Qwen3.6 Plus", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] }, "limit": { "context": 1000000, "output": 65536 } }, "qwen3.6-flash": { "name": "Qwen3.6 Flash", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] }, "limit": { "context": 1000000, "output": 65536 } }, "deepseek-v4.1-flash": { "name": "DeepSeek V4.1 Flash", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] }, "limit": { "context": 1000000, "output": 65536 } }, "deepseek-v4.1-flash-1017": { "name": "DeepSeek V4.1 Flash 1017", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] }, "limit": { "context": 1000000, "output": 65536 } }, "deepseek-v4-pro": { "name": "DeepSeek V4 Pro", "modalities": { "input": [ "text" ], "output": [ "text" ] }, "limit": { "context": 1000000, "output": 65536 } }, "deepseek-v4-pro-0813": { "name": "DeepSeek V4 Pro 0813", "modalities": { "input": [ "text" ], "output": [ "text" ] }, "limit": { "context": 1000000, "output": 65536 } }, "deepseek-v4-flash-0731": { "name": "DeepSeek V4 Flash 0731", "modalities": { "input": [ "text" ], "output": [ "text" ] }, "limit": { "context": 1000000, "output": 65536 } }, "kimi-k2.7-code": { "name": "Kimi K2.7 Code", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] }, "limit": { "context": 262144, "output": 98304 } }, "kimi-k2.6": { "name": "Kimi K2.6", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] }, "limit": { "context": 262144, "output": 98304 } }, "kimi-k2.5": { "name": "Kimi K2.5", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] }, "limit": { "context": 262144, "output": 98304 } }, "glm-5.3": { "name": "GLM-5.3", "modalities": { "input": [ "text" ], "output": [ "text" ] }, "limit": { "context": 202752, "output": 16384 } }, "glm-5.2": { "name": "GLM-5.2", "modalities": { "input": [ "text" ], "output": [ "text" ] }, "limit": { "context": 202752, "output": 16384 } }, "glm-5.1": { "name": "GLM-5.1", "modalities": { "input": [ "text" ], "output": [ "text" ] }, "limit": { "context": 202752, "output": 16384 } }, "glm-5": { "name": "GLM-5", "modalities": { "input": [ "text" ], "output": [ "text" ] }, "limit": { "context": 202752, "output": 16384 } }, "MiniMax-M2.5": { "name": "MiniMax M2.5", "modalities": { "input": [ "text" ], "output": [ "text" ] }, "limit": { "context": 196608, "output": 32768 } } } } } }Ganti{WorkspaceId}dengan ID Workspace Anda yang sebenarnya.Copy{ "$schema": "https://opencode.ai/config.json", "provider": { "bailian-payg": { "npm": "@ai-sdk/anthropic", "name": "Alibaba Cloud Model Studio", "options": { "baseURL": "https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/apps/anthropic/v1", "apiKey": "YOUR_API_KEY" }, "models": { "qwen3.8-max": { "name": "Qwen3.8 Max", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] }, "limit": { "context": 1000000, "output": 131072 } }, "qwen3.7-plus": { "name": "Qwen3.7 Plus", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] }, "limit": { "context": 1000000, "output": 65536 } }, "qwen3.8-flash": { "name": "Qwen3.8 Flash", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] }, "limit": { "context": 1000000, "output": 131072 } }, "deepseek-v4-pro-0813": { "name": "DeepSeek V4 Pro 0813", "modalities": { "input": [ "text" ], "output": [ "text" ] }, "limit": { "context": 1000000, "output": 65536 } }, "deepseek-v4.1-flash": { "name": "DeepSeek V4.1 Flash", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] }, "limit": { "context": 1000000, "output": 65536 } } } } } }Copy{ "$schema": "https://opencode.ai/config.json", "provider": { "bailian-coding-plan": { "npm": "@ai-sdk/anthropic", "name": "Alibaba Cloud Model Studio", "options": { "baseURL": "https://coding-intl.dashscope.aliyuncs.com/apps/anthropic/v1", "apiKey": "YOUR_API_KEY" }, "models": { "qwen3.7-plus": { "name": "Qwen3.7 Plus", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] }, "limit": { "context": 1000000, "output": 65536 } }, "qwen3.6-plus": { "name": "Qwen3.6 Plus", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] }, "limit": { "context": 1000000, "output": 65536 } }, "kimi-k2.5": { "name": "Kimi K2.5", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] }, "limit": { "context": 262144, "output": 98304 } }, "glm-5": { "name": "GLM-5", "modalities": { "input": [ "text" ], "output": [ "text" ] }, "limit": { "context": 202752, "output": 16384 } }, "MiniMax-M2.5": { "name": "MiniMax M2.5", "modalities": { "input": [ "text" ], "output": [ "text" ] }, "limit": { "context": 196608, "output": 32768 } }, "qwen3.5-plus": { "name": "Qwen3.5 Plus", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] }, "limit": { "context": 1000000, "output": 65536 } } } } } }Saat menggunakan qwen4-max-preview, batas output per permintaan secara default adalah 32000. Untuk menghasilkan output yang lebih panjang, aturOPENCODE_EXPERIMENTAL_OUTPUT_TOKEN_MAX.Saat menggunakan qwen4-max, batas output per permintaan defaultnya adalah 32000. Untuk output yang lebih panjang, setelOPENCODE_EXPERIMENTAL_OUTPUT_TOKEN_MAX. qwen4-max memiliki konteks 1M Token. Output maksimum adalah 131.072 Token dalam mode non-thinking dan 262.144 Token untuk thinking dan jawaban akhir secara gabungan. Nilai default adalah reasoning_effort=high dan thinking_budget=131072.
Kode Error
Jika Anda mengalami error selama konfigurasi, lihat dokumentasi FAQ untuk paket penagihan Anda:- Token Plan: FAQ Personal Edition · FAQ Team Edition
- Pay-as-you-go: Kode error
- Coding Plan: FAQ Coding Plan
FAQ
Bagaimana cara menggunakan paket penghematan dengan pay-as-you-go?
Bagaimana cara menggunakan paket penghematan dengan pay-as-you-go?
Pengaturan pay-as-you-go tetap sama: gunakan API key Model Studio umum dan Base URL. Setelah membeli paket penghematan, paket berlaku otomatis dan penggunaan yang memenuhi syarat dipotong secara otomatis. Lihat Paket penghematan.
Model yang saya butuhkan tidak ada dalam daftar
Model yang saya butuhkan tidak ada dalam daftar
Tingkatkan OpenCode ke versi terbaru, lalu periksa
/models lagi. Jika model masih tidak ada, tentukan penyedia kustom di opencode.json dan tambahkan model tersebut. Permintaan mengembalikan 401 Unauthorized
Permintaan mengembalikan 401 Unauthorized
Kunci API tidak cocok dengan penyedia yang dipilih, atau kunci tersebut milik paket penagihan lain. Jalankan
/connect lagi, pilih penyedia untuk paket Anda, dan masukkan kunci yang benar.