feat(cli): support tools.sandboxImage in settings (#3146)

Co-authored-by: jinye.djy <jinye.djy@alibaba-inc.com>
This commit is contained in:
jinye 2026-04-13 09:43:34 +08:00 committed by GitHub
parent 116796b2a4
commit 1557d93043
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 146 additions and 19 deletions

View file

@ -103,8 +103,16 @@ qwen -p "run the test suite"
- **CLI flag**: `--sandbox-image <image>`
- **Environment variable**: `QWEN_SANDBOX_IMAGE=<image>`
- **Settings file**: `tools.sandboxImage` in your `settings.json` (e.g., `{"tools": {"sandboxImage": "ghcr.io/qwenlm/qwen-code:0.14.1"}}`)
If you dont set either, Qwen Code uses the default image configured in the CLI package (for example `ghcr.io/qwenlm/qwen-code:<version>`).
Priority order (highest to lowest):
1. `--sandbox-image`
2. `QWEN_SANDBOX_IMAGE`
3. `tools.sandboxImage`
4. Built-in default image from the CLI package (for example `ghcr.io/qwenlm/qwen-code:<version>`)
`settings.env.QWEN_SANDBOX_IMAGE` also works as a generic env injection mechanism, but `tools.sandboxImage` is the preferred persistent setting.
### macOS Seatbelt profiles