Commit Graph

867 Commits

Author SHA1 Message Date
clh02467605 3ea2931152 fix(mcp): harden SSE parsing, abort, and fallback matching 2026-08-14 11:11:47 +08:00
gujieye b402f3eacd Merge pull request #141 from sonicg83/codex/usage-token-plan-reset-times
fix(usage): handle missing Token Plan quota fields
2026-08-14 11:10:56 +08:00
zeyu.fz b7a4efe619 feat(speech): 支持同步Flash ASR模型和异步文件转录模型
- 新增同步Flash ASR模型请求流程,支持单音频文件识别
- 实现了对同步Flash模型不支持异步标志及参数的限制校验
- 异步文件转录模型支持单文件URL上传和语言参数细化
- 优化异步和同步鉴权域显示,丰富根帮助和分组帮助提示
- speech recognize增加dry-run测试覆盖多种识别场景
- free-tier自动停用功能优化,改用统一轮询函数处理批量请求
- 统一轮询逻辑,支持console和telemetry接口的异步任务完成判定
- 规范输出格式和错误提示,增强用户调试体验
- 版本升级到1.14.3,更新示例参数和模型ID引用
2026-08-14 11:07:21 +08:00
gujieye bedd59df27 Merge branch 'main' into codex/usage-token-plan-reset-times 2026-08-13 19:54:06 +08:00
故璃 39a488181e refactor(usage): align token-plan with --output convention and tolerant quota reading 2026-08-13 19:43:11 +08:00
若麒 4ec0f6828b fix(update): sync skills after binary upgrades 2026-08-13 19:14:49 +08:00
clh02467605 4dcec7d075 fix(mcp): fix SSE header timeout, 405 fallback matching, and parseSSE chunking 2026-08-13 18:32:54 +08:00
若麒 29ce8990b9 fix(runtime): accept localized Command Pack descriptions 2026-08-13 17:54:35 +08:00
若麒 a770cbe787 feat(cli): adapt Quick Start to the configured language 2026-08-13 17:54:10 +08:00
zeyu.fz 30f7525d50 docs(commands): 更新知识库分块命令中 --doc-id 的描述和注意事项
- 说明 --doc-id 在实际使用中为必需,避免服务器返回 HTTP 500 错误
- 明确指出应使用 doc list 命令中的文档级别 ID,拒绝使用 chunk list 中的每行 doc_id
- 新增说明向图片类型文档添加文本块会触发服务器错误,建议使用文本类型文档
- 对帮助文档中相关描述和备注进行了同步更新,增强使用指导性和准确性
2026-08-13 16:42:19 +08:00
Gong Shiqi daefc094ec Merge pull request #149 from modelstudioai/fix/fixed_issue_146
fix: support sync-flash and qwen3-filetrans ASR models in speech recognize
2026-08-13 16:26:32 +08:00
zeyu.fz aa38d5c670 fix(commands): 修复知识库创建时请求ID未传递问题
- 在知识库创建成功日志中添加请求ID信息
- 确保导入作业失败消息中包含请求追踪数据
- 改进日志详细程度,方便问题排查
2026-08-13 16:25:34 +08:00
zeyu.fz cc51164c2f fix(knowledge): 优化导入任务轮询逻辑与失败信息展示
- 添加函数判断所有文档是否达到终止状态,防止服务器无限保持运行状态
- 修改失败信息函数,展示失败和成功文档详情,方便用户了解整体情况
- 调整轮询任务完成条件,新增所有文档终止状态判断,提升轮询准确性
- 改进轮询状态显示,增加失败文档数量与总计信息,清晰反馈任务进展
2026-08-13 16:18:37 +08:00
若麒 6b685964f3 feat(runtime): support colocated localized CLI help text 2026-08-13 16:12:09 +08:00
clh02467605 ae0c2c1213 fix(speech): handle qwen3-filetrans singular result.transcription_url
Normalize async ASR transcription items so waiting mode downloads text and --out works without changing shared media task types.
2026-08-13 15:52:34 +08:00
clh02467605 01a62eb85b Merge remote-tracking branch 'refs/remotes/origin/main' into feat/mcp-support-sse 2026-08-13 15:40:04 +08:00
clh02467605 798ce596f6 fix(mcp): harden SSE fallback for Bailian and --url overrides 2026-08-13 15:37:32 +08:00
clh02467605 bd91e9d1c2 Merge remote-tracking branch 'refs/remotes/origin/main' into fix/fixed_issue_146
# Conflicts:
#	skills/bailian-gen/reference/index.md
#	skills/bailian-gen/reference/speech.md
2026-08-13 14:36:16 +08:00
clh02467605 e244771ee9 test(speech): harden flash ASR contract coverage and docs
Add SSE disable header, data-URI format inference, broader response text
parsing, HTTP contract e2e, pipeline routing tests, and ASR model selection
guidance in bailian-gen.
2026-08-13 14:25:47 +08:00
Gong Shiqi 94f9dbbe9e Merge pull request #151 from modelstudioai/feat/command-auth-help
feat(cli): show command authentication requirements in help
2026-08-13 13:38:28 +08:00
若麒 8a0dd70206 feat(cli): show command authentication requirements in help 2026-08-13 12:01:41 +08:00
clh02467605 9379da7a4c fix(speech): align flash vocabulary_id and qwen3-filetrans language params 2026-08-13 09:47:09 +08:00
clh02467605 ddcd564e61 test: dry-run realtime ASR usage-error e2e to skip auth in CI 2026-08-12 17:22:25 +08:00
gujieye 0e4dd4b824 Merge pull request #148 from modelstudioai/feat/usage_free_api
refactor(usage): consolidate shared poll logic; migrate freeTrial API…
v1.14.3
2026-08-12 17:13:59 +08:00
clh02467605 241de61866 fix: support sync-flash and qwen3-filetrans ASR models in speech recognize
- Add asr-routes.ts with resolveAsrApi() to route models to the correct
  DashScope endpoint instead of always hitting asr/transcription
- Async filetrans: fun-asr / paraformer / *-filetrans → file_urls (plural)
- Async filetrans (qwen3): qwen3-asr-flash-filetrans* → file_url (singular)
- Sync flash (input-audio): fun-asr-flash* / qwen-audio-*-asr-flash → multimodal-generation
- Sync flash (qwen3): qwen3-asr-flash* → multimodal-generation + asr_options
- Realtime/streaming models now give a clear USAGE error instead of a
  confusing server-side "url error"
- Propagate same routing logic to pipeline speechRecognize step
- Add table-driven unit tests and dry-run e2e assertions
Fixes #146
2026-08-12 17:12:23 +08:00
故璃 61d9a74166 fix: 1.14.3 2026-08-12 17:05:18 +08:00
故璃 69eb759490 refactor(usage): consolidate shared poll logic; migrate freeTrial APIs to bailian-commerce
Dedup:
- shared.ts: extract generic pollConsoleUntilDone (request-builder callback
  absorbs each wrapper convention); pollTelemetryApi becomes a thin wrapper;
  add pollFreeTierBatch
- freetier.ts / stats.ts: drop inline duplicates of extractResponseData,
  polling, model-list paging, free-tier extractors and usage label maps;
  import from shared.ts (behaviour unchanged: freetier keeps its 20-poll
  budget, telemetry keeps 30)

Endpoint migration (broadscope-bailian.freeTrial -> bailian-commerce.freeTrial):
- queryFreeTierQuota, queryFreeTierOnlyStatus, batchActivateFreeTierOnly,
  batchDeactivateFreeTierOnly
- update the console call example and the gateway doc comment to match

Note: verified statically and via dry-run; live calls pending a fresh
console login (session expired).
2026-08-12 16:30:08 +08:00
clh02467605 313966d7a9 feat(mcp): add SSE support with fallback mechanism for MCP connections
- Add McpSseClient implementation for classic HTTP+SSE MCP protocol
- Implement connectBailianMcpWithFallback with Streamable HTTP to SSE fallback
- Add isStreamableHttpUnsupported helper to detect 405 streamableHttp errors
- Update activate-hint logic to handle WebSearch 405 streamableHttp cases
- Replace direct MCP client usage with connection manager in call/tools commands
- Add proper client cleanup with close() calls in finally blocks
- Export new MCP connection utilities and types from core client module
- Add comprehensive tests for SSE client and fallback behavior
2026-08-12 15:44:51 +08:00
故璃 d74d4efcd0 fix(dataset): align validation with the platform data-format rules doc
Reviewed against the official text-tuning data rules; fixes two confirmed
mismatches and fills enforcement gaps:

- thinking: exempt assistant messages carrying tool_calls from the
  THINK_TAG_NOT_LAST check — the spec's tool+thinking combo example puts
  <think> on a non-last assistant and was previously false-flagged
- DPO support matrix: reject image/video content items, tools, tool_calls
  and role:tool (DPO_UNSUPPORTED_ELEMENT); also scan chosen/rejected
- DPO: messages not ending with user upgraded warning -> error
- OpenAI migration: name/weight upgraded warning -> error (spec: must not
  carry); drop dead record-level name branch
- tool_call_id: unmatched tool response upgraded warning -> error
  (one-to-one per spec); new TOOL_CALL_NO_RESPONSE warning for orphan calls
- loss_weight: validate range at message level too; warn when placed on
  anything but the last assistant message (LOSS_WEIGHT_PLACEMENT)
- video params: fps/sample_fps must be within [0.1, 10]
  (INVALID_VIDEO_FPS); mode-mismatched params warned
  (VIDEO_PARAM_MODE_MISMATCH); video_start/video_end type-checked
- zip: skip macOS packaging metadata (__MACOSX/, .DS_Store, ._*) in
  filename constraints and image counting to stop false failures on
  Finder-created archives

Tests 45 -> 59 covering every new/changed rule, including a replica of the
spec's official tool+thinking example.
2026-08-12 10:09:10 +08:00
故璃 e7422bd2e5 fix(dataset): align validation rules with platform data format spec
- Support content array format [{text/image/video}] alongside legacy string
- Add tool role support with tool_calls structure and tool_call_id validation
- Add thinking tag placement check (only in last assistant message)
- Add OpenAI migration guards: warn on unsupported name/weight fields
- Add loss_weight range validation (0.0–1.0)
- Fix size limits: SFT/DPO 200MB, CPT 300MB, media ZIP 2GB
- Enforce data.jsonl at ZIP root (reject nested wrapping folders)
- Add ZIP filename constraints: charset [a-zA-Z0-9_-], length ≤120, uniqueness
- Add .tif to accepted image extensions
- Add DPO_LAST_MSG_NOT_USER warning when messages don't end with user role
- CPT profile now uses dedicated 300MB cap instead of shared default
- Expand unit tests from 19 to 45 covering all new validation paths
2026-08-12 07:48:11 +08:00
zeyu.fz 2d5c49b02e fix(knowledge): 优化quiet和format参数的输出逻辑
- 在file-get命令中,quiet模式下仅输出fileId,避免了多余的结果格式化
- 在kb-info命令中,quiet模式仅输出id,格式化输出逻辑得到简化
- 在kb-stats命令中,去除了quiet判断,确保非"text"格式下正确输出结果
- 在service-get命令中,quiet模式下只输出agent_id,格式化部分调整为独立判断
- 统一了各命令中针对quiet和format参数的处理流程,提升代码一致性和可读性
2026-08-11 20:05:44 +08:00
zeyu.fz 9bd8b60c22 refactor(knowledge-search): 移除对 query-history 功能的支持及相关代码
- 从文档中删除了 query-history 参数及示例
- 删除命令行接口中 query-history 相关 flag 定义
- 移除解析和传递 query-history 的逻辑代码
- 调整测试用例,去除对 query-history 的相关断言和测试
- 更新帮助文档,删除 query-history 相关说明和示例
- 精简接口类型定义,去除 query_history 字段
2026-08-11 19:44:00 +08:00
zeyu.fz 0369bd36b0 fix(knowledge): 修复内容文件读取时的编码和错误提示
- 为知识块添加和更新命令的读取内容文件函数添加了可选的inline flag参数
- 更新readUtf8TextFile以支持根据inline flag生成更友好的ENOENT错误提示
- 确保内容读取时使用严格的UTF-8编码解码方式
- 如果读取文件失败,提供文件路径和权限相关的详细错误信息
- 校验知识块内容长度时保持一致的错误处理逻辑
2026-08-11 17:48:21 +08:00
zeyu.fz 92a978af3c fix(knowledge): 验证并限制查询时间范围为过去时间
- 修改时间参数说明,明确要求起止时间必须为过去时间
- 添加起始时间未来时报错机制,避免无意义查询
- 截断结束时间未来时间至当前时间,保障监控接口正确响应
- 添加测试覆盖,验证时间范围边界行为及错误处理
- 补充对应端到端测试路由映射,完善测试用例组织结构
2026-08-11 17:39:40 +08:00
若麒 ea7b0f016f feat(cli): add bilingual quick-start examples 2026-08-11 15:49:05 +08:00
故璃 9749a11d76 fix(finetune): detect video-kf2v sub-variant from local dataset
finetune video create passed a fixed modality "video" to the profile
validator without probing the data for last_frame_path. This caused a
false KF2V_DATA_MISMATCH error when training kf2v models (wan2.2-kf2v-*)
with datasets that correctly contain last_frame_path.

Add sub-variant detection symmetric to the existing image-i2i upgrade:
when a local file is provided, detectModality() inspects the first record
and upgrades "video" → "video-kf2v" if last_frame_path is present.
v0.0.0-beta-9749a11-202608110822
2026-08-11 14:50:58 +08:00
故璃 2965080cb7 feat(skills): replace foreign skill dirs containing SKILL.md during fan-out
Previously, fan-out skipped any existing real directory not recorded in
the lock file, treating it as user content. This left stale skill copies
installed by other tools (e.g. npx skills add) permanently out of date.

Now: if the directory contains a SKILL.md, it is recognized as a skill
artifact and replaced with a symlink to the canonical dir. Directories
without SKILL.md are still preserved (user content safety boundary).
2026-08-11 14:29:10 +08:00
zeyu.fz 81959145d7 test(auth): 添加 openApiSource 头和相关测试字段
- 在请求和响应处理中新增 openApiSource 字段
- 更新 e2e 测试以包含 openApiSource 字段验证
- 确保请求头包含 x-dashscope-openapisource 信息
- 在测试数据中添加 openApiSource 的示例值 BailianCLI
2026-08-11 14:23:01 +08:00
zeyu.fz 4343fc87af feat(core): 添加并统一管理 x-dashscope-openapisource 请求头
- 在 headers.ts 中新增 OPEN_API_SOURCE 常量,作为静态的 OpenAPI 源标识
- 在 trackingHeaders 函数中添加 x-dashscope-openapisource 请求头
- 更新 client/index.ts 以导出 OPEN_API_SOURCE
- 在 instrumented-fetch.test.ts 中添加对应请求头的测试,确保其正确添加或省略
- 修改文档注释,明确 x-dashscope-openapisource 与 x-dashscope-source-config 的用途和区别
2026-08-11 14:20:44 +08:00
故璃 1c76749ee5 feat: update datalist validate v0.0.0-beta-1c76749-202608110535 2026-08-11 13:33:31 +08:00
zeyu.fz 1b568e8d37 test(knowledge): 补全知识库相关命令参数并增加E2E测试覆盖
- 添加知识库列表、创建、删除及文件删除等命令路由
- 新增知识块、分类、文件相关参数的端到端测试,覆盖文件列表、分类列表、块新增更新及分页等功能
- 增加对知识文档状态上传、等待、轮询参数的实时测试及自清理逻辑
- 新增知识文档列表分页、过滤参数的E2E测试覆盖
- 扩展知识文档上传命令的轮询间隔参数测试,验证无错误
- 补充知识库删除命令的轮询间隔参数传递测试
- 增强知识库列表的分页、名称过滤测试用例
- 丰富知识服务命令的参数全覆盖测试,包括创建、更新、部署、删除及多版本描述等功能
- 添加知识检索命令的重新排序指令与过时参数的实时测试覆盖
2026-08-11 13:17:34 +08:00
故璃 5d1b7aac3a Merge branch 'main' into feat/cli-skill-sync v0.0.0-beta-5d1b7aa-202608110249 2026-08-11 10:47:45 +08:00
zeyu.fz e292b20d4b docs(knowledge): 添加知识库各类资源及操作命令手册
- 新增 Chunk 管理命令手册,涵盖添加、列出、更新、删除操作详解
- 新增数据中心集合与分类命令文档,介绍集合创建、查看,分类增删查等功能
- 新增文档管理命令,包含文档上传、导入 OSS、状态查询、删除及标签管理
- 新增数据中心文件管理文档,涵盖文件列表、详情查看、删除等命令说明
- 新增知识库管理命令手册,包含知识库创建、查看、更新、删除和监控
- 各命令均详细说明参数、输出格式及多模式支持(text/quiet/json)
- 提供丰富示例及注意事项,帮助用户正确使用相关命令
2026-08-11 01:02:49 +08:00
zeyu.fz 12e7a22195 test(knowledge): 增加文档相关命令的独立读回验证
- 在 knowledge doc delete 命令中添加异步删除的轮询验证,确保文档从服务器彻底移除
- 为 knowledge doc tag 添加标签设置后,独立调用 file get 验证标签正确应用
- 在知识库更新操作后,通过 info 命令独立验证更新是否成功保存
- 在文件删除和类别删除后,通过独立列表命令验证资源确实被清除
- 对知识块更新及排除标记修改,添加通过列表接口的内容验证步骤
- 对知识服务代理删除操作后,增加独立查询接口确保代理已彻底删除
- 补充 doc delete 备注,明确 doc_id 与 fileId 的区别及异步删除机制说明
- 增加 e2e 路由映射中缺失的 knowledge info 和 knowledge file get 命令支持
2026-08-10 17:37:21 +08:00
zeyu.fz 219d8be80a test(e2e): 修正知识库删除测试中文件名匹配逻辑
- 移除未使用的完整文件名变量
- 使用文件名主干(去掉扩展名)进行文档匹配判断
- 更新断言提示信息以反映主干文件名匹配
- 提升测试对文档名称匹配的准确性与鲁棒性
2026-08-10 16:29:14 +08:00
zeyu.fz ab766d44d3 test(commands): 添加知识文档列表的端到端测试步骤
- 在topic-routes测试文件中新增“knowledge doc list”步骤
- 该步骤用于验证导入的知识库文件是否可见
- 增强了知识库文件相关功能的测试覆盖率
2026-08-10 16:25:01 +08:00
zeyu.fz 1d9852805f fix(knowledge): 修正文档上传接口请求的字段名为 docIds
- 将请求体中的 dataSource.fileIds 改为扁平结构的 docIds 字段
- 移除嵌套的 dataSource 对象,显式指定 sourceType 字段
- 更新相关单元测试以匹配新的请求参数格式和字段名称
- 在知识库删除测试中增加了导入结果和最终状态的断言,确保导入流程完整
- 新增校验导入文件在知识库文档列表中正确显示
- 调整测试中对请求体结构的断言逻辑以适配改动
2026-08-10 16:24:00 +08:00
zeyu.fz 99a3dbae2d Merge remote-tracking branch 'origin/main' into feat/iteration1-w1-foundation 2026-08-10 15:26:18 +08:00
sonicg83 4d84af614b Merge branch 'modelstudioai:main' into codex/usage-token-plan-reset-times 2026-08-07 23:29:01 +08:00
gujieye 2389681ad6 Merge pull request #144 from modelstudioai/feat/add-version-tag
feat: add version 1.14.2
v1.14.2
2026-08-07 18:02:08 +08:00