@qwen-code/qwen-code 0.10.1 → 0.10.2-nightly.20260217.a0a0a70b

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -18,15 +18,17 @@
18
18
 
19
19
  </div>
20
20
 
21
+ > 🎉 **News (2026-02-16)**: Qwen3.5-Plus is now live! Sign in via Qwen OAuth to use it directly, or get an API key from [Alibaba Cloud ModelStudio](https://modelstudio.console.alibabacloud.com?tab=doc#/doc/?type=model&url=2840914_2&modelId=group-qwen3.5-plus) to access it through the OpenAI-compatible API.
22
+
21
23
  Qwen Code is an open-source AI agent for the terminal, optimized for [Qwen3-Coder](https://github.com/QwenLM/Qwen3-Coder). It helps you understand large codebases, automate tedious work, and ship faster.
22
24
 
23
25
  ![](https://gw.alicdn.com/imgextra/i1/O1CN01D2DviS1wwtEtMwIzJ_!!6000000006373-2-tps-1600-900.png)
24
26
 
25
27
  ## Why Qwen Code?
26
28
 
27
- - **OpenAI-compatible, OAuth free tier**: use an OpenAI-compatible API, or sign in with Qwen OAuth to get 1,000 free requests/day.
29
+ - **Multi-protocol, OAuth free tier**: use OpenAI / Anthropic / Gemini-compatible APIs, or sign in with Qwen OAuth for 1,000 free requests/day.
28
30
  - **Open-source, co-evolving**: both the framework and the Qwen3-Coder model are open-source—and they ship and evolve together.
29
- - **Agentic workflow, feature-rich**: rich built-in tools (Skills, SubAgents, Plan Mode) for a full agentic workflow and a Claude Code-like experience.
31
+ - **Agentic workflow, feature-rich**: rich built-in tools (Skills, SubAgents) for a full agentic workflow and a Claude Code-like experience.
30
32
  - **Terminal-first, IDE-friendly**: built for developers who live in the command line, with optional integration for VS Code, Zed, and JetBrains IDEs.
31
33
 
32
34
  ## Installation
@@ -51,10 +53,7 @@ curl -fsSL -o %TEMP%\install-qwen.bat https://qwen-code-assets.oss-cn-hangzhou.a
51
53
 
52
54
  #### Prerequisites
53
55
 
54
- ```bash
55
- # Node.js 20+
56
- curl -qL https://www.npmjs.com/install.sh | sh
57
- ```
56
+ Make sure you have Node.js 20 or later installed. Download it from [nodejs.org](https://nodejs.org/en/download).
58
57
 
59
58
  #### NPM
60
59
 
@@ -104,7 +103,7 @@ Your browser does not support the video tag.
104
103
  Qwen Code supports two authentication methods:
105
104
 
106
105
  - **Qwen OAuth (recommended & free)**: sign in with your `qwen.ai` account in a browser.
107
- - **OpenAI-compatible API**: use `OPENAI_API_KEY` (and optionally a custom base URL / model).
106
+ - **API-KEY**: use an API key to connect to any supported provider (OpenAI, Anthropic, Google GenAI, Alibaba Cloud Bailian, and other compatible endpoints).
108
107
 
109
108
  #### Qwen OAuth (recommended)
110
109
 
@@ -116,17 +115,193 @@ Start `qwen`, then run:
116
115
 
117
116
  Choose **Qwen OAuth** and complete the browser flow. Your credentials are cached locally so you usually won't need to log in again.
118
117
 
119
- #### OpenAI-compatible API (API key)
118
+ > **Note:** In non-interactive or headless environments (e.g., CI, SSH, containers), you typically **cannot** complete the OAuth browser login flow. In these cases, please use the API-KEY authentication method.
119
+
120
+ #### API-KEY (flexible)
121
+
122
+ Use this if you want more flexibility over which provider and model to use. Supports multiple protocols:
123
+
124
+ - **OpenAI-compatible**: Alibaba Cloud Bailian, ModelScope, OpenAI, OpenRouter, and other OpenAI-compatible providers
125
+ - **Anthropic**: Claude models
126
+ - **Google GenAI**: Gemini models
127
+
128
+ The **recommended** way to configure models and providers is by editing `~/.qwen/settings.json` (create it if it doesn't exist). This file lets you define all available models, API keys, and default settings in one place.
129
+
130
+ ##### Quick Setup in 3 Steps
131
+
132
+ **Step 1:** Create or edit `~/.qwen/settings.json`
133
+
134
+ Here is a complete example:
135
+
136
+ ```json
137
+ {
138
+ "modelProviders": {
139
+ "openai": [
140
+ {
141
+ "id": "qwen3-coder-plus",
142
+ "name": "qwen3-coder-plus",
143
+ "baseUrl": "https://dashscope.aliyuncs.com/compatible-mode/v1",
144
+ "description": "Qwen3-Coder via Dashscope",
145
+ "envKey": "DASHSCOPE_API_KEY"
146
+ }
147
+ ]
148
+ },
149
+ "env": {
150
+ "DASHSCOPE_API_KEY": "sk-xxxxxxxxxxxxx"
151
+ },
152
+ "security": {
153
+ "auth": {
154
+ "selectedType": "openai"
155
+ }
156
+ },
157
+ "model": {
158
+ "name": "qwen3-coder-plus"
159
+ }
160
+ }
161
+ ```
120
162
 
121
- Environment variables (recommended for CI / headless environments):
163
+ **Step 2:** Understand each field
164
+
165
+ | Field | What it does |
166
+ | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
167
+ | `modelProviders` | Declares which models are available and how to connect to them. Keys like `openai`, `anthropic`, `gemini` represent the API protocol. |
168
+ | `modelProviders[].id` | The model ID sent to the API (e.g. `qwen3-coder-plus`, `gpt-4o`). |
169
+ | `modelProviders[].envKey` | The name of the environment variable that holds your API key. |
170
+ | `modelProviders[].baseUrl` | The API endpoint URL (required for non-default endpoints). |
171
+ | `env` | A fallback place to store API keys (lowest priority; prefer `.env` files or `export` for sensitive keys). |
172
+ | `security.auth.selectedType` | The protocol to use on startup (`openai`, `anthropic`, `gemini`, `vertex-ai`). |
173
+ | `model.name` | The default model to use when Qwen Code starts. |
174
+
175
+ **Step 3:** Start Qwen Code — your configuration takes effect automatically:
122
176
 
123
177
  ```bash
124
- export OPENAI_API_KEY="your-api-key-here"
125
- export OPENAI_BASE_URL="https://api.openai.com/v1" # optional
126
- export OPENAI_MODEL="gpt-4o" # optional
178
+ qwen
179
+ ```
180
+
181
+ Use the `/model` command at any time to switch between all configured models.
182
+
183
+ ##### More Examples
184
+
185
+ <details>
186
+ <summary>Coding Plan (Alibaba Cloud Bailian) — fixed monthly fee, higher quotas</summary>
187
+
188
+ ```json
189
+ {
190
+ "modelProviders": {
191
+ "openai": [
192
+ {
193
+ "id": "qwen3-coder-plus",
194
+ "name": "qwen3-coder-plus (Coding Plan)",
195
+ "baseUrl": "https://coding.dashscope.aliyuncs.com/v1",
196
+ "description": "qwen3-coder-plus from Bailian Coding Plan",
197
+ "envKey": "BAILIAN_CODING_PLAN_API_KEY"
198
+ }
199
+ ]
200
+ },
201
+ "env": {
202
+ "BAILIAN_CODING_PLAN_API_KEY": "sk-xxxxxxxxxxxxx"
203
+ },
204
+ "security": {
205
+ "auth": {
206
+ "selectedType": "openai"
207
+ }
208
+ },
209
+ "model": {
210
+ "name": "qwen3-coder-plus"
211
+ }
212
+ }
213
+ ```
214
+
215
+ > Subscribe to the Coding Plan at [Alibaba Cloud Bailian](https://bailian.console.aliyun.com/cn-beijing/?tab=globalset#/efm/coding_plan).
216
+
217
+ </details>
218
+
219
+ <details>
220
+ <summary>Multiple providers (OpenAI + Anthropic + Gemini)</summary>
221
+
222
+ ```json
223
+ {
224
+ "modelProviders": {
225
+ "openai": [
226
+ {
227
+ "id": "gpt-4o",
228
+ "name": "GPT-4o",
229
+ "envKey": "OPENAI_API_KEY",
230
+ "baseUrl": "https://api.openai.com/v1"
231
+ }
232
+ ],
233
+ "anthropic": [
234
+ {
235
+ "id": "claude-sonnet-4-20250514",
236
+ "name": "Claude Sonnet 4",
237
+ "envKey": "ANTHROPIC_API_KEY"
238
+ }
239
+ ],
240
+ "gemini": [
241
+ {
242
+ "id": "gemini-2.5-pro",
243
+ "name": "Gemini 2.5 Pro",
244
+ "envKey": "GEMINI_API_KEY"
245
+ }
246
+ ]
247
+ },
248
+ "env": {
249
+ "OPENAI_API_KEY": "sk-xxxxxxxxxxxxx",
250
+ "ANTHROPIC_API_KEY": "sk-ant-xxxxxxxxxxxxx",
251
+ "GEMINI_API_KEY": "AIzaxxxxxxxxxxxxx"
252
+ },
253
+ "security": {
254
+ "auth": {
255
+ "selectedType": "openai"
256
+ }
257
+ },
258
+ "model": {
259
+ "name": "gpt-4o"
260
+ }
261
+ }
262
+ ```
263
+
264
+ </details>
265
+
266
+ <details>
267
+ <summary>Enable thinking mode (for supported models like qwen3.5-plus)</summary>
268
+
269
+ ```json
270
+ {
271
+ "modelProviders": {
272
+ "openai": [
273
+ {
274
+ "id": "qwen3.5-plus",
275
+ "name": "qwen3.5-plus (thinking)",
276
+ "envKey": "DASHSCOPE_API_KEY",
277
+ "baseUrl": "https://dashscope.aliyuncs.com/compatible-mode/v1",
278
+ "generationConfig": {
279
+ "extra_body": {
280
+ "enable_thinking": true
281
+ }
282
+ }
283
+ }
284
+ ]
285
+ },
286
+ "env": {
287
+ "DASHSCOPE_API_KEY": "sk-xxxxxxxxxxxxx"
288
+ },
289
+ "security": {
290
+ "auth": {
291
+ "selectedType": "openai"
292
+ }
293
+ },
294
+ "model": {
295
+ "name": "qwen3.5-plus"
296
+ }
297
+ }
127
298
  ```
128
299
 
129
- For details (including `.qwen/.env` loading and security notes), see the [authentication guide](https://qwenlm.github.io/qwen-code-docs/en/users/configuration/auth/).
300
+ </details>
301
+
302
+ > **Tip:** You can also set API keys via `export` in your shell or `.env` files, which take higher priority than `settings.json` → `env`. See the [authentication guide](https://qwenlm.github.io/qwen-code-docs/en/users/configuration/auth/) for full details.
303
+
304
+ > **Security note:** Never commit API keys to version control. The `~/.qwen/settings.json` file is in your home directory and should stay private.
130
305
 
131
306
  ## Usage
132
307
 
@@ -194,10 +369,21 @@ Build on top of Qwen Code with the TypeScript SDK:
194
369
 
195
370
  Qwen Code can be configured via `settings.json`, environment variables, and CLI flags.
196
371
 
197
- - **User settings**: `~/.qwen/settings.json`
198
- - **Project settings**: `.qwen/settings.json`
372
+ | File | Scope | Description |
373
+ | ----------------------- | ------------- | --------------------------------------------------------------------------------------- |
374
+ | `~/.qwen/settings.json` | User (global) | Applies to all your Qwen Code sessions. **Recommended for `modelProviders` and `env`.** |
375
+ | `.qwen/settings.json` | Project | Applies only when running Qwen Code in this project. Overrides user settings. |
376
+
377
+ The most commonly used top-level fields in `settings.json`:
378
+
379
+ | Field | Description |
380
+ | ---------------------------- | ---------------------------------------------------------------------------------------------------- |
381
+ | `modelProviders` | Define available models per protocol (`openai`, `anthropic`, `gemini`, `vertex-ai`). |
382
+ | `env` | Fallback environment variables (e.g. API keys). Lower priority than shell `export` and `.env` files. |
383
+ | `security.auth.selectedType` | The protocol to use on startup (e.g. `openai`). |
384
+ | `model.name` | The default model to use when Qwen Code starts. |
199
385
 
200
- See [settings](https://qwenlm.github.io/qwen-code-docs/en/users/configuration/settings/) for available options and precedence.
386
+ > See the [Authentication](#api-key-flexible) section above for complete `settings.json` examples, and the [settings reference](https://qwenlm.github.io/qwen-code-docs/en/users/configuration/settings/) for all available options.
201
387
 
202
388
  ## Benchmark Results
203
389