feat(models): 单独测速改并发(每行独立、上限 3)+ 收尾每日同步漂移(2.7.1 → 2.7.2)

老板:「单独测速能异步测速不,不用等到上一个回来后才能测速其他的」

- 单独测速(每行常驻 ⚡)改为**并发**:状态从单个 latCurrentId 换成 latRunning 集合,
  每行自己的加载图标与按钮状态、互不阻塞;并发上限 SPEEDTEST_MAX_CONCURRENCY=3,
  到上限按钮置灰并在悬浮里说明「同时最多测 3 个,等一个回来再点」。
- 一键测速**保持串行**(老板定的口味:测一个显示一个;且并发会把免费额度瞬间打满 → 上游 429
  会把结果刷成一片失败)。整轮在跑时单测按钮禁用;有单测在飞时一键测速按钮禁用(互斥)。
- 抽 probeOne() 共用「一次探针 = 一个模型」的取数与出错处理(整轮 / 单测同一份逻辑)。
- i18n 新增 models.testOneRunning / models.testOneBusy(中英对称 751/751),
  speedtestHint 补「每行 ⚡ 单测可同时跑 {n} 个」。后端零改动(该端点本就是 async)。

收尾(每日同步 10-07~10-10 落盘的漂移,一直未入库):
- data/gateway.yaml:space-bunny-free → space-bunny(官方改名并转收费 $0.15/$0.60)、
  新增 space-bunny / claude-haiku-5-5 / step-5-preview-free,opencode 30 → 32 个模型。
- tests:test_models_payload_marks_free_models 样本 space-bunny-free → longcat-2.5-preview-free
  (否则该用例因配置漂移假红);app/config.py 注释同步。

验证:单测 225 passed / 0 failed、ci_check.sh 六门禁全绿;线上真机实测——同时点 3 行 ⚡
(agnes-3.0-flash / deepseek-v4.1-flash / dots3-note-prev)3 行**同时**转圈、各自独立回
621/1662/951 ms,第 4 行按钮置灰(悬浮=上限提示),一键测速按钮同时置灰;三个回来后
按钮全部恢复、未测的行仍为「—」;一键测速仍串行(全程 1 个转圈)、36/36 行填满
(4 行失败为上游真实原因:1 超时 + 2 DataPolicyError + 1 Endpoint unavailable)。
This commit is contained in:
api-gateway committed 2026-10-12 13:44:26 +08:00
1 parent 1728aa03e0
commit ce0cd0f812
9 files changed
+129 -51

No files matched your search

+3 -1
View File
@@ -513,11 +513,13 @@ export default {
testing: 'Probing latency of every text model…',
testingShort: 'Testing…',
testOne: 'Test this model',
testOneRunning: 'Testing this model…',
testOneBusy: 'Up to {n} at a time — wait for one to finish',
latency: 'Latency',
failed: 'Failed',
speedtestDone: 'Speed test done, {n} models',
speedtestFail: 'Speed test failed',
speedtestHint: 'Latency probed per format',
speedtestHint: 'Latency probed per format; per-row ⚡ tests run {n} at a time',
textModelCount: '{n} text models',
// Round 27: the supported-formats column (three protocol lines). Line names are the
// vendors' own endpoint names, so they are not translated.
+3 -1
View File
@@ -518,11 +518,13 @@ export default {
testing: '正在测试全部文本模型延迟…',
testingShort: '测速中…',
testOne: '单独测速',
testOneRunning: '正在测这一个…',
testOneBusy: '同时最多测 {n} 个,等一个回来再点',
latency: '延迟',
failed: '失败',
speedtestDone: '测速完成,共 {n} 个模型',
speedtestFail: '测速失败',
speedtestHint: '按模型自己的格式探测延迟',
speedtestHint: '按模型自己的格式探测延迟;每行 ⚡ 单测可同时跑 {n} 个',
textModelCount: '{n} 个文本模型',
// 第二十七轮:支持的格式列(三条协议线)。格式名直接用各家标准端点名,不译。
protocols: '支持的格式',