fix(pricing): correct YAML pricing_data format per pricing skill spec - unit_values + fields + pricings

This commit is contained in:
yumoqing 2026-08-06 17:20:42 +08:00
parent e583189321
commit 520accdade

View File

@ -1,42 +1,88 @@
-- ============================================================
-- MiniMax-H3 — 定价记录(修正版
-- MiniMax-H3 — 定价记录(按pricing skill规范
-- 1个 pricing_program + 2个 pricing_program_timing
-- pricing_data: YAML格式 {unit_values, fields, pricings}
-- ============================================================
-- === pricing_program (1条) ===
-- === pricing_program ===
INSERT IGNORE INTO pricing_program (id, name, ownerid, providerid, pricing_belong, description) VALUES (
'minimax_h3',
'MiniMax-H3',
'platform',
'minimax',
'provider',
'MiniMax-H3 视频生成模型,按分辨率计费2K 0.80元/秒768P 0.50元/秒'
'MiniMax-H3 视频生成模型,按分辨率+时长计费。2K 0.80元/秒768P 0.50元/秒。'
);
-- === pricing_program_timing (2条: 2K + 768P) ===
-- 2K: 0.80 元/秒
-- === pricing_program_timing: 2K (0.80元/秒) ===
-- pricing_data 是 YAML 格式,用 yaml.dump 生成的转义字符串
INSERT IGNORE INTO pricing_program_timing (id, ppid, name, pricing_data, enabled_date, expired_date) VALUES (
'minimax_h3_2k',
'minimax_h3',
'MiniMax-H3-2K',
'resolution: 2K
unit: second
price: 0.80
currency: CNY',
'unit_values:
: 1
fields:
price_factors:
type: string
role: factor
label:
unit_prices:
type: float
role: factor
label:
unit:
type: string
role: factor
label:
resolution:
type: string
role: filter
label:
options:
- 2K
- 768P
pricings:
- price_factors: duration
unit_prices: 0.80
unit:
resolution: 2K',
'2025-01-01',
'9999-12-31'
);
-- 768P: 0.50 元/秒
-- === pricing_program_timing: 768P (0.50元/秒) ===
INSERT IGNORE INTO pricing_program_timing (id, ppid, name, pricing_data, enabled_date, expired_date) VALUES (
'minimax_h3_768p',
'minimax_h3',
'MiniMax-H3-768P',
'resolution: 768P
unit: second
price: 0.50
currency: CNY',
'unit_values:
: 1
fields:
price_factors:
type: string
role: factor
label:
unit_prices:
type: float
role: factor
label:
unit:
type: string
role: factor
label:
resolution:
type: string
role: filter
label:
options:
- 2K
- 768P
pricings:
- price_factors: duration
unit_prices: 0.50
unit:
resolution: 768P',
'2025-01-01',
'9999-12-31'
);