test(utils): accept the per-size image cost keys in the price-map schema check (#42612)

The cost map's fal_ai/fal-ai/trellis-2 entry prices its output by resolution
with output_cost_per_image_512, output_cost_per_image_1024, and
output_cost_per_image_1536, which litellm/types/utils.py types and the fal_ai
cost calculator reads, but INTENDED_SCHEMA in
test_aaamodel_prices_and_context_window_json_is_valid never allowed them, so
the test fails on main with "Additional properties are not allowed". Add the
three keys next to output_cost_per_image in the schema and in the cost-under-1
field list so a per-size image price is validated like the per-size video ones

Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com>
This commit is contained in:
devin-ai-integration[bot] 2026-09-22 17:04:13 -07:00 • committed by GitHub
parent 13691426c4
commit cf08cb89e8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -631,6 +631,9 @@ def validate_model_cost_values(model_data, exceptions=None):
"output_cost_per_character",
"input_cost_per_image",
"output_cost_per_image",
"output_cost_per_image_512",
"output_cost_per_image_1024",
"output_cost_per_image_1536",
"input_cost_per_pixel",
"output_cost_per_pixel",
"input_cost_per_second",
@ -858,6 +861,9 @@ def test_aaamodel_prices_and_context_window_json_is_valid():
"output_cost_per_character": {"type": "number"},
"output_cost_per_character_above_128k_tokens": {"type": "number"},
"output_cost_per_image": {"type": "number"},
"output_cost_per_image_512": {"type": "number"},
"output_cost_per_image_1024": {"type": "number"},
"output_cost_per_image_1536": {"type": "number"},
"output_cost_per_image_token": {"type": "number"},
"output_cost_per_video_token": {"type": "number"},
"output_cost_per_pixel": {"type": "number"},