From 887eab39998eed1467d7d9112ad77dc726a473b9 Mon Sep 17 00:00:00 2001 From: argszero Date: Sat, 12 Sep 2026 08:51:48 +0800 Subject: [PATCH] fix(ui): resync the fallback catalog in data.js with config.example.toml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `ui/js/data.js` documents its tables as "对齐 config.toml [[models]] 官方价", but they had drifted, and the drift broke a cross-reference the code itself relies on. - Delete `gemini-3.5-flash-lite` from MODELS: it exists only in this file. It is not in any config, nothing in src/, and not in the models table of a live DB. The commit that announced adding it (ce6d0db) only ever wrote it here. - Add `deepseek-v4-flash-vision-exp` (present in config and seeded into the DB, but missing from this fallback) with its config pricing and max_output. - Resync the guest MARKET table: `glm-5.2`/`gpt-5.5-pro`/`claude-opus-4.7` were renamed to `glm-5.3`/`gpt-5.6-sol`/`claude-opus-5`, and `deepseek-v4-flash` still carried a 7.2x-scaled USD price (1.008/2.016) instead of the CNY official price. - Drive the peak columns from the config peak prices (3.0/9.0, not the derived 2.016/4.032) and drop the stale `peak: true` flag from `glm-5.3`, which has no peak price in config. Why it matters: `app.js:737-739` resolves a guest row's max-token cell by model NAME (`D.MODELS.find((x) => x.model === m.model)`), so the three renamed rows were rendering "not published" instead of their max output. All values are derived from config/config.example.toml (USD prices x CNY_PER_USD = 7.2, src/billing.rs:22). Cache-bust bumped so the changed file is refetched. Verified: 155 tests pass, fmt/clippy clean; the MARKET -> MODELS cross-reference resolves for all 7 guest rows (was 4/7); a runtime check that reads the real module reports 5 failures before this change and 0 after. --- ui/index.html | 10 +++++----- ui/js/data.js | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ui/index.html b/ui/index.html index 29d4b09..db5e79c 100644 --- a/ui/index.html +++ b/ui/index.html @@ -5,7 +5,7 @@ AITokenPool - + @@ -842,9 +842,9 @@

使用模型

- - - - + + + + diff --git a/ui/js/data.js b/ui/js/data.js index 42aad3c..ad9ca48 100644 --- a/ui/js/data.js +++ b/ui/js/data.js @@ -18,11 +18,11 @@ const MODELS = [ { provider: "deepseek", model: "deepseek-v4-pro", in: CNY(4.5), out: CNY(13.5), ctx: 1048576, max: 384000, tag: "推理" }, { provider: "deepseek", model: "deepseek-v4-flash", in: CNY(1.5), out: CNY(4.5), ctx: 1048576, max: 384000, tag: "通用" }, + { provider: "deepseek", model: "deepseek-v4-flash-vision-exp", in: CNY(1.5), out: CNY(4.5), ctx: 1048576, max: 384000, tag: "读图" }, { provider: "zhipu", model: "glm-5.3", in: CNY(8.0), out: CNY(28.0), ctx: 1048576, max: 131072, tag: "旗舰" }, { provider: "openai", model: "gpt-5.6-sol", in: USD(5.0), out: USD(30.0), ctx: 1050000, max: null, tag: "旗舰" }, { provider: "anthropic",model: "claude-opus-5", in: USD(5.0), out: USD(25.0), ctx: 1000000, max: null, tag: "旗舰" }, { provider: "google", model: "gemini-3.1-pro", in: USD(2.0), out: USD(12.0), ctx: 1048576, max: null, tag: "多模态" }, - { provider: "google", model: "gemini-3.5-flash-lite", in: USD(0.3), out: USD(2.5), ctx: 1048576, max: null, tag: "轻量" }, { provider: "xai", model: "grok-4.6", in: USD(2.0), out: USD(6.0), ctx: 500000, max: null, tag: "通用" }, { provider: "moonshot", model: "kimi-k3", in: CNY(20.0), out: CNY(100.0), ctx: 1048576, max: null, tag: "长文" }, { provider: "bytedance-ark", model: "doubao-seed-evolving", in: CNY(6.0), out: CNY(30.0), ctx: 1048576, max: 262144, tag: "旗舰" }, @@ -79,10 +79,10 @@ // 市场在售 key(游客浏览用;rant 2026-08-19T15:54:06:multi/success 为虚构数据已移除; // 登录态用 GET /api/models 真实数据,multi=available_keys>=2、ctx=context_window) MARKET: [ - { id: 1, provider: "deepseek", model: "deepseek-v4-flash", in: USD(0.14), out: USD(0.28), ctx: 1048576, avail: true, peak: true, peakIn: USD(0.28), peakOut: USD(0.56), peakMult: 2 }, - { id: 2, provider: "zhipu", model: "glm-5.2", in: CNY(8.0), out: CNY(28.0), ctx: 1048576, avail: true }, - { id: 3, provider: "openai", model: "gpt-5.5-pro", in: USD(30.0), out: USD(180.0), ctx: 1050000, avail: true }, - { id: 4, provider: "anthropic",model: "claude-opus-4.7", in: USD(5.0), out: USD(25.0), ctx: 1000000, avail: false }, + { id: 1, provider: "deepseek", model: "deepseek-v4-flash", in: CNY(1.5), out: CNY(4.5), ctx: 1048576, avail: true, peak: true, peakIn: CNY(3.0), peakOut: CNY(9.0), peakMult: 2 }, + { id: 2, provider: "zhipu", model: "glm-5.3", in: CNY(8.0), out: CNY(28.0), ctx: 1048576, avail: true }, + { id: 3, provider: "openai", model: "gpt-5.6-sol", in: USD(5.0), out: USD(30.0), ctx: 1050000, avail: true }, + { id: 4, provider: "anthropic",model: "claude-opus-5", in: USD(5.0), out: USD(25.0), ctx: 1000000, avail: false }, { id: 5, provider: "google", model: "gemini-3.1-pro", in: USD(2.0), out: USD(12.0), ctx: 1048576, avail: true }, { id: 6, provider: "moonshot", model: "kimi-k3", in: CNY(20.0), out: CNY(100.0), ctx: 1048576, avail: true }, { id: 7, provider: "xai", model: "grok-4.6", in: USD(2.0), out: USD(6.0), ctx: 500000, avail: true },