Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,34 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and

[中文版](CHANGELOG.zh.md) · [README](README.md) · [Contributing](CONTRIBUTING.md)

## [2.7.3] - 2026-11-03

### Added

- **Custom model import**: Add `bl cmodel base-models/import/get/list/watch/delete` to import Bailian base models as custom models.
- `cmodel base-models` lists base models eligible for import (console API; import is currently available in the Beijing region only).
- `cmodel import` submits an import job with weight type, display name, and optional bucket/object-key, validating the base model against the console-supported import list before submission.
- `cmodel watch --job-id <id>` tracks import job progress with `--follow`, polling interval, and timeout options.
- `cmodel get/list/delete` query and remove imported custom models.

### Changed

- **Unified output contract**: Route every command family through one invocation output contract (result / progress / info / warning / debug). Progress and informational messages go to stderr and are hidden in quiet mode; warnings and errors are always preserved. In JSON mode, warnings and errors are emitted as single-line JSON on stderr. Quiet mode no longer trims result fields and gains a `DASHSCOPE_QUIET=1` environment variable.
- **Advisor thinking disabled**: `bl advisor recommend` LLM calls no longer use thinking mode; intent analysis was the only thinking stage. `--no-thinking` remains accepted as a deprecated no-op for existing scripts.

### Fixed

- **Root help configuration**: Reuse the loaded configuration when rendering root help, preserving parsed flags, Profile selection, and credential precedence.
- **Duplicate error messages**: Stop repeating the redundant normalization cause in text errors while preserving explicit causes, error codes, JSON details, and verbose stacks.
- **SDK warnings and empty ASR results**: Preserve SDK warnings and empty ASR task results in managed-agent workflows and `bl speech recognize`.
- **Finetune fee diagnostics**: `bl finetune fee` now emits gateway diagnostics for fee queries in verbose mode.

### Internal

- Instrument advisor LLM requests for telemetry.
- Align all command tests and guidance with the output contract; optimize CLI test suites and shard CI test jobs.
- Clarify quiet output behavior in the CLI and Knowledge Studio READMEs.

## [2.7.2] - 2026-10-30

### Added
Expand Down
28 changes: 28 additions & 0 deletions CHANGELOG.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,34 @@

[English](CHANGELOG.md) · [README](README.zh.md) · [参与贡献](CONTRIBUTING.zh.md)

## [2.7.3] - 2026-11-03

### 新增

- **自定义模型导入**:新增 `bl cmodel base-models/import/get/list/watch/delete`,支持将百炼基础模型导入为自定义模型。
- `cmodel base-models` 列出可导入的基础模型(控制台接口动态返回;导入当前仅北京地域开放)。
- `cmodel import` 提交导入任务,支持权重类型、展示名称与可选 bucket/object-key,提交前按控制台可导入清单校验基础模型。
- `cmodel watch --job-id <id>` 跟踪导入任务进度,支持 `--follow`、轮询间隔与超时配置。
- `cmodel get/list/delete` 查询与删除已导入的自定义模型。

### 变更

- **统一输出契约**:全部命令统一走本次调用的输出契约(result / progress / info / warning / debug)。进度与过程提示写 stderr(quiet 下隐藏),警告与错误始终保留;JSON 模式下警告/错误以 stderr 单行 JSON 输出。quiet 不再裁剪结果字段,并新增 `DASHSCOPE_QUIET=1` 环境变量。
- **Advisor 关闭思考模式**:`bl advisor recommend` 的 LLM 调用始终关闭思考模式(意图分析此前为唯一开启思考的阶段);`--no-thinking` 仍被接受但已无效果,为兼容旧脚本保留。

### 修复

- **根帮助配置复用**:渲染根帮助时复用已加载的配置,保留 flag 解析、Profile 选择与凭证优先级。
- **重复错误信息**:文本错误不再重复输出归一化 cause,同时保留显式 cause、错误码、JSON 详情与 verbose 堆栈。
- **SDK 警告与空 ASR 结果**:managed-agent 工作流与 `bl speech recognize` 保留 SDK 警告与空的 ASR 任务结果。
- **微调费用诊断**:`bl finetune fee` 在 verbose 模式下输出费用查询的 gateway 诊断信息。

### 内部

- Advisor LLM 调用接入请求埋点。
- 全部命令测试与指引对齐输出契约;优化 CLI 测试套件并对 CI 测试任务分片。
- 澄清 CLI 与 Knowledge Studio README 中 quiet 行为说明。

## [2.7.2] - 2026-10-30

### 新增
Expand Down
5 changes: 5 additions & 0 deletions docs/agents/auth-change.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ defineCommand({ auth }) → runtime/authStage → ctx.client → command.run(ctx
- `openapi` — 阿里云 OpenAPI 签名域,用 AccessKey ID/Secret 调用 Token Plan 等 OpenAPI
- `none` — 本地命令、登录/配置类命令、无需 credential 的命令

### 可选 console 副凭证

`auth: "apiKey"` 的命令可用 `optionalConsole: true` 声明 best-effort console 副凭证(例:`cmodel import` 提交前用 console 目录预检基础模型)。runtime 在注入 apiCred 后尽力 `resolveConsole`;解析失败静默跳过,**不得**让 apiKey 主流程失败。此类命令的 help 会额外展示 console 域 flag(`--console-region` / `--console-site` / `--console-switch-agent`),命令捕获 `client.console` 的 AUTH 错误后降级并 warning。纯 console 请求仍必须声明 `auth: "console"`。

### 多凭证并存

`~/.bailian/config.json` 可同时保存 `api_key`、`access_token` 与 `access_key_*`。登录任一种方式不得删除另一种:
Expand Down Expand Up @@ -130,6 +134,7 @@ defineCommand({ auth }) → runtime/authStage → ctx.client → command.run(ctx
- `globalFlags` 与 `ownFlags` 分流正确
- [ ] `packages/runtime/src/middleware.ts:authStage`:
- 根据 `command.auth` 解析 credential 并注入 `ctx.client`
- `optionalConsole` 只做 best-effort 副注入;console 解析失败不得影响 apiKey 主流程
- `settings.dryRun` 下是否允许缺 credential 的策略明确
- [ ] `packages/runtime/src/error-handler.ts`:
- AUTH hint 增强使用 `binName`,不要硬编码 `bl`
Expand Down
1 change: 1 addition & 0 deletions docs/agents/command-add-remove.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ packages/commands/src/index.ts
- [ ] 新建/删除/移动对应的 `packages/commands/src/commands/<...>.ts`
- [ ] `defineCommand` 字段使用当前 schema:
- `auth: "apiKey" | "console" | "openapi" | "none"`
- `optionalConsole: true` 仅用于 `auth: "apiKey"` 但需要 best-effort console 预检的命令:runtime 会尽力注入 console 凭证并展示 console 域 flag;console 会话缺失/过期不得阻断主流程,命令必须自行捕获 `client.console` 的 AUTH 错误
- `flags`(camelCase key,由 runtime 渲染为 kebab-case)
- `usageArgs`(不含 bin/path 前缀)
- `exampleArgs`(不含 bin/path 前缀)
Expand Down
Loading
Loading