Setup guide - Documented by Qwen
Use Qwen in Kilo Code
Model Studio documents Kilo CLI, the command-line client for Kilo Code, two ways: the built-in /connect providers (Alibaba (China) for pay-as-you-go, Alibaba Coding Plan (China), Alibaba Token Plan (China)), or a custom provider in ~/.config/kilo/config.json that uses @ai-sdk/anthropic against Model Studio's Anthropic-compatible endpoint (/apps/anthropic/v1) for all three plans.
Last verified 8 steps2 official sources
Steps
- Step 1.
Start Kilo CLI.
Terminalkilo - Step 2.
Enter /connect, select the provider for your billing plan, and enter the API key: Alibaba (China) with your Model Studio API key, Alibaba Coding Plan (China) with your Coding Plan API key, or Alibaba Token Plan (China) with your Token Plan API key.
Snippet/connect - Step 3.
Enter /models and select the model you want.
Snippet/models - Step 4.
Verify.
Terminalkilo run "Hello" - Step 5.
Config file alternative: open or create ~/.config/kilo/config.json (Windows: C:\Users\<username>\.config\kilo\config.json). Pay-as-you-go example (replace YOUR_API_KEY and {WorkspaceId}; the Alibaba example also lists deepseek-v4-pro-0813 and deepseek-v4.1-flash):
JSON{ "$schema": "https://kilo.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"] } }, "qwen3.7-plus": { "name": "Qwen3.7 Plus", "modalities": { "input": ["text", "image"], "output": ["text"] } }, "qwen3.8-flash": { "name": "Qwen3.8 Flash", "modalities": { "input": ["text", "image"], "output": ["text"] } } } } } } - Step 6.
Coding Plan alternative: provider bailian-coding-plan with "npm": "@ai-sdk/anthropic" and the baseURL below, using the Coding Plan key (models qwen3.7-plus, qwen3.6-plus, kimi-k2.5, glm-5, MiniMax-M2.5, qwen3.5-plus).
JSON"options": { "baseURL": "https://coding-intl.dashscope.aliyuncs.com/apps/anthropic/v1", "apiKey": "YOUR_API_KEY" } - Step 7.
Token Plan alternative: provider bailian-token-plan with "npm": "@ai-sdk/anthropic" and the baseURL below (models include auto, qwen3.8-max, qwen3.8-flash, qwen3.7-max, qwen3.7-plus, qwen3.6-flash; the Team Edition example adds qwen3.6-plus).
JSON"options": { "baseURL": "https://token-plan.ap-southeast-1.maas.aliyuncs.com/apps/anthropic/v1", "apiKey": "YOUR_API_KEY" } - Step 8.
Verify the config file setup, replacing <provider>/<model> with your provider and model (for example bailian-token-plan/auto).
Terminalkilo run "Hello" -m <provider>/<model>
Caveats
- The Alibaba guide covers Kilo CLI specifically, not the Kilo Code IDE extension.
- The config-file examples store the API key inline in config.json.
- Requests returning 401 Unauthorized mean the API key does not match the baseURL or belongs to another billing plan.
- A model missing from the list can be added to models in config.json in the same format; replace {WorkspaceId} in the pay-as-you-go baseURL.
More setup guides
Same tool, other providers
Related reading
- Qwen4-Max: Pricing, Benchmarks and What to TestQwen4-Max is live on QwenCloud at $1.50 input and $4.50 output per million tokens, down from $2 and $6 for Qwen3.8-Max. What is vendor-reported, what is missing, and a test plan.
- GVS5H: Can Qwen3.8-27B Match Fable 5 on Coding?GVS5H claims five Qwen3.8-27B instances match Fable 5 on LiveCodeBench Hard. What the harness does, why Hacker News doubts the benchmark, and what to copy.
- Run Qwen3.8-Flash-Next on a Gaming PC With StrataRun Qwen3.8-Flash-Next locally with Strata on a 12 GB GPU: hardware needs, speeds by quant, the license catch, and when the hosted API is the better call.
- Terminal-Universe Turns Agent Traces Into Training EnvironmentsTerminal-Universe, Qwen's paper on rebuilding terminal-agent trajectories into reusable environments, and why agent teams should keep replayable workspaces.
- Qwen3.8-27B vs Opus 4.6 Max: Local Agentic Coding BenchmarksQwen3.8-27B is a 27B dense Apache-2.0 model that beats Opus 4.6 Max on SWE-bench Pro (61.7 vs 53.4). Benchmarks, hardware, cost and when to run it.
- Qwen 3.8 Max Ships: 2.4T MoE, 1M Context, $2/$6 per MTok, Open Weights Next WeekQwen 3.8 Max is a 2.4T-parameter MoE with 95B active, a 1M context window and $2/$6 per million tokens on QwenCloud, with open weights promised next week.
FAQ
How do I use Qwen in Kilo Code?
Model Studio documents Kilo CLI, the command-line client for Kilo Code, two ways: the built-in /connect providers (Alibaba (China) for pay-as-you-go, Alibaba Coding Plan (China), Alibaba Token Plan (China)), or a custom provider in ~/.config/kilo/config.json that uses @ai-sdk/anthropic against Model Studio's Anthropic-compatible endpoint (/apps/anthropic/v1) for all three plans.
Which Qwen model ids work in Kilo Code?
The official docs read for this guide list qwen3.8-max, qwen3.7-plus, qwen3.8-flash, qwen3.6-plus, qwen3.5-plus, qwen3.7-max, qwen3.6-flash and auto. Requests go to https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/apps/anthropic/v1.
Is this an official Qwen and Kilo Code setup?
Qwen documents this setup in its own docs. It was last checked against 2 official pages on November 8, 2026.
Sources
Last verified against 2 official pages.
- alibabacloud.comhttps://www.alibabacloud.com/help/en/model-studio/kilo-cli
- alibabacloud.comhttps://www.alibabacloud.com/help/en/model-studio/coding-plan
Newsletter
New models, set up the day they ship
One email per week. New model releases, the coding tools that support them and how to wire them up.