mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-07 02:59:05 +00:00
feat(azure_ai): add MAI-Image-2.5-Pro image generation pricing
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
daf22ec871
commit
4e68cbd1ea
3 changed files with 40 additions and 1 deletions
|
|
@ -8642,6 +8642,19 @@
|
||||||
"/v1/images/edits"
|
"/v1/images/edits"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"azure_ai/MAI-Image-2.5-Pro": {
|
||||||
|
"input_cost_per_image_token": 8e-06,
|
||||||
|
"input_cost_per_token": 5e-06,
|
||||||
|
"litellm_provider": "azure_ai",
|
||||||
|
"mode": "image_generation",
|
||||||
|
"output_cost_per_image": 0.05,
|
||||||
|
"output_cost_per_image_token": 4.7e-05,
|
||||||
|
"source": "https://techcommunity.microsoft.com/blog/azure-ai-foundry-blog/new-mai-models-in-microsoft-foundry-across-text-image-voice-and-speech/4524632",
|
||||||
|
"supported_endpoints": [
|
||||||
|
"/v1/images/generations",
|
||||||
|
"/v1/images/edits"
|
||||||
|
]
|
||||||
|
},
|
||||||
"azure_ai/MAI-Image-2e": {
|
"azure_ai/MAI-Image-2e": {
|
||||||
"input_cost_per_token": 5e-06,
|
"input_cost_per_token": 5e-06,
|
||||||
"litellm_provider": "azure_ai",
|
"litellm_provider": "azure_ai",
|
||||||
|
|
|
||||||
|
|
@ -8642,6 +8642,19 @@
|
||||||
"/v1/images/edits"
|
"/v1/images/edits"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"azure_ai/MAI-Image-2.5-Pro": {
|
||||||
|
"input_cost_per_image_token": 8e-06,
|
||||||
|
"input_cost_per_token": 5e-06,
|
||||||
|
"litellm_provider": "azure_ai",
|
||||||
|
"mode": "image_generation",
|
||||||
|
"output_cost_per_image": 0.05,
|
||||||
|
"output_cost_per_image_token": 4.7e-05,
|
||||||
|
"source": "https://techcommunity.microsoft.com/blog/azure-ai-foundry-blog/new-mai-models-in-microsoft-foundry-across-text-image-voice-and-speech/4524632",
|
||||||
|
"supported_endpoints": [
|
||||||
|
"/v1/images/generations",
|
||||||
|
"/v1/images/edits"
|
||||||
|
]
|
||||||
|
},
|
||||||
"azure_ai/MAI-Image-2e": {
|
"azure_ai/MAI-Image-2e": {
|
||||||
"input_cost_per_token": 5e-06,
|
"input_cost_per_token": 5e-06,
|
||||||
"litellm_provider": "azure_ai",
|
"litellm_provider": "azure_ai",
|
||||||
|
|
|
||||||
|
|
@ -36,11 +36,15 @@ class TestAzureMAIImageGeneration:
|
||||||
"azure_ai/MAI-Image-2.5"
|
"azure_ai/MAI-Image-2.5"
|
||||||
)
|
)
|
||||||
assert AzureFoundryMAIImageGenerationConfig.is_mai_model("MAI-Image-2.5-Flash")
|
assert AzureFoundryMAIImageGenerationConfig.is_mai_model("MAI-Image-2.5-Flash")
|
||||||
|
assert AzureFoundryMAIImageGenerationConfig.is_mai_model("MAI-Image-2.5-Pro")
|
||||||
|
assert AzureFoundryMAIImageGenerationConfig.is_mai_model(
|
||||||
|
"azure_ai/MAI-Image-2.5-Pro"
|
||||||
|
)
|
||||||
assert AzureFoundryMAIImageGenerationConfig.is_mai_model("MAI-Image-2e")
|
assert AzureFoundryMAIImageGenerationConfig.is_mai_model("MAI-Image-2e")
|
||||||
assert not AzureFoundryMAIImageGenerationConfig.is_mai_model("flux.2-pro")
|
assert not AzureFoundryMAIImageGenerationConfig.is_mai_model("flux.2-pro")
|
||||||
assert not AzureFoundryMAIImageGenerationConfig.is_mai_model("MAI-DS-R1")
|
assert not AzureFoundryMAIImageGenerationConfig.is_mai_model("MAI-DS-R1")
|
||||||
|
|
||||||
def test_mai_flash_and_2e_model_pricing_in_cost_map(self):
|
def test_mai_flash_pro_and_2e_model_pricing_in_cost_map(self):
|
||||||
os.environ["LITELLM_LOCAL_MODEL_COST_MAP"] = "True"
|
os.environ["LITELLM_LOCAL_MODEL_COST_MAP"] = "True"
|
||||||
litellm.model_cost = litellm.get_model_cost_map(url="")
|
litellm.model_cost = litellm.get_model_cost_map(url="")
|
||||||
|
|
||||||
|
|
@ -52,6 +56,15 @@ class TestAzureMAIImageGeneration:
|
||||||
assert flash_info["input_cost_per_image_token"] == 1.75e-06
|
assert flash_info["input_cost_per_image_token"] == 1.75e-06
|
||||||
assert flash_info["output_cost_per_image_token"] == 3.3e-05
|
assert flash_info["output_cost_per_image_token"] == 3.3e-05
|
||||||
|
|
||||||
|
pro_info = litellm.get_model_info(
|
||||||
|
model="azure_ai/MAI-Image-2.5-Pro",
|
||||||
|
custom_llm_provider="azure_ai",
|
||||||
|
)
|
||||||
|
assert pro_info["input_cost_per_token"] == 5e-06
|
||||||
|
assert pro_info["input_cost_per_image_token"] == 8e-06
|
||||||
|
assert pro_info["output_cost_per_image_token"] == 4.7e-05
|
||||||
|
assert pro_info["output_cost_per_image"] == 0.05
|
||||||
|
|
||||||
image_2e_info = litellm.get_model_info(
|
image_2e_info = litellm.get_model_info(
|
||||||
model="azure_ai/MAI-Image-2e",
|
model="azure_ai/MAI-Image-2e",
|
||||||
custom_llm_provider="azure_ai",
|
custom_llm_provider="azure_ai",
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue