fix(pi): use Model Access v3 and surface provider errors - #2471
Conversation
Signed-off-by: xd-bobo <caojianbo@xd.com>
Signed-off-by: xd-bobo <caojianbo@xd.com>
Signed-off-by: xd-bobo <caojianbo@xd.com>
|
| Filename | Overview |
|---|---|
| packages/maker-core/src/agents/pi/index.ts | 会话启动和模型切换现在按实际 provider 解析描述符及 API;BYOM 不再进入 XD v3 协议校验。 |
| apps/desktop/src/main/maker-host/pi-host.ts | Desktop 为 XD/Cindy 注入 v3 Responses resolver,并为其他 provider 保留 Messages 路由。 |
| apps/desktop/src/main/maker-host/active-catalog.ts | XD 模型目录取消跨 Agent 投影,并以三态 resolver 表达非 XD、非法 XD 配置和有效 Responses 配置。 |
| packages/maker-core/src/agents/pi/translator.ts | Pi provider 终态错误经过脱敏后转换为共享终态错误事件,避免会话停留在思考状态。 |
| packages/model-providers/src/modelAccessValidator.ts | Model Access v3 模型和逐 Agent 协议字段在目录边界执行严格校验。 |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Pi 启动会话] --> B{实际 provider}
B -->|XD / cindy| C[读取 Model Access v3 Pi wireProtocol]
C -->|openai-responses| D[写入 cindy models.json 并路由 /v1/responses]
C -->|缺失或非法| E[Fail closed]
B -->|BYOM / 订阅| F[解析实际 provider 描述符]
F --> G[保留 anthropic-messages 兼容路由]
Reviews (8): Last reviewed commit: "fix(pi): keep defaults source-specific" | Re-trigger Greptile
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fe0f53b435
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Signed-off-by: xd-bobo <caojianbo@xd.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a89580f0bc
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
维护者确认本 PR 触发了维护者确认门(product: 命中 UI 路径 + arch: 核心路径改动 ≥ 150 行 / 超大 diff ≥ 800 行)。 改动涉及 PI harness 的 Model Access v3 迁移、供应商错误信息展示、模型选择器能力定义等。已开启讨论 issue 待维护者确认。 维护者在 PR 上 Approve 即放行;需要修改请 Request Changes。 讨论 issue:#2475 |
Signed-off-by: xd-bobo <caojianbo@xd.com>
Signed-off-by: xd-bobo <caojianbo@xd.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7e1ac1bdfc
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Signed-off-by: xd-bobo <caojianbo@xd.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b9714ec527
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Signed-off-by: xd-bobo <caojianbo@xd.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5855b3d9f0
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Signed-off-by: xd-bobo <caojianbo@xd.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 925d2bff3d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@xd-bobo 👋 这个 PR 还有 2 条 review conversation 没 resolve(apps/desktop/src/main/maker-host/index.ts / apps/mobile/src/session/newSession.ts),auto-review 因此暂时跳过、没法继续审查 / 合并。 如果你已经按评论改完或回应了,请到对应 thread 上点 Resolve conversation;全部 resolve 后,下一轮 auto-review 会自动重新审查这个 PR。 |
Signed-off-by: xd-bobo <caojianbo@xd.com>
这次改了什么
摘要
修复 Pi Agent 的两个同源问题:provider 终态错误不再停留在“思考中”,而是作为终态错误直接呈现;Cindy AI 模型目录改用 Model Access v3 的服务端真值,Pi 严格按服务端下发的
openai-responses路由,不再由客户端跨 Agent 投影模型或猜测 wire protocol。变更类型
feat新功能fix缺陷修复refactor/perf重构或性能优化docs/test/chore文档、测试或工程维护范围
/v1/responses路由;相关单元与真实 Pi 集成测试UI 变化
不涉及:未修改视觉、布局、交互控件或 UI 文案;仅修正既有错误事件的终态投递和模型路由数据。
怎么验证的
自动验证
Maker Core 核心指标评估
手工验证
cindy,Responses 模型请求命中/v1/responses。未执行的验证
风险
风险分类
影响与回滚
提交前检查
git commit -s,见 DCO)