# Visual UI editing with Qwen Code

> Use Qwen Code as a visual UI editor on your running app. Set up a Qwen plan or a provider key, and what to expect, including no image support.

GUIJam gives Qwen Code a visual front end. Circle an element on your running app, describe the change, and Qwen Code proposes live UI variants you preview in the page before anything is written.

[Qwen Code](https://github.com/QwenLM/qwen-code) is verified live. It needs a Qwen plan or a provider key.

## Set up

### Install it

```bash
npm install -g @qwen-code/qwen-code
```

### Log in with a plan or a provider key

Run `qwen` and choose `/auth`. Pick one of:

- Qwen's own subscription, which needs a Plus or Pro membership.
- A provider key, such as OpenRouter or Fireworks AI.

### Choose it in GUIJam

```bash
npx guijam provider use qwen-code
```

> **Qwen OAuth's free tier is gone**
>
> Qwen discontinued the free tier of Qwen OAuth on 2026-04-15. If Qwen Code still uses it, every request is refused. Switch to a plan or a provider key with `/auth`.

## Login status

Qwen Code has no login-status command, so GUIJam shows its status as unknown: "If the first run fails, run `qwen` and choose /auth".

To find out for sure, `init` offers to send Qwen Code one short test request. It spends a few tokens. Run the same check any time:

```bash
npx guijam doctor --probe
```

## When Qwen Code refuses a request

The widget repeats what Qwen Code said, and tells you what to change:

| Message                                                                                                                                                          | What to do                                                                                                |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
| "Qwen Code was refused: Qwen OAuth free tier was discontinued on 2026-04-15. Run /auth to switch to Coding Plan, OpenRouter, Fireworks AI, or another provider." | Run `qwen`, choose `/auth` and switch to a plan or a provider key. Then retry.                            |
| "Qwen Code was refused: No auth type is selected…"                                                                                                               | Run `qwen` and choose `/auth`. Then retry.                                                                |
| "Qwen Code was refused: `<what Qwen Code said>`." For example, an invalid API key.                                                                               | Fix the key with `/auth`. Then retry.                                                                     |
| Qwen says "membership required: upgrade to plus or pro".                                                                                                         | Your Qwen subscription needs a Plus or Pro membership. Upgrade, or switch to a provider key with `/auth`. |

If Qwen Code stops before answering, the widget shows the last line it printed: "Qwen Code stopped before answering: `<last line>`." Every failed run is also logged in `.guijam/logs/gjd.log`, with the Qwen Code version and the model.

## Limits

- Qwen Code can't read images in GUIJam, so [sketches](https://guijam.francistinao.com/docs/guides/sketch) and attached images need another tool.
- GUIJam runs it in safe mode and plan mode, with tool calls turned off for quick requests, so it can't change files.
