# henyo-pi-qwen3

A [pi](https://github.com/earendil-works/pi-coding-agent) extension that prepends the Qwen system identity (`You are Qwen, created by Alibaba Cloud. You are a helpful assistant.`) to the system prompt whenever a **Qwen3** model is selected.

## Installation

```bash
pi install npm:henyo-pi-qwen3
```

## How it works

1. **`session_start`** — Notifies if the current model is Qwen3.
2. **`model_select`** — Notifies when switching to a Qwen3 model.
3. **`before_agent_start`** — If the active model ID matches `/^qwen3/i`, prepends the Qwen identity text to the system prompt before the agent loop begins.

## Customization

To change the model regex or prepend text, fork this repo and edit the constants in `index.ts`:

| Constant | Default | Description |
|---|---|---|
| `MODEL_PREFIX_REGEX` | `/^qwen3/i` | Regex to match model IDs that trigger the prompt prepend |
| `PREPEND_TEXT` | `You are Qwen...` | Text prepended to the system prompt |

## License

MIT