mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-24 12:44:18 +08:00
feat(pricing): seed gpt-5.6 alias rows and 1.25x cache-write rates
- Add the bare gpt-5.6 row (official Sol alias) plus effort-suffix variants mirroring the gpt-5.5 accounting shape, priced at Sol rates - The GPT-5.6 family charges cache writes at 1.25x the uncached input rate (new for OpenAI; earlier GPT models keep their correct zero): set 6.25 / 3.125 / 1.25 for Sol / Terra / Luna across seed rows - Repair earlier zero-value gpt-5.6 tier seeds in existing databases, matching only untouched rows so user-customized prices survive
This commit is contained in:
@@ -1510,9 +1510,24 @@ impl Database {
|
||||
"3.75",
|
||||
),
|
||||
// GPT-5.6 系列(Sol / Terra / Luna,2026-06 发布)
|
||||
("gpt-5.6-sol", "GPT-5.6 Sol", "5", "30", "0.50", "0"),
|
||||
("gpt-5.6-terra", "GPT-5.6 Terra", "2.50", "15", "0.25", "0"),
|
||||
("gpt-5.6-luna", "GPT-5.6 Luna", "1", "6", "0.10", "0"),
|
||||
// 5.6 家族起 cache write 收 1.25× 输入价(此前 GPT 模型写缓存免费,勿回填旧系列)
|
||||
("gpt-5.6-sol", "GPT-5.6 Sol", "5", "30", "0.50", "6.25"),
|
||||
(
|
||||
"gpt-5.6-terra",
|
||||
"GPT-5.6 Terra",
|
||||
"2.50",
|
||||
"15",
|
||||
"0.25",
|
||||
"3.125",
|
||||
),
|
||||
("gpt-5.6-luna", "GPT-5.6 Luna", "1", "6", "0.10", "1.25"),
|
||||
// 裸名 gpt-5.6 是 sol 的官方别名;effort 后缀对齐 gpt-5.5 系列的记账形态
|
||||
("gpt-5.6", "GPT-5.6 Sol", "5", "30", "0.50", "6.25"),
|
||||
("gpt-5.6-low", "GPT-5.6 Sol", "5", "30", "0.50", "6.25"),
|
||||
("gpt-5.6-medium", "GPT-5.6 Sol", "5", "30", "0.50", "6.25"),
|
||||
("gpt-5.6-high", "GPT-5.6 Sol", "5", "30", "0.50", "6.25"),
|
||||
("gpt-5.6-xhigh", "GPT-5.6 Sol", "5", "30", "0.50", "6.25"),
|
||||
("gpt-5.6-minimal", "GPT-5.6 Sol", "5", "30", "0.50", "6.25"),
|
||||
// GPT-5.5 系列
|
||||
("gpt-5.5", "GPT-5.5", "5", "30", "0.50", "0"),
|
||||
("gpt-5.5-low", "GPT-5.5", "5", "30", "0.50", "0"),
|
||||
@@ -2248,6 +2263,44 @@ impl Database {
|
||||
|
||||
fn repair_current_model_pricing(conn: &Connection) -> Result<(), AppError> {
|
||||
let pricing_fixes = [
|
||||
// 2026-07-12 GPT-5.6 家族 cache write=1.25× 输入价(OpenAI 5.6 起的新规),
|
||||
// 修正早期 seed 的 0 值;只匹配未被用户改过的行
|
||||
(
|
||||
"gpt-5.6-sol",
|
||||
"GPT-5.6 Sol",
|
||||
"5",
|
||||
"30",
|
||||
"0.50",
|
||||
"6.25",
|
||||
"5",
|
||||
"30",
|
||||
"0.50",
|
||||
"0",
|
||||
),
|
||||
(
|
||||
"gpt-5.6-terra",
|
||||
"GPT-5.6 Terra",
|
||||
"2.50",
|
||||
"15",
|
||||
"0.25",
|
||||
"3.125",
|
||||
"2.50",
|
||||
"15",
|
||||
"0.25",
|
||||
"0",
|
||||
),
|
||||
(
|
||||
"gpt-5.6-luna",
|
||||
"GPT-5.6 Luna",
|
||||
"1",
|
||||
"6",
|
||||
"0.10",
|
||||
"1.25",
|
||||
"1",
|
||||
"6",
|
||||
"0.10",
|
||||
"0",
|
||||
),
|
||||
// 2026-06-10 全量核价(厂商官方 list 价;CNY 按 ~7.14 折算)
|
||||
// GLM 4.6/4.7:旧值是中转/OpenRouter 折扣价,统一到 Z.ai 官方(与 glm-5/5.1 一致)
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user