Skip to content
2 changes: 1 addition & 1 deletion docs/design/tool-use-summary/tool-use-summary-design.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ At T0+1s, we cannot retroactively add the label to the already-committed tool_gr

This PR takes option 2 in full mode. The `tool_use_summary` entry is a real history item, rendered as a single dim `● <label>` line by `HistoryItemDisplay`. No `refreshStatic` needed.

Compact mode is different because of `mergeCompactToolGroups`. When consecutive tool_groups merge, `MainContent` already calls `refreshStatic()` — that's an existing codepath, and it re-renders the merged group with the label looked up from history. So compact mode _does_ get the label as a header replacement. To avoid rendering the same label twice (once as the compact header, once as a trailing `● <label>` line), `HistoryItemDisplay` hides the standalone line when `compactMode` is true.
Compact mode is different because of `mergeCompactToolGroups`. When consecutive tool*groups merge, `MainContent` already calls `refreshStatic()` — that's an existing codepath, and it re-renders the merged group with the label looked up from history. So compact mode \_does* get the label as a header replacement. To avoid rendering the same label twice (once as the compact header, once as a trailing `● <label>` line), `HistoryItemDisplay` hides the standalone line when `compactMode` is true.

```
Full mode Compact mode (with merge)
Expand Down
7 changes: 6 additions & 1 deletion docs/users/configuration/auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ You'll see a selector with arrow-key navigation:
Select authentication method:

Alibaba Cloud Coding Plan - Paid · Up to 6,000 requests/5 hrs · All Alibaba Cloud Coding Plan Models
API Key - Bring your own API key
Qwen OAuth - Discontinued — switch to Coding Plan or API Key

(Use ↑ ↓ arrows to navigate, Enter to select, Ctrl+C to exit)
Expand All @@ -340,9 +341,10 @@ Select authentication method:
| Command | Description |
| ---------------------------------------------------- | ------------------------------------------------- |
| `qwen auth` | Interactive authentication setup |
| `qwen auth qwen-oauth` | Authenticate with Qwen OAuth |
| `qwen auth coding-plan` | Authenticate with Alibaba Cloud Coding Plan |
| `qwen auth coding-plan --region china --key sk-sp-…` | Non-interactive Coding Plan setup (for scripting) |
| `qwen auth api-key` | Authenticate with an API key |
| `qwen auth qwen-oauth` | Authenticate with Qwen OAuth (discontinued) |
| `qwen auth status` | Show current authentication status |

**Examples:**
Expand All @@ -357,6 +359,9 @@ qwen auth coding-plan
# Set up Coding Plan non-interactively (useful for CI/scripting)
qwen auth coding-plan --region china --key sk-sp-xxxxxxxxx

# Set up API key (ModelStudio Standard or custom provider)
qwen auth api-key

# Check your current auth configuration
qwen auth status
```
Expand Down
3 changes: 2 additions & 1 deletion docs/users/features/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,10 @@ In addition to the in-session `/auth` slash command, Qwen Code provides standalo
| Command | Description |
| ---------------------------------------------------- | ------------------------------------------------------------- |
| `qwen auth` | Interactive authentication setup |
| `qwen auth qwen-oauth` | ~~Authenticate with Qwen OAuth~~ (discontinued on 2026-04-15) |
| `qwen auth coding-plan` | Authenticate with Alibaba Cloud Coding Plan |
| `qwen auth coding-plan --region china --key sk-sp-…` | Non-interactive Coding Plan setup (for scripting) |
| `qwen auth api-key` | Authenticate with an API key |
| `qwen auth qwen-oauth` | ~~Authenticate with Qwen OAuth~~ (discontinued on 2026-04-15) |
| `qwen auth status` | Show current authentication status |

> [!tip]
Expand Down
1 change: 1 addition & 0 deletions docs/users/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ Here are the most important commands for daily use:
| `qwen` | start Qwen Code | `qwen` |
| `/auth` | Change authentication method (in session) | `/auth` |
| `qwen auth` | Configure authentication from the terminal | `qwen auth` |
| `qwen auth api-key` | Configure API key authentication | `qwen auth api-key` |
| `qwen auth status` | Check current authentication status | `qwen auth status` |
| `/help` | Display help information for available commands | `/help` or `/?` |
| `/compress` | Replace chat history with summary to save Tokens | `/compress` |
Expand Down
12 changes: 11 additions & 1 deletion packages/cli/src/commands/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import type { CommandModule, Argv } from 'yargs';
import {
handleQwenAuth,
handleApiKeyAuth,
runInteractiveAuth,
showAuthStatus,
} from './auth/handler.js';
Expand Down Expand Up @@ -50,6 +51,14 @@ const codePlanCommand = {
},
};

const apiKeyCommand = {
command: 'api-key',
describe: t('Authenticate using an API key'),
handler: async () => {
await handleApiKeyAuth();
},
};

const openRouterCommand = {
command: 'openrouter',
describe: t('Authenticate using OpenRouter API key setup'),
Expand All @@ -76,13 +85,14 @@ const statusCommand = {
export const authCommand: CommandModule = {
command: 'auth',
describe: t(
'Configure Qwen authentication information with Qwen-OAuth, OpenRouter, or Alibaba Cloud Coding Plan',
'Configure Qwen authentication with OpenRouter, Coding Plan, API Key, or Qwen-OAuth',
),
builder: (yargs: Argv) =>
yargs
.command(qwenOauthCommand)
.command(codePlanCommand)
.command(openRouterCommand)
.command(apiKeyCommand)
.command(statusCommand)
.demandCommand(0) // Don't require a subcommand
.version(false),
Expand Down
Loading
Loading