From 5e0d04f737f303130478fd04f33f2e9b146c9241 Mon Sep 17 00:00:00 2001 From: argszero Date: Fri, 16 Oct 2026 23:00:53 +0800 Subject: [PATCH] fix(models): correct four catalogue prices and add grok-4.7 / qwen3.8-flash 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. --- config/config.example.toml | 43 ++++++++++++++++++++++++++++++++++---- src/catalog_gate.rs | 2 +- ui/README.md | 3 ++- ui/js/data.js | 6 ++++-- 4 files changed, 46 insertions(+), 8 deletions(-) diff --git a/config/config.example.toml b/config/config.example.toml index 005c2f3..dc9893b 100644 --- a/config/config.example.toml +++ b/config/config.example.toml @@ -338,10 +338,13 @@ vision = false [[models]] provider = "openai" model = "gpt-5.6-sol" +# 官方价(2026-10-16 核实,https://platform.openai.com/docs/pricing):短上下文促销价 $4.00 / +# 缓存命中 $0.40 / 输出 $20.00;该促销价至少有效到 2026-11-21,到期后按官网重新核对。长上下文档 +# 另有 $8.00 / $0.80 / $30.00 —— 本仓价格字段只有一组、不区分档位(见 rant 2026-10-16T14:08:14.003832) currency = "USD" -input_per_m = 5.0 -cache_hit_input_per_m = 0.5 -output_per_m = 30.0 +input_per_m = 4.0 +cache_hit_input_per_m = 0.4 +output_per_m = 20.0 context_length = 1050000 max_output = 0 vision = false @@ -368,9 +371,25 @@ vision = false [[models]] provider = "xai" model = "grok-4.6" +# 官方价(2026-10-16 核实,https://docs.x.ai/developers/pricing):$2.00 / 缓存命中 $0.50 / $6.00 +# (500k 上下文)。缓存命中价原记 0(=命中一分钱不收、持续少收),本次更正为官网值 +# —— rant 2026-10-16T14:08:13.993557 currency = "USD" input_per_m = 2.0 -cache_hit_input_per_m = 0.0 +cache_hit_input_per_m = 0.5 +output_per_m = 6.0 +context_length = 500000 +max_output = 0 +vision = false + +[[models]] +provider = "xai" +model = "grok-4.7" +# 官网现役旗舰(2026-10-16 核实,https://docs.x.ai/developers/pricing):$2.00 / 缓存命中 $0.50 / +# $6.00,500k 上下文;≥200k 长档为 $4.00 / $1.00 / $12.00(本仓价格字段不分档) +currency = "USD" +input_per_m = 2.0 +cache_hit_input_per_m = 0.5 output_per_m = 6.0 context_length = 500000 max_output = 0 @@ -441,5 +460,21 @@ context_length = 1048576 max_output = 0 vision = false +[[models]] +provider = "aliyun-bailian" +model = "qwen3.8-flash" +# 官网现役轻量档(2026-10-16 核实,https://help.aliyun.com/zh/model-studio/model-pricing): +# 0