Panduan ini menjelaskan cara mengkonfigurasi claw-code untuk menggunakan Qwen (via Alibaba Cloud DashScope atau Coding Plan) sebagai alternatif Claude API.
- API Key dari Alibaba Cloud (DashScope atau Coding Plan)
- Python 3.8+ untuk Python client
- Internet connection untuk akses API
Coding Plan adalah API khusus untuk coding assistant dengan endpoint yang kompatibel dengan OpenAI dan Anthropic.
- Kunjungi Alibaba Cloud Coding Plan
- Login atau daftar akun Alibaba Cloud
- Aktifkan service Coding Plan
- Buat API Key di dashboard
Coding Plan Endpoints:
| Mode | Endpoint | Protocol |
|---|---|---|
| OpenAI-compatible | https://coding-intl.dashscope.aliyuncs.com/v1 |
OpenAI API format |
| Anthropic-compatible | https://coding-intl.dashscope.aliyuncs.com/apps/anthropic |
Anthropic API format |
- Kunjungi Alibaba Cloud DashScope
- Login atau daftar akun Alibaba Cloud
- Buka API Key Management
- Klik Create New API Key
- Copy dan simpan API key Anda
# Linux / macOS
export QWEN_API_KEY="your-api-key-here"
export QWEN_API_MODE="openai"
export QWEN_BASE_URL="https://coding-intl.dashscope.aliyuncs.com/v1"
export QWEN_MODEL="qwen-coder-plus" # atau model coding lainnya# Linux / macOS
export QWEN_API_KEY="your-api-key-here"
export QWEN_API_MODE="anthropic"
export QWEN_BASE_URL="https://coding-intl.dashscope.aliyuncs.com/apps/anthropic"
export QWEN_MODEL="qwen-coder-plus"# Linux / macOS
export QWEN_API_KEY="your-api-key-here"
export QWEN_API_MODE="dashscope"
export QWEN_BASE_URL="https://dashscope.aliyuncs.com/api/v1"
export QWEN_MODEL="qwen-max"$env:QWEN_API_KEY="your-api-key-here"
$env:QWEN_API_MODE="openai"
$env:QWEN_BASE_URL="https://coding-intl.dashscope.aliyuncs.com/v1"
$env:QWEN_MODEL="qwen-coder-plus"set QWEN_API_KEY=your-api-key-here
set QWEN_API_MODE=openai
set QWEN_BASE_URL=https://coding-intl.dashscope.aliyuncs.com/v1
set QWEN_MODEL=qwen-coder-pluscd claw-codes
python -m src.main summaryOutput akan menampilkan Active Provider: qwen jika API key terdeteksi.
# Menggunakan Qwen (otomatis jika QWEN_API_KEY set)
python -m src.main turn-loop "Jelaskan struktur project ini" --max-turns 2
# Explicit memilih provider
python -m src.main turn-loop "Hello" --provider qwen
python -m src.main turn-loop "Hello" --provider claudeAlibaba Cloud Coding Plan offers the latest and most powerful programming models. With its powerful Coding Agent, you can switch between models on demand.
Your current plan supports these models:
| Brand | Model | Capabilities |
|---|---|---|
| Qwen | qwen3.5-plus |
Text Generation, Deep Thinking, Visual Understanding |
qwen3-max-2026-01-23 |
Text Generation, Deep Thinking | |
qwen3-coder-next |
Text Generation | |
qwen3-coder-plus |
Text Generation | |
| Zhipu | glm-5 |
Text Generation, Deep Thinking |
glm-4.7 |
Text Generation, Deep Thinking | |
| Kimi | kimi-k2.5 |
Text Generation, Deep Thinking, Visual Understanding |
| MiniMax | MiniMax-M2.5 |
Text Generation, Deep Thinking |
| Model | Best For |
|---|---|
qwen3-coder-plus |
Complex coding tasks, multi-file refactoring |
qwen3-coder-next |
Fast code completion, quick fixes |
qwen3.5-plus |
General purpose with visual understanding |
glm-5 |
Alternative for complex reasoning tasks |
# Cek apakah environment variable ter-set
echo $QWEN_API_KEY # Linux/macOS
echo %QWEN_API_KEY% # Windows CMD
echo $env:QWEN_API_KEY # PowerShell- Pastikan internet connection aktif
- Cek firewall/proxy settings
- Verify base URL benar
- Pastikan API key tidak ada typo
- Cek apakah API key sudah activated di dashboard
- Pastikan ada quota/credit yang cukup
| Model | Input (per 1K tokens) | Output (per 1K tokens) |
|---|---|---|
| qwen-turbo | ~$0.0003 | ~$0.0006 |
| qwen-plus | ~$0.001 | ~$0.002 |
| qwen-max | ~$0.003 | ~$0.006 |
Harga approximate, cek official pricing untuk update terbaru
Test koneksi ke Qwen API:
python -c "
from src.qwen_client import QwenClient, QwenRequest, QwenMessage
try:
client = QwenClient.from_env()
request = QwenRequest(messages=[QwenMessage(role='user', content='Hello')])
response = client.send_message(request)
print(f'Connected! Model: {response.model}')
print(f'Response: {response.content}')
except Exception as e:
print(f'Error: {e}')
"| Feature | Claude (Anthropic) | Qwen (Alibaba) |
|---|---|---|
| Context Window | 200K tokens | Up to 256K tokens |
| Max Output | 8K tokens | 8K tokens |
| Multilingual | Excellent | Excellent (strong in Chinese) |
| Code Generation | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐ |
| API Latency | ~500ms-2s | ~300ms-1.5s |
| Pricing | $$ | $ |
Happy coding with claw-code + Qwen! 🚀