litellm - ✅(Solved) Fix [Bug]: wandb cost data is incorrect [2 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
BerriAI/litellm#23503Fetched 2026-04-08 00:43:58
View on GitHub
Comments
0
Participants
1
Timeline
7
Reactions
0
Participants
Timeline (top)
labeled ×3cross-referenced ×2referenced ×2

Fix Action

Fixed

PR fix notes

PR #23517: fix: correct wandb model prices (off by 100,000x)

Description (problem / solution / changelog)

Summary

Fixes #23503

All 13 wandb model entries in model_prices_and_context_window_backup.json had input_cost_per_token and output_cost_per_token values that were 100,000x too high. The prices appeared to be in dollars-per-million-tokens rather than dollars-per-token.

For example, wandb/meta-llama/Llama-3.3-70B-Instruct:

  • Before: input_cost_per_token: 0.071 (= $71,000/1M tokens)
  • After: input_cost_per_token: 7.1e-07 (= $0.71/1M tokens, matching wandb pricing page)

The one model that already had correct values (wandb/moonshotai/Kimi-K2-Instruct at 6e-07) was left unchanged.

Models fixed (13 total)

ModelInput (before → after)Output (before → after)
openai/gpt-oss-120b0.015 → 1.5e-070.06 → 6e-07
openai/gpt-oss-20b0.005 → 5e-080.02 → 2e-07
zai-org/GLM-4.50.055 → 5.5e-070.2 → 2e-06
Qwen/Qwen3-235B-A22B-Instruct-25070.01 → 1e-070.01 → 1e-07
Qwen/Qwen3-Coder-480B-A35B-Instruct0.1 → 1e-060.15 → 1.5e-06
Qwen/Qwen3-235B-A22B-Thinking-25070.01 → 1e-070.01 → 1e-07
meta-llama/Llama-3.1-8B-Instruct0.022 → 2.2e-070.022 → 2.2e-07
deepseek-ai/DeepSeek-V3.10.055 → 5.5e-070.165 → 1.65e-06
deepseek-ai/DeepSeek-R1-05280.135 → 1.35e-060.54 → 5.4e-06
deepseek-ai/DeepSeek-V3-03240.114 → 1.14e-060.275 → 2.75e-06
meta-llama/Llama-3.3-70B-Instruct0.071 → 7.1e-070.071 → 7.1e-07
meta-llama/Llama-4-Scout-17B-16E-Instruct0.017 → 1.7e-070.066 → 6.6e-07
microsoft/Phi-4-mini-instruct0.008 → 8e-080.035 → 3.5e-07

Test plan

  • Verified corrected values match wandb pricing page
  • Confirmed wandb/moonshotai/Kimi-K2-Instruct was already correct and left unchanged
  • JSON file parses correctly after changes

Changed files

  • litellm/model_prices_and_context_window_backup.json (modified, +31/-44)

PR #23521: fix: correct wandb model prices (off by ~100,000x)

Description (problem / solution / changelog)

Summary

  • Fixes all 13 wandb model entries in model_prices_and_context_window_backup.json where input_cost_per_token and output_cost_per_token were ~100,000x too high
  • Prices were in per-1M-token format instead of per-token format (e.g., Llama-3.3-70B-Instruct was 0.071 instead of 7.1e-07)
  • wandb/moonshotai/Kimi-K2-Instruct was already correct and left unchanged

Fixes #23503

Affected models

ModelFieldBeforeAfter
Qwen3-235B-A22B-Instruct-2507input/output0.01 / 0.011e-07 / 1e-07
Qwen3-235B-A22B-Thinking-2507input/output0.01 / 0.011e-07 / 1e-07
Qwen3-Coder-480B-A35B-Instructinput/output0.1 / 0.151e-06 / 1.5e-06
DeepSeek-R1-0528input/output0.135 / 0.541.35e-06 / 5.4e-06
DeepSeek-V3-0324input/output0.114 / 0.2751.14e-06 / 2.75e-06
DeepSeek-V3.1input/output0.055 / 0.1655.5e-07 / 1.65e-06
Llama-3.1-8B-Instructinput/output0.022 / 0.0222.2e-07 / 2.2e-07
Llama-3.3-70B-Instructinput/output0.071 / 0.0717.1e-07 / 7.1e-07
Llama-4-Scout-17B-16E-Instructinput/output0.017 / 0.0661.7e-07 / 6.6e-07
Phi-4-mini-instructinput/output0.008 / 0.0358e-08 / 3.5e-07
gpt-oss-120binput/output0.015 / 0.061.5e-07 / 6e-07
gpt-oss-20binput/output0.005 / 0.025e-08 / 2e-07
GLM-4.5input/output0.055 / 0.25.5e-07 / 2e-06

Test plan

  • Verified corrected prices match wandb pricing page (e.g., Llama-3.3-70B at $0.71/M tokens = 7.1e-07 per token)
  • Verified corrected prices align with same models on other providers (e.g., azure_ai/Llama-3.3-70B-Instruct at 7.1e-07)
  • Confirmed wandb/moonshotai/Kimi-K2-Instruct was already correct and unchanged

Changed files

  • litellm/model_prices_and_context_window_backup.json (modified, +31/-44)
RAW_BUFFERClick to expand / collapse

Check for existing issues

  • I have searched the existing issues and checked that my issue is not a duplicate.

What happened?

The cost data for all 14 wandb models seems to be off by a factor of 100,000.

e.g the input_cost_per_token for Llama-3.3-70B-Instruct is listed as 0.071 for wandb but 7.1e-07 for azure_ai

The wandb site lists the price as $0.71 per 1M tokens (equal to 7.1e-07 per token).

Steps to Reproduce

View file at https://github.com/BerriAI/litellm/blob/main/litellm/model_prices_and_context_window_backup.json#L31437-L31562

Relevant log output

What part of LiteLLM is this about?

SDK (litellm Python package)

What LiteLLM version are you on ?

v1.82.0.dev5

Twitter / LinkedIn details

No response

extent analysis

Fix Plan

To correct the cost data for wandb models, we need to update the input_cost_per_token values in the model_prices_and_context_window_backup.json file.

Steps:

  1. Identify the incorrect values: Locate the input_cost_per_token values for wandb models in the JSON file.
  2. Calculate the correct values: Use the correct price per token from the wandb site ($0.71 per 1M tokens) to calculate the correct input_cost_per_token values.
  3. Update the JSON file: Replace the incorrect input_cost_per_token values with the calculated correct values.

Example Code (Python):

import json

# Load the JSON file
with open('model_prices_and_context_window_backup.json', 'r') as f:
    data = json.load(f)

# Define the correct price per token
correct_price_per_token = 7.1e-07

# Update the input_cost_per_token values for wandb models
for model in data['models']:
    if model['name'].startswith('Llama'):
        model['input_cost_per_token'] = correct_price_per_token

# Save the updated JSON file
with open('model_prices_and_context_window_backup.json', 'w') as f:
    json.dump(data, f, indent=4)

Verification

After updating the JSON file, verify that the input_cost_per_token values for wandb models are correct by checking the file or using a tool like jq to query the JSON data.

Extra Tips

  • Make sure to backup the original JSON file before making any changes.
  • Consider adding a validation step to ensure that the updated values are correct and consistent.
  • If the JSON file is used in a production environment, consider implementing a automated process to update the file with the correct values.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

litellm - ✅(Solved) Fix [Bug]: wandb cost data is incorrect [2 pull requests, 1 participants]