维护者确认: fix(desktop): pi 会话仅连 BYOM 来源时钉住 providerId,避免 null 误路由网关
- Dominant language
- TypeScript
- Stars
- 2.7k
- Forks
- 395
- Avg merge
- 21h 48m
- Merged PRs (30d)
- 776
Description
## 触发
product 门: 命中 UI 路径 `apps/desktop/src/renderer/lib/draftModelCalibration.ts`
## 改动摘要
修复未登录 Cindy 时 pi 会话使用自定义 BYOM 供应商新建即报 `LAZY_CREATE_FAILED` 的问题。根因是 renderer 的 providerId 推断函数在仅 BYOM 连接时误判「可安全省略」,导致 `provider_id` 落 NULL → 恒路由 Cindy 网关 → 鉴权失败。修复在 `agent === 'pi'` 时把 null 落点固定为网关。
## 确认方式
维护者直接在 PR 上 Approve 即放行;需要修改则 Request Changes,作者改完后重新 Approve。
---
关联 PR:#2154(作者 @plasma-blue);本 issue 由 review-pr 流程自动创建,用于先讨论该 PR 涉及的产品 / UI 变更,维护者确认后 PR 会恢复推进。
Contributor guide
Research direction
The affected entry point is apps/desktop/src/renderer/lib/draftModelCalibration.ts; start by reading the providerId inference path for pi sessions and the BYOM-only case. Review PR #2154 and verify that an unauthenticated pi session using only a custom BYOM provider no longer fails with LAZY_CREATE_FAILED.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 25/100