litellm/tests/test_litellm/llms/azure
Sameer Kankute 424db6a980
feat(azure_ai): add MAI-Image-2.5 image generation support (#29688)
* feat(azure_ai): add MAI-Image-2.5 image generation support

Route azure_ai MAI models to /mai/v1/images/generations and map OpenAI size to width/height for the serverless API.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(azure_ai): address MAI image generation review feedback

Validate unsupported size values, default width/height independently, add MAI-Image-2.5 pricing, and expand test coverage.

@greptileai

Co-authored-by: Cursor <cursoragent@cursor.com>

* feat(azure_ai): add MAI image edit and expand model cost map

Add MAI image edit support with usage normalization for Azure response format,
and register MAI-Image-2.5-Flash and MAI-Image-2e pricing in the model map.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(azure_ai): validate MAI edit size by consuming map iterator

Greptile: lazy map() never evaluated int() so values like 1024xabc passed through.
Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(azure_ai): normalize MAI usage in generation response handler

Apply normalize_mai_image_usage before building ImageResponse so token-based
cost calculation works when Azure returns num_output_tokens fields.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(azure_ai): narrow MAI edit size param type for mypy

Co-authored-by: Cursor <cursoragent@cursor.com>

* Fix Azure MAI image response handling

* Fix MAI image generation base model routing

* fix(azure_ai): preserve zero num_output_tokens in MAI usage normalization

* fix(azure_ai): wrap MAI generation response JSON parsing in error handling

* fix(azure_ai): build MAI image edit URL correctly for /mai/ root bases

* fix(azure_ai): build MAI image generation URL correctly for /mai/ root bases

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com>
2026-06-08 18:27:04 -07:00
..
chat Litellm oss staging 2 (#28582) 2026-05-22 10:04:23 -07:00
image_edit Litellm oss staging 040626 (#29671) 2026-06-04 11:07:20 -07:00
image_generation feat(azure_ai): add MAI-Image-2.5 image generation support (#29688) 2026-06-08 18:27:04 -07:00
passthrough fix(azure/passthrough): populate standard_logging_object via logging hook 2026-04-14 08:10:39 +02:00
realtime feat(realtime): OpenAI Realtime GA support and beta compatibility (#27110) 2026-05-05 16:49:20 -07:00
response fix: encode upstream URL path identifiers 2026-04-29 22:02:39 -07:00
text_to_speech style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
videos style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_azure_common_utils.py fix(azure): preserve AD token refresh in v1 OpenAI client path (#28627) 2026-05-25 21:08:52 -07:00
test_azure_cost_calculation.py fix(cost): pass service_tier through azure and azure_ai cost calculation (#24926) 2026-05-01 17:26:45 +05:30
test_azure_exception_mapping.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_azure_fine_tuning_api.py refactor: refactor testing 2026-03-28 18:39:32 -07:00
test_azure_speech_audio_transcription.py feat(azure): add speech transcription config support (#27482) 2026-05-23 12:16:01 -07:00