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
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,24 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and

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

## [2.14.1] - 2026-12-01

### Added

- **Hyper-parameter provenance**: `bl finetune <modality> create` output adds `parameter_sources`, reporting for every hyper-parameter whether it came from the user, the parameter schema default or recommended value, a train option default, or the training profile.
- **`bl finetune price` cost inputs**: new `--batch-size` and `--max-length` flags align the estimate with the planned create request; the result reports the `hyper_parameters` used for the estimate.

### Changed

- **Dataset upload caps**: fine-tune datasets (text, CPT, decision, TTS) now accept files up to 300 MB (was 200 MB); image and video ZIPs accept up to 1 GB (was 2 GB), matching the official upload rules. Without `--schema`, ZIP archives are inspected from their first `data.jsonl` record so image and video archives get the 1 GB cap automatically; pass `--schema image|video` when detection fails. Applies to `bl dataset upload` and `bl dataset validate`.
- **`batch_size` power of two**: `bl finetune text create` rejects a `batch_size` that is not a positive power of two when the parameter schema declares an integer input.
- **RL `max_prompt_length`**: `bl finetune rl run` rejects `max_prompt_length >= max_length` after merging the YAML spec and `--hp`; `--dry-run` runs the same check.
- **Console workspace hint**: when `--workspace-id` does not match an accessible workspace, the error hint lists the requested ID, the match count and up to 10 accessible workspace IDs.

### Fixed

- **Dataset upload errors**: `bl dataset upload` now reports the rejected file, server code and rejected count when the server returns `failed_uploads`, and lists the response key layout when no file ID is returned. Oversize errors report the exact file size and cap; unsupported formats name the file.

## [2.14.0] - 2026-11-27

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

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

## [2.14.1] - 2026-12-01

### 新增

- **超参来源**:`bl finetune <modality> create` 输出新增 `parameter_sources`,逐个超参标明取值来源:用户指定、参数配置默认值或推荐值、训练选项默认值、训练 Profile 默认值。
- **`bl finetune price` 估价参数**:新增 `--batch-size` 与 `--max-length`,使估价与计划创建任务参数一致;结果新增估价所用的 `hyper_parameters`。

### 变更

- **数据集上传上限**:文本、CPT、decision、TTS 微调数据集上限改为 300 MB(原 200 MB);图像、视频 ZIP 改为 1 GB(原 2 GB),与官方上传规则对齐。未传 `--schema` 时,从 ZIP 内第一条 `data.jsonl` 记录识别内容,图像、视频 ZIP 自动采用 1 GB;识别失败时请传 `--schema image|video`。适用于 `bl dataset upload` 与 `bl dataset validate`。
- **`batch_size` 2 的幂校验**:参数配置声明为整数输入时,`bl finetune text create` 会拒绝不是正的 2 的幂的 `batch_size`。
- **RL `max_prompt_length`**:`bl finetune rl run` 在合并 YAML 与 `--hp` 后校验 `max_prompt_length >= max_length` 并拒绝;`--dry-run` 同样生效。
- **Console 工作空间提示**:`--workspace-id` 未匹配到可访问工作空间时,错误提示会列出请求的 ID、命中数量及最多 10 个可访问的工作空间 ID。

### 修复

- **数据集上传报错**:服务端返回 `failed_uploads` 时,`bl dataset upload` 会报出被拒文件、服务端错误码与被拒数量;未返回文件 ID 时列出响应字段结构。超限报错给出精确的文件大小与上限;不支持的格式会带出文件名。

## [2.14.0] - 2026-11-27

### 新增
Expand Down
24 changes: 12 additions & 12 deletions docs/agents/telemetry-change.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ source-config 只用于百炼 / DashScope API 侧消费,不发送到通用网
- `callerType`(必填:`agent` | `script` | `unknown`)
- `callerName`:`agent` 与 `script` 时发送(缺省/非法 → `"unknown"`);`skillName` / `skillVersion` 仅 `agent` 时可选发送
- `bizFrom`:全局 `--biz-from` 声明的业务来源(可选);经 `normalizeBizFrom` 归一化(缺省省略,空白/非法 → `"unknown"`),与 `callerName` 独立;映射到 AEM `c6` 专用扁平列
- 失败时的 `errorMessage`、`exitCode`、`httpStatus`、`requestId`
- 失败时的 `errorMessage`、`exitCode`、`httpStatus`、`requestId`,以及服务端业务错码 `apiCode`(来自 `BailianError.api.apiCode`,例如上传 HTTP 200 但 `failed_uploads[].code` 非空;随 `ext` 上报,不进 `c1`—`c6`)
- 安全 allowlist 过滤后的 `params`
- 仅 `npmPackage=bailian-cli`:已有合法 `~/.bailian/install.json` 时,命令事件带 `installChannel`,不带安装日,也不发 `first_install`。新用户的 `first_installed_at` 在安装成功写盘后单独发一条事件名 `first_install` 的事件,`ext` 里是 `firstInstalledAt`、`installChannel`、`timestamp`(上报时刻)和 `cliVersion`。每个安装日只入队一次,次数记在 `~/.bailian/first-install-reported.json`;远端入队失败不计入,也不改由后续命令补发。`DO_NOT_TRACK=1` 和配置 `telemetry: false` 都不写文件、不发事件,与普通命令同一个开关。没有安装日的老用户不发 `first_install`。命令不创建、不修补 `install.json`。`kscli` 不读这份文件。bootstrap 事件也不读取它

