fix: correct wandb model prices (off by ~100,000x) - #23521
Conversation
All 13 wandb model entries (except Kimi-K2-Instruct which was already correct) had input_cost_per_token and output_cost_per_token values that were ~100,000x too high. The prices appeared to be in per-1M-token format rather than per-token format. For example, Llama-3.3-70B-Instruct was listed at 0.071 per token instead of 7.1e-07 per token ($0.71 per 1M tokens). Fixes BerriAI#23503
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
|
Greptile SummaryThis PR corrects pricing data for 13 WandB-hosted models in Key observations:
Confidence Score: 4/5
|
| Filename | Overview |
|---|---|
| litellm/model_prices_and_context_window_backup.json | Correctly divides all 13 wandb model prices by 100,000 to fix per-token amounts; also contains unrelated changes to vertex_ai/gemini-embedding-2-preview (deduplication + removal of multimodal pricing fields) and a JSON formatting tweak. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[WandB Pricing Page<br/>$/M tokens] -->|÷ 1,000,000| B[Correct per-token price<br/>e.g. 7.1e-07]
C[Old entries<br/>e.g. 0.071] -->|Were 100,000x too high| D[Wrong: interpreted as<br/>dollars per token]
B --> E[Updated 13 wandb entries<br/>in model_prices_and_context_window_backup.json]
F[wandb/moonshotai/Kimi-K2-Instruct] -->|Already correct — unchanged| E
E --> G[LiteLLM cost calculation<br/>input_cost_per_token × n_tokens]
Last reviewed commit: 52cde5c
| "vertex_ai/gemini-embedding-2-preview": { | ||
| "input_cost_per_audio_per_second": 0.00016, | ||
| "input_cost_per_image": 0.00012, | ||
| "input_cost_per_token": 2e-07, | ||
| "input_cost_per_video_per_second": 0.00079, | ||
| "input_cost_per_token": 1.5e-07, | ||
| "litellm_provider": "vertex_ai", | ||
| "max_input_tokens": 8192, | ||
| "max_tokens": 8192, | ||
| "mode": "embedding", | ||
| "output_cost_per_token": 0, | ||
| "output_vector_size": 3072, | ||
| "source": "https://cloud.google.com/vertex-ai/generative-ai/pricing", | ||
| "source": "https://ai.google.dev/gemini-api/docs/embeddings#multimodal", | ||
| "supports_multimodal": true, | ||
| "uses_embed_content": true | ||
| }, |
There was a problem hiding this comment.
Unrelated change removes multimodal pricing for vertex_ai/gemini-embedding-2-preview
This PR's stated purpose is to fix wandb model pricing, but this hunk also overwrites the vertex_ai/gemini-embedding-2-preview entry in a way that drops the multimodal cost fields that were present before:
"input_cost_per_audio_per_second": 0.00016,
"input_cost_per_image": 0.00012,
"input_cost_per_video_per_second": 0.00079,
It also changes the input_cost_per_token from 2e-07 (sourced from Google Cloud Vertex AI pricing) to 1.5e-07 (sourced from the Gemini API docs) and points the source URL to the Gemini API documentation instead of the Vertex AI pricing page. For a vertex_ai/-prefixed model entry, the Vertex AI pricing source is the authoritative reference. Removing the audio/image/video cost fields could silently cause zero-cost billing for multimodal embedding calls on Vertex AI.
Please confirm whether these changes are intentional and, if so, document the reasoning. If they were accidentally included (e.g. picked up from a rebase/merge), consider reverting them to keep this PR focused.
|
FYI the price for |
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Summary
model_prices_and_context_window_backup.jsonwhereinput_cost_per_tokenandoutput_cost_per_tokenwere ~100,000x too high0.071instead of7.1e-07)wandb/moonshotai/Kimi-K2-Instructwas already correct and left unchangedFixes #23503
Affected models
Test plan
azure_ai/Llama-3.3-70B-Instructat 7.1e-07)wandb/moonshotai/Kimi-K2-Instructwas already correct and unchanged