Qwen
Alibaba Qwen AI assistant integration via qwen-code CLI.
Installation
Prerequisites
Ensure you have Node.js version 20 or higher installed.
Global Installation (Recommended)
Local Project Installation
Usage
After installation, start Qwen Code by running:
Notes
- Token Usage: Qwen Code may issue multiple API calls per cycle, resulting in higher token usage
- Free Options:
- ModelScope: 2,000 free API calls/day (mainland China)
- OpenRouter: Up to 1,000 free API calls/day (worldwide)
Usage
Configuration
Qwen uses environment variables for configuration.
Required Environment Variables
OPENAI_API_KEY
- Set to your DASHSCOPE_API_KEYOPENAI_BASE_URL
- Defaults tohttps://dashscope-intl.aliyuncs.com/compatible-mode/v1
OPENAI_MODEL
- Defaults toqwen3-coder-plus
Setting Up
# Export your Dashscope API key
export OPENAI_API_KEY="your-dashscope-api-key"
# Or set DASHSCOPE_API_KEY (will be used as OPENAI_API_KEY)
export DASHSCOPE_API_KEY="your-dashscope-api-key"
Config File
While Qwen primarily uses environment variables, you can still use Metacoder config:
Available Models
qwen3-coder-plus
(default)- Other Qwen models as supported by Dashscope API
Notes
- Qwen CLI doesn't provide structured output like some other coders
- Cost information is not available through the CLI