feat(desktop): 统一辅助模型路由 - #3649
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
| Filename | Overview |
|---|---|
| apps/desktop/src/main/utility-model/oneShotCandidates.ts | 新增统一辅助链派发;catalog 分支缺少与 profile 分支一致的实时付费资格门禁。 |
| apps/desktop/src/main/utility-model/auxiliary-model-settings-store.ts | 将旧双槽设置迁移为最多三个模型引用,并保留 owner-scoped 持久化与兼容读取。 |
| apps/desktop/src/main/utility-model/resolveAuxiliaryModelChain.ts | 统一解析自定义、环境变量和冻结自动链的优先级。 |
| apps/desktop/src/main/voice-input/mapAuxiliaryRefsToVoiceRefiners.ts | 将辅助模型引用映射到语音润色支持的 profile,并显式跳过不支持的协议。 |
| apps/desktop/src/renderer/components/settings/AuxiliaryModelSection.tsx | 新增自动/自定义辅助模型设置和三槽选择交互。 |
| apps/desktop/src/renderer/cindy-brain/OneshotModelPinPicker.tsx | 实现供应商分组、搜索、选中态和不可用模型展示。 |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
Settings[辅助模型设置 models] --> Resolve[解析统一辅助模型链]
Resolve --> Profile{引用类型}
Profile -- Profile --> ProfileGuards[检查 disabled 与 payment-required]
ProfileGuards --> Dispatch[模型请求]
Profile -- Catalog --> Explicit[requestExplicitProviderText]
Explicit --> RouteGuards[检查路由与 disabled]
RouteGuards --> Dispatch
Dispatch --> Features[标题 / 摘要 / 提示词预测 / 语音润色]
Prompt To Fix All With AI
### Issue 1
apps/desktop/src/main/utility-model/oneShotCandidates.ts:650-655
**Catalog 路径绕过付费门禁**
当已保存的 XD catalog 模型变为 payment-required 时,这里仍直接进入 `requestExplicitProviderText`,没有执行 profile 路径已有的实时付费资格检查,导致请求仍被发送到受限模型并可能产生非预期调用,或直到远端拒绝后才回退。
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Reviews (1): Last reviewed commit: "feat(desktop): unify auxiliary model rou..." | Re-trigger Greptile
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 06ed246ead
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8245b390e6
ℹ️ 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".
|
@dashhuang 👋 这个 PR 还有 1 条 review conversation 没 resolve(apps/desktop/src/main/utility-model/auxiliary-model-settings-store.ts),auto-review 因此暂时跳过、没法继续审查 / 合并。 如果你已经按评论改完或回应了,请到对应 thread 上点 Resolve conversation;全部 resolve 后,下一轮 auto-review 会自动重新审查这个 PR。 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b6b4836aae
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: df6efff4a9
ℹ️ 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".
|
命中 UI 路径(AuxiliaryModelSection / OneshotModelPinPicker / VoiceInputSection 等)但 description 未附界面效果证据。建议补充改动后效果:截图/录屏,或改动后界面的 HTML 页面(```html 代码块、.html 附件或在线预览链接),便于确认界面符合 DESIGN.md。 |
|
@dashhuang 👋 这个 PR 还有 5 条 review conversation 没 resolve(apps/desktop/src/main/voice-input/mapAuxiliaryRefsToVoiceRefiners.ts / apps/desktop/src/main/voice-input/VoiceInputModelSelection.ts / apps/desktop/src/main/sessionTaskSummary.ts / apps/desktop/src/main/utility-model/auxiliary-model-settings-store.ts / apps/desktop/src/main/maker-ipc/promptPrediction.ts),auto-review 因此暂时跳过、没法继续审查 / 合并。 如果你已经按评论改完或回应了,请到对应 thread 上点 Resolve conversation;全部 resolve 后,下一轮 auto-review 会自动重新审查这个 PR。 |
df6efff to
0634564
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0634564d8a
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4757853701
ℹ️ 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".
|
@dashhuang 👋 这个 PR 还有 10 条 review conversation 没 resolve(apps/desktop/src/main/voice-input/mapAuxiliaryRefsToVoiceRefiners.ts / apps/desktop/src/main/voice-input/VoiceInputModelSelection.ts / apps/desktop/src/main/sessionTaskSummary.ts / apps/desktop/src/main/utility-model/auxiliary-model-settings-store.ts / apps/desktop/src/main/maker-ipc/promptPrediction.ts 等),auto-review 因此暂时跳过、没法继续审查 / 合并。 如果你已经按评论改完或回应了,请到对应 thread 上点 Resolve conversation;全部 resolve 后,下一轮 auto-review 会自动重新审查这个 PR。 |
辅助模型路由收敛检查点本轮按
本轮实现提交: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4f8e129dd8
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c44ace9eda
ℹ️ 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".
|
@dashhuang 👋 这个 PR 还有 1 条 review conversation 没 resolve(apps/desktop/src/main/utility-model/oneShotCandidates.ts),auto-review 因此暂时跳过、没法继续审查 / 合并。 如果你已经按评论改完或回应了,请到对应 thread 上点 Resolve conversation;全部 resolve 后,下一轮 auto-review 会自动重新审查这个 PR。 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 27a9286c58
ℹ️ 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".
|
@dashhuang 👋 这个 PR 还有 2 条 review conversation 没 resolve(apps/desktop/src/main/utility-model/resolveAuxiliaryModelChain.ts / apps/desktop/src/main/maker-ipc/promptPrediction.ts),auto-review 因此暂时跳过、没法继续审查 / 合并。 如果你已经按评论改完或回应了,请到对应 thread 上点 Resolve conversation;全部 resolve 后,下一轮 auto-review 会自动重新审查这个 PR。 |
27a9286 to
8dd43cc
Compare
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
c57a6cc to
709668d
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 709668d3cc
ℹ️ 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: Dash <125997726+dashhuang@users.noreply.github.com>
|
@dashhuang 👋 这个 PR 还有 1 条 review conversation 没 resolve(apps/desktop/src/main/cindy-brain/index.ts),auto-review 因此暂时跳过、没法继续审查 / 合并。 如果你已经按评论改完或回应了,请到对应 thread 上点 Resolve conversation;全部 resolve 后,下一轮 auto-review 会自动重新审查这个 PR。 |
|
@dashhuang 👋 这个 PR 目前与 请在本地 merge 最新的 |
这次改了什么
摘要
统一辅助模型的配置、解析和调用路径:设置页支持自动推荐与按供应商选择自定义模型;标题生成、任务摘要、提示词预测和语音输入统一复用辅助模型链,并保持目录内的本地/BYOK 模型可用。供应商展示名复用标准映射,
xd在用户界面显示为Cindy AI。变更类型
feat新功能fix缺陷修复refactor/perf重构或性能优化docs/test/chore文档、测试或工程维护范围
XD Gateway统一显示为Cindy AI。UI 变化
docs/design-rules/DESIGN.md§4.3 Select & Dropdown(供应商分组、搜索与选中态);§10.1 Light / Dark Dual-Mode Delivery Gate(使用语义 token,双模式样式);§14.2 Focus Management(打开选择器后聚焦搜索输入)。怎么验证的
自动验证
统一全量 unit gate 运行了
bash /Users/dash/Code/XD/dash/Skills/git/scripts/run-unit-gate.sh <worktree>:Desktop、Mobile 及其余 workspace 通过;
packages/maker-core的 3 个 Pi subagent集成用例失败。针对同 3 个用例的单文件窄复核可稳定复现;本 PR 未修改
packages/maker-core,未把该基线/环境问题混入本 PR。手工验证
system prompt 与核心指标评估
promptPrediction的固定 system prompt 有意发送到 XD、OpenAI 和其他所有支持的辅助模型路由。promptPredictionRevision.test.ts锁定固定 system prompt 会传入共享辅助请求;oneShotCandidates.test.ts锁定 system/instructions 在自定义 chat 与内置路由上作为独立 system 消息发送。真实短文本样本均通过输出校验。未执行的验证
风险
风险分类
影响与回滚
提交前检查
git commit -s,见 DCO)