litellm/tests/unit/llms/azure_ai
SanthoshSachin 28a71ab46c
fix(images): send image_edit markup as a multipart file part (#53815)
* fix(images): send image_edit markup as a multipart file part

* fix(images): unpack FileTypes tuples for multipart uploads and add Final annotations

* fix(images): avoid Unknown tuple narrowing in _build_upload_part for basedpyright

* fix(images): send tuple mask uploads through the shared upload part helper

Mask uploads now go through _add_image_to_files like image and markup, so a (filename, content[, content_type[, headers]]) mask tuple is sent as that file instead of nested as the part's content

* fix(images): reject JSON image references for mask and markup, send the first markup of a list, and let Azure drop markup

A mask or markup given as a JSON image reference now gets a 400 from LiteLLM before any provider call, instead of a 500 from the multipart send

A markup list sends its first file, the same as mask

Azure answers Unknown parameter for markup, so Azure no longer lists it, and drop_params drops it

The FLUX 2 edit config now returns list[str] like its parent

* fix(hosted_vllm): exclude unsupported markup param from image_edit config

* fix(images): stop listing markup for Azure AI FLUX Kontext and name the resolved provider on image edit errors

The JSON image reference 400 used litellm_params built before the provider was resolved, so azure, azure_ai and litellm_proxy errors said openai. The hosted vLLM markup test now goes through litellm.image_edit, and the JSON reference test covers a list holding a reference

* fix(images): let the markup type hint take a list like image

* fix(images): read pathlib.Path image edit uploads, send base file names and reject string mask or markup

---------

Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com>
2026-11-25 04:14:57 +00:00
..
agents refactor(typing): clear 1141 basedpyright Any errors across 182 files (#50711) 2026-11-11 22:11:47 +00:00
anthropic feat(messages): serve azure ai foundry messages on rust only (#51721) 2026-11-14 13:40:38 -08:00
chat fix(llms): treat chat-latest and gpt-chat-latest as gpt-5 family models (#51151) 2026-11-24 04:02:51 -08:00
claude fix(anthropic)!: send extra_body fields at the top level of the Messages request (#48373) 2026-11-20 06:52:56 -08:00
embed fix(azure_ai): use the v1 chat path for Azure OpenAI resource bases (#52759) 2026-11-19 20:12:55 -08:00
image_edit fix(images): send image_edit markup as a multipart file part (#53815) 2026-11-25 04:14:57 +00:00
image_generation refactor(rust_bridge): route every Rust-to-Python call through host modules (#50822) 2026-11-11 01:57:54 +00:00
passthrough fix(cohere): price native Cohere embed calls on Foundry relays and the Cohere passthrough (#48978) 2026-10-29 05:17:11 -07:00
rerank chore(cost-map): remove the 52 rows whose provider retired them before 2026 (#49974) 2026-11-03 16:23:06 -08:00
responses fix(proxy): size budget reservation from route output cap fields (#51752) 2026-11-20 16:25:09 -08:00
vector_stores refactor(typing): clear 1141 basedpyright Any errors across 182 files (#50711) 2026-11-11 22:11:47 +00:00
__init__.py test(unit): add package markers to migrated unit test directories 2026-09-20 11:53:14 +00:00
test_azure_ai_agents_handler.py test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
test_azure_ai_cost_calculator.py fix(azure_ai)!: call Responses natively for a model router on a Foundry project or resource base (#52474) 2026-11-18 16:36:46 +00:00
test_azure_ai_entra_auth.py fix(azure)!: answer 401 when Entra rejects the deployment's credential (#49863) 2026-11-04 20:44:55 +00:00
test_azure_ai_foundry_catalog_model_metadata.py feat(cost-map): rolling registry update (claude-mythos-5-2, Azure Mythos 5.2, Friendli GLM-5.1 date, GovCloud Fable 5.2 token counting) (#50777) 2026-11-10 13:31:56 +00:00
test_azure_ai_fw_models_metadata.py refactor(rust_bridge): route every Rust-to-Python call through host modules (#50822) 2026-11-11 01:57:54 +00:00
test_azure_ai_kimi_k26_metadata.py refactor(rust_bridge): route every Rust-to-Python call through host modules (#50822) 2026-11-11 01:57:54 +00:00