Repository navigation
fix(models): correct four catalogue prices and add grok-4.7 / qwen3.8-flash - #413
Merged
Merged
Conversation
…-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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Brings four entries of the model catalogue in line with each vendor's own pricing page (checked 2026-10-16) and adds the two current-generation rows the catalogue was missing. The config is the single source of truth for the catalogue (
config/config.example.toml, seeded into themodelstable on start), so the same numbers are mirrored in the UI fallback table (ui/js/data.js).Work order: rant
2026-10-16T14:08:13.993557— 【定价】4 条模型价格与官网不符(含一处缓存命中价被写成 0 的持续少收). Translated from the Chinese original: four catalogue prices do not match the vendors' official pages, one of them a cached-hit price written as 0 that undercharges continuously.What changed
gpt-5.6-solgrok-4.6grok-4.7qwen3.8-flashgpt-5.6-sol— the three recorded numbers were all above the official short-context price (input 25% high, output 50% high), so points were overcharged. The official price is a promotion valid at least until 2026-11-21; the row's comment records that date and the long-context tier (8.0 / 0.8 / 30.0), because this repository has one price field per model and cannot express the tiers.grok-4.6cache hit — written as0.0, i.e. cached input was billed as free: the higher the cache-hit rate, the more was undercharged. It was the only entry of the thirteen whose cached-hit price was 0, so this reads as a missed field rather than a deliberate giveaway. Corrected to the official 0.5 USD.grok-4.7— the vendor's current flagship (same 2.0 / 0.5 / 6.0 USD, 500k context; ≥200k context is 4.0 / 1.0 / 12.0). Added besidegrok-4.6rather than replacing it:seed_modelsdeletes rows the config no longer lists, and a listed key whose(provider, model)has no price is rejected at the router with 503.qwen3.8-flash— Bailian's current light tier (0<Token≤1M: 0.8 CNY in / 2.7 CNY out).qwen3.7-flashstays for the same reason as above. Its cached-hit price is not published: the price table for that model only says the context cache is discounted, and the cache-billing page states that the qwen3.8 family does not follow the usual percentage and points at the Bailian console. Following the work order's instruction not to guess, the field is recorded as0.0— an explicit undercharge — with a "pending" note in the row's comment stating exactly why and where the number has to come from.Carriers kept in step
config/config.example.toml— the tracked source of truth (the two new rows plus the corrected values).ui/js/data.js—MODELSis a deliberate mirror of the config (bidirectional set equality asserted bysrc/catalog_gate.rs), and the guest-market row forgpt-5.6-solcarried the same wrong price, so it is corrected too.src/catalog_gate.rs—MODEL_COUNT13 → 15. That constant is the positive control whose own comment asks for it to be updated deliberately whenever the catalogue changes.ui/README.md— one line that restated the two fallback tables' row counts no longer does; it points atMODEL_COUNT/MARKET_COUNTinstead, so it cannot go stale again.Note for deployment
An instance's live
config/config.tomlis not part of the repository, andseed_modelssynchronises themodelstable from it on start: the new rows and prices reach a running instance only when that file is updated as well. Keys already listed keep working either way.Tests
cargo test— 564 passed / 0 failedcargo fmt --checkandcargo clippy --all-targets— cleanMODEL_COUNTto 13 failsextractors_are_alive; perturbing the newgrok-4.7price inui/js/data.jsfailsshared_model_fields_match_the_config— the added rows are genuinely compared, not merely present