haruka
06e03f467a
feat(billing): 渠道自定义定价支持图片输入 token 单价 image_input_price
渠道 token 计费模式此前无法为图片输入 token 单独定价,gpt-image-2
图片编辑等请求的图像输入被按文本 input_price 计费。新增
channel_model_pricing.image_input_price 列及全链路支持。
后端:
- 迁移 178:channel_model_pricing 新增 image_input_price 列
- ChannelModelPricing 新增 ImageInputPrice 字段,repo 读写、校验补齐
- model_pricing_resolver / GetModelPricingWithChannel 映射到
ImageInputPricePerToken;未配置时归零,由 computeTokenBreakdown
回退文本输入价(向后兼容,与 image_output_price 的渠道权威规则一致)
- admin / 用户侧定价 DTO 与 model-pricing 自动填充接口补充该字段
前端:
- 渠道定价表单新增「图片输入」价格输入(token 模式)
- API 类型、表单模型、form↔API 换算、自动填充、用户侧模型定价卡展示
- zh/en i18n 标签
相关 #4386。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015wcJTKDddxXSQrepSs3wrU
2026-07-15 09:35:34 -07:00
..
2026-07-15 17:52:10 +08:00
2026-07-14 15:00:52 +08:00
2026-07-15 17:52:10 +08:00
2026-07-14 15:00:52 +08:00
2026-07-14 12:24:42 +08:00
2026-07-14 15:00:52 +08:00
2026-07-15 16:13:22 +08:00
2026-07-14 15:00:52 +08:00
2026-07-14 15:00:52 +08:00
2026-07-14 15:00:52 +08:00
2026-07-14 15:00:52 +08:00
2026-07-14 15:00:52 +08:00
2026-07-01 12:21:45 +08:00
2026-07-15 16:11:28 +08:00
2026-07-01 12:21:45 +08:00
2026-07-01 12:21:45 +08:00
2026-03-04 15:22:46 +08:00
2026-05-27 18:00:45 +08:00
2026-07-10 15:16:09 +08:00
2026-07-15 10:51:13 +08:00
2026-05-03 20:33:13 +08:00
2026-04-09 18:14:28 +08:00
2026-04-09 18:14:28 +08:00
2026-02-11 01:23:21 +08:00
2026-04-27 16:47:44 +08:00
2026-04-27 16:47:44 +08:00
2026-03-16 20:22:10 +08:00
2026-07-14 15:00:52 +08:00
2026-05-19 20:32:32 +08:00
2026-07-15 09:35:34 -07:00
2026-07-14 12:24:42 +08:00
2026-07-14 12:24:42 +08:00
2026-06-10 14:16:51 +08:00
2026-06-12 01:47:01 +08:00
2026-03-11 16:46:58 +08:00
2026-03-17 19:26:30 +08:00
2026-07-10 11:43:44 +08:00
2026-07-10 11:43:44 +08:00
2026-03-17 19:26:11 +08:00
2026-03-17 19:26:11 +08:00
2026-02-28 15:01:20 +08:00
2026-02-28 15:05:54 +08:00
2026-02-10 11:42:39 +08:00
2026-02-24 20:04:05 +08:00
2026-07-15 16:11:28 +08:00
2026-07-14 12:45:03 +08:00
2026-07-14 15:00:52 +08:00
2026-07-15 20:30:23 +08:00
2026-07-15 09:40:08 +08:00
2026-07-13 09:54:51 +08:00
2026-03-04 15:22:46 +08:00
2026-03-04 13:45:49 +08:00
2026-02-23 12:45:37 +08:00
2026-07-15 10:51:13 +08:00
2026-07-01 12:21:45 +08:00
2026-07-13 17:55:01 +08:00
2026-06-08 00:01:30 +08:00
2026-02-12 14:20:14 +08:00
2026-07-14 14:55:30 +08:00
2026-07-02 20:04:47 +00:00
2026-02-12 16:27:29 +08:00
2026-02-12 16:27:29 +08:00
2026-03-04 13:45:49 +08:00
2026-07-14 01:29:46 +08:00
2026-07-14 01:29:46 +08:00
2026-07-14 01:29:30 +08:00
2026-06-25 16:23:45 +08:00
2026-06-30 10:19:50 +08:00
2026-06-18 23:07:25 +08:00
2026-04-09 18:14:28 +08:00
2026-06-08 00:01:30 +08:00
2026-06-08 00:01:30 +08:00
2026-04-09 18:14:28 +08:00
2026-05-19 15:53:28 +08:00
2026-05-20 16:08:41 +08:00
2026-03-08 06:59:53 +08:00
2026-02-07 19:46:42 +08:00
2026-07-15 04:28:55 -05:00
2026-07-05 17:24:38 +08:00
2026-06-26 16:19:41 +08:00
2026-05-19 15:27:47 +08:00
2026-07-09 10:03:49 +08:00
2026-05-26 10:49:20 +08:00
2026-07-08 08:49:22 +08:00
2026-07-15 04:28:55 -05:00
2026-07-15 04:28:55 -05:00
2026-03-11 16:46:58 +08:00
2026-03-11 16:46:58 +08:00
2026-07-01 22:19:21 +08:00
2026-07-09 22:30:04 +08:00
2026-07-09 22:30:04 +08:00
2026-03-27 14:33:05 +08:00
2026-02-28 15:01:20 +08:00
2026-04-09 19:25:08 +08:00
2026-05-30 17:52:18 +08:00
2026-04-09 18:14:28 +08:00
2026-05-30 18:56:08 +08:00
2026-05-30 18:56:08 +08:00
2026-05-30 18:56:08 +08:00
2026-03-04 13:45:49 +08:00
2026-05-26 10:49:20 +08:00
2026-05-30 17:52:18 +08:00
2026-06-08 22:54:01 +08:00
2026-07-09 20:06:09 +08:00
2026-06-29 09:40:04 +08:00
2026-05-26 10:49:20 +08:00