feat(MOC-236): 提供商整合 / 模型池标准档映射(Codex 选档自动分流上游)#477
Conversation
加 provider 后所有模型可进统一池,Codex 按模型选择,proxy 按 catalog slug `<provider>/<model>` 自动分流到对应上游;切模型不再重写 config / 重启 Codex。 - registry: unique_pool_slugs(确定性排序 + 碰撞 -N 后缀)/ pooled_model_ids (pooledModels → 回退槽位映射)/ build_catalog_slug_map - proxy: StaticResolver.catalog_slug_map 反查表,decide_provider 先精确查表 再回退;空表 = 行为与池化前一致 - codex_integration: catalog_models_for_pool(provider-qualified 显示名)+ ApplyConfig.pool + 泛化 root model 锚定 - src-tauri: snapshot build_pool_catalog 全 provider 构建 + 编排,proxy_runner 按开关建反查表,save_settings 翻开关 re-apply + needsCodexRestart(失败 surface) 默认关时行为零变化。catalog 生成端与路由端共用 unique_pool_slugs 保证 slug 逐字 一致、不错路由(含跨进程一致性单测)。Phase 0 已用真机 codex debug models 实证 catalog 接受斜杠 slug。前端(pooledModels 抓取持久化 + provider→model 级联选择)后续搭车。 Refs MOC-236
- 保留 [1m] 1M 信号:新增 pooled_models_with_one_m + PoolEntry.supports_one_m, 让仅靠 [1m] 标 1M 的自定义模型(无 modelCapabilities / 非 documented)在池模式 也拿 1M 窗口,与单 provider 模式一致 - 全新 pool config(config.toml 无 root model)锚到 pool_default_slug,避免 Codex 隐式默认 gpt-5.5 不在池 catalog(全是 <provider>/<model> slug) Refs MOC-236
bot review P2:池模式下 catalog/路由依赖**全部** provider,但原 CRUD 只在 active provider 变更时 re-sync —— 增删改 / autofill / reorder 一个**非 active** provider 后, Codex picker 漏新模型、被删 provider 的 slug 仍用陈旧 in-memory 凭据路由,直到下次 无关 re-apply / 重启才纠。 - 新增 providers::resync_pool_if_enabled(开池才动、单模式整体 no-op) - 接入 add_provider / update_provider / delete_provider / reorder_providers / save_draft / autofill_provider_models(均补 State<AdminState>,axum 自动注入、无需改路由) - update_models 改 was_active → was_active || pool_on 才 sync 单模式行为零变化(helper no-op、update_models 退回原 was_active 门)。 Refs MOC-236
bot review P2:save_settings 之前返回的 needsCodexRestart / exposeAllProviderModelsWarning 被前端 CCApi.saveSettings wrapper 丢弃(它只透传 webFetchSyncWarning)。本 PR 后端 only, 故去掉这两个尚无前端消费方的响应字段;re-apply 失败改为后端 tracing::error 记录(不静默吞)。 用户面 toast / 「需重启 Codex」引导属池化前端 UX,随 follow-up 落地。 Refs MOC-236
bot review P2:resync_pool_if_enabled 用 `let _ =` 丢弃 sync 结果 —— re-apply 失败 (proxy 重启绑定失败 / apply 出错)时 CRUD 仍报成功,Codex 被留在停掉 / 陈旧的 proxy+catalog 却无任何记录。改为检查 sync 结果,attempted 但 !success 时 tracing::error(POOL_CRUD_RESYNC_FAILED)。不阻塞 CRUD(config 已落盘,幂等补偿)。 Refs MOC-236
stacked 在后端引擎 PR #476 之上。加 provider / 「获取模型」(autofill)时把可用模型 id 持久化到 provider.pooledModels(按 provider 隔离,经 extra flatten);autofill **合并**而非 覆盖(保留用户手加 + 追加新上游,守 no-silent-destructive)。catalog 池化(pooled_model_ids) 优先用 pooledModels、为空才回退槽位映射 —— 即「provider 所有模型进池」。 - crud.rs: AddProviderInput.pooledModels + add/update 持久化(update 不带该字段=保留现值) - models.rs: autofill 合并写入 usable 模型 id(去 embedding/rerank) - api.js: mapProvider 暴露 + providerBody 下发 pooledModels 前端编辑流解耦(不再每次进编辑页强制 fetch)+ provider→model 级联选择 + 开关文案随后续 commit。 Refs MOC-236
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8c85a675c7
ℹ️ 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".
- 编辑流解耦(用户要求):进 provider 编辑页直接用持久化的 pooledModels 渲染模型下拉, 不再强制网络拉取;「获取模型」仍刷新并(后端)合并 pooledModels,返回后刷新下拉。 pooledModels 空时回退原行为(下拉禁用直到获取)。antigravity 自动拉取降级为锦上添花。 - 开关文案:exposeAllProviderModels 提示改为「Codex 模型列表显示所有 provider 模型 + 代理 自动分流;切开关 / 改模型列表需重启 Codex 生效」。 - set-default 语义:池化模式下「设为默认」= 新对话 / 不带前缀请求的默认 provider, active badge / 按钮文案 + tooltip 随 poolMode 切换(关闭维持原文案)。 - 后端:status handler 返回真实 exposeAllProviderModels(此前硬编 false 的 stub),供前端读取。 i18n 补 zh+en:setPoolDefault / setPoolDefaultHint / poolDefaultBadge + 更新 modelMenu 提示。 Refs MOC-236
- providerPayloadFromForm 带 pooledModels(当前下拉列表 ids,去重):fetch-form-models 后 保存也持久化完整列表,不再静默回退槽位(满足「添加 provider 时记录已获取模型」) - pooledModels 用新 chat_usable_model_ids(no-fallback 过滤):provider 只返 embedding/ rerank/语音 等时返回空、不把非 chat 模型写进池(否则进 Codex chat picker 把 chat 路由到 不支持的端点);usable_model_ids 保留 fallback 供映射下拉用 Refs MOC-236
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b4eda601cf
ℹ️ 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".
…pings) - 后端单一过滤真源:新增 chat_filter_pooled_value,add/update provider 持久化 pooledModels 前统一 chat-only 过滤(覆盖表单保存路径;embedding/rerank 等非 chat 模型不进池) - 前端 providerPayloadFromForm 的 pooledModels 并入当前 mappings 值(含用户手输的新模型 id), 否则新模型不进池、且旧 seed 出来的 pooledModels 反而盖掉它(registry 优先 pooledModels) Refs MOC-236
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cbfbc5b558
ℹ️ 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".
- update_provider 改为**合并** pooledModels(现有 ∪ 新增、去重、永不收缩):防表单 fetch 失败 / 部分态时易失的下拉缓存把已持久化的完整池删剩 1-5 个映射值(bot review P2) - suggest_model_mappings 改用 chat_usable_model_ids(no-fallback):只含 embedding/rerank 的 provider 不再被自动推荐非 chat 模型当 default,避免「pooledModels 空 → 回退槽位映射」把该 embedding 漏进 Codex chat picker - 移除随之 dead 的 usable_model_ids Refs MOC-236
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c3bf82b21c
ℹ️ 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".
update_models(Model Mapping 页 PUT /models)此前只写 models;池模式偏好非空 pooledModels, 导致映射页改/手输的新模型持久化了却不进池、不出现/不路由(bot review P2)。现在该 provider 已在用池(pooledModels 非空)时,把映射值 chat 过滤后并入池(去重、永不收缩);空池无需(走 mappings fallback)。 Refs MOC-236
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9aa0bcd782
ℹ️ 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".
update_provider:当 baseUrl / apiFormat 与原值不同(= 指向不同上游)时清空 pooledModels — 旧池属旧端点,不再随「永不收缩」合并保留,避免 stale slug 路由到新上游不存在的模型(bot review P2)。同一上游的编辑仍合并永不收缩(防 fetch 失败/部分态删池 + 保留手加)。apiKey 变更 视作同上游再鉴权、不算身份变更。 Refs MOC-236
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8876ee121d
ℹ️ 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".
update_provider 身份变更判定加入 apiKey:换 key 常意味换账号,旧账号可见模型未必新 key 可用, stale slug 会拿新 key 路由 → invalid-model/权限错(bot review P2)。比对 existing vs updated 的 apiKey,用户没重填 key 时前端不下发、updated 沿用旧值 → 相等不误清。 Refs MOC-236
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 93169569d9
ℹ️ 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".
- unique_pool_slugs 仅纳入 pooledEnabled==true 的 provider(整合页「手动添加的子集」)
- 新增 PUT /api/providers/{id}/pool:enabled 加入/移出整合、models 权威替换可选模型列表
- 池为空时退回单 provider catalog 并 loud log(POOL_EMPTY_FELL_BACK_TO_SINGLE)
- models 非数组拒为 400、provider 元素损坏拒为 500(不静默 no-op 报 success)
- 回归测试:active provider 未加入整合时池非空 + default_slug=None
- 第二页改造为「整合提供商」页:右上角整合开关,上池选要整合的 provider、下池按 provider 分组增删可选模型 - 加入整合后自动获取该 provider 模型并列入下池;支持手动加 / 删模型、重新获取 - 整合开启时锁定控制台页与提供商编辑页的「应用 / 启用」按钮 + 顶部提示,避免与模型池冲突 - api.js 暴露 pooledEnabled + setProviderPool;清理被替换面板的死 i18n key
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c4805b00df
ℹ️ 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".
curation 删光某 provider 模型写入 pooledModels:[] 时,pooled_models_with_one_m 原把空数组等同缺省、回退 models 槽位映射 → UI 删光了 Codex catalog/resolver 仍带 该 provider 映射模型(静默不一致)。改为「数组存在即权威(含空)」,仅整个缺省才回退; 新增 explicit-empty / absent / unique_pool_slugs 三个回归测试
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2b981ea783
ℹ️ 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".
- 整合页「获取模型」改用非破坏性 GET /models/available + setProviderPool, 不再走 autofill(autofill 会顺带覆盖 provider.models 槽位映射,池外仍在用) - mapProvider 保留 pooledModels 缺省(null)与显式空([])之分;下池对「未 curation」 provider 显示并固化回退映射(effectivePoolModels),与后端 catalog 一致 - 增删模型以「实际生效列表」为基底(回退态先固化,避免单条编辑丢其余回退模型)
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6b57352b64
ℹ️ 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".
模型池改由「整合提供商」页 setProviderPool 独家管理,provider 表单 / autofill / 映射页保存全部与 pool 解耦,不再读写 pooledModels: - 表单保存(providerPayloadFromForm / providerBody / add_provider / update_provider) 不再拼/持久化 pooledModels;update_provider 克隆 existing 原样保留整合页 curation 的池 - autofill / update_models 只更新槽位 models 映射,不动 pool(映射变仍 resync 兜底回退池) - 根因:多路径写 pool → 整合页删掉的模型在保存其它字段时被悄悄加回(resurrection) 保留:setProviderPool 仍是唯一写者;mapping 缺省回退仍生效
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9a1e18f6f0
ℹ️ 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".
- pool-add-provider 改为合并 effectivePoolModels(映射回退)+ 抓取结果,不再只发抓取 结果当权威 —— 否则手填、/models 不返回的映射模型会被挤出池(thread 1) - build_pool_catalog 区分:无 provider 加入整合 → None(退回单 provider);有 provider 加入但 curation 全清空 → Some(空) 尊重显式空池,不退回单 provider 复活 active 模型(thread 2) - 新增 2 个 snapshot 回归测试 + 调整 POOL_EMPTY_FELL_BACK_TO_SINGLE 日志措辞
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f06ef0a901
ℹ️ 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".
旧表格版提供商页有条 #page-providers .page-title{display:none}(旧设计无标题),
改造成整合页后这条把新的「整合提供商」标题 + 右上角整合开关整行藏了 → 用户看不到开关。
删除该规则;整合页标题/副标题/开关正常显示。(用户真机测试反馈)
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 80e85ecc4c
ℹ️ 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".
- update_provider:upstream 身份变了(baseUrl/apiFormat/apiKey)→ 清空 pooledModels, 否则旧 slug 被 catalog/resolver 继续广播、请求路由到新上游不存在的模型(错路由)。 表单只作废池、绝不填充池(不重新引入 resurrection)(thread 1) - build_pool_catalog:池为空(没加入 / 加入的全清空)统一返 None → catalog 与 resolver 一致退回单 provider。此前对「加入但清空」返 Some(空) 但 resolver 空 map 仍 legacy 路由 → 不一致;改走「避免下发空池」graceful 回退 + loud log(thread 2) - 测试合并为 empty_pool_returns_none_for_consistent_fallback(两种空因)
…der) StaticResolver 加显式 pool_enabled(反查表非空即置位):池化模式下 decide_provider 反查表 miss 时不再走 <slug>/<model> legacy 拆分 —— 否则旧会话 / 手输的 excluded-provider/model 会被路由到用户已移出整合的 provider(违反子集语义)→ 改退默认 provider。单 provider / 池空回退(表空)仍保留 legacy 拆分(向后兼容)。+1 回归测试。 (thread 2「unseeded 当显式空池」round-5 已修:空池统一回退单 provider、不下发空 catalog)
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fe4d5be24f
ℹ️ 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".
round-5 身份变更用 remove(pooledModels),但缺省会让 unique_pool_slugs 回退到该 provider (同样陈旧的)models 槽位映射 → 旧 slug 立刻又进池广播、路由到新上游不存在模型。改为置 **显式空 []**(round-3 registry 语义 = 不贡献 slug 也不回退),等用户在整合页「重新获取」 对新上游重建池。表单仍只作废池、不填充。
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3c4f412bad
ℹ️ 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".
round-6 pool-miss 退 default_provider()=active,但 active 本身可能未加入整合(整合时 set-default 锁定,active 可能是开整合前的遗留)→ pool-miss 仍把流量打到被排除的 active。 proxy_runner 新增 pool_default_provider_id:池化下 default = active(若在子集内)否则池首条 所属 provider(与 apply root-model 锚定一致),绝不退被排除的 active。+1 单测。
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 10bcaa866e
ℹ️ 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".
NON_CHAT_MODEL_KEYWORDS 含 vision/audio,但 moonshot-...-vision-preview / gpt-4o-audio-preview 等是多模态 chat 模型(只是支持图/音输入),按子串剔会把合法 chat 模型 静默踢出池、在 Codex picker 消失。移除 vision/audio;保留 embedding/rerank/moderation/ whisper/tts/image(真非 chat,image 是生成端点无 chat 同名变体)。+1 单测。
There was a problem hiding this comment.
💡 Codex Review
codex-app-transfer/src-tauri/src/admin/services/desktop/snapshot.rs
Lines 220 to 221 in bd3fa90
When exposeAllProviderModels is enabled while the active provider is a custom Responses/direct provider, this early return still builds a direct target with pool: None and requires_proxy: false, so apply strips the catalog and stops/avoids the proxy before the integration pool is considered. In that state the UI can add providers to the pool and locks per-provider apply actions, but Codex remains pointed at the single direct upstream and never sees or routes the integrated models; force local-proxy mode when integration is on or block the toggle for direct active providers.
ℹ️ 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".
真机确认 provider/model slug 进不了 Codex model picker,故整合模式改为:Codex 只暴露
映射了的标准档(gpt-5.x),选某档由 resolver 路由到映射的池中 (provider, model)。
- 数据:Config 新增全局 poolSlotMappings(gpt-5.x→{provider,model})
- registry pool_slot_entries(单源:catalog + resolver 共用,slug=标准档名,校验 target 在子集)
- catalog_models_for_slot_mappings(标准档 catalog,套 Codex 原生 builtin 模板)
- build_pool_catalog / proxy_runner 改用 pool_slot_entries;byte-identity 守恒
- PUT /api/pool/slot-mappings 端点 + status 暴露 + api.js
- 前端:上池与下池间插「模型映射」区(复用槽位布局 + 右侧两级 select provider→model)
- 下池/映射 model 显示 displayName(修 antigravity raw id 看不懂);下池改注「映射来源」
- 重写 3 个 snapshot 测试 + 新增 pool_slot_entries 测试
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8a7428917d
ℹ️ 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".
- pool_slot_entries 增校验:target model 必须在该 provider 当前可选池(pooled_model_ids)内, 否则跳过 —— 删模型 / 换上游清空 pooledModels 后,旧映射不再把标准档暴露/路由到已删模型 - normalize_imported_config 白名单加 poolSlotMappings:导入备份保留全局映射,不再丢失退回单 provider - 更新 pool_slot_entries 测试覆盖「model 不在池→跳过」
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8c7e5e33bd
ℹ️ 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".
resolver 加 pool_default((provider_idx, real_model)=首条标准档映射);池模式 catalog miss (旧会话残留 / 未映射档 / 未知 model)路由到池默认档的精确 (provider, model),不再 fall through 到 map_model_for_provider —— 后者会用 default provider 自己的槽位映射改写、绕过整合 catalog、把流量发给整合页未暴露的模型(#477 P2)。proxy_runner 传首条 entry;+1 回归测试。
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9a08fc41ed
ℹ️ 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".
连点多个映射 select 时,每次发整份权威快照;并发 PUT 乱序完成会让旧请求覆盖新选择。改为 单飞 + 最新覆盖(last-write-wins):同时只一个 PUT,期间新变更只更 pending,队列排空再统一 重渲染。
用户反馈:开整合后没有「启用」按钮,Codex 用的还是开整合前那个 provider 的旧配置。根因: 单 provider「应用/启用」按用户要求锁定了,但整合模式本身缺一个应用入口;且 active provider 若是 responses 直连会 bypass 代理、绕过整合池。 - 整合模式 desktop target 强制 local_proxy(不 bypass):base_url=代理、catalog=整合池 - 整合页「模型映射」区加「应用整合并重启 Codex」按钮 → configureDesktop(写 config.toml 池 catalog + 代理)+ 必要时起代理 + 重启 Codex 生效
…ontend # Conflicts: # crates/codex_integration/src/apply.rs # frontend/js/app.js # src-tauri/src/admin/handlers/providers/crud.rs # src-tauri/src/admin/services/desktop/snapshot.rs
💡 Codex Reviewcodex-app-transfer/crates/proxy/src/server.rs Line 130 in ee8d2c8 When integration mode is enabled and the active/default provider is a chat provider, but the selected standard slot maps to an ℹ️ 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". |
Stacked on #476(后端引擎)。base =
worktree-feat+pool-model-routing,合并顺序:先 #476 再本 PR。做了什么
让池子的模型来源从「仅已配置的槽位映射」升级为「provider 实际可用的完整模型列表」:
provider.pooledModels(按 provider 隔离)。pooled_model_ids)优先用pooledModels,为空才回退槽位映射 → 真正「所有模型进池」。用户影响
范围 / 后续
仅数据层(crud.rs / models.rs / api.js,+46 行)。后续 commit(同 PR):前端编辑流解耦(进编辑页不再强制 fetch、直接渲染持久化列表)、provider→model 级联选择、
exposeAllProviderModels开关文案 + 重启提示。验证
cargo check干净。update_provider不带 pooledModels 时保留现值(编辑其它字段不误清池)。Refs MOC-236
🤖 Generated with Claude Code