Repository navigation
fix(xai): correct grok-4.5 cached-input pricing - #36413
AndrewAvery7 wants to merge 1 commit into
Conversation
cache_read_input_token_cost was 5e-07 ($0.50/1M) and cache_read_input_token_cost_above_200k_tokens was 1e-06 ($1.00/1M). xAI's current pricing page lists $0.30/1M and $0.60/1M respectively for these two tiers; base input/output pricing was already correct. Verified 2026-08-10 against: - https://docs.x.ai/developers/pricing - https://docs.x.ai/developers/models/grok-4.5 - https://docs.x.ai/docs/models (this entry's own `source` field) All three currently agree on $0.30 / $0.60.
Greptile SummaryCorrects cached-input token prices for the base and long-context tiers of both Grok 4.5 aliases.
Confidence Score: 4/5The fallback cost map must be synchronized before merging because supported local and remote-failure paths still apply the stale Grok 4.5 cached-input prices. The primary catalog has the corrected prices, but fallback loading uses an unchanged bundled catalog and therefore records inflated cached-input spend for both aliases under supported configurations. Files Needing Attention: model_prices_and_context_window.json and litellm/model_prices_and_context_window_backup.json
|
| Filename | Overview |
|---|---|
| model_prices_and_context_window.json | The primary Grok 4.5 prices are corrected, but the corresponding bundled fallback entries remain stale. |
Reviews (1): Last reviewed commit: "fix(xai): correct grok-4.5 cached-input ..." | Re-trigger Greptile
| "cache_read_input_token_cost": 3e-07, | ||
| "cache_read_input_token_cost_above_200k_tokens": 6e-07, |
There was a problem hiding this comment.
Fallback pricing remains stale
If LiteLLM uses LITELLM_LOCAL_MODEL_COST_MAP=True or falls back after a remote cost-map fetch or validation failure, the bundled map still charges cached input for both Grok 4.5 aliases at $0.50/$1.00 per million tokens instead of the corrected $0.30/$0.60, inflating recorded spend and budget consumption.
Knowledge Base Used: Cost Tracking and Budget Enforcement
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
The base branch already contains this change (verified against the official provider docs); registry consolidation is tracked in the rolling PR #38990. Closing as superseded. |
What changed
xai/grok-4.5andxai/grok-4.5-latesthave stale cached-input prices:cache_read_input_token_cost(base tier, <200k tokens)5e-07($0.50/1M)3e-07($0.30/1M)cache_read_input_token_cost_above_200k_tokens(long-context tier, ≥200k tokens)1e-06($1.00/1M)6e-07($0.60/1M)Base
input_cost_per_token/output_cost_per_token(and their_above_200k_tokenscounterparts) were already correct and are untouched.Sources checked 2026-08-10
sourcefield; already shows the corrected numbers, so this looks like a sync that just never landed for these two fields specificallyAll three currently agree on $0.30 / $0.60 for cached input.
How this was found
Cross-checking a hand-verified pricing catalog (input/output/cache rates confirmed independently against vendor docs) against this feed. Every other field on these two entries matched; only the cached-input rates had drifted.