Skip to content

fix(codex): 移除已废弃的 provider 模型目录字段 - #99

Closed
MattLYT wants to merge 6 commits into
BigStrongSun:mainfrom
MattLYT:codex/remove-deprecated-provider-models
Closed

MattLYT wants to merge 6 commits into
BigStrongSun:mainfrom
MattLYT:codex/remove-deprecated-provider-models

Conversation

@MattLYT

@MattLYT MattLYT commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

概述

新版 Codex 已不再支持 model_providers.<provider>.models。旧版 CCSwitchMulti 在活动 provider 下继续写入该字段时,会触发未知配置告警,且该字段不再是受支持的模型目录入口。

本次修改:

  • 停止生成 provider 内联 models,继续通过顶层 model_catalog_jsonmodels_cache.json 提供模型目录;
  • 同步时只清理活动自定义 provider 下由旧版 CCSwitchMulti 写入的 models
  • 保留非活动用户 provider、MCP 与其他非目标配置;
  • 保留旧内联目录的只读兼容回退,避免尚未重新同步的旧安装出现空模型菜单;
  • 补充活动 provider 清理与非目标配置保留的回归测试;
  • 合入最新 main,修复前后端格式门禁、稳定版 Clippy 阻塞及新增协议证据调用的单测 mock。

验证

  • pnpm typecheck:通过;
  • pnpm format:check:通过;
  • tests/components/AddProviderDialog.test.tsx:8 项通过;
  • tests/components/PiProviderForm.test.tsx:46 项通过;
  • 前端全量测试此前为 1619 项通过;其中两个失败已分别定位并复核,协议证据 mock 缺口已修复,Pi 表单单测已独立通过;
  • cargo fmt --check --manifest-path src-tauri/Cargo.toml:通过;
  • cargo clippy --manifest-path src-tauri/Cargo.toml -- -D warnings:通过;
  • Codex 配置定向回归:通过;
  • git diff --check:通过。

验证边界:完整 cargo test 在本机因 Windows 页面文件不足(OS error 1455)中断,并非断言失败;GitHub Actions 将在三平台继续执行完整后端测试。本 PR 不涉及安装包构建或本机安装。

关联 Issue

无。

截图

不适用:本次为配置同步、兼容迁移与 CI 门禁修复,无 UI 变化。

检查清单

  • 通过 TypeScript 类型检查
  • 通过前端格式检查
  • 通过 Rust 格式检查
  • 通过 Clippy 严格检查
  • 更新或补充相关回归测试
  • 无用户可见文本变更,无需更新国际化文件

@MattLYT
MattLYT marked this pull request as ready for review September 18, 2026 08:50
@MattLYT MattLYT closed this Sep 18, 2026
@MattLYT MattLYT reopened this Sep 18, 2026
@MattLYT MattLYT closed this Sep 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant