Conversation
Add cost entries for OpenAI's gpt-image-2 model and its Azure AI Foundry variant to both pricing JSON files: - input_cost_per_token: $5/1M (5e-06) - cache_read_input_token_cost: $1.25/1M (1.25e-06) - input_cost_per_image_token: $8/1M (8e-06) - cache_read_input_image_token_cost: $2/1M (2e-06) - output_cost_per_image_token: $30/1M (3e-05) Fixes #26765, relates to #26863
|
|
Greptile SummaryThis PR adds pricing entries for Confidence Score: 5/5Safe to merge — JSON-only pricing addition with values confirmed against OpenAI's official pricing page All pricing values are verified correct, structure matches existing image generation model entries, both files are kept in sync, and no logic/code changes are involved No files require special attention
|
| Filename | Overview |
|---|---|
| model_prices_and_context_window.json | Adds gpt-image-2 (openai) and azure_ai/gpt-image-2 pricing entries with correct token costs verified against OpenAI's official pricing page |
| litellm/model_prices_and_context_window_backup.json | Identical entries added as in the primary JSON; backup kept in sync correctly |
Reviews (1): Last reviewed commit: "feat(pricing): add gpt-image-2 and azure..." | Re-trigger Greptile
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Thanks for putting this together! Two notes from production usage of gpt-image-2 on LiteLLM v1.82.3: 1. Missing This PR adds Concrete impact: in our setup ( 2. Please apply the same fix as #27064 (remove Greptile already flagged this above: setting assert info.get("output_cost_per_token") is None
assert info.get("supports_pdf_input") is NoneAligning #26866 with the same shape (and with the existing Suggested entries to add/adjust:
Happy to verify against our deployment once merged. Thanks again! |
|
🤖 litellm-agent: This PR is currently BLOCKED from merge. Score: 4/5 ❌ Why blocked:
Details: Score docked for: 2 unresolved reviewer concerns (unknown, unknown). Fix the issues above and push an update — the bot will re-review automatically.
|
|
🤖 litellm-agent: This PR was marked BLOCKED 7 days ago with no subsequent activity. Closing automatically. |
Summary
Adds pricing entries for OpenAI's
gpt-image-2model and its Azure AI Foundry (azure_ai/gpt-image-2) variant to bothmodel_prices_and_context_window.jsonandlitellm/model_prices_and_context_window_backup.json.Pricing values sourced from https://platform.openai.com/docs/models/gpt-image-2 and https://azure.microsoft.com/en-us/pricing/details/cognitive-services/openai-service/:
input_cost_per_token(text)5e-06($5.00 / 1M tokens)cache_read_input_token_cost1.25e-06($1.25 / 1M tokens)input_cost_per_image_token8e-06($8.00 / 1M image tokens)cache_read_input_image_token_cost2e-06($2.00 / 1M image tokens)output_cost_per_image_token3e-05($30.00 / 1M image tokens)Both
openaiandazure_aiproviders support/v1/images/generationsand/v1/images/editsendpoints.Closes #26765
Relates to #26863 (gpt-image-2 cost always 0 — this adds the missing cost entry)
Test plan
python3 -c "import json; json.load(open(...))")gpt-image-1/azure/gpt-image-1structure