Qwen Cloud Plugin for OpenClaw: Setup and Usage
Learn how to configure and use the Qwen Cloud plugin in OpenClaw, including API keys, supported models, and compatibility with Alibaba DashScope and Token Plan endpoints.
Read this when
- You want to use Qwen with OpenClaw
- You have an Alibaba Cloud Token Plan subscription
Qwen Cloud is an official external provider plugin for OpenClaw, identified canonically as qwen. It supports Qwen Cloud and Alibaba DashScope Standard and Coding Plan endpoints, exposes Token Plan under qwen-token-plan, retains modelstudio as a compatibility alias, and manages Alibaba's documented bailian-token-plan custom-provider id independently.
| Property | Value |
|---|---|
| Provider | qwen |
| Token Plan provider | qwen-token-plan |
| Preferred env var | QWEN_API_KEY |
| Token Plan env var | QWEN_TOKEN_PLAN_API_KEY |
| Also accepted (compat) | MODELSTUDIO_API_KEY, DASHSCOPE_API_KEY |
| API style | OpenAI-compatible |
Tip
Both
qwen3.7-plusandqwen3.6-plusfunction with Coding Plan and Standard endpoints. When working withqwen3.8-maxorqwen3.8-flash, opt for Standard (pay-as-you-go) or Token Plan. The older Coding Plan lacks these models.qwen3.7-maxandqwen3.6-flashlikewise demand Standard or Token Plan.
Install plugin
qwen comes as an official external plugin, separate from the core bundle. After installation, restart Gateway:
openclaw plugins install @openclaw/qwen-provider
openclaw gateway restart
Getting started
Pick your plan type and proceed with the configuration steps.
Coding Plan (subscription)
Best for: subscription-based access through the Qwen Coding Plan.
Get your API key
Generate or duplicate an API key from home.qwencloud.com/api-keys.
Run onboarding
When using the Global endpoint:
openclaw onboard --auth-choice qwen-api-key
When using the China endpoint:
openclaw onboard --auth-choice qwen-api-key-cn
Set a default model
{
agents: {
defaults: {
model: { primary: "qwen/qwen3.5-plus" },
},
},
}
Verify the model is available
openclaw models list --provider qwen
Note
Older
modelstudio-*auth-choice ids andmodelstudio/...model refs remain functional as compatibility aliases, though new setup flows should adopt the canonicalqwen-*auth-choice ids andqwen/...model refs. Should you define an exact custommodels.providers.modelstudioentry with a differentapivalue, that custom provider takes ownership ofmodelstudio/...refs instead of the Qwen compatibility alias.
Standard (pay-as-you-go)
Best for: pay-as-you-go access through the Standard Model Studio endpoint, covering qwen3.8-max and qwen3.8-flash, which the older Coding Plan does not offer.
Get your API key
Generate or duplicate an API key from home.qwencloud.com/api-keys.
Run onboarding
When using the Global endpoint:
openclaw onboard --auth-choice qwen-standard-api-key
When using the China endpoint:
openclaw onboard --auth-choice qwen-standard-api-key-cn
Set a default model
{
agents: {
defaults: {
model: { primary: "qwen/qwen3.5-plus" },
},
},
}
Verify the model is available
openclaw models list --provider qwen
Note
Older
modelstudio-*auth-choice ids andmodelstudio/...model refs remain functional as compatibility aliases, though new setup flows should adopt the canonicalqwen-*auth-choice ids andqwen/...model refs. Should you define an exact custommodels.providers.modelstudioentry with a differentapivalue, that custom provider takes ownership ofmodelstudio/...refs instead of the Qwen compatibility alias.
Token Plan (Team Edition)
Best for: credit-based team subscription access to Qwen and supported third-party models via Alibaba Cloud Model Studio.
Get your dedicated key
Assign a Token Plan seat and generate its dedicated sk-sp-... key. Token Plan, Coding Plan, and pay-as-you-go keys cannot be used interchangeably. Consult the Global Token Plan overview or China Token Plan overview.
Run onboarding
When using the Global / International endpoint in Singapore:
openclaw onboard --auth-choice qwen-token-plan
For the China endpoint located in Beijing:
openclaw onboard --auth-choice qwen-token-plan-cn
Verify the provider
openclaw models list --provider qwen-token-plan
openclaw agent --model qwen-token-plan/qwen3.7-plus --message "Reply with: token plan ready"
Note
Alibaba's OpenClaw documentation references
bailian-token-planwhen setting up a custom provider manually. While the plugin claims that id for compatibility purposes, fresh configurations ought to rely onqwen-token-plan. A dedicated custommodels.providers.bailian-token-planentry retains authority over its own transport and catalog, and it never gets folded into the standard OpenAI catalog.
Warning
Token Plan is meant solely for interactive OpenClaw sessions. Avoid picking it for scheduled jobs, headless scripts, or server-side applications. According to Alibaba, running it non-interactively may lead to a suspended subscription or a revoked API key.
Plan types and endpoints
| Plan | Region | Auth choice | Endpoint |
|---|---|---|---|
| Coding Plan (subscription) | China | qwen-api-key-cn | coding.dashscope.aliyuncs.com/v1 |
| Coding Plan (subscription) | Global | qwen-api-key | coding-intl.dashscope.aliyuncs.com/v1 |
| Standard (pay-as-you-go) | China | qwen-standard-api-key-cn | dashscope.aliyuncs.com/compatible-mode/v1 |
| Standard (pay-as-you-go) | Global | qwen-standard-api-key | dashscope-intl.aliyuncs.com/compatible-mode/v1 |
| Token Plan (Team Edition) | China | qwen-token-plan-cn | token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1 |
| Token Plan (Team Edition) | Global | qwen-token-plan | token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1 |
The endpoint gets picked automatically by the provider, driven by your chosen
auth method. Standard choices fall under the qwen-* family; modelstudio-* is kept
around strictly for backward compatibility. To override, supply a custom
baseUrl in your config.
Tip
Manage keys: home.qwencloud.com/api-keys | Docs: docs.qwencloud.com
Built-in catalog
Model discovery in OpenClaw relies on the authenticated /models
API exposed by the configured endpoint. For offline scenarios or endpoints that
only hand back model IDs, the plugin keeps a fixed set of seed metadata. Coding
Plan setups leave out models that the plan does not cover, and a Standard model
list does not imply Token Plan or Coding Plan access.
| Model ref | Input | Context | Notes |
|---|---|---|---|
qwen/qwen3.5-plus | text, image | 1,000,000 | Default model |
qwen/qwen3.6-flash | text, image | 1,000,000 | Standard endpoints only |
qwen/qwen3.6-plus | text, image | 1,000,000 | Coding Plan + Standard |
qwen/qwen3.7-max | text | 1,000,000 | Standard endpoints only |
qwen/qwen3.7-plus | text, image | 1,000,000 | Coding Plan + Standard |
qwen/qwen3.8-max | text, image | 1,000,000 | Standard endpoints only |
qwen/qwen3.8-flash | text, image | 1,000,000 | Standard endpoints only |
qwen/qwen3-max-2026-01-23 | text | 262,144 | Qwen Max line |
qwen/qwen3-coder-next | text | 262,144 | Coding |
qwen/qwen3-coder-plus | text | 1,000,000 | Coding |
qwen/MiniMax-M2.5 | text | 1,000,000 | Reasoning enabled |
qwen/glm-5 | text | 202,752 | GLM |
qwen/glm-4.7 | text | 202,752 | GLM |
qwen/kimi-k2.5 | text, image | 262,144 | Moonshot AI via Alibaba |
Note
Even when a model shows up in the seed catalog, actual availability may differ depending on the endpoint and billing plan. Chat models that the endpoint returns beyond the seed list can show up without any plugin update. For models hosted locally, follow the Ollama or LM Studio discovery flow.
Token Plan catalog
Token Plan enforces its own exact-string allowlist. The built-in catalog lists Alibaba's currently suggested plan models, while the newer Qwen3-Coder compatibility tier stays selectable but out of sight. Any other allowlisted model IDs remain reachable as custom model refs. Plan models meant purely for image generation are absent here since they rely on separate APIs.
| Model ref | Input | Context | Picker status |
|---|---|---|---|
qwen-token-plan/qwen3.7-plus | text, image | 1,000,000 | visible |
qwen-token-plan/qwen3.8-max | text, image | 1,000,000 | visible |
qwen-token-plan/qwen3.8-flash | text, image | 1,000,000 | visible |
qwen-token-plan/qwen3.6-plus | text, image | 1,000,000 | visible |
qwen-token-plan/qwen3-coder-next | text | 262,144 | hidden |
qwen-token-plan/kimi-k2.5 | text, image | 262,144 | visible |
qwen-token-plan/glm-5 | text | 202,752 | visible |
qwen-token-plan/MiniMax-M2.5 | text | 196,608 | visible |
Thinking controls
qwen3.8-max and qwen3.8-flash handle off, low, medium, and xhigh
thinking, with xhigh serving as the default. minimal is mapped to low; high and max
correspond to xhigh. This holds for both Standard and Token Plan. Each model can output up to
131,072 tokens. During tool use, OpenClaw keeps returned reasoning in its dedicated
reasoning_content replay field, instead of inserting it into
visible answer text.
When request parameters include an explicit thinking_budget, it overrides the
mapped reasoning_effort: Qwen rejects any request that carries both. Refer to the
Qwen thinking reference.
In the built-in catalog, qwen3.7-max, qwen3.7-plus, qwen3.6-flash, and qwen3.6-plus are
reasoning-enabled. For reasoning models in the qwen
family, the provider translates OpenClaw thinking levels into DashScope's top-level
enable_thinking request flag: disabled thinking results in enable_thinking: false,
while any other level produces enable_thinking: true. Custom models can choose an
alternate chat-template thinking payload by configuring
compat.thinkingFormat: "qwen-chat-template" on the model entry.
Token Plan models are flagged as reasoning-capable too. kimi-k2.7-code and
MiniMax-M2.5 are thinking-only, so OpenClaw forces thinking on even when the
session asks for /think off. DeepSeek V4 maps minimal through high to
the service's high effort and translates xhigh or max into max. GLM 5.2 supports
the complete minimal through max range; GLM 5.1 and GLM 5 accept up to
xhigh, and all three default to high. Other hybrid models respect the
requested on/off state.
Multimodal add-ons
The qwen plugin provides multimodal capabilities exclusively on the Standard DashScope
endpoints, not on the Coding Plan endpoints:
- Image and video understanding through
qwen3.6-plus - Wan video generation using
wan2.6-t2v(default),wan2.6-i2v,wan2.6-r2v,wan2.6-r2v-flash,wan2.7-r2v
Media understanding is resolved automatically from the configured Qwen auth; no additional setup is required. Ensure you are on a Standard (pay-as-you-go) endpoint for media understanding to function.
To set Qwen as the default video provider:
{
agents: {
defaults: {
mediaModels: { video: { primary: "qwen/wan2.6-t2v" } },
},
},
}
Each Wan model advertises only its corresponding runtime mode:
| Mode | Models | Reference limits | Max duration | Supported controls |
|---|---|---|---|---|
| Text-to-video | wan2.6-t2v | n/a | 15 s | size, aspectRatio, resolution, audio, watermark |
| Image-to-video | wan2.6-i2v | 1 image | 15 s | resolution, audio, watermark |
| Reference-to-video (Wan 2.6) | wan2.6-r2v, wan2.6-r2v-flash | 5 total images/videos; up to 3 videos | 10 s | size, aspectRatio, resolution, audio, watermark |
| Reference-to-video (Wan 2.7) | wan2.7-r2v | 5 total images/videos; up to 3 videos | 10 s | size, aspectRatio, resolution, watermark; audio is always on |
For Wan 2.6 text and reference models, resolution along with aspectRatio are converted into the precise size as documented. When using Wan 2.6 image-to-video, the resolution tier gets transmitted, and the aspect ratio from the source image is adopted. With Wan 2.7 reference-to-video, media, resolution, and ratio are transmitted, and audio generation is unconditional.
Remote http(s) URLs are mandatory for reference image/video inputs. Local file paths are refused immediately, since the DashScope video endpoint cannot accept uploaded local buffers for these references.
Note
Shared tool parameters, provider selection, and failover behavior are covered under Video generation.
Advanced configuration
Qwen model availability
Both qwen3.7-plus and qwen3.6-plus work on Coding Plan and Standard endpoints. For qwen3.8-max, qwen3.8-flash, qwen3.7-max, or qwen3.6-flash, go with Standard or Token Plan. These are the Standard (pay-as-you-go) endpoints:
- China:
dashscope.aliyuncs.com/compatible-mode/v1 - Global:
dashscope-intl.aliyuncs.com/compatible-mode/v1
OpenClaw leaves these models out of Coding Plan catalogs. When a Coding Plan endpoint responds with an "unsupported model" error, move to the matching Standard or Token Plan endpoint and its dedicated key.
Video generation region routing
Before a video job is submitted, OpenClaw maps the configured Qwen region to the appropriate DashScope AIGC host:
- Global/Intl:
https://dashscope-intl.aliyuncs.com - China:
https://dashscope.aliyuncs.com
A regular models.providers.qwen.baseUrl aimed at either the Coding Plan or Standard Qwen hosts still directs video generation to the correct regional DashScope video endpoint.
Streaming usage compatibility
On the shared openai-completions transport, native Qwen endpoints advertise streaming usage compatibility. Consequently, DashScope-compatible custom provider ids that point to the same native hosts inherit this behavior without needing the built-in qwen provider id explicitly. This holds for Coding Plan, Standard, and Token Plan endpoints:
https://coding.dashscope.aliyuncs.com/v1https://coding-intl.dashscope.aliyuncs.com/v1https://dashscope.aliyuncs.com/compatible-mode/v1https://dashscope-intl.aliyuncs.com/compatible-mode/v1https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1
Capability plan
The qwen plugin is being established as the vendor home for the entire Qwen Cloud surface, extending beyond coding and text models.
- Text/chat models: available through the plugin
- Tool calling, structured output, thinking: inherited from the OpenAI-compatible transport
- Image generation: planned at the provider-plugin layer
- Image/video understanding: available through the plugin on the Standard endpoint
- Speech/audio: planned at the provider-plugin layer
- Memory embeddings/reranking: planned through the embedding adapter surface
- Video generation: available through the plugin through the shared video-generation capability
Environment and daemon setup
When the Gateway runs as a daemon (launchd/systemd), ensure QWEN_API_KEY or QWEN_TOKEN_PLAN_API_KEY is reachable by that process (for instance, in ~/.openclaw/.env or through env.shellEnv).
Related
-
Choosing a model, Picking providers, model references, and fallback logic.
-
Creating videos, Common video tool settings and how to pick a provider.
-
Alibaba Model Studio, Integrated Wan video generation service within the same DashScope environment.
-
Fixing issues, Common problems and frequently asked questions.