fix(model-access): 对齐 Provider 上报元数据契约 - #38
Conversation
Signed-off-by: JiangJiahao <jiangjiahao@xd.com>
|
| Filename | Overview |
|---|---|
| packages/model-access-protocol/src/parse.ts | 扩展 Provider 元数据的严格校验和空白文本归一化,并完整修复此前指出的 defaultEffort 成员关系问题。 |
| packages/model-access-protocol/src/types.ts | 以可选字段方式扩展 ProviderReportedModel,保持现有 v2 字段兼容。 |
| packages/model-access-protocol/src/tests/protocol.test.ts | 覆盖扩展字段 round-trip、异常值拒收、空白文本归一化及 effort 列表不一致场景。 |
| docs/model-access-protocol.md | 更新 resolve request 示例和新增 Provider facts 的语义、归一化及排序约定。 |
Reviews (5): Last reviewed commit: "fix(model-access): normalize blank provi..." | Re-trigger Greptile
Signed-off-by: JiangJiahao <jiangjiahao@xd.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9d7d1320f1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: JiangJiahao <jiangjiahao@xd.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d76d87a8e5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: JiangJiahao <jiangjiahao@xd.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bd617bded1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: JiangJiahao <jiangjiahao@xd.com>
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
动机 / Motivation
服务端 resolve 已按字段消费 Provider 官方端点返回的名称、描述、分组、effort、成本和生命周期等事实,但共享 ProviderReportedModel 与严格 parser 仍只声明旧的六个字段,导致正式客户端无法表达服务端已经支持的输入。
关联:xindong/cindy-server#331 的 review thread PRRT_kwDOTTBY3M6WwLu2。
变更类型 / Change type
兼容性影响 / Compatibility impact
保持 schema v2,不删除或改名现有字段,只新增可选 Provider facts。现有客户端仍只发送旧字段子集,因此对旧服务端没有即时行为变化;新字段必须按“协议与服务端先就绪、客户端后开始上报”的顺序启用。由于 v2 固定对象 parser 严格拒绝未知字段,尚未升级的 v2 对端在未来收到新增字段时会拒收整批并保留上一份有效快照。
「三件套」自查 / The trio
检查项 / Checklist
验证 / Verification