Skip to content

Commit 64ff057

Browse files
committed
feat(auth): support token-plan model profile login
- add the built-in Token Plan profile preset - validate and persist model API keys atomically - materialize the default Base URL and models on login - preserve flag > env > config precedence
1 parent 6d588a5 commit 64ff057

13 files changed

Lines changed: 956 additions & 103 deletions

File tree

docs/agents/auth-change.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ defineCommand({ auth }) → runtime/authStage → ctx.client → command.run(ctx
4444

4545
- `resolveApiKey()``auth: "apiKey"` 命令;优先级 `--api-key` > `DASHSCOPE_API_KEY` > config `api_key`
4646
- `resolveModelBaseUrl()` — model base URL;优先级 `--base-url` > `DASHSCOPE_BASE_URL` > config `base_url` > `REGIONS.cn`
47+
- `--config` 只选择 config 文件 block,不提升该 block 的字段优先级;内置套餐 Profile(当前为 `token-plan`)的预设仅在登录时物化写入,运行时继续走统一的 flag > env > selected config file > 默认值
4748
- `resolveConsole()``auth: "console"` 命令;当前 token 来自 config `access_token`,region/site/switchAgent 来自 flag > config > 默认
4849
- `resolveOpenApi()``auth: "openapi"` 命令;优先级 `--access-key-id/--access-key-secret` > `ALIBABA_CLOUD_ACCESS_KEY_ID/ALIBABA_CLOUD_ACCESS_KEY_SECRET` > config `access_key_*`。兼容读取旧字段 `openapi_access_key_*`,新写入只写短字段
4950
- `describeAuthState()``auth status` / banner / telemetry 使用的只读快照

0 commit comments

Comments
 (0)