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.

PropertyValue
Providerqwen
Token Plan providerqwen-token-plan
Preferred env varQWEN_API_KEY
Token Plan env varQWEN_TOKEN_PLAN_API_KEY
Also accepted (compat)MODELSTUDIO_API_KEY, DASHSCOPE_API_KEY
API styleOpenAI-compatible

Tip

Both qwen3.7-plus and qwen3.6-plus function with Coding Plan and Standard endpoints. When working with qwen3.8-max or qwen3.8-flash, opt for Standard (pay-as-you-go) or Token Plan. The older Coding Plan lacks these models. qwen3.7-max and qwen3.6-flash likewise 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 and modelstudio/... model refs remain functional as compatibility aliases, though new setup flows should adopt the canonical qwen-* auth-choice ids and qwen/... model refs. Should you define an exact custom models.providers.modelstudio entry with a different api value, that custom provider takes ownership of modelstudio/... 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 and modelstudio/... model refs remain functional as compatibility aliases, though new setup flows should adopt the canonical qwen-* auth-choice ids and qwen/... model refs. Should you define an exact custom models.providers.modelstudio entry with a different api value, that custom provider takes ownership of modelstudio/... 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-plan when setting up a custom provider manually. While the plugin claims that id for compatibility purposes, fresh configurations ought to rely on qwen-token-plan. A dedicated custom models.providers.bailian-token-plan entry 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

PlanRegionAuth choiceEndpoint
Coding Plan (subscription)Chinaqwen-api-key-cncoding.dashscope.aliyuncs.com/v1
Coding Plan (subscription)Globalqwen-api-keycoding-intl.dashscope.aliyuncs.com/v1
Standard (pay-as-you-go)Chinaqwen-standard-api-key-cndashscope.aliyuncs.com/compatible-mode/v1
Standard (pay-as-you-go)Globalqwen-standard-api-keydashscope-intl.aliyuncs.com/compatible-mode/v1
Token Plan (Team Edition)Chinaqwen-token-plan-cntoken-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1
Token Plan (Team Edition)Globalqwen-token-plantoken-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 refInputContextNotes
qwen/qwen3.5-plustext, image1,000,000Default model
qwen/qwen3.6-flashtext, image1,000,000Standard endpoints only
qwen/qwen3.6-plustext, image1,000,000Coding Plan + Standard
qwen/qwen3.7-maxtext1,000,000Standard endpoints only
qwen/qwen3.7-plustext, image1,000,000Coding Plan + Standard
qwen/qwen3.8-maxtext, image1,000,000Standard endpoints only
qwen/qwen3.8-flashtext, image1,000,000Standard endpoints only
qwen/qwen3-max-2026-01-23text262,144Qwen Max line
qwen/qwen3-coder-nexttext262,144Coding
qwen/qwen3-coder-plustext1,000,000Coding
qwen/MiniMax-M2.5text1,000,000Reasoning enabled
qwen/glm-5text202,752GLM
qwen/glm-4.7text202,752GLM
qwen/kimi-k2.5text, image262,144Moonshot 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 refInputContextPicker status
qwen-token-plan/qwen3.7-plustext, image1,000,000visible
qwen-token-plan/qwen3.8-maxtext, image1,000,000visible
qwen-token-plan/qwen3.8-flashtext, image1,000,000visible
qwen-token-plan/qwen3.6-plustext, image1,000,000visible
qwen-token-plan/qwen3-coder-nexttext262,144hidden
qwen-token-plan/kimi-k2.5text, image262,144visible
qwen-token-plan/glm-5text202,752visible
qwen-token-plan/MiniMax-M2.5text196,608visible

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:

ModeModelsReference limitsMax durationSupported controls
Text-to-videowan2.6-t2vn/a15 ssize, aspectRatio, resolution, audio, watermark
Image-to-videowan2.6-i2v1 image15 sresolution, audio, watermark
Reference-to-video (Wan 2.6)wan2.6-r2v, wan2.6-r2v-flash5 total images/videos; up to 3 videos10 ssize, aspectRatio, resolution, audio, watermark
Reference-to-video (Wan 2.7)wan2.7-r2v5 total images/videos; up to 3 videos10 ssize, 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/v1
  • https://coding-intl.dashscope.aliyuncs.com/v1
  • https://dashscope.aliyuncs.com/compatible-mode/v1
  • https://dashscope-intl.aliyuncs.com/compatible-mode/v1
  • https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1
  • https://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).

2,188 words · updated Sep 1, 2026