mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-18 09:45:23 +00:00
fix(cost-map): price eight-second Pixverse clips (#52107)
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
dbe520f664
commit
71f9cb63ac
3 changed files with 95 additions and 9 deletions
|
|
@ -102068,6 +102068,11 @@
|
|||
"540p": 0.15,
|
||||
"720p": 0.2,
|
||||
"1080p": 0.4
|
||||
},
|
||||
"8s": {
|
||||
"360p": 0.3,
|
||||
"540p": 0.3,
|
||||
"720p": 0.4
|
||||
}
|
||||
},
|
||||
"source": "https://fal.ai/models/fal-ai/pixverse/extend",
|
||||
|
|
@ -102114,6 +102119,11 @@
|
|||
"540p": 0.15,
|
||||
"720p": 0.2,
|
||||
"1080p": 0.4
|
||||
},
|
||||
"8s": {
|
||||
"360p": 0.3,
|
||||
"540p": 0.3,
|
||||
"720p": 0.4
|
||||
}
|
||||
},
|
||||
"source": "https://fal.ai/models/fal-ai/pixverse/v3.5/effects",
|
||||
|
|
@ -102237,6 +102247,11 @@
|
|||
"540p": 0.15,
|
||||
"720p": 0.2,
|
||||
"1080p": 0.4
|
||||
},
|
||||
"8s": {
|
||||
"360p": 0.3,
|
||||
"540p": 0.3,
|
||||
"720p": 0.4
|
||||
}
|
||||
},
|
||||
"source": "https://fal.ai/models/fal-ai/pixverse/v3.5/transition",
|
||||
|
|
@ -102260,6 +102275,11 @@
|
|||
"540p": 0.15,
|
||||
"720p": 0.2,
|
||||
"1080p": 0.4
|
||||
},
|
||||
"8s": {
|
||||
"360p": 0.3,
|
||||
"540p": 0.3,
|
||||
"720p": 0.4
|
||||
}
|
||||
},
|
||||
"source": "https://fal.ai/models/fal-ai/pixverse/v4.5/effects",
|
||||
|
|
@ -102383,6 +102403,11 @@
|
|||
"540p": 0.15,
|
||||
"720p": 0.2,
|
||||
"1080p": 0.4
|
||||
},
|
||||
"8s": {
|
||||
"360p": 0.3,
|
||||
"540p": 0.3,
|
||||
"720p": 0.4
|
||||
}
|
||||
},
|
||||
"source": "https://fal.ai/models/fal-ai/pixverse/v4.5/transition",
|
||||
|
|
@ -102406,6 +102431,11 @@
|
|||
"540p": 0.15,
|
||||
"720p": 0.2,
|
||||
"1080p": 0.4
|
||||
},
|
||||
"8s": {
|
||||
"360p": 0.3,
|
||||
"540p": 0.3,
|
||||
"720p": 0.4
|
||||
}
|
||||
},
|
||||
"source": "https://fal.ai/models/fal-ai/pixverse/v4/effects",
|
||||
|
|
@ -102529,6 +102559,11 @@
|
|||
"540p": 0.15,
|
||||
"720p": 0.2,
|
||||
"1080p": 0.4
|
||||
},
|
||||
"8s": {
|
||||
"360p": 0.3,
|
||||
"540p": 0.3,
|
||||
"720p": 0.4
|
||||
}
|
||||
},
|
||||
"source": "https://fal.ai/models/fal-ai/pixverse/v5/effects",
|
||||
|
|
@ -102607,6 +102642,11 @@
|
|||
"540p": 0.15,
|
||||
"720p": 0.2,
|
||||
"1080p": 0.4
|
||||
},
|
||||
"8s": {
|
||||
"360p": 0.3,
|
||||
"540p": 0.3,
|
||||
"720p": 0.4
|
||||
}
|
||||
},
|
||||
"source": "https://fal.ai/models/fal-ai/pixverse/v5/transition",
|
||||
|
|
|
|||
|
|
@ -102068,6 +102068,11 @@
|
|||
"540p": 0.15,
|
||||
"720p": 0.2,
|
||||
"1080p": 0.4
|
||||
},
|
||||
"8s": {
|
||||
"360p": 0.3,
|
||||
"540p": 0.3,
|
||||
"720p": 0.4
|
||||
}
|
||||
},
|
||||
"source": "https://fal.ai/models/fal-ai/pixverse/extend",
|
||||
|
|
@ -102114,6 +102119,11 @@
|
|||
"540p": 0.15,
|
||||
"720p": 0.2,
|
||||
"1080p": 0.4
|
||||
},
|
||||
"8s": {
|
||||
"360p": 0.3,
|
||||
"540p": 0.3,
|
||||
"720p": 0.4
|
||||
}
|
||||
},
|
||||
"source": "https://fal.ai/models/fal-ai/pixverse/v3.5/effects",
|
||||
|
|
@ -102237,6 +102247,11 @@
|
|||
"540p": 0.15,
|
||||
"720p": 0.2,
|
||||
"1080p": 0.4
|
||||
},
|
||||
"8s": {
|
||||
"360p": 0.3,
|
||||
"540p": 0.3,
|
||||
"720p": 0.4
|
||||
}
|
||||
},
|
||||
"source": "https://fal.ai/models/fal-ai/pixverse/v3.5/transition",
|
||||
|
|
@ -102260,6 +102275,11 @@
|
|||
"540p": 0.15,
|
||||
"720p": 0.2,
|
||||
"1080p": 0.4
|
||||
},
|
||||
"8s": {
|
||||
"360p": 0.3,
|
||||
"540p": 0.3,
|
||||
"720p": 0.4
|
||||
}
|
||||
},
|
||||
"source": "https://fal.ai/models/fal-ai/pixverse/v4.5/effects",
|
||||
|
|
@ -102383,6 +102403,11 @@
|
|||
"540p": 0.15,
|
||||
"720p": 0.2,
|
||||
"1080p": 0.4
|
||||
},
|
||||
"8s": {
|
||||
"360p": 0.3,
|
||||
"540p": 0.3,
|
||||
"720p": 0.4
|
||||
}
|
||||
},
|
||||
"source": "https://fal.ai/models/fal-ai/pixverse/v4.5/transition",
|
||||
|
|
@ -102406,6 +102431,11 @@
|
|||
"540p": 0.15,
|
||||
"720p": 0.2,
|
||||
"1080p": 0.4
|
||||
},
|
||||
"8s": {
|
||||
"360p": 0.3,
|
||||
"540p": 0.3,
|
||||
"720p": 0.4
|
||||
}
|
||||
},
|
||||
"source": "https://fal.ai/models/fal-ai/pixverse/v4/effects",
|
||||
|
|
@ -102529,6 +102559,11 @@
|
|||
"540p": 0.15,
|
||||
"720p": 0.2,
|
||||
"1080p": 0.4
|
||||
},
|
||||
"8s": {
|
||||
"360p": 0.3,
|
||||
"540p": 0.3,
|
||||
"720p": 0.4
|
||||
}
|
||||
},
|
||||
"source": "https://fal.ai/models/fal-ai/pixverse/v5/effects",
|
||||
|
|
@ -102607,6 +102642,11 @@
|
|||
"540p": 0.15,
|
||||
"720p": 0.2,
|
||||
"1080p": 0.4
|
||||
},
|
||||
"8s": {
|
||||
"360p": 0.3,
|
||||
"540p": 0.3,
|
||||
"720p": 0.4
|
||||
}
|
||||
},
|
||||
"source": "https://fal.ai/models/fal-ai/pixverse/v5/transition",
|
||||
|
|
|
|||
|
|
@ -974,19 +974,25 @@ class TestFalAIVideoTransformation:
|
|||
"fal-ai/pixverse/extend",
|
||||
],
|
||||
)
|
||||
def test_pixverse_five_second_clip_prices(self, model: str) -> None:
|
||||
def test_pixverse_five_and_eight_second_clip_prices(self, model: str) -> None:
|
||||
info: Final = litellm.get_model_info(model=model, custom_llm_provider="fal_ai")
|
||||
prices: Final = info.get("output_cost_per_video_clip")
|
||||
assert prices is not None
|
||||
for resolution, price in prices["5s"].items():
|
||||
assert prices["8s"].keys() == prices["5s"].keys() - {"1080p"}
|
||||
for resolution, price in prices["8s"].items():
|
||||
assert price > 0
|
||||
assert default_video_cost_calculator(model, 5, "fal_ai", video_resolution=resolution) == pytest.approx(price)
|
||||
assert video_generation_cost(
|
||||
model, 5, "fal_ai", model_info=info, video_resolution=resolution
|
||||
) == pytest.approx(price)
|
||||
assert fal_ai_passthrough_cost(
|
||||
model, {"duration": "5", "resolution": resolution}
|
||||
) == pytest.approx(price)
|
||||
assert price == pytest.approx(2 * prices["5s"][resolution])
|
||||
for duration in (5, 8):
|
||||
for resolution, price in prices[f"{duration}s"].items():
|
||||
assert default_video_cost_calculator(
|
||||
model, duration, "fal_ai", video_resolution=resolution
|
||||
) == pytest.approx(price)
|
||||
assert video_generation_cost(
|
||||
model, duration, "fal_ai", model_info=info, video_resolution=resolution
|
||||
) == pytest.approx(price)
|
||||
assert fal_ai_passthrough_cost(
|
||||
model, {"duration": str(duration), "resolution": resolution}
|
||||
) == pytest.approx(price)
|
||||
|
||||
def test_h3_video_cost_uses_model_info_tiers(self, local_model_cost_map):
|
||||
row = litellm.model_cost[f"fal_ai/{H3_TEXT_MODEL}"]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue