mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-10-26 01:34:51 +08:00
fix(pricing): price deepseek-v4.1-flash as V4.1 Flash
Third-party upstreams such as OpenCode Go, OpenRouter (deepseek/ namespace) and the Hermes presets call DeepSeek V4.1 Flash deepseek-v4.1-flash. Pricing had no row for that id: none of the lookup fallbacks turn it into deepseek-flash, and the prefix fallback only matches longer ids. These requests showed "Unpriced" and were counted at $0. Add a deepseek-v4.1-flash row at the same official peak price as deepseek-flash (0.3 / 1.2 / 0.006 per million). Default prices are added again on every start, so existing installs get the row on next launch. Requests already logged are not repriced.
This commit is contained in:
1 parent
0af8b77288
commit
816346022b
2 files changed
+12
No files matched your search
@@ -2393,6 +2393,17 @@ impl Database {
|
||||
"0.006",
|
||||
"0",
|
||||
),
|
||||
// 第三方上游(OpenCode Go、OpenRouter 的 deepseek/ 命名空间、Hermes 预设等)用带版本号的
|
||||
// deepseek-v4.1-flash。点号版本既剥不成 deepseek-flash,前缀兜底也只命中更长的行,
|
||||
// 不单列会显示「未定价」并按 0 计费
|
||||
(
|
||||
"deepseek-v4.1-flash",
|
||||
"DeepSeek V4.1 Flash",
|
||||
"0.3",
|
||||
"1.2",
|
||||
"0.006",
|
||||
"0",
|
||||
),
|
||||
(
|
||||
"deepseek-v4-flash",
|
||||
"DeepSeek V4 Flash",
|
||||
|
||||
@@ -1040,6 +1040,7 @@ fn model_pricing_seed_covers_deepseek_v41_flash_aliases() {
|
||||
// 查价前缀兜底是 LIKE '{id}-%',只命中更长的行,任一行缺失都会静默按 0 计费。
|
||||
for model_id in [
|
||||
"deepseek-flash",
|
||||
"deepseek-v4.1-flash",
|
||||
"deepseek-v4-flash",
|
||||
"deepseek-v4-flash-0731",
|
||||
"deepseek-v4-flash-vision-exp",
|
||||
|
||||
Reference in new issue
Block a user