qwen. It targets Qwen Cloud / Alibaba DashScope Standard and Coding Plan endpoints, exposes Token Plan as qwen-token-plan, keeps modelstudio as a compatibility alias, and independently owns Alibaba’s documented bailian-token-plan custom-provider id.
Install plugin
qwen ships as an official external plugin, not bundled with core. Install it and restart Gateway:
Getting started
Choose your plan type and follow the setup steps.- Coding Plan (subscription)
- Standard (pay-as-you-go)
- Token Plan (Team Edition)
Best for: subscription-based access through the Qwen Coding Plan.
1
Get your API key
Create or copy an API key from home.qwencloud.com/api-keys.
2
Run onboarding
For the Global endpoint:For the China endpoint:
3
Set a default model
4
Verify the model is available
Legacy
modelstudio-* auth-choice ids and modelstudio/... model refs still
work as compatibility aliases, but new setup flows should prefer the canonical
qwen-* auth-choice ids and qwen/... model refs. If you define an exact
custom models.providers.modelstudio entry with another api value, that
custom provider owns modelstudio/... refs instead of the Qwen compatibility
alias.Retired Qwen Portal authentication
Theqwen-oauth Portal provider and its legacy OAuth flow have been removed.
Portal tokens are not interchangeable with Qwen Cloud or DashScope API keys.
Using the current Qwen plugin requires fresh API-key authentication for the
chosen endpoint and updated model configuration. Follow
Install plugin and
Getting started; existing Portal credentials
are not converted automatically.
Plan types and endpoints
The provider auto-selects the endpoint based on your auth choice. Canonical
choices use the
qwen-* family; modelstudio-* remains compatibility-only.
Override with a custom baseUrl in config.
Built-in catalog
OpenClaw discovers models from the configured endpoint’s authenticated/models
API. The plugin keeps the following seed metadata for offline discovery and for
endpoints that return only model IDs. Coding Plan configs omit models that are
not included in that plan; a Standard model listing does not establish Token
Plan or Coding Plan access.
Token Plan catalog
Token Plan uses a separate exact-string allowlist. The built-in catalog shows Alibaba’s currently recommended plan models and keeps the newer Qwen3-Coder compatibility tier selectable but hidden. Other allowlisted model IDs remain available as custom model refs. Image-generation-only plan models are not included here because they use different APIs.Thinking controls
qwen3.8-max and qwen3.8-flash support off, low, medium, and xhigh
thinking, with xhigh as the default. minimal maps to low; high and max
map to xhigh. This applies to Standard and Token Plan. Both models support
131,072 output tokens. OpenClaw preserves returned reasoning in its separate
reasoning_content replay field during tool use, rather than placing it in
visible answer text.
An explicit thinking_budget in request parameters takes precedence over the
mapped reasoning_effort: Qwen rejects requests containing both. See the
Qwen thinking reference.
qwen3.7-max, qwen3.7-plus, qwen3.6-flash, and qwen3.6-plus are
reasoning-enabled in the built-in catalog. For reasoning models on the qwen
family, the provider maps OpenClaw thinking levels to DashScope’s top-level
enable_thinking request flag: disabled thinking sends enable_thinking: false,
any other level sends enable_thinking: true. Custom models can opt into an
alternate chat-template thinking payload by setting
compat.thinkingFormat: "qwen-chat-template" on the model entry.
Token Plan models are also marked reasoning-capable. kimi-k2.7-code and
MiniMax-M2.5 are thinking-only, so OpenClaw keeps thinking enabled even when
the session requests /think off. DeepSeek V4 maps minimal through high to
the service’s high effort and maps xhigh or max to max. GLM 5.2 accepts
the full minimal through max range; GLM 5.1 and GLM 5 accept through
xhigh, and all three default to high. Other hybrid models follow the
requested on/off state.
Multimodal add-ons
Theqwen plugin exposes multimodal capabilities on the Standard DashScope
endpoints only, not the Coding Plan endpoints:
- Image and video understanding via
qwen3.6-plus - Wan video generation via
wan2.6-t2v(default),wan2.6-i2v,wan2.6-r2v,wan2.6-r2v-flash,wan2.7-r2v
Wan 2.6 text/reference models translate
resolution plus aspectRatio to the
documented exact size. Wan 2.6 image-to-video sends the resolution tier and
uses the input image’s aspect ratio. Wan 2.7 reference-to-video sends
media, resolution, and ratio and always generates audio.
Reference image/video inputs require remote http(s) URLs; local file paths are
rejected up front because the DashScope video endpoint does not accept uploaded
local buffers for those references.
See Video generation for shared tool parameters, provider selection, and failover behavior.
Advanced configuration
Qwen model availability
Qwen model availability
qwen3.7-plus and qwen3.6-plus are available on Coding Plan and Standard endpoints. For qwen3.8-max, qwen3.8-flash, qwen3.7-max, or qwen3.6-flash, use Standard or Token Plan. The Standard (pay-as-you-go) endpoints are:- China:
dashscope.aliyuncs.com/compatible-mode/v1 - Global:
dashscope-intl.aliyuncs.com/compatible-mode/v1
Video generation region routing
Video generation region routing
OpenClaw maps the configured Qwen region to the matching DashScope AIGC host
before submitting a video job:
- Global/Intl:
https://dashscope-intl.aliyuncs.com - China:
https://dashscope.aliyuncs.com
models.providers.qwen.baseUrl pointing at either the Coding Plan
or Standard Qwen hosts still routes video generation to the matching
regional DashScope video endpoint.Streaming usage compatibility
Streaming usage compatibility
Native Qwen endpoints advertise streaming usage compatibility on the shared
openai-completions transport, so DashScope-compatible custom provider ids
targeting the same native hosts inherit the same behavior without requiring
the built-in qwen provider id specifically. This applies to 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
Capability plan
The
qwen plugin is being positioned as the vendor home for the full Qwen
Cloud surface, not just coding/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
Environment and daemon setup
If the Gateway runs as a daemon (launchd/systemd), make sure
QWEN_API_KEY
or QWEN_TOKEN_PLAN_API_KEY is available to that process (for example, in
~/.openclaw/.env or via env.shellEnv).Related
Model selection
Choosing providers, model refs, and failover behavior.
Video generation
Shared video tool parameters and provider selection.
Alibaba Model Studio
Bundled Wan video generation provider on the same DashScope platform.
Troubleshooting
General troubleshooting and FAQ.