@qwen-code/qwen-code 0.15.8 → 0.15.9
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/bundled/qc-helper/docs/configuration/model-providers.md +2 -2
- package/bundled/qc-helper/docs/configuration/settings.md +43 -39
- package/cli.js +20187 -17499
- package/locales/en.js +19 -0
- package/locales/zh-TW.js +19 -0
- package/locales/zh.js +19 -0
- package/package.json +2 -2
|
@@ -10,9 +10,9 @@ Use `modelProviders` to declare curated model lists per auth type that the `/mod
|
|
|
10
10
|
>
|
|
11
11
|
> Only the `/model` command exposes non-default auth types. Anthropic, Gemini, etc., must be defined via `modelProviders`. The `/auth` command lists Qwen OAuth, Alibaba Cloud Coding Plan, and API Key as the built-in authentication options.
|
|
12
12
|
|
|
13
|
-
> [!
|
|
13
|
+
> [!note]
|
|
14
14
|
>
|
|
15
|
-
> **
|
|
15
|
+
> **Model uniqueness:** Models within the same `authType` are uniquely identified by the combination of `id` + `baseUrl`. This means you can define the same model ID (e.g., `"gpt-4o"`) multiple times under a single `authType` as long as each entry has a different `baseUrl` — for example, one pointing to OpenAI directly and another to a proxy endpoint. If two entries share both the same `id` and the same `baseUrl` (or both omit `baseUrl`), the first occurrence wins and subsequent duplicates are skipped with a warning.
|
|
16
16
|
|
|
17
17
|
## Configuration Examples by Auth Type
|
|
18
18
|
|
|
@@ -83,16 +83,17 @@ Settings are organized into categories. Most settings should be placed within th
|
|
|
83
83
|
|
|
84
84
|
#### general
|
|
85
85
|
|
|
86
|
-
| Setting | Type | Description
|
|
87
|
-
| ------------------------------------------ | ------- |
|
|
88
|
-
| `general.preferredEditor` | string | The preferred editor to open files in.
|
|
89
|
-
| `general.vimMode` | boolean | Enable Vim keybindings.
|
|
90
|
-
| `general.enableAutoUpdate` | boolean | Enable automatic update checks and installations on startup.
|
|
91
|
-
| `general.showSessionRecap` | boolean | Auto-show a one-line "where you left off" recap when returning to the terminal after being away. Off by default. Use `/recap` to trigger manually regardless of this setting.
|
|
92
|
-
| `general.sessionRecapAwayThresholdMinutes` | number | Minutes the terminal must be blurred before an auto-recap fires on focus-in. Only used when `showSessionRecap` is enabled.
|
|
93
|
-
| `general.gitCoAuthor`
|
|
94
|
-
| `general.
|
|
95
|
-
| `general.
|
|
86
|
+
| Setting | Type | Description | Default |
|
|
87
|
+
| ------------------------------------------ | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
|
|
88
|
+
| `general.preferredEditor` | string | The preferred editor to open files in. | `undefined` |
|
|
89
|
+
| `general.vimMode` | boolean | Enable Vim keybindings. | `false` |
|
|
90
|
+
| `general.enableAutoUpdate` | boolean | Enable automatic update checks and installations on startup. | `true` |
|
|
91
|
+
| `general.showSessionRecap` | boolean | Auto-show a one-line "where you left off" recap when returning to the terminal after being away. Off by default. Use `/recap` to trigger manually regardless of this setting. | `false` |
|
|
92
|
+
| `general.sessionRecapAwayThresholdMinutes` | number | Minutes the terminal must be blurred before an auto-recap fires on focus-in. Only used when `showSessionRecap` is enabled. | `5` |
|
|
93
|
+
| `general.gitCoAuthor.commit` | boolean | Add a Co-authored-by trailer to git commit messages AND attach a per-file AI-attribution git note (`refs/notes/ai-attribution`) for commits made through Qwen Code. Disabling skips both. | `true` |
|
|
94
|
+
| `general.gitCoAuthor.pr` | boolean | Append a Qwen Code attribution line to pull request descriptions when running `gh pr create`. | `true` |
|
|
95
|
+
| `general.checkpointing.enabled` | boolean | Enable session checkpointing for recovery. | `false` |
|
|
96
|
+
| `general.defaultFileEncoding` | string | Default encoding for new files. Use `"utf-8"` (default) for UTF-8 without BOM, or `"utf-8-bom"` for UTF-8 with BOM. Only change this if your project specifically requires BOM. | `"utf-8"` |
|
|
96
97
|
|
|
97
98
|
#### output
|
|
98
99
|
|
|
@@ -469,15 +470,16 @@ Configures connections to one or more Model-Context Protocol (MCP) servers for d
|
|
|
469
470
|
|
|
470
471
|
Configures logging and metrics collection for Qwen Code. For more information, see [telemetry](/developers/development/telemetry).
|
|
471
472
|
|
|
472
|
-
| Setting
|
|
473
|
-
|
|
|
474
|
-
| `telemetry.enabled`
|
|
475
|
-
| `telemetry.target`
|
|
476
|
-
| `telemetry.otlpEndpoint`
|
|
477
|
-
| `telemetry.otlpProtocol`
|
|
478
|
-
| `telemetry.logPrompts`
|
|
479
|
-
| `telemetry.
|
|
480
|
-
| `telemetry.
|
|
473
|
+
| Setting | Type | Description | Default |
|
|
474
|
+
| ------------------------------------------ | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
|
|
475
|
+
| `telemetry.enabled` | boolean | Whether or not telemetry is enabled. | |
|
|
476
|
+
| `telemetry.target` | string | The destination for collected telemetry. Supported values are `local` and `gcp`. | |
|
|
477
|
+
| `telemetry.otlpEndpoint` | string | The endpoint for the OTLP Exporter. | |
|
|
478
|
+
| `telemetry.otlpProtocol` | string | The protocol for the OTLP Exporter (`grpc` or `http`). | |
|
|
479
|
+
| `telemetry.logPrompts` | boolean | Whether or not to include the content of user prompts in the logs. | |
|
|
480
|
+
| `telemetry.includeSensitiveSpanAttributes` | boolean | Whether to include `prompt`, `function_args`, and `response_text` in spans created by the log-to-span bridge. Only controls bridge spans; OTel logs and other telemetry sinks may still receive `response_text`. | `false` |
|
|
481
|
+
| `telemetry.outfile` | string | The file to write telemetry to when `target` is `local`. | |
|
|
482
|
+
| `telemetry.useCollector` | boolean | Whether to use an external OTLP collector. | |
|
|
481
483
|
|
|
482
484
|
### Example `settings.json`
|
|
483
485
|
|
|
@@ -519,7 +521,8 @@ Here is an example of a `settings.json` file with the nested structure, new as o
|
|
|
519
521
|
"enabled": true,
|
|
520
522
|
"target": "local",
|
|
521
523
|
"otlpEndpoint": "http://localhost:4317",
|
|
522
|
-
"logPrompts": true
|
|
524
|
+
"logPrompts": true,
|
|
525
|
+
"includeSensitiveSpanAttributes": false
|
|
523
526
|
},
|
|
524
527
|
"privacy": {
|
|
525
528
|
"usageStatisticsEnabled": true
|
|
@@ -565,25 +568,26 @@ For authentication-related variables (like `OPENAI_*`) and the recommended `.qwe
|
|
|
565
568
|
|
|
566
569
|
### Environment Variables Table
|
|
567
570
|
|
|
568
|
-
| Variable
|
|
569
|
-
|
|
|
570
|
-
| `QWEN_TELEMETRY_ENABLED`
|
|
571
|
-
| `QWEN_TELEMETRY_TARGET`
|
|
572
|
-
| `QWEN_TELEMETRY_OTLP_ENDPOINT`
|
|
573
|
-
| `QWEN_TELEMETRY_OTLP_PROTOCOL`
|
|
574
|
-
| `QWEN_TELEMETRY_LOG_PROMPTS`
|
|
575
|
-
| `
|
|
576
|
-
| `
|
|
577
|
-
| `
|
|
578
|
-
| `
|
|
579
|
-
| `
|
|
580
|
-
| `
|
|
581
|
-
| `
|
|
582
|
-
| `
|
|
583
|
-
| `
|
|
584
|
-
| `
|
|
585
|
-
| `
|
|
586
|
-
| `
|
|
571
|
+
| Variable | Description | Notes |
|
|
572
|
+
| -------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
573
|
+
| `QWEN_TELEMETRY_ENABLED` | Set to `true` or `1` to enable telemetry. Any other value is treated as disabling it. | Overrides the `telemetry.enabled` setting. |
|
|
574
|
+
| `QWEN_TELEMETRY_TARGET` | Sets the telemetry target (`local` or `gcp`). | Overrides the `telemetry.target` setting. |
|
|
575
|
+
| `QWEN_TELEMETRY_OTLP_ENDPOINT` | Sets the OTLP endpoint for telemetry. | Overrides the `telemetry.otlpEndpoint` setting. |
|
|
576
|
+
| `QWEN_TELEMETRY_OTLP_PROTOCOL` | Sets the OTLP protocol (`grpc` or `http`). | Overrides the `telemetry.otlpProtocol` setting. |
|
|
577
|
+
| `QWEN_TELEMETRY_LOG_PROMPTS` | Set to `true` or `1` to enable or disable logging of user prompts. Any other value is treated as disabling it. | Overrides the `telemetry.logPrompts` setting. |
|
|
578
|
+
| `QWEN_TELEMETRY_INCLUDE_SENSITIVE_SPAN_ATTRIBUTES` | Set to `true` or `1` to include `prompt`, `function_args`, and `response_text` in spans created by the log-to-span bridge. Any other value disables it. | Overrides the `telemetry.includeSensitiveSpanAttributes` setting. Only controls bridge spans; OTel logs and other telemetry sinks may still receive `response_text`. |
|
|
579
|
+
| `QWEN_TELEMETRY_OUTFILE` | Sets the file path to write telemetry to when the target is `local`. | Overrides the `telemetry.outfile` setting. |
|
|
580
|
+
| `QWEN_TELEMETRY_USE_COLLECTOR` | Set to `true` or `1` to enable or disable using an external OTLP collector. Any other value is treated as disabling it. | Overrides the `telemetry.useCollector` setting. |
|
|
581
|
+
| `QWEN_SANDBOX` | Alternative to the `sandbox` setting in `settings.json`. | Accepts `true`, `false`, `docker`, `podman`, or a custom command string. |
|
|
582
|
+
| `QWEN_SANDBOX_IMAGE` | Overrides sandbox image selection for Docker/Podman. | Takes precedence over `tools.sandboxImage`. |
|
|
583
|
+
| `SEATBELT_PROFILE` | (macOS specific) Switches the Seatbelt (`sandbox-exec`) profile on macOS. | `permissive-open`: (Default) Restricts writes to the project folder (and a few other folders, see `packages/cli/src/utils/sandbox-macos-permissive-open.sb`) but allows other operations. `strict`: Uses a strict profile that declines operations by default. `<profile_name>`: Uses a custom profile. To define a custom profile, create a file named `sandbox-macos-<profile_name>.sb` in your project's `.qwen/` directory (e.g., `my-project/.qwen/sandbox-macos-custom.sb`). |
|
|
584
|
+
| `DEBUG` or `DEBUG_MODE` | (often used by underlying libraries or the CLI itself) Set to `true` or `1` to enable verbose debug logging, which can be helpful for troubleshooting. | **Note:** These variables are automatically excluded from project `.env` files by default to prevent interference with the CLI behavior. Use `.qwen/.env` files if you need to set these for Qwen Code specifically. |
|
|
585
|
+
| `NO_COLOR` | Set to any value to disable all color output in the CLI. | |
|
|
586
|
+
| `CLI_TITLE` | Set to a string to customize the title of the CLI. | |
|
|
587
|
+
| `CODE_ASSIST_ENDPOINT` | Specifies the endpoint for the code assist server. | This is useful for development and testing. |
|
|
588
|
+
| `QWEN_CODE_MAX_OUTPUT_TOKENS` | Overrides the default maximum output tokens per response. When not set, Qwen Code uses an adaptive strategy: starts with 8K tokens and automatically retries with 64K if the response is truncated. Set this to a specific value (e.g., `16000`) to use a fixed limit instead. | Takes precedence over the capped default (8K) but is overridden by `samplingParams.max_tokens` in settings. Disables automatic escalation when set. Example: `export QWEN_CODE_MAX_OUTPUT_TOKENS=16000` |
|
|
589
|
+
| `QWEN_CODE_UNATTENDED_RETRY` | Set to `true` or `1` to enable persistent retry mode. When enabled, transient API capacity errors (HTTP 429 Rate Limit and 529 Overloaded) are retried indefinitely with exponential backoff (capped at 5 minutes per retry) and heartbeat keepalives every 30 seconds on stderr. | Designed for CI/CD pipelines and background automation where long-running tasks should survive temporary API outages. Must be set explicitly — `CI=true` alone does **not** activate this mode. See [Headless Mode](../features/headless#persistent-retry-mode) for details. Example: `export QWEN_CODE_UNATTENDED_RETRY=1` |
|
|
590
|
+
| `QWEN_CODE_PROFILE_STARTUP` | Set to `1` to enable startup performance profiling. Writes a JSON timing report to `~/.qwen/startup-perf/` with per-phase durations. | Only active inside the sandbox child process. Zero overhead when not set. Example: `export QWEN_CODE_PROFILE_STARTUP=1` |
|
|
587
591
|
|
|
588
592
|
## Command-Line Arguments
|
|
589
593
|
|