OpenClaw provider plugin that routes Qwen Code LLM calls through the locally installed Qwen Code CLI (qwen binary) instead of calling the DashScope API directly.
No API key needed in OpenClaw. Authentication is handled entirely by the Qwen Code CLI, which uses your existing DashScope / Alibaba Cloud credentials.
- OpenClaw >= 2026.3.24
- Qwen Code CLI installed and authenticated
# Install Qwen Code CLI
npm install -g @qwen-code/cli
# Authenticate
qwen loginopenclaw plugins install @richizo/openclaw-qwen-code-cliEnable the plugin in your ~/.openclaw/openclaw.json:
{
"agents": {
"defaults": {
"model": {
"primary": "qwen-code-cli/qwen-coder"
},
"models": {
"qwen-code-cli/qwen-coder": {},
"qwen-code-cli/qwen3-coder-plus": {}
}
}
},
"plugins": {
"entries": {
"qwen-code-cli": { "enabled": true }
}
}
}"qwen-code-cli": {
"enabled": true,
"config": {
"command": "/path/to/qwen", // default: "qwen" (resolved from PATH)
"timeoutMs": 120000 // default: 120000 (2 min)
}
}| Model ID | Description |
|---|---|
qwen-code-cli/qwen-coder |
Qwen Coder via CLI |
qwen-code-cli/qwen3-coder-plus |
Qwen3 Coder Plus via CLI (reasoning) |
The plugin uses --output-format json --yolo flags and parses the Qwen Code CLI's JSONL output, extracting the type:"result" event to get the response text and token usage.
The plugin extracts input_tokens and output_tokens from the CLI's JSON output and reports them back to OpenClaw for usage tracking.
The qwen binary may block on stdin when no TTY is attached. The plugin uses stdio: ["ignore", "pipe", "pipe"] to prevent this hang.
The plugin spawns qwen --output-format json --yolo --prompt "<prompt>" as a subprocess and parses the JSONL output.
OpenClaw agent → qwen-code-cli plugin → qwen subprocess → DashScope (via CLI auth)
MIT — see LICENSE