Merge pull request #1952 from QwenLM/coding-plan-ui-fix

feat(auth): add automatic backup of settings.json before auth modification
This commit is contained in:
tanzhenxin 2026-02-27 21:29:45 +08:00 committed by GitHub
commit 1979e2121b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 72 additions and 21 deletions

View file

@ -266,12 +266,12 @@ This is the approach used in the [one-file setup example](#recommended-one-file-
**Priority summary:**
| Priority | Source | Override behavior |
| ----------- | ------------------------------ | ---------------------------------------- |
| 1 (highest) | CLI flags (`--openai-api-key`) | Always wins |
| 2 | System env (`export`, inline) | Overrides `.env` and `settings.env` |
| 3 | `.env` file | Only sets if not in system env |
| 4 (lowest) | `settings.json``env` | Only sets if not in system env or `.env` |
| Priority | Source | Override behavior |
| ----------- | ------------------------------ | -------------------------------------------- |
| 1 (highest) | CLI flags (`--openai-api-key`) | Always wins |
| 2 | System env (`export`, inline) | Overrides `.env` and `settings.json` → `env` |
| 3 | `.env` file | Only sets if not in system env |
| 4 (lowest) | `settings.json``env` | Only sets if not in system env or `.env` |
#### Step 3: Switch models with `/model`

View file

@ -317,7 +317,7 @@ The region is selected during authentication and stored in `settings.json` under
### API Key Storage
When you configure Coding Plan through the `/auth` command, the API key is stored using the reserved environment variable name `BAILIAN_CODING_PLAN_API_KEY`. By default, it is stored in the `settings.env` field of your `settings.json` file.
When you configure Coding Plan through the `/auth` command, the API key is stored using the reserved environment variable name `BAILIAN_CODING_PLAN_API_KEY`. By default, it is stored in the `env` field of your `settings.json` file.
> [!warning]
>