> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wednesdayai.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Qwen

> Connect WednesdayAI to Alibaba's Qwen models via the Qwen portal OAuth flow.

# Qwen

Qwen is Alibaba's model family. WednesdayAI integrates with Qwen through a portal OAuth flow (no API key required) that gives free-tier access to Qwen Coder and Qwen Vision models — up to 2,000 requests per day, subject to Qwen rate limits.

## Prerequisites

* A Qwen account at [portal.qwen.ai](https://portal.qwen.ai)

## Quick setup

### 1. Enable the plugin

```bash theme={"dark"}
openclaw plugins enable qwen-portal-auth
```

Restart the gateway after enabling:

```bash theme={"dark"}
openclaw gateway restart
```

### 2. Authenticate

```bash theme={"dark"}
openclaw models auth login --provider qwen-portal --set-default
```

This runs the Qwen device-code OAuth flow and writes a provider entry to your `models.json`, plus a `qwen` alias for quick switching.

### 3. Configure

```json5 theme={"dark"}
{
  agents: {
    defaults: {
      model: { primary: "qwen-portal/coder-model" },
    },
  },
}
```

## Provider settings

| Setting     | Value                          |
| ----------- | ------------------------------ |
| Provider ID | `qwen-portal`                  |
| Base URL    | `https://portal.qwen.ai/v1`    |
| Auth        | Device-code OAuth (no API key) |
| Daily limit | 2,000 requests                 |

## Available models

| Model ID                   | Notes                                   |
| -------------------------- | --------------------------------------- |
| `qwen-portal/coder-model`  | Qwen Coder — optimised for coding tasks |
| `qwen-portal/vision-model` | Qwen Vision — multimodal input          |

Switch models:

```bash theme={"dark"}
openclaw models set qwen-portal/coder-model
```

## Reuse existing Qwen Code CLI login

If you already logged in with the Qwen Code CLI, WednesdayAI syncs credentials from `~/.qwen/oauth_creds.json` when it loads the auth store. You still need a `models.providers.qwen-portal` entry — run the login command above to create one.

## Verification

```bash theme={"dark"}
openclaw models status --probe-provider qwen-portal
```

## Troubleshooting

<AccordionGroup>
  <Accordion title="401 / token expired">
    Tokens auto-refresh; if refresh fails, re-run `openclaw models auth login --provider qwen-portal` to re-authenticate.
  </Accordion>

  <Accordion title="429 Rate limited">
    The free tier allows 2,000 requests per day. Check your usage on the Qwen portal dashboard.
  </Accordion>

  <Accordion title="Plugin not found">
    Ensure the `qwen-portal-auth` plugin is listed in `openclaw plugins list`. Re-enable with `openclaw plugins enable qwen-portal-auth` and restart the gateway.
  </Accordion>
</AccordionGroup>

## Related

* [AI providers overview](/admin/providers/index)
* [Reference: config](/reference/config)