Expand Down Expand Up @@ -209,17 +209,17 @@ mmstat 网关对任何 POST 都返回 `200` + GIF,端点或 pid 写错不会

AEM 映射:

| AEM 字段 | 内容 |
| ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| event name | 命令路径 |
| `et` | `EXP` |
| `ext` | 除 `command`、`params` 外的结构化事件字段,含 `commandPrefix`、`callerType`、`site`、可选 `siteReason`、可选 `dryRun`(仅 `--dry-run` 时为 `true`)、失败时的 `exitCode`,以及读到的 `installChannel`。安装日不在命令事件里 |
| `c1` | allowlist 参数 |
| `c2` | `success` / `failure` |
| `c3` | HTTP status |
| `c4` | 错误文案,最多 500 字符 |
| `c5` | request ID |
| `c6` | `bizFrom` 业务来源(全局 `--biz-from`,归一化标量;专用扁平列,直接筛选/分组) |
| AEM 字段 | 内容 |
| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| event name | 命令路径 |
| `et` | `EXP` |
| `ext` | 除 `command`、`params` 外的结构化事件字段,含 `commandPrefix`、`callerType`、`site`、可选 `siteReason`、可选 `dryRun`(仅 `--dry-run` 时为 `true`)、失败时的 `exitCode` 与可选 `apiCode`,以及读到的 `installChannel`。安装日不在命令事件里 |
| `c1` | allowlist 参数 |
| `c2` | `success` / `failure` |
| `c3` | HTTP status |
| `c4` | 错误文案,最多 500 字符 |
| `c5` | request ID |
| `c6` | `bizFrom` 业务来源(全局 `--biz-from`,归一化标量;专用扁平列,直接筛选/分组) |

`siteReason` 为粗粒度枚举(`product-domestic` / `product-international` / `positive-domestic` / `positive-international` / `default-fallback` / `unknown-host`),**禁止**带原始 host。`product-*` 表示归属来自产品声明,`positive-*` 表示来自用户配置信号,两者不能混算。漏判量化用国内站 `siteReason` 兜底类占比;不要用「国内 pid 出现 `site=international`」做告警(国际事件不会进国内 pid)。

