Qwen
OpenClaw で Qwen OAuth(無料層)を使用
Qwen は Qwen Coder および Qwen Vision モデル向けの無料層 OAuth フローを提供します
(1 日 2,000 リクエスト、Qwen のレート制限が適用されます)。
プラグインを有効にする
openclaw plugins enable qwen-portal-auth
有効にした後、Gateway を再起動します。
Authenticate
openclaw models auth login --provider qwen-portal --set-default
これにより Qwen デバイスコード OAuth フローが実行され、プロバイダーエントリが
'<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'models.json'</code>' に書き込まれます(および高速切り替え用の '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'qwen'</code>' エイリアス)。
モデル ID
- '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'qwen-portal/coder-model'</code>'
- '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'qwen-portal/vision-model'</code>'
モデルを切り替える:
openclaw models set qwen-portal/coder-model
Qwen Code CLI ログインを再利用
すでに Qwen Code CLI でログインしている場合、OpenClaw は認証ストアをロードするときに
'<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'~/.qwen/oauth_creds.json'</code>' から認証情報を同期します。それでも
'<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'models.providers.qwen-portal'</code>' エントリが必要です(上記のログインコマンドを使用して作成します)。
Notes
- トークンは自動的に更新されます。更新に失敗した場合やアクセスが取り消された場合は、ログインコマンドを再実行してください。
- デフォルトのベース URL:'<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'https://portal.qwen.ai/v1'</code>'(Qwen が異なるエンドポイントを提供する場合は、
'<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'models.providers.qwen-portal.baseUrl'</code>' で上書きできます)。
- プロバイダー全体のルールについては、'<a href="/concepts/model-providers" className="text-emerald-400 hover:text-emerald-300 transition-colors">'モデルプロバイダー'</a>' を参照してください。