name
ff6f1640c4
fix(channels): 后端按次/图片计费跳过 token 区间重叠校验
前端在上一个 commit 已对 image / per_request 模式跳过 unbounded-last
和重叠检查, 但保存时后端仍按 token 语义校验, 导致添加第二个图片层级
时报错:
invalid pricing intervals for platform 'openai' models
[gpt-image-2 gpt-image-1.5 gpt-image-1]:
interval #1: unbounded interval (max_tokens=null) must be the last one
ValidateIntervals 加 mode 参数, 与前端校验逻辑对齐:
- token 模式行为不变 (区间重叠 / last-unlimited 仍校验)
- per_request / image 模式跳过区间重叠和 last-unlimited 检查,
保留单条 min/max 自洽校验与价格非负校验。
调用方 validatePricingIntervals 把 pricing.BillingMode 透给校验器。
既有单测全部加上 BillingModeToken 显式参数, 新增 3 个 image 模式用例
(允许多条 unbounded / 仍拒绝负价 / 仍拒绝 max <= min)。
2026-05-15 13:14:07 +08:00
..
2026-05-11 11:17:26 +08:00
2026-04-25 20:39:58 -04:00
2026-05-11 22:25:20 +08:00
2026-02-08 12:05:39 +08:00
2026-02-08 12:05:39 +08:00
2026-03-27 14:33:05 +08:00
2026-05-11 11:17:26 +08:00
2026-05-11 22:25:20 +08:00
2026-05-07 09:35:14 +08:00
2026-05-11 22:55:02 +08:00
2026-05-15 13:14:07 +08:00
2026-03-17 15:38:18 +08:00
2026-03-09 19:55:18 +08:00
2026-04-05 17:11:01 +08:00
2026-04-23 15:13:57 +00:00