Files
adolf/docs/providers/qwen-oauth.md
alvis bedb527145
Some checks failed
ClawSweeper Dispatch / dispatch (push) Has been cancelled
CodeQL / Security High (actions) (push) Has been cancelled
CodeQL / Security High (channel-runtime-boundary) (push) Has been cancelled
CodeQL / Security High (core-auth-secrets) (push) Has been cancelled
CodeQL / Security High (mcp-process-tool-boundary) (push) Has been cancelled
CodeQL / Security High (network-ssrf-boundary) (push) Has been cancelled
CodeQL / Security High (plugin-trust-boundary) (push) Has been cancelled
CodeQL / Security High (process-exec-boundary) (push) Has been cancelled
Docs Sync Publish Repo / sync-publish-repo (push) Has been cancelled
Docs / docs (push) Has been cancelled
OpenClaw Stable Main Closeout / Resolve stable release closeout inputs (push) Has been cancelled
OpenClaw Stable Main Closeout / Verify stable main closeout (push) Has been cancelled
Workflow Sanity / no-tabs (push) Has been cancelled
Workflow Sanity / actionlint (push) Has been cancelled
Workflow Sanity / generated-doc-baselines (push) Has been cancelled
CI / runner-admission (push) Has been cancelled
CI / preflight (push) Has been cancelled
CI / security-fast (push) Has been cancelled
CI / pnpm-store-warmup (push) Has been cancelled
CI / build-artifacts (push) Has been cancelled
CI / native-i18n (push) Has been cancelled
CI / ${{ matrix.check_name }} (push) Has been cancelled
CI / ${{ matrix.checkName }} (push) Has been cancelled
CI / checks-node-compat-node22 (push) Has been cancelled
CI / check-bundled-channel-config-metadata (push) Has been cancelled
CI / check-dependencies (push) Has been cancelled
CI / check-guards (push) Has been cancelled
CI / check-lint (push) Has been cancelled
CI / check-prod-types (push) Has been cancelled
CI / check-shrinkwrap (push) Has been cancelled
CI / check-test-types (push) Has been cancelled
CI / check-additional-boundaries-a (push) Has been cancelled
CI / check-additional-boundaries-bcd (push) Has been cancelled
CI / check-additional-extension-bundled (push) Has been cancelled
CI / check-additional-extension-channels (push) Has been cancelled
CI / check-additional-extension-package-boundary (push) Has been cancelled
CI / check-additional-runtime-topology-architecture (push) Has been cancelled
CI / check-session-accessor-boundary (push) Has been cancelled
CI / check-session-transcript-reader-boundary (push) Has been cancelled
CI / check-docs (push) Has been cancelled
CI / skills-python (push) Has been cancelled
CI / macos-swift (push) Has been cancelled
CI / ios-build (push) Has been cancelled
CI / ci-timings-summary (push) Has been cancelled
Native App Locale Refresh / Refresh native fa (push) Has been cancelled
Native App Locale Refresh / Refresh native fr (push) Has been cancelled
Native App Locale Refresh / Refresh native hi (push) Has been cancelled
Native App Locale Refresh / Refresh native id (push) Has been cancelled
Native App Locale Refresh / Refresh native it (push) Has been cancelled
Native App Locale Refresh / Refresh native ja-JP (push) Has been cancelled
Control UI Locale Refresh / plan (push) Has been cancelled
Control UI Locale Refresh / Refresh ${{ matrix.locale }} (push) Has been cancelled
Control UI Locale Refresh / Commit control UI locale refresh (push) Has been cancelled
Live Media Runner Image / Build live media runner image (push) Has been cancelled
Native App Locale Refresh / Refresh native ar (push) Has been cancelled
Native App Locale Refresh / Refresh native de (push) Has been cancelled
Native App Locale Refresh / Refresh native es (push) Has been cancelled
Native App Locale Refresh / Refresh native ko (push) Has been cancelled
Native App Locale Refresh / Refresh native nl (push) Has been cancelled
Native App Locale Refresh / Refresh native pl (push) Has been cancelled
Native App Locale Refresh / Refresh native pt-BR (push) Has been cancelled
Native App Locale Refresh / Refresh native ru (push) Has been cancelled
Native App Locale Refresh / Refresh native sv (push) Has been cancelled
Native App Locale Refresh / Refresh native th (push) Has been cancelled
Native App Locale Refresh / Refresh native tr (push) Has been cancelled
Native App Locale Refresh / Refresh native uk (push) Has been cancelled
Native App Locale Refresh / Refresh native vi (push) Has been cancelled
Native App Locale Refresh / Refresh native zh-CN (push) Has been cancelled
Native App Locale Refresh / Refresh native zh-TW (push) Has been cancelled
Native App Locale Refresh / Commit native locale refresh (push) Has been cancelled
Plugin Init Scaffold Validation / Validate provider scaffold (push) Has been cancelled
Plugin NPM Release / preview_plugins_npm (push) Has been cancelled
Plugin NPM Release / Validate release publish approval (push) Has been cancelled
Plugin NPM Release / preview_plugin_pack (push) Has been cancelled
Plugin NPM Release / publish_plugins_npm (push) Has been cancelled
Sandbox Common Smoke / sandbox-common-smoke (push) Has been cancelled
Website Installer Sync / static (push) Has been cancelled
Website Installer Sync / linux-docker (push) Has been cancelled
Website Installer Sync / macos-installer (push) Has been cancelled
Website Installer Sync / windows-installer (push) Has been cancelled
Website Installer Sync / sync-website (push) Has been cancelled
Vendor OpenClaw source as Adolf fork baseline
Adolf is a fork/vendored clone of github.com/openclaw/openclaw (v2026.6.11),
free to diverge. Tree copied sans upstream .git; upstream remote added for
future syncs. Node pinned to 24 (.nvmrc); engines already require >=22.19.
Preserves docs/ARCHITECTURE.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LeqyaxJF2nbRXJtae2kNB2
2026-07-05 09:36:54 +00:00

5.0 KiB

summary, read_when, title
summary read_when title
Use the Qwen Portal provider id with OpenClaw
You want to configure the qwen-oauth provider id
You previously used Qwen Portal OAuth credentials
You need the Qwen Portal endpoint or migration guidance
Qwen OAuth / Portal

qwen-oauth is the Qwen Portal provider id, registered by the Qwen plugin (@openclaw/qwen-provider). It targets the Qwen Portal endpoint at https://portal.qwen.ai/v1 and keeps older Qwen OAuth / portal setups addressable through a distinct provider id, separate from the canonical qwen provider.

Choose qwen-oauth if you already have a working Qwen Portal token, are migrating a legacy Qwen OAuth or Qwen CLI workflow, or need to test the Qwen Portal endpoint specifically. For new setups, prefer Qwen with the Standard ModelStudio endpoint: it covers new API-key setups, broader endpoint choices, Standard pay-as-you-go, Coding Plan, and the full Qwen plugin catalog.

Setup

Install the Qwen plugin if you have not already:

openclaw plugins install @openclaw/qwen-provider
openclaw gateway restart

Provide your portal token through onboarding:

openclaw onboard --auth-choice qwen-oauth

Non-interactive runs read the token from --qwen-oauth-token <token>, or set:

export QWEN_API_KEY="<your-qwen-portal-token>" # pragma: allowlist secret

Onboarding stores the token under a qwen-oauth auth profile, seeds the portal model catalog, and sets qwen-oauth/qwen3.5-plus as the default model when none is configured.

Defaults

  • Provider: qwen-oauth
  • Aliases: qwen-portal, qwen-cli
  • Base URL: https://portal.qwen.ai/v1
  • Env var: QWEN_API_KEY
  • API style: OpenAI-compatible
  • Default model: qwen-oauth/qwen3.5-plus

How this differs from Qwen

OpenClaw has two Qwen-facing provider ids:

Provider Endpoint family Best for
qwen Qwen Cloud / Alibaba DashScope and Coding Plan endpoints New API-key setups, Standard pay-as-you-go, Coding Plan, multimodal DashScope features
qwen-oauth Qwen Portal endpoint at portal.qwen.ai/v1 Existing Qwen Portal tokens and legacy Qwen OAuth / CLI setups

Both providers use OpenAI-compatible request shapes, but they are separate auth surfaces. A token stored for qwen-oauth should not be treated as a DashScope or ModelStudio key, and a new DashScope key should use the canonical qwen provider instead.

Models

The Qwen plugin seeds this static catalog for the Qwen Portal endpoint. All entries use a 65,536-token max output; availability depends on the current Qwen Portal account and token.

Model ref Input Context Notes
qwen-oauth/qwen3.5-plus text, image 1,000,000 Default model
qwen-oauth/qwen3.6-plus text, image 1,000,000
qwen-oauth/qwen3-max-2026-01-23 text 262,144
qwen-oauth/qwen3-coder-next text 262,144
qwen-oauth/qwen3-coder-plus text 1,000,000
qwen-oauth/MiniMax-M2.5 text 1,000,000 Reasoning
qwen-oauth/glm-5 text 202,752
qwen-oauth/glm-4.7 text 202,752
qwen-oauth/kimi-k2.5 text, image 262,144

If your account uses ModelStudio / DashScope API keys instead, configure the canonical qwen provider:

openclaw onboard --auth-choice qwen-standard-api-key
openclaw models set qwen/qwen3-coder-plus

Migration

Legacy Qwen Portal OAuth profiles are not refreshable; openclaw doctor flags them. If a portal profile stops working, re-run onboarding with a current token or switch to the Standard Qwen provider:

openclaw onboard --auth-choice qwen-standard-api-key

Standard global ModelStudio uses:

https://dashscope-intl.aliyuncs.com/compatible-mode/v1

Troubleshooting

  • Portal OAuth refresh failures: legacy Qwen Portal OAuth profiles are not refreshable. Re-run onboarding with a current token.
  • Wrong endpoint errors: confirm the model ref starts with qwen-oauth/ when using a portal token. Use qwen/ refs only for the canonical Qwen provider.
  • QWEN_API_KEY confusion: both Qwen pages mention this env var, but onboarding stores credentials under the selected provider id. Prefer onboarding when you keep both qwen and qwen-oauth available on the same machine.