Skip to content

Commit eadfb9f

Browse files
authored
fix(models): correct four catalogue prices and add grok-4.7 / qwen3.8-flash (#413)
Verified against each vendor's own pricing page (2026-10-16): - openai/gpt-5.6-sol: 5.0/0.5/30.0 -> 4.0/0.4/20.0 USD/M tokens (short-context promo price, valid at least until 2026-11-21; long context is 8.0/0.8/30.0) - xai/grok-4.6: cache_hit_input_per_m 0.0 -> 0.5. The cached-hit price was written as 0, so every cache hit was billed as free (a persistent undercharge) - xai/grok-4.7 (new row): 2.0/0.5/6.0 USD, 500k context -- xAI's current flagship. grok-4.6 stays: seed_models deletes rows absent from the config, and a listed key whose (provider, model) has no price is rejected at the router with 503 - aliyun-bailian/qwen3.8-flash (new row): 0.8/2.7 CNY, 1M context -- Bailian's current light tier. Its cached-hit price is NOT published: the price table only says the context cache is discounted, and the cache-billing page states the qwen3.8 family does not follow the usual percentage and points to the console. Recorded as 0 (free hits, i.e. an undercharge) with a "pending" note in the config, per the request not to guess The same numbers are mirrored in ui/js/data.js (MODELS plus the guest-market row for gpt-5.6-sol), and catalog_gate's MODEL_COUNT positive control moves 13 -> 15. cargo test 564/0, fmt and clippy clean. A/B: reverting MODEL_COUNT to 13 fails extractors_are_alive, and perturbing the new grok-4.7 row fails shared_model_fields_match_the_config.
1 parent ada9043 commit eadfb9f

4 files changed

Lines changed: 46 additions & 8 deletions

File tree

‎config/config.example.toml‎

Lines changed: 39 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -338,10 +338,13 @@ vision = false
338338
[[models]]
339339
provider = "openai"
340340
model = "gpt-5.6-sol"
341+
# 官方价(2026-10-16 核实,https://platform.openai.com/docs/pricing):短上下文促销价 $4.00 /
342+
# 缓存命中 $0.40 / 输出 $20.00;该促销价至少有效到 2026-11-21,到期后按官网重新核对。长上下文档
343+
# 另有 $8.00 / $0.80 / $30.00 —— 本仓价格字段只有一组、不区分档位(见 rant 2026-10-16T14:08:14.003832)
341344
currency = "USD"
342-
input_per_m = 5.0
343-
cache_hit_input_per_m = 0.5
344-
output_per_m = 30.0
345+
input_per_m = 4.0
346+
cache_hit_input_per_m = 0.4
347+
output_per_m = 20.0
345348
context_length = 1050000
346349
max_output = 0
347350
vision = false
@@ -368,9 +371,25 @@ vision = false
368371
[[models]]
369372
provider = "xai"
370373
model = "grok-4.6"
374+
# 官方价(2026-10-16 核实,https://docs.x.ai/developers/pricing):$2.00 / 缓存命中 $0.50 / $6.00
375+
# (500k 上下文)。缓存命中价原记 0(=命中一分钱不收、持续少收),本次更正为官网值
376+
# —— rant 2026-10-16T14:08:13.993557
371377
currency = "USD"
372378
input_per_m = 2.0
373-
cache_hit_input_per_m = 0.0
379+
cache_hit_input_per_m = 0.5
380+
output_per_m = 6.0
381+
context_length = 500000
382+
max_output = 0
383+
vision = false
384+
385+
[[models]]
386+
provider = "xai"
387+
model = "grok-4.7"
388+
# 官网现役旗舰(2026-10-16 核实,https://docs.x.ai/developers/pricing):$2.00 / 缓存命中 $0.50 /
389+
# $6.00,500k 上下文;≥200k 长档为 $4.00 / $1.00 / $12.00(本仓价格字段不分档)
390+
currency = "USD"
391+
input_per_m = 2.0
392+
cache_hit_input_per_m = 0.5
374393
output_per_m = 6.0
375394
context_length = 500000
376395
max_output = 0
@@ -441,5 +460,21 @@ context_length = 1048576
441460
max_output = 0
442461
vision = false
443462

463+
[[models]]
464+
provider = "aliyun-bailian"
465+
model = "qwen3.8-flash"
466+
# 官网现役轻量档(2026-10-16 核实,https://help.aliyun.com/zh/model-studio/model-pricing):
467+
# 0<Token≤1M 输入 0.8 元 / 输出 2.7 元。⚠️ 缓存命中价官网价格表未给数(该行只写「上下文缓存
468+
# 享有折扣」),而缓存计费页明说 qwen3.8 系列不适用通用折扣比例、要查百炼控制台
469+
# (https://help.aliyun.com/zh/model-studio/context-cache)⇒ 暂记 0(=命中免费、会少收),待补
470+
# —— rant 2026-10-16T14:08:13.993557
471+
currency = "CNY"
472+
input_per_m = 0.8
473+
cache_hit_input_per_m = 0.0
474+
output_per_m = 2.7
475+
context_length = 1048576
476+
max_output = 0
477+
vision = false
478+
444479
# 读图模型:DeepSeek 的视觉能力已并入 `deepseek-flash`(V4.1-Flash 原生多模态),
445480
# 旧的 `deepseek-v4-flash-vision-exp` 已下线并被官方路由到 V4.1-Flash ⇒ 此处不再单列。

‎src/catalog_gate.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const APP_JS: &str = include_str!("../ui/js/app.js");
3838
///
3939
/// 它们的作用是把「提取器静默失真」与「数据真的变了」区分开:若扫描器写错而返回空集,
4040
/// 集合断言会**在空集上"通过"**(C2005 坑 68),这些计数会先把运行中止。
41-
const MODEL_COUNT: usize = 13;
41+
const MODEL_COUNT: usize = 15;
4242
const MARKET_COUNT: usize = 7;
4343
const PLAN_COUNT: usize = 12;
4444

‎ui/README.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,8 @@ ui/
560560
多一处读取就多一处「按数据到没到」的机会(本轮的三个缺陷正是这么长出来的)。
561561
2. **登录态目录缺席就诚实地空着**:`marketRows()` 返回 `null` ⇒ 列表走 `loadErrorRow` + 重试(C2072 的
562562
降级态)、芯片不渲染、徽标不显示数字。空着不是缺陷 —— 假数据才是。
563-
3. **`MODELS` / `PLANS` 是「上架表单的兜底表」,不是市场目录**(13 行 vs 7 行、顺序也不同):
563+
3. **`MODELS` / `PLANS` 是「上架表单的兜底表」,不是市场目录**(两张表行数与顺序都不同,
564+
各自的**行数**由 `src/catalog_gate.rs` 的 `MODEL_COUNT` / `MARKET_COUNT` 守,此处不抄数字):
564565
二者**不得在同一条表达式里互为兜底**。
565566
4. **游客路径是设计的一部分,不许顺手删**:`data.js` 的 `MARKET` / `PROVIDERS` 必须仍然存在且**被读**。
566567
5. 控件按数据源重建时,`dataset` 标记要**区分三种状态**(`live` / `none` / `mock`)—— 把「登录态没数据」

‎ui/js/data.js‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,18 @@
1919
{ provider: "deepseek", model: "deepseek-v4-pro", in: CNY(4.5), out: CNY(13.5), ctx: 1048576, max: 384000, tag: "推理" },
2020
{ provider: "deepseek", model: "deepseek-flash", in: CNY(1.0), out: CNY(4.0), ctx: 1048576, max: 384000, tag: "多模态" },
2121
{ provider: "zhipu", model: "glm-5.3", in: CNY(8.0), out: CNY(28.0), ctx: 1048576, max: 131072, tag: "旗舰" },
22-
{ provider: "openai", model: "gpt-5.6-sol", in: USD(5.0), out: USD(30.0), ctx: 1050000, max: null, tag: "旗舰" },
22+
{ provider: "openai", model: "gpt-5.6-sol", in: USD(4.0), out: USD(20.0), ctx: 1050000, max: null, tag: "旗舰" },
2323
{ provider: "anthropic",model: "claude-opus-5", in: USD(5.0), out: USD(25.0), ctx: 1000000, max: null, tag: "旗舰" },
2424
{ provider: "google", model: "gemini-3.1-pro", in: USD(2.0), out: USD(12.0), ctx: 1048576, max: null, tag: "多模态" },
2525
{ provider: "xai", model: "grok-4.6", in: USD(2.0), out: USD(6.0), ctx: 500000, max: null, tag: "通用" },
26+
{ provider: "xai", model: "grok-4.7", in: USD(2.0), out: USD(6.0), ctx: 500000, max: null, tag: "旗舰" },
2627
{ provider: "moonshot", model: "kimi-k3", in: CNY(20.0), out: CNY(100.0), ctx: 1048576, max: null, tag: "长文" },
2728
{ provider: "bytedance-ark", model: "doubao-seed-evolving", in: CNY(6.0), out: CNY(30.0), ctx: 1048576, max: 262144, tag: "旗舰" },
2829
{ provider: "minimax", model: "minimax-m3", in: CNY(2.1), out: CNY(8.4), ctx: 1048576, max: null, tag: "轻量" },
2930
{ provider: "aliyun-bailian", model: "qwen3.8-max", in: CNY(12.0), out: CNY(36.0), ctx: 1048576, max: null, tag: "旗舰" },
3031
{ provider: "aliyun-bailian", model: "qwen3.7-plus", in: CNY(2.0), out: CNY(8.0), ctx: 1048576, max: null, tag: "通用" },
3132
{ provider: "aliyun-bailian", model: "qwen3.7-flash", in: CNY(0.2), out: CNY(0.8), ctx: 1048576, max: null, tag: "轻量" },
33+
{ provider: "aliyun-bailian", model: "qwen3.8-flash", in: CNY(0.8), out: CNY(2.7), ctx: 1048576, max: null, tag: "轻量" },
3234
];
3335

