Grok 4.6 launch pricing, Cursor slug handling, DeepSeek v4 builtins - #129
Grok 4.6 launch pricing, Cursor slug handling, DeepSeek v4 builtins#129ItsJazii wants to merge 2 commits into
Conversation
Released today (2026-08-12); no public catalog carries it yet, so Grok 4.6 spend showed the unpriced warning. Rates from docs.x.ai/docs/pricing: $2 in / $0.50 cached / $6 out per MTok, doubling for >=200k-prompt requests (whole-request tiering, matching request_cost at the default 200k threshold); cache writes bill as plain input. The 2x fast variant resolves through the existing -fast multiplier path. Catalog entries outrank this the moment one ships. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…iltins - builtin_price strips Cursor's "cursor-" branding so launch-day slugs like cursor-grok-4.6-xhigh price before the supplement learns them (verified against real CSV rows: 20.6M tokens showed $0.00). - grok_price backstop: 4.6''s "fast" is a 2x premium tier, never the old cheap grok-4-fast branch. - DeepSeek v4 pro/flash builtin prices + dated-snapshot stripping (from the parallel working-tree edits; CORRECTIONS_REV 4). Local-only branch — PR when jazii says so. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
| "deepseek-v4-pro" => Some(Price::flat(0.464, 0.928, 0.004, 0.464)), | ||
| "deepseek-v4-flash" => Some(Price::flat(0.142, 0.284, 0.0284, 0.142)), |
There was a problem hiding this comment.
🟡 Cached input on one DeepSeek model is billed at roughly a tenth of the plausible rate
The cached-input rate for DeepSeek's pro model is set to $0.004 per million (Price::flat(0.464, 0.928, 0.004, 0.464) at src-tauri/src/pricing.rs:692), about 1/116 of its regular input rate, while its sibling flash model uses 1/5, which points to a dropped digit, so cached usage is charged far too little.
Impact: Spend totals for that model under-report the money actually spent whenever prompt caching is used.
Rate-card ratio inconsistency inside the same baked-in family
Both new entries mirror each other everywhere else (output = 2× input, cache write = input). The flash entry's cache read 0.0284 is exactly 20% of its input 0.142; the pro entry's cache read 0.004 is 0.86% of 0.464. A vendor cache-hit price of 1/10 input would be 0.0464 — 0.004 looks like a truncated 0.0464. The value is asserted in the new test at src-tauri/src/pricing.rs:772, so the test would need updating alongside. Please re-check the aihubmix.com rate card before merge.
Was this helpful? React with 👍 or 👎 to provide feedback.
| ### Fixed | ||
| - **DeepSeek V4 pro/flash now price** — DeepSeek's V4 pro and flash | ||
| models (including dated snapshots like `deepseek-v4-pro-0813` and | ||
| `deepseek-v4-flash-0731`) weren't in any public catalog, so usage | ||
| through Hermes/AihubMix counted tokens but showed $0 and folded out of | ||
| the spend ring. Their AihubMix rates are baked in until the catalogs | ||
| learn them (self-retiring), and cached history repricies. | ||
| - **Grok 4.6 prices from day one** — xAI's launch-day rates | ||
| ($2 in / $0.50 cached / $6 out per MTok, doubling for ≥200k-token | ||
| prompts; the fast variant at 2x) are baked in until the public | ||
| catalogs learn the model, so spend from Grok 4.6 sessions shows | ||
| dollars instead of the unpriced ⚠. |
There was a problem hiding this comment.
🟡 Pull request bundles three unrelated changes despite the one-change rule
This change ships launch pricing for one vendor's new model, a separate vendor-prefix stripping rule, and a third vendor's model family in a single pull request (see the changelog entries added at CHANGELOG.md:5-16), which the project's contribution rules forbid.
Impact: Reviewers cannot accept or revert one part without the others.
CONTRIBUTING.md rule
CONTRIBUTING.md states under Pull requests: "Keep PRs focused: one change per PR." The PR title itself names three separate items (Grok 4.6 launch pricing, Cursor slug handling, DeepSeek v4 builtins), and the code changes touch independent builtin entries in src-tauri/src/pricing.rs:667-716 plus a backstop table in src-tauri/src/spend.rs:414-432.
Was this helpful? React with 👍 or 👎 to provide feedback.
| // DeepSeek ships dated snapshots ("deepseek-v4-pro-0813"); price them as | ||
| // the base model so a new date doesn't silently go unpriced. | ||
| let bare = match bare.strip_suffix(|c: char| c.is_ascii_digit()) { | ||
| Some(_) if bare.starts_with("deepseek-") => bare.rsplit_once('-').map_or(bare, |(h, t)| { | ||
| if t.chars().all(|c| c.is_ascii_digit()) && t.len() >= 4 { h } else { bare } | ||
| }), | ||
| _ => bare, | ||
| }; |
There was a problem hiding this comment.
🔍 Dated-snapshot stripping is scoped tightly, but only to deepseek-
The snapshot trimmer at src-tauri/src/pricing.rs:681-686 only fires when the slug ends in a digit, starts with deepseek-, and the trailing dash-segment is ≥4 digits, so deepseek-v4 (t=v4) and deepseek-coder-6.7b are untouched and non-DeepSeek families are unaffected. Note the guard is on the post-prefix-strip bare, so deepseek/deepseek-v4-pro-0813 works but a gateway spelling like aihubmix/deepseek-v4-pro-0813 would not be prefix-stripped at all and stays unpriced — worth confirming which exact strings Hermes/AihubMix logs emit.
Was this helpful? React with 👍 or 👎 to provide feedback.
|
Superseded — splitting into one-change PRs per CONTRIBUTING.md (Devin's bundling finding). Grok 4.6 and DeepSeek v4 land separately; the DeepSeek pro cache rate Devin questioned is confirmed correct against aihubmix.com/model/deepseek-v4-pro-0813 (page lists Cache Read $0.004/M — the flash family simply has a different ratio). |
Summary
Grok 4.6 shipped 2026-08-12 and no public catalog carries it yet, so its spend showed the unpriced ⚠. This bakes in the vendor rates until catalogs catch up (same self-retiring pattern as kimi-k3 / qwen3.8-max — a real catalog entry outranks these the moment one ships). Verified working on a live install against real launch-day Cursor usage.
Grok 4.6 (docs.x.ai/docs/pricing):
request_cost's tiering at the default 200k threshold)-fastmultiplier path — no separate entrybuiltin_pricenow also strips Cursor'scursor-branding: Cursor's CSV logs the model ascursor-grok-4.6-xhigh, which stayed unpriced (20.6M real tokens at $0.00) until strippedgrok_pricebackstop in spend.rs: 4.6's "fast" is a 2× premium tier, never the old cheapgrok-4-fastbranch (kept consistent even though the backstop is normally unreachable for 4.6)DeepSeek v4 (aihubmix.com):
deepseek-v4-probuiltin at $0.464 / $0.928 / $0.004 cached, with dated-snapshot stripping (deepseek-v4-pro-0813→ base) so new dates don't silently go unpriced.CORRECTIONS_REVbumped to 4 so cached spend reprices.Testing
grok-4.6,grok-4-6,xai/-prefixed, effort suffixes,cursor-grok-4.6-xhigh, fast/long-context scaling) and DeepSeek dated snapshots$0.00 · 20.6M tokens · estimatedprices correctly after the fix🤖 Generated with Claude Code