Expand Down
2 changes: 1 addition & 1 deletion packages/bailian-kb-dsh/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bailian-kb-dsh",
"version": "2.14.0",
"version": "2.14.1",
"description": "Bailian knowledge-base tools for DeepSeek Harness: kb_search and kb_chat over the DashScope RAG API, plus the bl CLI management skill.",
"keywords": [
"alibaba-cloud",
Expand Down
2 changes: 1 addition & 1 deletion packages/bailian-memo-dsh/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bailian-memo-dsh",
"version": "2.14.0",
"version": "2.14.1",
"description": "Bailian personal memory for DeepSeek Harness: automatic recall, silent curation, and user-controlled remember/forget.",
"keywords": [
"alibaba-cloud",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bailian-cli",
"version": "2.14.0",
"version": "2.14.1",
"description": "CLI for Aliyun Model Studio (DashScope) AI Platform.",
"keywords": [
"agent",
Expand Down
2 changes: 1 addition & 1 deletion packages/commands/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bailian-cli-commands",
"version": "2.14.0",
"version": "2.14.1",
"description": "Command library for bailian-cli products (knowledge, memory, media, …). See https://www.npmjs.com/package/bailian-cli for usage.",
"homepage": "https://bailian.console.aliyun.com/cli",
"bugs": {
Expand Down
25 changes: 8 additions & 17 deletions packages/commands/src/commands/dataset/upload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ import {
validateDataset,
parseDatasetSchemaFlag,
formatIssue,
MAX_DATASET_BYTES,
MAX_CPT_BYTES,
MAX_DECISION_DATASET_BYTES,
MAX_MEDIA_ZIP_BYTES,
resolveDatasetMaxBytesForFile,
BailianError,
ExitCode,
type FlagsDef,
Expand All @@ -20,9 +17,9 @@ const UPLOAD_FLAGS = {
valueHint: "<path>",
description: {
"en-US":
"Local dataset file (.jsonl or .zip; ≤200MB SFT/DPO, ≤300MB CPT/decision, ≤2GB media zip)",
"Local dataset file (.jsonl or .zip; ≤300MB text/CPT/decision/TTS, ≤1GB image/video zip)",
"zh-CN":
"本地数据集文件(.jsonl 或 .zip;SFT/DPO 不超过 200MB,CPT/决策模型不超过 300MB,媒体 ZIP 不超过 2GB)",
"本地数据集文件(.jsonl 或 .zip;文本/CPT/决策/TTS 不超过 300MB,图像/视频 ZIP 不超过 1GB)",
},
required: true,
},
Expand Down Expand Up @@ -94,25 +91,19 @@ export default defineCommand({
},
{
"en-US":
"Upload cap: 200MB SFT/DPO text, 300MB CPT/decision data, 2GB media zip. For decision files over 200MB, pass --schema decision so the correct cap is applied. Upload uses the OpenAI-compatible /compatible-mode/v1/files endpoint so the purpose tag is persisted.",
"Upload cap: 300MB for text, CPT, decision and TTS data; 1GB for image/video ZIPs. Without --schema, ZIP archives are sniffed from their first data.jsonl record so image/video ZIPs get 1GB automatically; pass --schema only to override. Upload uses the OpenAI-compatible /compatible-mode/v1/files endpoint so the purpose tag is persisted.",
"zh-CN":
"上传上限:SFT/DPO 文本 200MB、CPT/决策模型数据 300MB、媒体 ZIP 2GB。决策数据超过 200MB 时请显式传入 --schema decision,以应用正确上限。上传使用 OpenAI 兼容的 /compatible-mode/v1/files 接口,以确保持久化 purpose 标签。",
"上传上限:文本、CPT、决策与 TTS 数据 300MB;图像/视频 ZIP 1GB。未指定 --schema 时会读取 ZIP 内 data.jsonl 的首条记录自动识别,图像/视频 ZIP 自动适用 1GB;仅在需要覆盖时传 --schema。上传使用 OpenAI 兼容的 /compatible-mode/v1/files 接口,以确保持久化 purpose 标签。",
},
],
async run(ctx) {
const { identity, settings, flags } = ctx;
const filePath = flags.file;
const purpose = flags.purpose || "fine-tune";
const schema = parseDatasetSchemaFlag(flags.schema);
// 大小上限按平台数据类型区分;自动识别仍采用保守的文本上限,避免放宽已有格式。
const isMediaSchema = schema === "image" || schema === "video";
const maxBytes = isMediaSchema
? MAX_MEDIA_ZIP_BYTES
: schema === "decision"
? MAX_DECISION_DATASET_BYTES
: schema === "cpt"
? MAX_CPT_BYTES
: MAX_DATASET_BYTES;
// 大小上限按 --schema 区分:图像/视频 ZIP 1GB,其余文本类 300MB;未传 --schema 时先嗅探 ZIP 内容。
// 与 dataset validate 共用同一解析。
const maxBytes = await resolveDatasetMaxBytesForFile(schema, filePath);

if (!flags.noValidate) {
const result = await validateDataset(filePath, {
Expand Down
11 changes: 9 additions & 2 deletions packages/commands/src/commands/dataset/validate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
defineCommand,
validateDataset,
parseDatasetSchemaFlag,
MAX_DECISION_DATASET_BYTES,
resolveDatasetMaxBytesForFile,
BailianError,
ExitCode,
type FlagsDef,
Expand Down Expand Up @@ -82,6 +82,12 @@ export default defineCommand({
"zh-CN":
"ZIP 归档(.zip)除逐条检查记录内容外,还会执行结构验证(存在 data.jsonl、媒体引用可解析)。使用 --full-validate 对每一行执行 JSON.parse。",
},
{
"en-US":
"Size cap follows --schema, same as dataset upload: 300MB for text, CPT, decision and TTS data; 1GB for image/video ZIPs. Without --schema, ZIP archives are sniffed from their first data.jsonl record so image/video ZIPs get 1GB automatically.",
"zh-CN":
"大小上限与 dataset upload 一致,随 --schema 而定:文本、CPT、决策与 TTS 数据 300MB;图像/视频 ZIP 1GB。未指定 --schema 时会读取 ZIP 内 data.jsonl 的首条记录自动识别,图像/视频 ZIP 自动适用 1GB。",
},
],
async run(ctx) {
const { settings, flags } = ctx;
Expand All @@ -104,7 +110,8 @@ export default defineCommand({
const result = await validateDataset(filePath, {
fullValidate: flags.fullValidate,
schema,
maxBytes: schema === "decision" ? MAX_DECISION_DATASET_BYTES : undefined,
// 与 dataset upload 共用上限解析,避免两命令对同一文件结论不一致。
maxBytes: await resolveDatasetMaxBytesForFile(schema, filePath),
});

ctx.output.result(
Expand Down
Loading