fix(pricing): correct wandb model prices off by 100,000x - #33947
fix(pricing): correct wandb model prices off by 100,000x#33947MattFisher wants to merge 1 commit into
Conversation
|
|
Thirteen wandb/* entries stored input_cost_per_token and output_cost_per_token as dollars-per-1M-tokens instead of per-token, inflating every price by 100,000x. Sorting the cost map by output_cost_per_token put these at the very top, e.g. wandb/deepseek-ai/DeepSeek-R1-0528 reading $540,000 per 1M output tokens. Each is corrected to the per-token value published on the W&B Inference pricing page; the three already-correct wandb entries (Kimi-K2-Instruct, Kimi-K2.5, MiniMax-M2.5) are left untouched. The fix is applied to both the served map (model_prices_and_context_window.json) and the bundled fallback (litellm/model_prices_and_context_window_backup.json), which are hand-maintained for wandb and were drifting from reality together.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
079e479 to
34965c9
Compare
Greptile SummaryThis PR corrects a unit error in 13
Confidence Score: 5/5Safe to merge — the change is a targeted numerical correction to pricing data with no logic modifications. All 13 corrected per-token values divide the W&B $/1M figure by 1,000,000 and match the published pricing page; the ratio between old and new values is uniformly 100,000 across every entry. The three wandb models already stored at the correct scale are untouched. Both files are updated identically, keeping the served map and bundled fallback in sync. No files require special attention.
|
| Filename | Overview |
|---|---|
| model_prices_and_context_window.json | 13 wandb model entries corrected from $/1M-tokens values to proper per-token values (÷1,000,000); math verified correct for all entries; 3 already-correct entries left unchanged. |
| litellm/model_prices_and_context_window_backup.json | Identical set of 13 wandb pricing corrections applied; backup file kept in sync with the served map. |
Reviews (1): Last reviewed commit: "fix(pricing): correct wandb model prices..." | Re-trigger Greptile
|
Superseded by the rolling registry PR #38207, which carries these values re-verified against the provider's own pricing page/API (DeepInfra publishes $/token and 262144 context for the Kimi K2.5 and K2.7 Code entries). Maintainers asked for a single open model-pricing PR at a time. |
Relevant issues
Fixes #23503
This corrects a longstanding unit error in the wandb pricing entries. The same "off by 100,000x" problem was reported upstream before and two fix attempts (#23517 and #23521, both referencing #23503) were closed without merging, so the wrong values are still live on the served cost map
Linear ticket
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
Screenshots / Proof of Fix
The end-user-visible symptom is the per-request cost. Run a real wandb completion through a live proxy and read the cost header at the parent commit versus this commit
.envasWANDB_API_KEY, then write a minimal configwandb_proof.yaml:Start the proxy:
python litellm/proxy/proxy_cli.py --config wandb_proof.yaml --detailed_debug 2>&1 | tee litellm.logMake a real call and read the cost header:
git stashor check outHEAD~1and repeat) the same call reports a cost in the hundreds of dollars, because output was billed at $0.54 per token instead of $0.54 per 1M tokensType
🐛 Bug Fix
Changes
Thirteen
wandb/*entries hadinput_cost_per_tokenandoutput_cost_per_tokenset to the dollars-per-1M-tokens figure from the W&B Inference pricing page, stored directly in the per-token field. That inflates every price by 100,000x. Sorting the cost map byoutput_cost_per_tokendescending puts these entries at the very top of the entire catalog; the worst,wandb/deepseek-ai/DeepSeek-R1-0528, reads as $540,000 per 1M output tokensThe tell is internal to the file: three sibling wandb entries (
Kimi-K2-Instruct,Kimi-K2.5,MiniMax-M2.5) are already stored correctly at roughly 1e-06 per token, which is the scale the rest should be on. Each corrected value below is the stored figure divided by 100,000, and matches the W&B Inference pricing pageThe wandb block is not maintained by
.github/workflows/auto_update_price_and_context_window_file.py; that job only syncsopenrouter/*andvercel_ai_gateway/*, and only into the served map. So the same fix is applied to both hand-maintained files, the served mapmodel_prices_and_context_window.jsonand the bundled fallbacklitellm/model_prices_and_context_window_backup.json, and their wandb blocks are verified identical after the changeFinal Attestation
Generated by Claude Code