fix(pricing): correct wandb model prices off by 100,000x - #1
Closed
MattFisher wants to merge 1 commit into
Closed
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.
MattFisher
force-pushed
the
claude/litellm-pricing-anomalies-woum6c
branch
from
July 20, 2026 02:40
079e479 to
34965c9
Compare
MattFisher
changed the base branch from
litellm_internal_staging
to
litellm_oss_daily_2026_07_17
July 20, 2026 02:41
Owner
Author
|
This was just a draft for BerriAI#33947 |
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.
Relevant issues
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 (BerriAI#23517 and BerriAI#23521, both referencing BerriAI#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