From cf08cb89e81d4e744644428a09241da08b2996ce Mon Sep 17 00:00:00 2001 From: "devin-ai-integration[bot]" <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 22 Sep 2026 17:04:13 -0700 Subject: [PATCH] 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> --- tests/test_litellm/test_utils.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/test_litellm/test_utils.py b/tests/test_litellm/test_utils.py index 79462d16a8c..283cff97ce0 100644 --- a/tests/test_litellm/test_utils.py +++ b/tests/test_litellm/test_utils.py @@ -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"},