Files
openclaw/docs/providers/qwen.md

54 lines
1.4 KiB
Markdown
Raw Normal View History

2026-01-17 20:20:25 +00:00
---
2026-01-30 03:15:10 +01:00
summary: "Use Qwen OAuth (free tier) in OpenClaw"
2026-01-17 20:20:25 +00:00
read_when:
2026-01-30 03:15:10 +01:00
- You want to use Qwen with OpenClaw
2026-01-17 20:20:25 +00:00
- You want free-tier OAuth access to Qwen Coder
title: "Qwen"
2026-01-17 20:20:25 +00:00
---
2026-01-31 21:13:13 +09:00
2026-01-17 20:28:15 +00:00
# Qwen
2026-01-17 20:20:25 +00:00
2026-01-17 20:28:15 +00:00
Qwen provides a free-tier OAuth flow for Qwen Coder and Qwen Vision models
2026-01-17 20:20:25 +00:00
(2,000 requests/day, subject to Qwen rate limits).
## Enable the plugin
```bash
2026-01-30 03:15:10 +01:00
openclaw plugins enable qwen-portal-auth
2026-01-17 20:20:25 +00:00
```
Restart the Gateway after enabling.
## Authenticate
```bash
2026-01-30 03:15:10 +01:00
openclaw models auth login --provider qwen-portal --set-default
2026-01-17 20:20:25 +00:00
```
This runs the Qwen device-code OAuth flow and writes a provider entry to your
`models.json` (plus a `qwen` alias for quick switching).
## Model IDs
- `qwen-portal/coder-model`
- `qwen-portal/vision-model`
Switch models with:
```bash
2026-01-30 03:15:10 +01:00
openclaw models set qwen-portal/coder-model
2026-01-17 20:20:25 +00:00
```
## Reuse Qwen Code CLI login
2026-01-30 03:15:10 +01:00
If you already logged in with the Qwen Code CLI, OpenClaw will sync credentials
2026-01-17 20:20:25 +00:00
from `~/.qwen/oauth_creds.json` when it loads the auth store. You still need a
`models.providers.qwen-portal` entry (use the login command above to create one).
## Notes
2026-01-17 20:28:15 +00:00
- Tokens auto-refresh; re-run the login command if refresh fails or access is revoked.
2026-01-17 20:20:25 +00:00
- Default base URL: `https://portal.qwen.ai/v1` (override with
`models.providers.qwen-portal.baseUrl` if Qwen provides a different endpoint).
- See [Model providers](/concepts/model-providers) for provider-wide rules.