docs: filter title model from outfit model picker

This commit is contained in:
2026-06-24 08:55:05 +08:00
parent f033943db0
commit e4b691b22a
2 changed files with 22 additions and 0 deletions
+20
View File
@@ -1521,3 +1521,23 @@
- [x] `config_service`:`load_ai_models` 在用户文件存在但缺 `app_config.title_model` 时,从 factory `ai_models.json` 追加同名模型;不覆盖同名模型、不改 `api_key`;factory 无同名只记录日志
- [x] 测试:缺 prompt 文件时从 factory 复制;已有 prompt 不覆盖;已有 `ai_models.json` 缺标题模型时追加;已有同名标题模型不重复;factory 无同名不报错
- [x] 验证:`py_compile`、`test_config_service.py`、`test_launcher.py`、全套 `python -m unittest discover -s tests`、离屏启动主窗口并切到 AI 穿搭页通过
### 19.29 AI 模型下拉过滤标题模型 — docs/11 §10 / §17.3
前置阅读:
- `docs/11-ai-outfit.md`(§10 右栏、§17.3 模型与提示词)
- `src/app/widgets/ai_outfit_panel.py`(`apply_config` / `_fill_model_combo` / `_resolve_title_model_config`)
- `tests/test_ai_outfit_panel.py`(模型下拉与标题模型查找用例)
背景:
§19.28 后出厂 `ai_models.json` 同时包含图片模型和标题文本模型。右栏「AI 模型」下拉用于图片生成,但当前会显示 `app_config.title_model` 对应的标题模型(默认 `GPT-5.5 文本`),用户可能误选文本模型去生成图片,导致开始生成后失败。
任务:
- [x] 文档更新:`docs/11-ai-outfit.md` 已明确右栏图片 `AI 模型` 下拉填充时跳过 `name == app_config.title_model` 的模型;不新增 `usage` 字段
- [ ] `ai_outfit_panel.py`:`_fill_model_combo()` 按 `self._title_model_name` 过滤图片模型下拉;标题模型仍保留在 `self._models` 中供 `_resolve_title_model_config()` 使用
- [ ] 行为:如果过滤后没有可选图片模型,显示「未配置可用图片模型」类占位并保持开始生成前校验提示
- [ ] 测试:标题模型不出现在图片 AI 模型下拉;图片模型仍显示;标题生成仍能按 `title_model` 找到同名模型;只有标题模型时下拉为空/占位
- [ ] 验证:`test_ai_outfit_panel.py`、全套测试、离屏启动 AI 穿搭页