Quick Setup Guide:
1️⃣ Install the npm Package Globally
Make sure your Node.js version is ≥ 22, then run the following in your terminal:2️⃣ Configure Environment Variables
Add your Aihubmix key and forwarding address to your system environment variables. You can generate a key on the Aihubmix Keys page. For example, add the following to your ~/.zshrc:OPENAI_MODEL with any other model ID from the AIHubMix model list. Once OPENAI_API_KEY is set, Qwen Code connects to AIHubMix through the OpenAI-compatible API at startup, so you do not need to select an authentication method in /auth.
Windows users can set the environment variables in PowerShell (applies to the current window only):
~/.qwen/settings.json (macOS / Linux). On Windows, it is at C:\Users\<username>\.qwen\settings.json.
3️⃣ Apply the Configuration
After adding the configuration, run source ~/.zshrc in your terminal and press Enter.
4️⃣ Launch and Use
Type the following in your terminal:/status (you can also enter /about) and press Enter to confirm your setup. You’ll see the current version and the selected large language model:

Some users have reported that Qwen Code may occasionally get stuck. We recommend setting a limited quota for your token↗ to avoid unnecessary waste.