3436
// 金额/余额格式化:整数原样(千分位);小数保留最多 5 位(2026-08-20:1 CNY = 1 点,点数可为小数)
@@ -80,7 +82,7 @@
8082
MARKET: [
8183
{ id: 1, provider: "deepseek", model: "deepseek-flash", in: CNY(1.0), out: CNY(4.0), ctx: 1048576, avail: true, peak: true, peakIn: CNY(2.0), peakOut: CNY(8.0), peakMult: 2 },
8284
{ id: 2, provider: "zhipu", model: "glm-5.3", in: CNY(8.0), out: CNY(28.0), ctx: 1048576, avail: true },
83-
{ id: 3, provider: "openai", model: "gpt-5.6-sol", in: USD(5.0), out: USD(30.0), ctx: 1050000, avail: true },
85+
{ id: 3, provider: "openai", model: "gpt-5.6-sol", in: USD(4.0), out: USD(20.0), ctx: 1050000, avail: true },
8486
{ id: 4, provider: "anthropic",model: "claude-opus-5", in: USD(5.0), out: USD(25.0), ctx: 1000000, avail: false },
8587
{ id: 5, provider: "google", model: "gemini-3.1-pro", in: USD(2.0), out: USD(12.0), ctx: 1048576, avail: true },
8688
{ id: 6, provider: "moonshot", model: "kimi-k3", in: CNY(20.0), out: CNY(100.0), ctx: 1048576, avail: true },

0 commit comments

Comments
 (0)