Skip to content

chore(cost-map): rolling registry update, fal_ai kling v4, azure gpt-6-luna flex, snowflake, bedrock/mantle claude 5.5 - #52299

Merged
kerry-berri merged 9 commits into
mainfrom
litellm-providers/price-sync-fal-ai
Nov 17, 2026
Merged

kerry-berri merged 9 commits into
mainfrom
litellm-providers/price-sync-fal-ai

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

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_unit carries fal's unit price and the per-image fields carry the cost of one image at each resolution for when the x-fal-billable-units header is absent

What 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-image and kling/v4/image-to-image return "unit_price": 0.063, "unit": "units", and kling/v4/long-image returns "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/estimate with unit_quantity: 1 for kling/v4/long-image returns "total_cost": 0.235, so cost is units times unit price

Neither the pages nor the API say how many units one image is. fal's docs say of the X-Fal-Billable-Units response 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 decimals

Endpoint Request x-fal-billable-units Cost
text-to-image 2K, 1:1 1.0 $0.063
text-to-image 2K, 16:9, 800 word prompt 1.0 $0.063
text-to-image 2K, num_images 2 2.0 $0.126
text-to-image 2K, series of 2 2.0 $0.126
text-to-image 4K 1.4921 $0.094
text-to-image 8K 2.4921 $0.157
image-to-image 2K, 1 input image 1.0476 $0.066
image-to-image 2K, 2 input images 1.0952 $0.069
image-to-image 4K, 1 input image 1.5397 $0.097
image-to-image 8K, 1 input image 2.5397 $0.160
long-image 1K, output 1024x7770 2.3362 $0.549
long-image 1K, output 1024x3842 2.3362 $0.549
long-image 2K, output 2048x10752 2.5362 $0.596

Rows

fal_ai/kling/v4/text-to-image: output_cost_per_billable_unit 0.063 (api), output_cost_per_image and output_cost_per_image_2K 0.063, output_cost_per_image_4K 0.094 (measured header times the api unit price). The 8K cost of $0.157 is in the row metadata because the catalog schema test rejects output_cost_per_image_8K, so 8K spend comes from the header

fal_ai/kling/v4/image-to-image: output_cost_per_billable_unit 0.063 (api), output_cost_per_image and output_cost_per_image_2K 0.066, output_cost_per_image_4K 0.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 header

fal_ai/kling/v4/long-image: output_cost_per_billable_unit 0.235 (api), output_cost_per_image and output_cost_per_image_1K 0.549, output_cost_per_image_2K 0.596 (measured)

mode, supported_endpoints and supports_vision are inherited_from fal_ai/fal-ai/kling-image/v3/text-to-image and fal_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 against

Caveats

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-luna gets back its Global Flex rates (*_flex and *_above_272k_tokens_flex input, 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 containing 6-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.py comes 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 existing bedrock_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-transcribe audio 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), Fireworks accounts/fireworks/models/qwen3p8-2p4t-a95b (model page says 262k context and function calling, serverless not supported, no price), Gemini gemini-robotics-er-2-preview, gemini-omni-1.2-flash and lyria-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

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@veria-ai

veria-ai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

PR overview

No security issues were found in this pull request.

Reviews

@kerry-berri
kerry-berri enabled auto-merge (squash) November 17, 2026 17:03
@kerry-berri

Copy link
Copy Markdown
Contributor

@BugBot run

@kerry-berri

Copy link
Copy Markdown
Contributor

@greptileai

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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.

@greptile-apps

greptile-apps Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 3/5

[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

  1. P1 8K spend is understated ▶
  2. P1 Extra input charges disappear ▶
  3. P2 Required billing proof is missing ▶

Summary

Adds matching Kling V4 pricing rows to both catalogs. Reported billable units take priority over per-image prices. The missing-header fallback understates 8K images and edits with multiple inputs. Required live-proxy billing proof is also missing.

  • Text-to-image calls get Kling V4 prices for different image sizes.
  • Image-to-image calls get Kling V4 prices based on their input images.
  • Long-image calls get Kling V4 prices for 1K and 2K images.

Reviews (1) · Last reviewed commit: "chore(cost-map): add fal_ai kling v4 tex..." · Reviewed by Greptile

Comment on lines +104346 to +104348
"output_cost_per_image": 0.063,
"output_cost_per_image_2K": 0.063,
"output_cost_per_image_4K": 0.094,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 8K spend is understated

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)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment on lines +104359 to +104361
"output_cost_per_image": 0.066,
"output_cost_per_image_2K": 0.066,
"output_cost_per_image_4K": 0.097,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Extra input charges disappear

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)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@codspeed

codspeed Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

1 warning

⚠️ 2 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

✅ 45 untouched benchmarks


Comparing litellm-providers/price-sync-fal-ai (05ce40a) with main (540a62b)1

Open in CodSpeed

Footnotes

  1. No successful run was found on main (4a83cbc) during the generation of this report, so 540a62b was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

@codecov

codecov Bot commented Nov 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

devin-ai-integration Bot and others added 8 commits November 17, 2026 18:31
…6-luna flex prices

Absorbed from #52297 and #52289.

Co-authored-by: David Hinckley <david.hinckley5@gmail.com>
Co-authored-by: danielguthruf <102602010+danielguthruf@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…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>
@devin-ai-integration devin-ai-integration Bot changed the title chore(cost-map): add fal_ai kling v4 text-to-image, image-to-image and long-image priced per billable unit chore(cost-map): rolling registry update, fal_ai kling v4, azure gpt-6-luna flex, snowflake, bedrock/mantle claude 5.5 Nov 17, 2026
@kerry-berri
kerry-berri merged commit 9fde4a1 into main Nov 17, 2026
98 of 100 checks passed
@kerry-berri
kerry-berri deleted the litellm-providers/price-sync-fal-ai branch November 17, 2026 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants