Setup guide - From Qwen and Roo Code docs
Use Qwen in Roo Code
Roo Code documents an OpenAI Compatible provider (Base URL, API Key, Model). Model Studio documents its OpenAI-compatible base URLs and says any tool that accepts custom OpenAI-compatible endpoints is supported. Combine the two to use Qwen models in Roo Code.
Last verified 4 steps4 official sources
Steps
- Step 1.
Open Roo Code settings (gear icon) and set API Provider to "OpenAI Compatible".
- Step 2.
Base URL: enter the Model Studio OpenAI-compatible URL for your plan (pay-as-you-go shown, replace {WorkspaceId}; Beijing and US (Virginia) also available).
Snippethttps://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1 - Step 3.
Coding Plan alternative Base URL (use the Coding Plan dedicated key).
Snippethttps://coding-intl.dashscope.aliyuncs.com/v1 - Step 4.
API Key: enter the Model Studio key that matches the plan and region. Model: enter a Qwen model id such as qwen3.7-plus. Optionally set Max Output Tokens, Context Window and Image Support under Model Configuration.
Caveats
- Combined setup: Roo Code's documented OpenAI Compatible provider plus Model Studio's documented OpenAI-compatible base URLs (More tools page) and model ids (Coding Plan, Kilo and Codex pages). Neither side publishes a Roo-specific Model Studio guide.
- Roo Code uses native tool calling only; the selected model must support OpenAI-compatible tool calling.
- Roo Code also has a separate "Qwen Code CLI API" provider that reuses OAuth credentials from ~/.qwen/oauth_creds.json; its docs describe a free tier "available during a promotional period". That is a different path from a Model Studio API key.
- Roo Code docs now live in the Roo-Code repo under apps/docs.
More setup guides
Same tool, other providers
Related reading
- 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.
- Qwen-UI-Agent Points at the Next GUI Agent RuntimeQwen-UI-Agent, Alibaba's GUI agent report, reads best as a product spec: mobile, desktop, browser, CLI and DeepSearch combined in one stateful agent runtime.
- $500 RL Fine-Tune of a 9B Open Model Beat GPT-5.6 Sol and Claude Opus 4.8 on Catalog ReviewA $500 GRPO fine-tune of Qwen 3.5 9B beat GPT-5.6 Sol and Opus 4.8 on catalog review, hitting 97% accuracy at a fraction of the cost per listing.
FAQ
How do I use Qwen in Roo Code?
Roo Code documents an OpenAI Compatible provider (Base URL, API Key, Model). Model Studio documents its OpenAI-compatible base URLs and says any tool that accepts custom OpenAI-compatible endpoints is supported. Combine the two to use Qwen models in Roo Code.
Which Qwen model ids work in Roo Code?
The official docs read for this guide list qwen3.7-plus, qwen3.6-plus and qwen3.7-max. Requests go to https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1.
Is this an official Qwen and Roo Code setup?
The steps draw on both Qwen's and Roo Code's docs. It was last checked against 4 official pages on October 17, 2026.
Sources
Last verified against 4 official pages.
- github.comhttps://github.com/RooCodeInc/Roo-Code/blob/main/apps/docs/docs/providers/openai-compatible.md
- github.comhttps://github.com/RooCodeInc/Roo-Code-Docs/blob/main/docs/providers/qwen-code.md
- alibabacloud.comhttps://www.alibabacloud.com/help/en/model-studio/more-tools
- 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.