Skip to content

Commit e2c4935

Browse files
committed
Merge remote-tracking branch 'origin/main' into chore/list-voices
2 parents fd36db5 + 4f10b7f commit e2c4935

2 files changed

Lines changed: 47 additions & 4 deletions

File tree

skills/bailian-cli/SKILL.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,11 @@ More examples per command: see `reference/<group>.md` (e.g. [`reference/text.md`
147147
Install, API key / console login, endpoint override, and config keys:
148148
[`assets/setup.md`](assets/setup.md).
149149

150+
**Console login:** never run bare `bl auth login --console` — always pass `--console-site domestic` or `--console-site international`. Before login, run `bl config show --output json` and follow the site-selection rules in [`assets/setup.md` → Console site selection](assets/setup.md#console-site-selection).
151+
150152
```bash
151153
bl auth status # check current auth
154+
bl auth login --console --console-site international # example: international console
152155
bl text chat --message "Write a poem about spring" # quick smoke test
153156
```
154157

@@ -197,3 +200,4 @@ Full workflow, redaction rules, template, and exit-code reference: [`assets/issu
197200
- Video understanding with audio context → `bl omni`, not only `bl vision describe`.
198201
- Search → `bl search web`.
199202
- Local paths → pass directly to `bl`; never require the user to obtain URLs first.
203+
- Console login → always `--console-site domestic|international`; see [`assets/setup.md`](assets/setup.md#console-site-selection).

skills/bailian-cli/assets/setup.md

Lines changed: 43 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ Verify: `bl --version` (prints `bl X.Y.Z`).
2121

2222
## Authentication
2323

24-
| Auth | How | Used by |
25-
| ------------- | --------------------------------------------------------------------- | ---------------------------------------- |
26-
| API key | `export DASHSCOPE_API_KEY=sk-...` or `bl auth login --api-key sk-...` | Most DashScope API commands |
27-
| Console token | `bl auth login --console` | `app list`, `usage free`, `console call` |
24+
| Auth | How | Used by |
25+
| ------------- | ------------------------------------------------------------------------ | ---------------------------------------- |
26+
| API key | `export DASHSCOPE_API_KEY=sk-...` or `bl auth login --api-key sk-...` | Most DashScope API commands |
27+
| Console token | `bl auth login --console --console-site domestic` or `... international` | `app list`, `usage free`, `console call` |
2828

2929
```bash
3030
bl auth status # check current auth
@@ -34,6 +34,45 @@ bl auth logout --console # clear console token only
3434

3535
Get an API key: https://bailian.console.aliyun.com/cn-beijing/?tab=app#/api-key
3636

37+
### Console site selection
38+
39+
Console login and console-gateway commands (`app list`, `usage *`, `quota *`, `workspace list`, `console call`) target one of two Bailian consoles:
40+
41+
| Site | Value | Login URL |
42+
| ----------------- | --------------- | ---------------------------------------------- |
43+
| Domestic (中国站) | `domestic` | `https://bailian.console.aliyun.com` |
44+
| International | `international` | `https://modelstudio.console.alibabacloud.com` |
45+
46+
**Do not run bare `bl auth login --console`** — the CLI defaults to `domestic`. Always pass `--console-site` explicitly (or rely on a saved `console_site` in config).
47+
48+
**Before console login**, run `bl config show --output json` and check `console_site`.
49+
50+
**How to choose the site** (first match wins):
51+
52+
1. **`console_site` in `~/.bailian/config.json`** — use it; no need to ask again.
53+
2. **User explicitly says** 国际站 / 全球站 / international / `modelstudio.console.alibabacloud.com``international`.
54+
3. **User explicitly says** 国内站 / 中国站 / domestic / `bailian.console.aliyun.com``domestic`.
55+
4. **Infer from DashScope endpoint** (`base_url` or `DASHSCOPE_BASE_URL` from `bl config show`):
56+
- `https://dashscope-intl.aliyuncs.com``international`
57+
- `https://dashscope.aliyuncs.com` or `https://dashscope-us.aliyuncs.com``domestic`
58+
5. **Still unclear** — ask the user which console they use; do not assume domestic.
59+
60+
```bash
61+
# Domestic
62+
bl auth login --console --console-site domestic
63+
64+
# International
65+
bl auth login --console --console-site international
66+
```
67+
68+
After a successful console login, the callback may persist `console_site` in `~/.bailian/config.json`. You can also set it manually:
69+
70+
```json
71+
{ "console_site": "international" }
72+
```
73+
74+
Use the same `--console-site` on console-gateway commands when it differs from the saved default, e.g. `bl app list --console-site international`.
75+
3776
---
3877

3978
## DashScope endpoint

0 commit comments

Comments
 (0)