Skip to content

feat(model): 定义档案、参数与模型请求契约 - #4119

Merged
YehongPan merged 1 commit into
developfrom
feature/model-service-contracts
Oct 29, 2026
Merged

YehongPan merged 1 commit into
developfrom
feature/model-service-contracts

Conversation

@JasonW404

@JasonW404 JasonW404 commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

统一模型档案、参数与模型服务请求/响应契约,使后续档案组合和调用实现复用同一套数据结构、校验和资源转换规则。

本 PR 变更

  • 定义模型能力、参数类型、作用范围、API 字段绑定、有限转换和出口快照,区分未知与明确不支持。
  • 定义模型消息、流式事件、HTTP 连接及已授权资源转换的契约。
  • 提供固定版本的上游 TOML 读取与必要字段校验,以及对应的边界、错误路径和回归测试。
  • SDK 打包包含离线档案数据;依赖清单仅增加 package-data 声明,无新增依赖。

堆叠关系与范围

原系列第 2/9 层,#4118 已合入;本 PR 直接基于 develop 7d94065df,后续为 #4078。本轮只更新 #4119,保留现有 PR。

本层仅修改 38 个与模型契约及其测试相关的文件。此前继承的 A2A 调用名、SQLite 测试依赖、CodeQL 手动触发、管理员初始化修复及无关旧测试修补均已撤回;已保留本地说明和补丁,供未来独立评估。

验证

  • 本层独立源码:480 项 Python 契约测试通过。
  • 本地变更行覆盖率 93.38%;将未完整覆盖的分支行视为未覆盖时为 91.69%。最终覆盖率以本提交的 Codecov 为准。
  • 从本层提交构建 ARM64 后端镜像,镜像内同样 480 项契约测试通过,无后端/SDK 开发源码挂载。
  • 在镜像内实际构建 SDK wheel,105 个档案、清单及说明文件全部打包,逐文件内容一致。
  • 版权、正式测试资产校验和 git diff whitespace 检查通过。未改变正式 Case,也未新增界面、HTTP 调用方或 Agent Runtime 行为;本层不依赖真实模型服务验收。
  • 推送前同步上游 fix: persist agent tutorial preferences through shared storage #4246(仅前端修改);后端、SDK、测试、部署及主镜像构建输入与已验收源码逐树/文件哈希一致,沿用上述证据。
  • 最新提交 CI 将随更新重跑,历史绿灯不替代本轮结果。

@JasonW404
JasonW404 force-pushed the feature/model-service-contracts branch from c02d2cf to 58412dd Compare October 27, 2026 06:18
@JasonW404
JasonW404 force-pushed the feature/model-service-contracts branch from 58412dd to 982269a Compare October 28, 2026 02:01
@JasonW404
JasonW404 force-pushed the feature/model-service-contracts branch from 982269a to 1b9d8d3 Compare October 28, 2026 02:51
@JasonW404
JasonW404 force-pushed the feature/model-service-contracts branch from 1b9d8d3 to 1970251 Compare October 29, 2026 02:43
@JasonW404 JasonW404 changed the title [WIP] 模型档案契约与来源元数据 feat(model): 定义档案、参数与模型请求契约 Oct 29, 2026
@JasonW404
JasonW404 marked this pull request as ready for review October 29, 2026 03:10
Copilot AI balanced review requested due to automatic review settings October 29, 2026 03:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@JasonW404
JasonW404 force-pushed the feature/model-service-contracts branch from 1970251 to a552cad Compare October 29, 2026 03:36
@JasonW404
JasonW404 force-pushed the feature/model-service-contracts branch from a552cad to 8d8a294 Compare October 29, 2026 04:37
@JasonW404
JasonW404 force-pushed the feature/model-service-contracts branch from 8d8a294 to c6aa713 Compare October 29, 2026 05:55
Base automatically changed from feature/model-profile-data to develop October 29, 2026 11:10
@JasonW404
JasonW404 force-pushed the feature/model-service-contracts branch from c6aa713 to b762ee4 Compare October 29, 2026 11:26
@YehongPan
YehongPan merged commit dc22caf into develop Oct 29, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants