Skip to content

fix(models): bring first-party model rows and pricing current as of 2026-08-17 - #5485

Merged
Hmbown merged 1 commit into
mainfrom
codex/v0910-model-catalog-currency
Aug 17, 2026
Merged

fix(models): bring first-party model rows and pricing current as of 2026-08-17#5485
Hmbown merged 1 commit into
mainfrom
codex/v0910-model-catalog-currency

Conversation

@Hmbown

@Hmbown Hmbown commented Aug 17, 2026

Copy link
Copy Markdown
Owner

Summary

Model catalog currency sweep. Every value below was re-verified against the official page on 2026-08-17 (curl of the model/pricing pages; xAI tier values come from the embedded price tables on docs.x.ai model pages, whose LongContext columns are exactly 2x standard). Follows the DeepSeek V4 tier-test style from #5470: each pricing row carries a dated source comment and tests pinning the exact numbers.

Changes

Model Field Old → New Source
gpt-5.6-terra pricing.rs + models_dev seed (cache-read / input / output, cache-write) 0.25 / 2.50 / 15.00 (write 3.125) → 0.20 / 2.00 / 12.00 (write 2.50) https://developers.openai.com/api/docs/models/gpt-5.6-terra (cache_write follows the row's existing 1.25x convention, matching https://models.dev/api.json)
gpt-5.6-luna pricing.rs + models_dev seed 0.10 / 1.00 / 6.00 (write 1.25) → 0.02 / 0.20 / 1.20 (write 0.25) https://developers.openai.com/api/docs/models/gpt-5.6-luna
claude-sonnet-5 pricing.rs claude_sonnet_5_pricing 2/10 until 2026-09-01 then 3/15 (0.30 / write 3.75) → 2.00 / 10.00 permanently (cache-read 0.20, 5m write 2.50) https://platform.claude.com/docs/en/about-claude/pricing ("The previously scheduled increase to $3/$15 … on September 1, 2026 will not occur")
claude-sonnet-5 models_dev seed cost; TUI seed price 3.00 / 15.00 / 0.30 → 2.00 / 10.00 / 0.20 (+ cache_write 2.50); TUI 3.0/15.0 → 2.0/10.0 same
claude-opus-5 new: models.rs (1M ctx / 128K out / reasoning), model_registry seed, pricing.rs row usd_pricing_with_write(0.50, 5.00, 25.00, 6.25) + Anthropic allowlist, models_dev seed, TUI seed, agent ModelInfo (alias opus-5) absent → added https://platform.claude.com/docs/en/about-claude/models/overview ; https://platform.claude.com/docs/en/about-claude/pricing
kimi-k3 (direct Moonshot) pricing.rs row + Moonshot allowlist; models_dev seed cost; TUI seed price unpriced → 0.30 / 3.00 / 15.00 (membership k3 stays unpriced; Fireworks-hosted K3 still unpriced) https://platform.kimi.ai/docs/pricing/chat-k3
kimi-k2.7-code-highspeed new: models.rs (262,144 / 32,768 / reasoning), registry seed, pricing.rs row 0.38 / 1.90 / 8.00 + allowlist, models_dev seed row absent → added https://platform.kimi.ai/docs/pricing/chat-k27-code
MiniMax-M2.7-highspeed pricing.rs row usd_pricing_with_write(0.06, 0.60, 2.40, 0.375) + Minimax/MinimaxAnthropic allowlist; models_dev seed rows in minimax and minimax-anthropic unpriced → priced https://platform.minimax.io/docs/guides/pricing-paygo
grok-4.5 pricing.rs (usage-aware grok_tiered_pricing, 2x at ≥200K like grok-4.6) + Xai allowlist + audit path; models_dev seed limit.context 500000, modalities text+image unpriced / no limit → 0.30 / 2.00 / 6.00 standard, 0.60 / 4.00 / 12.00 long-context; limit 500,000 https://docs.x.ai/docs/models/grok-4.5
grok-4.3 pricing.rs tiered row; models_dev seed row (1,000,000 ctx, no cost — same honesty rule as grok-4.6) absent from seed / unpriced → 0.20 / 1.25 / 2.50 standard, 0.40 / 2.50 / 5.00 long-context https://docs.x.ai/docs/models/grok-4.3
Mistral mistral-medium-latest (+ -3-5, -3.5, -2604), mistral-large-latest (+ -2512), mistral-small-latest (+ -2603), mistral-code-latest (+ codestral-latest, codestral) pricing.rs rows + ApiProvider::Mistral allowlist unpriced → 0.15 / 1.50 / 7.50; 0.05 / 0.50 / 1.50; 0.015 / 0.15 / 0.60; 0.03 / 0.30 / 0.90 (cache-write unpublished → stays Unpublished) https://docs.mistral.ai/inference/pricing
Gemini gemini-3.7-flash, gemini-3.6-flash, gemini-3.5-flash, gemini-3.5-flash-lite, gemini-3.1-pro-preview, gemini-3-pro-preview, gemini-2.5-pro, gemini-2.5-flash models.rs context / max output None → 1,048,576 / 65,536 https://ai.google.dev/gemini-api/docs/models/gemini-3.7-flash (and the sibling model pages)
gemini-3.7-flash registry seed, TUI /model picker (Google), agent ModelInfo, docs/PROVIDERS.md google rows absent → added https://ai.google.dev/gemini-api/docs/models/gemini-3.7-flash
dots-studio/dots-3-note-preview:free (OpenRouter) models.rs 512,000 ctx / 512,000 out; models_dev openrouter seed row (limits only, no price) absent → added https://openrouter.ai/api/v1/models/dots-studio/dots-3-note-preview:free/endpoints
docs/PROVIDERS.md google / anthropic / moonshot / xai rows and the limits table mirrors the code changes above
models_dev seed _meta currency_sweep_2026_08_17 note; coverage count 81 → 89 model rows (baseline was already 83)

Test changes: sonnet_5_* tests now pin the permanent 2/10 rate and assert the 3/15 flip never resurfaces; scorecard::anthropic_sonnet_5_uses_the_recorded_turn_time prices both sides of the former boundary at 6.60; runtime_threads::aggregate_usage_prices_slow_predispatch_turn_at_dispatch_boundary now rides the DeepSeek V4 Flash off-peak→peak boundary (0.22 + 0.44) because Sonnet 5 no longer has a rate boundary; new tests for terra/luna, Opus 5, kimi-k3 vs k3, K2.7 high-speed (exactly 2x), M2.7 high-speed, grok-4.5/4.3 tiers (metadata + direct-route audit + no aggregator leak), Mistral rows, Gemini limits, K2.7 high-speed limits.

Skipped (and why)

  • DeepSeek: nothing to do — deepseek-v4-pro / deepseek-v4-flash peak/off-peak USD+CNY tiers, the 01–04 / 06–10 UTC window, the /anthropic route, alias retirement and 1M/384K limits all match https://api-docs.deepseek.com/quick_start/pricing/ ; no other first-party DeepSeek flat rows exist in pricing.rs (Fireworks/OpenCode Zen hosted rows are provider-owned and out of scope).
  • RedNote / Xiaohongshu (Dots Studio) provider: no first-party hosted API exists on any official page (only open weights dots-studio/dots3-note-prev on Hugging Face and one free OpenRouter endpoint), so a new ProviderKind is out of scope for a hot fix. Added only the OpenRouter row (rule 4). Plan if a first-party API appears: (1) crates/config/src/provider_kind.rs new ProviderKind::Rednote + aliases (rednote, xiaohongshu, dots-studio) and provider_defaults.rs DEFAULT_REDNOTE_MODEL / DEFAULT_REDNOTE_BASE_URL; (2) crates/tui/src/config.rs ApiProvider::Rednote (env keys, base URL, model_completion_names_for_provider, canonical_model_id_for_provider passthrough) and crates/config/src/provider.rs registry entry with docs URL; (3) crates/tui/src/model_registry.rs seed + models.rs limits (512K ctx / 512K out, reasoning on) + pricing.rs row + allowlist once a price is published; (4) crates/config/assets/models_dev.bundled.json provider block with a default: true row equal to DEFAULT_REDNOTE_MODEL; (5) docs/PROVIDERS.md (three tables) + docs/PROVIDERS.id.md, README/locale restamp (18 locales) and scripts/check-provider-registry.py expectations; (6) crates/agent/src/lib.rs ModelInfo entries; (7) docs/public-surface-facts.json + web/lib/facts.generated.ts regeneration. Self-hosting of the open weights already works through the existing vllm / sglang pass-through.
  • Google Gemini pricing (gemini-3.7-flash $0.75/$3.75 through 2026-12-31 then $1.50/$7.50; gemini-3.1-pro-preview $2/$12 with a >200K tier): needs a time-windowed row plus ApiProvider::Google in provider_owned_hand_pricing_at and a bundled google block; deferred so the promo end date and the long-context tier get their own tests. Limits landed now.
  • Mistral bundled provider block: skipped — the seed rule requires a default: true row equal to DEFAULT_MISTRAL_MODEL (mistral-code-latest), which upstream Models.dev does not list (it lists codestral-latest); hand-priced rows in pricing.rs cover the offline case instead.
  • Xiaomi MiMo PAYG pricing (XIAOMI_PAYG_BILLING_SURFACE): pricing_for_billing_surface only prices StepFun and the route audit for ApiProvider::XiaomiMimo never consults it; wiring a surface-gated Xiaomi branch (Token Plan must stay unknown) is a route-audit change with its own tests, not a catalog edit.
  • StepFun: step-3.5-flash publishes CNY-only rates (¥0.7 / ¥0.14 / ¥2.1) and ModelPricing requires a USD row; no stepfun block exists in the seed (needs a default: true row and PAYG-vs-Step-Plan honesty text); step-3.7-flash supports_reasoning: false in the TUI seed vs the StepFun overview's reasoning_effort low/medium/high is a client-behavior change, not a catalog value.
  • Alibaba qwen3.7-max (token-plan output 131072) / qwen3.7-plus (coding-plan output 64000): the seed mirrors upstream Models.dev exactly (alibaba-token-plan 131072, alibaba-coding-plan 64000 as of 2026-08-17) and live refresh supersedes the seed on (provider, wire_model_id), so a hand edit would be overwritten; the fix belongs upstream at models.dev (Alibaba page says 65,536; models.rs already says 65,536).
  • grok-build (512K) / grok-composer-2.5-fast / grok-4.20-0309-* ids: docs.x.ai lists grok-build-0.1 (256K, $1.00/$0.20/$2.00) with grok-build-latest aliasing grok-4.5; the bare grok-build id and 512K are unverified. Renaming a shipped id (XAI_GROK_BUILD_MODEL) is a roster/product change, not a value fix — flagged for follow-up. Note grok-4.20-0309-reasoning / -non-reasoning do appear in the xAI page's embedded price table (1.25 / 0.20 / 2.50, 2x long-context) but were not priced here to keep this PR to audited rows.
  • gemini-3-pro-preview: the Gemini API model page states it was shut down 2026-03-09 (migrate to 3.1 Pro Preview); it remains DEFAULT_ANTIGRAVITY_MODEL on a different route and stays seeded/listed here — a default change is a product choice.
  • OpenAI gpt-5.5-codex acceptance (models.rs is_openai_gpt_55_api_model): low priority, negative tests already cover the other ids.
  • Roster/picker additions for claude-opus-5 (Anthropic picker is a one-per-tier list) and kimi-k2.7-code-highspeed / MOONSHOT_DIRECT_PLATFORM_MODELS: facts landed; picker rosters left as product choices (the catalog-backed facade already surfaces the new bundled rows).
  • CHANGELOG and README not touched per the release-lane rules.

Intended CHANGELOG line (for the release branch/addendum): - fix(models): bring first-party model rows and pricing current as of 2026-08-17 — GPT-5.6 Terra/Luna repriced, Claude Sonnet 5 $2/$10 made permanent, Claude Opus 5 / Kimi K2.7 Code high-speed / Gemini 3.7 Flash added, Kimi K3, MiniMax-M2.7-highspeed, Grok 4.5/4.3 (2x above 200K) and Mistral first-party rates priced, Gemini token limits recorded (#PR)

No-Issue: model catalog currency sweep for v0.9.9/v0.9.10

Testing

  • cargo fmt --all -- --check (clean)
  • python3 scripts/catalog_models_dev.py snapshot --check crates/config/assets/models_dev.bundled.jsonok … providers=20 canonical_models=2 provider_offerings=89
  • python3 scripts/catalog_models_dev_test.py (8 tests OK)
  • python3 scripts/check-provider-registry.py (passed)
  • cargo clippy --workspace --all-targets --all-features --locked — not run in the authoring environment (no cargo builds allowed there); CI must run it
  • cargo test --workspace --all-features --locked — not run in the authoring environment; CI must run it. Tests touched: crates/tui/src/pricing.rs, crates/tui/src/models.rs, crates/tui/src/model_registry.rs, crates/tui/src/scorecard.rs, crates/tui/src/runtime_threads/tests.rs

Checklist

  • Updated docs or comments as needed
  • Added or updated tests where relevant
  • Verified TUI behavior manually if UI changes (no UI changes beyond one picker roster entry)
  • Harvested/co-authored credit uses a GitHub numeric noreply address (n/a — single author)

…026-08-17

Catalog currency sweep against official provider pages (all re-verified
2026-08-17):

- OpenAI gpt-5.6-terra 0.20/2.00/12.00 and gpt-5.6-luna 0.02/0.20/1.20
  (cache-read/input/output per 1M) replace the retired launch cards.
- Anthropic claude-sonnet-5 stays 2.00/10.00 (cache 0.20 / write 2.50):
  the scheduled 2026-09-01 increase to 3/15 was cancelled upstream, so
  the time-windowed flip is gone; claude-opus-5 (GA 2026-07-24,
  5.00/25.00, 0.50/6.25, 1M/128K) is added to models.rs, the registry,
  the pricing table, both bundled catalogs and the agent model list.
- Moonshot kimi-k3 0.30/3.00/15.00 and kimi-k2.7-code-highspeed
  0.38/1.90/8.00 get first-party rows (membership `k3` stays unpriced).
- MiniMax-M2.7-highspeed 0.06/0.60/2.40 (write 0.375).
- xAI grok-4.5 (0.30/2.00/6.00) and grok-4.3 (0.20/1.25/2.50) join
  grok-4.6 on the usage-aware 2x-above-200K tier; bundled xai rows carry
  limits only (same honesty rule as grok-4.6).
- Mistral medium/large/small/code first-party rows (cache-write
  unpublished, kept unpriced).
- Google Gemini API context/max-output (1,048,576 / 65,536) for the
  seeded ids plus gemini-3.7-flash; OpenRouter
  dots-studio/dots-3-note-preview:free limits (512K) as the only hosted
  RedNote/Dots route.

Tests pin every number (DeepSeek V4 tier-test style, #5470); the Sonnet 5
dispatch-boundary aggregation test now rides the DeepSeek off-peak/peak
boundary since Sonnet 5 no longer has one.

No-Issue: model catalog currency sweep for v0.9.9/v0.9.10
@cursor

cursor Bot commented Aug 17, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@claude

claude Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Claude finished @Hmbown's task in 2m 54s —— View job


Review complete

  • Gather context (PR body, changed files list)
  • Read diff (git diff origin/main...HEAD)
  • Review crates/tui/src/pricing.rs changes
  • Review crates/tui/src/models.rs changes
  • Review crates/tui/src/model_registry.rs / crates/tui/src/config.rs
  • Review crates/config/assets/models_dev.bundled.json + crates/tui/assets/model_catalog.bundled.json
  • Review crates/agent/src/lib.rs
  • Review test changes (scorecard.rs, runtime_threads/tests.rs)
  • Review docs/PROVIDERS.md
  • Post final review summary

This is a well-scoped, well-sourced catalog sweep — every pricing row carries a dated source comment, and the "skipped" list in the PR body shows real judgment about what's safely out of scope. One correctness bug found; everything else checked out.

Bug: new test will fail — model_supports_reasoning is missing the bare kimi-k2.7-code-highspeed id

crates/tui/src/models.rs:463-467 adds "moonshotai/kimi-k2.7-code-highspeed" to the matches! arm in model_supports_reasoning, but not the bare "kimi-k2.7-code-highspeed" id — unlike the parallel arms in known_context_window_for_model (line ~239/243) and max_output_tokens_for_model (line ~376/379), which both got the bare id added alongside the prefixed one.

The new test at crates/tui/src/models.rs:1008-1020 (kimi_k2_7_code_highspeed_shares_the_k2_7_code_limits) loops over both "kimi-k2.7-code-highspeed" and "moonshotai/kimi-k2.7-code-highspeed" and asserts model_supports_reasoning(model) for each. Since crates/tui/assets/model_catalog.bundled.json has no entry for either id (so resolved_supports_reasoning returns None and the function falls through to the matches! list), the bare-id case will return false and the assertion fails.

Fix: add "kimi-k2.7-code-highspeed" next to "moonshotai/kimi-k2.7-code-highspeed" in the matches! arm at crates/tui/src/models.rs:464.

Fix this →

Everything else checked out

  • Provider/route safety (EPIC v0.8.65 EPIC: Separate provider facts, model facts, offerings, and route resolution #2608 invariant): no new inference of provider from freeform text or wire-id prefixes. Every new hand-priced row is gated through the existing provider_owned_hand_pricing_at allowlist pattern (Mistral, Moonshot, MiniMax, xAI), and the new direct_xai_grok_45_and_43_own_usage_tier_without_leaking_to_other_providers / mistral_first_party_rows_match_published_table_and_stay_provider_owned tests explicitly assert no aggregator leak.
  • Claude Sonnet 5 permanent-rate change: claude_sonnet_5_pricing now ignores now (parameter prefixed _now) but correctly keeps the DateTime<Utc> signature so the recorded-time contract stays uniform with the DeepSeek tiers — confirmed the callers (scorecard.rs, runtime_threads/tests.rs) were updated consistently, and the runtime_threads boundary test was correctly re-pointed at the DeepSeek V4 Flash peak/off-peak boundary now that Sonnet 5 has no more rate boundary to exercise.
  • Grok 4.5/4.3 tiering: grok_tiered_pricing correctly generalizes the old grok_4_6_pricing/is_grok_4_6 single-model helpers to a match table, reusing the same 200K threshold constant, and the direct-route audit / allowlist / metadata paths were all updated together.
  • kimi-k3 vs membership k3: correctly kept separate — provider_owned_hand_pricing_at only lists "kimi-k3", and a test explicitly checks "k3" stays unpriced.
  • Mistral cache-write honesty: no published cache-write rate, so rows correctly use usd_only_pricingCacheWritePolicy::Unpublished rather than assuming a multiplier.
  • models_dev.bundled.json: spot-checked the kimi-k3/kimi-k2.7-code-highspeed/claude-opus-5/grok-4.3 additions against the PR's table — all consistent, including deliberately price-less grok-4.5/grok-4.3 rows (limits only, matching the "no cost" honesty rule already used for grok-4.6).
  • Tests: strong coverage — tiered-boundary tests, provider-leak-prevention tests, and 2x-multiplier cross-checks (kimi_k2_7_code_highspeed_matches_published_rates asserts the high-speed rate is exactly 2x the standard rate rather than hardcoding both independently).

Not verified (no cargo access in this environment)

cargo test/cargo clippy could not be run here (matches the PR author's own note that these weren't run in their authoring environment either); the bug above was found by static tracing of the match arms and catalog JSON, not by running the suite. CI should confirm.

@Hmbown
Hmbown merged commit 14767f6 into main Aug 17, 2026
26 checks passed
@Hmbown
Hmbown deleted the codex/v0910-model-catalog-currency branch August 17, 2026 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant