Integrate with Qwen Code

June 29, 2026 · View on GitHub

English | 简体中文 · ← Back

Integrate with Qwen Code

Qwen Code is an open-source AI agent that lives in your terminal, built by the Qwen team at Alibaba Group.

Prerequisites

Both Pay-as-you-go API and Token Plan are supported with Qwen Code. You need to obtain the corresponding credentials before configuration.

Usage ModeDescriptionHow to Get Credentials
Pay-as-you-goBilled by actual usage, suitable for light useGo to API Keys and create an API Key
Token PlanFixed subscription with quota-based accessAfter subscribing, go to Subscription Management to get your dedicated Base URL and API Key

1. Install Qwen Code

  • Install Node.js 20 or later.
  • Install Qwen Code:
npm install -g @qwen-code/qwen-code@latest

Or via the quick-install script:

curl -fsSL https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen-standalone.sh | bash

Or Homebrew:

brew install qwen-code
  • Verify:
qwen --version

2. Configure MiMo via /auth

Launch Qwen Code:

qwen

Inside the interactive session, run /auth:

/auth

Select Custom Provider and follow the 6-step wizard:

StepFieldValue
1ProtocolOpenAI Compatible
2Base URLhttps://api.xiaomimimo.com/v1 (Pay-as-you-go) or https://token-plan-{region}.xiaomimimo.com/v1 (Token Plan)
3API KeyYour MiMo API Key
4Model IDmimo-v2.5-pro
5Advanced ConfigEnable thinking: on; Enable modality: off; Context window: 1048576
6Provider NameMiMo (or any name you prefer)

3. Switch to MiMo Model

Run the /model command and select mimo-v2.5-pro:

/model

You're ready to go. Qwen Code will now use MiMo for coding.

Tip: Use /model to switch between models at any time. Use /auth again if you need to reconfigure.

Resources