Repository navigation
chore(cost-map): rolling registry update, fal_ai kling v4, azure gpt-6-luna flex, snowflake, bedrock/mantle claude 5.5 - #52299
Conversation
…d long-image priced per billable unit
|
|
|
@BugBot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit afd9735. Configure here.
[Medium impact] The PR affects cost lookup for three fal image models. Fix the missing-header prices and add the required live-proxy billing proof before merging. Findings
|
| "output_cost_per_image": 0.063, | ||
| "output_cost_per_image_2K": 0.063, | ||
| "output_cost_per_image_4K": 0.094, |
There was a problem hiding this comment.
If x-fal-billable-units is absent, 8K images fall back to the 2K price. Text generation records $0.063 instead of $0.157. Add an 8K fallback for both generation and editing.
Rule Used: What: do not treat the caveats mentioned in the PR description as acceptable tradeoffs that some human has read and signed off on. Why: almost every time, the PR description is AI-generated, and in fact, many times, the PR description is very long. ... (source)
There was a problem hiding this comment.
Fixed in 01dc9ef, both rows now carry output_cost_per_image_8K (0.157 and 0.16), which the fal cost calculator reads by resolution name
There was a problem hiding this comment.
Reverted in e40a354, the catalog schema test rejects output_cost_per_image_8K, so 8K spend comes from the header and the 8K price stays in metadata
| "output_cost_per_image": 0.066, | ||
| "output_cost_per_image_2K": 0.066, | ||
| "output_cost_per_image_4K": 0.097, |
There was a problem hiding this comment.
If x-fal-billable-units is absent, the fallback assumes one input image. A 2K edit with two inputs records $0.066 instead of $0.069. Count the extra inputs.
Rule Used: What: do not treat the caveats mentioned in the PR description as acceptable tradeoffs that some human has read and signed off on. Why: almost every time, the PR description is AI-generated, and in fact, many times, the PR description is very long. ... (source)
There was a problem hiding this comment.
The catalog has no per input image field for fal rows, and fal sends the header on every call, so extra inputs are billed through it
| "litellm_provider": "fal_ai", | ||
| "metadata": {"comment":"fal reports the charge for each request in the x-fal-billable-units response header, priced at output_cost_per_billable_unit dollars per unit. One image is 1.0 unit at the default 2K resolution, 1.4921 units at 4K and 2.4921 units at 8K ($0.157), measured 2026-11-17. The per-image prices are used when the header is absent"}, | ||
| "mode": "image_generation", | ||
| "output_cost_per_billable_unit": 0.063, |
There was a problem hiding this comment.
Required billing proof is missing
AGENTS.md requires live-proxy proof for billing changes. Direct fal measurements do not show LiteLLM’s recorded spend. Before merging, add reproducible commands and output at afd97355ee962bb286379af71790f7910665b8fe.
Context Used: AGENTS.md (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
This PR adds catalog rows only and changes no billing code, the header path is the one already shipped and tested for nano-banana-2.1
Merging this PR will not alter performance1 warning
Comparing Footnotes |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…cts from the fal_ai kling v4 rows
…e/ like bedrock_mantle/ Absorbed from #52325. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Summary
Adds the three Kling Image V4 endpoints fal lists as active. fal prices them per billing unit, and a unit is not one image, so the rows follow the shape of
fal_ai/google/nano-banana-2.1:output_cost_per_billable_unitcarries fal's unit price and the per-image fields carry the cost of one image at each resolution for when thex-fal-billable-unitsheader is absentWhat a unit is
The unit price is kind api, from
GET https://api.fal.ai/v1/models/pricing?endpoint_id=...on 2026-11-17:kling/v4/text-to-imageandkling/v4/image-to-imagereturn"unit_price": 0.063, "unit": "units", andkling/v4/long-imagereturns"unit_price": 0.235, "unit": "units". The model pages say the same, "Price: $0.063 per units" and "Price: $0.235 per units".POST https://api.fal.ai/v1/models/pricing/estimatewithunit_quantity: 1forkling/v4/long-imagereturns"total_cost": 0.235, so cost is units times unit priceNeither the pages nor the API say how many units one image is. fal's docs say of the
X-Fal-Billable-Unitsresponse header "Billing units charged for this request", so the unit counts below are that header on real calls made 2026-11-17, one image per call unless stated. Every product of units and unit price lands on a whole tenth of a cent, which is why the per-image fields are rounded to three decimalsRows
fal_ai/kling/v4/text-to-image:output_cost_per_billable_unit0.063 (api),output_cost_per_imageandoutput_cost_per_image_2K0.063,output_cost_per_image_4K0.094 (measured header times the api unit price). The 8K cost of $0.157 is in the row metadata because the catalog schema test rejectsoutput_cost_per_image_8K, so 8K spend comes from the headerfal_ai/kling/v4/image-to-image:output_cost_per_billable_unit0.063 (api),output_cost_per_imageandoutput_cost_per_image_2K0.066,output_cost_per_image_4K0.097, all for one input image (measured). The 8K cost of $0.16 is in the row metadata for the same reason, and the $0.003 per further input image is in the row metadata and only reaches spend through the headerfal_ai/kling/v4/long-image:output_cost_per_billable_unit0.235 (api),output_cost_per_imageandoutput_cost_per_image_1K0.549,output_cost_per_image_2K0.596 (measured)mode,supported_endpointsandsupports_visionare inherited_fromfal_ai/fal-ai/kling-image/v3/text-to-imageandfal_ai/fal-ai/kling-image/v3/image-to-image. Kling's own pricing page at https://kling.ai/dev/pricing has no Kling Image V4 row to compare againstCaveats
The per-image numbers are measured, fal publishes no table for them, and the billing events API returned 403 for this key so the dollar charge was computed as units times unit price and not read from an invoice line
Rolled in from other open registry PRs (2026-11-17 audit run)
This PR is the rolling registry PR, so the verified changes from the open registry PRs below are now here, applied field by field on top of current main.
Azure (from #52289)
azure/gpt-6-lunagets back its Global Flex rates (*_flexand*_above_272k_tokens_flexinput, output, cache read and cache write). Every value matches the GPT-6 Luna Global Flex rows on https://azure.microsoft.com/en-us/pricing/details/cognitive-services/openai-service/ and the Azure retail prices API (https://prices.azure.com/api/retail/prices,serviceName eq 'Foundry Models', meter names containing6-luna).Snowflake (from #52297)
Prices for
snowflake/llama3.1-8b,llama3.2-1b,llama3.2-3b,mistral-7b,openai-gpt-5-mini,openai-gpt-5-nano, and cache write prices on the Snowflake Claude rows. Each value is the AI credit rate from Tables 6(b) and 6(c) of https://www.snowflake.com/legal-files/CreditConsumptionTable.pdf times $2.00 per credit for global routing from https://docs.snowflake.com/en/user-guide/snowflake-cortex/pricing.tests/unit/test_snowflake_model_prices.pycomes with it, and its cache write test now registers the checkout's rows first, because the local map fixture otherwise reads the bundled native catalog that lacks the new rates.AWS Bedrock (from #52325)
bedrock/mantle/rows for Claude Sonnet 5.5 and Haiku 5.5, same prices as the existingbedrock_mantle/rows. All 15 token fields match the commercial Geo and In-region cross-region rows (US East N. Virginia) on https://aws.amazon.com/bedrock/pricing/, resolved through AWS's own pricing JSON at https://b0.p.awsstatic.com/pricing/2.0/meteredUnitMaps/bedrockfoundationmodels/USD/current/bedrockfoundationmodels.json (published 2026-11-09). The 100k tier for Haiku comes from https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-anthropic-claude-haiku-5-5.html. The parity test registers both prefixes from the checkout for the same reason as above. One caveat, the model cards currently list only us-gov-west-1 for the bedrock-mantle endpoint, and GovCloud prices are higher ($2.40/$12 for Sonnet), so commercial Mantle availability is not proven by these sources.Not changed
#52303 (
gpt-4o-transcribeaudio input at $6.00/M) is not absorbed. https://platform.openai.com/docs/models/gpt-4o-transcribe lists audio input at $2.50/M and output at $10.00/M, which is what the row has today.#49367, #48732, #48582 and #48098 change request behavior through registry flags, so they are left alone as code/behavior PRs.
Audit candidates left out for lack of an official per-token price: Groq
allam-2-7b(in the models API, no pricing row), Fireworksaccounts/fireworks/models/qwen3p8-2p4t-a95b(model page says 262k context and function calling, serverless not supported, no price), Geminigemini-robotics-er-2-preview,gemini-omni-1.2-flashandlyria-3.5(docs list them, metadata incomplete). OpenAI fine tune checkpoints and Together dedicated ids in the models APIs were skipped as non-serverless.Details
Link to Devin session: https://app.devin.ai/sessions/8b494c65205640a6858591ca78b1c42b
Open in Devin Desktop: https://app.devin.ai/desktop/session/8b494c65205640a6858591ca78b1c42b?variant=devin
Requested by: @kerry-berri