Files
vscode-workbench/PLANNING/PROGRESS_I-01.md
T

42 lines
2.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# PROGRESS_I-01 · 模型能力自动探测(每晚,只报告不写配置)
> 日期 2026-09-13/14 · 范围:只改 `dsh` 目录(新建 `tools/probe_models.py` + 报告目录)
## 现状 vs 差距(接手时)
- 已有:2026-09-06 手动探测结论(DSH模型能力测试报告.md:b/glm-5.3-flash 与 b/qwen3.8-flash
思考✅视觉✅)+ `~/.dsh/model-probe-last.json` 单次快照 + settings.yaml 能力声明注释。
- 缺口:无自动巡检;无 diff 告警;手动一次即忘,漂移无人知。
## 改动(全部在 `C:/Users/12914/Desktop/dsh/` 内)
1. `tools/probe_models.py`(新建,单文件,标准库 + urllib,无 httpx 依赖):
- 只读 `~/.dsh/settings.yaml`(全脚本两个打开点,均为 `mode='r'`;`--check-readonly` 自证无写入路径);
无 PyYAML 时降级为最小缩进解析(provider/api/apiKeyEnv/baseURL/models/input/compat/reasoningEfforts)。
- 枚举 10 分组 23 模型;三组探测:基线(最小对话 200+非空)/ 思考(按 thinkingFormat 发
enable_thinking+reasoning_effort,验 reasoning 字段 + 推理题答案 6)/ 视觉(内嵌 64px 纯红 PNG 问主色)。
- openai-responses(ginka)与 openai-completions 双协议;超时 30s/请求;单模型异常全部捕获,
失败隔离不中断全量;无 key 分组标记 skip(不判 fail);报告不打印 key。
2. 产出:`tools/probe-reports/probe-YYYY-MM-DD.json`(机读:verdict/diff)+
同名 `.md`(人读:表格 + 与上次 diff + 失败明细 + 配置建议)。
告警方向:报告首行——能力变化列 diff,无变化/失败数异常即标红。
3. 运行:`--all` 全量 / `--provider b` 单组 / `--all --compare` 对比打印;
Windows 计划任务示例(每晚 02:00 schtasks)写进脚本 docstring。
## 验证
```bash
python tools/probe_models.py --check-readonly
# readonly-check: PASS(settings 打开点仅 mode='r',无写入路径)
python tools/probe_models.py --all
# 报告:tools/probe-reports/probe-2026-09-14.json + .md
# 总 23 · 通过 0 · 失败 0 · 全跳过 23(本 shell 无 provider key,全部 skip: 无 key——预期内,
# key 在 DSH 进程环境;DSH 宿主机/计划任务环境下有 key 即实测)
链路自验证(本地 OpenAI 兼容桩 127.0.0.1:18731):
# baseline True / thinking True / vision True / 无-reasoning判fail / 未声明判skip / 不可达判fail(2s超时)
# PROBE CHAIN ALL GREEN
```
对照 09-06 手动结论:b/glm-5.3-flash 与 b/qwen3.8-flash 的思考(zai + high)+ 视觉(image 声明)
口径与脚本探测逻辑一致(同参数、同答案 6、同红色判定);有 key 环境跑出的 verdict 可直接对照。
## 状态
done(最小闭环)。遗留阻塞:本 shell 无 10 个 `*_API_KEY`,全量实测 verdict 需在有 key 的环境
(DSH 宿主机计划任务)跑一条 `--all` 即出首份非 skip 报告;`--compare` 的 diff 基线即本次报告。