litellm/tests/unit/llms/azure
zoveki fb00770538
fix(decisions): accept OpenAI input_json content parts on /v1/decisions (#52805)
* fix(decisions): accept OpenAI input_json content parts on /v1/decisions

User messages on the OpenAI-format /v1/decisions route can now carry
input_json parts whose data is an object or an array of objects. OpenAI
and Azure deployments forward them unchanged. Providers without JSON input
answer 400 naming input_json, or drop the part under drop_params. An
input_json part takes no prompt_cache_breakpoint, matching OpenAI.

* fix(router): send Decisions input_json to deployments that take JSON in a mixed group

* test(decisions): match input_json test answers to the asked question

* fix(decisions): catch tuple input_json in the router filter and mark it in latest-turn spend logs

* fix(router): keep JSON-only Decisions calls off deployments that would drop all input under drop_params

* fix(router): skip Decisions deployments whose drop would leave no input under drop_params

* fix(decisions): run text guardrails on input_json data and count only kept image types

* fix(decisions): redact input_json keys, scan it in LLM Shield and Cisco, count only surely kept images

hide_secrets now checks each input_json value with its key in front and rewrites secrets found in keys too. LLM Shield scans the strings in input_json data, and Cisco AI Defense scans the data as JSON text and falls back to on_flagged_action in redact mode, since it cannot write redacted text back into JSON

The drop_params check that skips a deployment the drop would leave with no input now counts an image as kept only when it is well formed and its media type is known to be one the deployment takes

* fix(guardrails): keep colliding input_json keys apart and let LLM Shield mask keys and numbers

hide-secrets now gives a key that redacts to an existing name a numbered
suffix, so two secret keys in one object no longer collapse into one
value. LLM Shield now sends input_json keys and numbers to the shield
too, writes a number back only when the shield changed it, and renames
keys after every value write so no value lands under an old key

* fix(guardrails): block Cisco redact verdicts on input_json in every mode and resume colliding key suffixes

* fix(guardrails): refuse Cisco redaction of input_json even when the request carries a messages field

---------

Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com>
2026-11-20 13:33:36 -08:00
..
batches test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
chat refactor(rust_bridge): route every Rust-to-Python call through host modules (#50822) 2026-11-11 01:57:54 +00:00
completion test: migrate tests/llm_translation into unit, integration and e2e tiers (#45759) 2026-10-11 07:58:53 +00:00
decisions fix(decisions): accept OpenAI input_json content parts on /v1/decisions (#52805) 2026-11-20 13:33:36 -08:00
image_edit test(unit): add package markers to migrated unit test directories 2026-09-20 11:53:14 +00:00
image_generation refactor(images): remove dall-e-2 and dall-e-3 code paths (#48703) 2026-10-28 17:48:09 -07:00
passthrough fix(vllm): write spend log rows for /vllm passthrough calls to router models (#45733) 2026-10-14 12:40:48 -07:00
realtime feat(realtime)!: support latest OpenAI audio models (#35600) 2026-11-03 07:27:52 +00:00
response fix(azure): send no api-version on Foundry project /openai/v1 Responses bases (#51767) 2026-11-14 05:24:12 -05:00
search fix(azure)!: answer 401 when Entra rejects the deployment's credential (#49863) 2026-11-04 20:44:55 +00:00
text_to_speech test: migrate SDK and proxy-booting legacy CircleCI tests to their tiers (#45758) 2026-10-11 00:17:21 -07:00
vector_stores fix(vector_stores): put azure vector store id before the api-version query on retrieve, update and delete (#48224) 2026-10-24 13:44:19 -07:00
videos test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
__init__.py test(unit): add package markers to migrated unit test directories 2026-09-20 11:53:14 +00:00
test_audio_transcriptions.py feat(realtime)!: support latest OpenAI audio models (#35600) 2026-11-03 07:27:52 +00:00
test_azure.py test(azure): restore client session after extra headers test (#52815) 2026-11-19 08:27:46 +00:00
test_azure_common_utils.py fix(azure_ai)!: send chat on Foundry project and /openai/v1 bases to the v1 chat route (#51144) 2026-11-18 05:50:05 +00:00
test_azure_cost_calculation.py test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
test_azure_embedding.py test: migrate tests/llm_translation into unit, integration and e2e tiers (#45759) 2026-10-11 07:58:53 +00:00
test_azure_exception_mapping.py fix(exceptions): map upstream 403 to PermissionDeniedError for OpenAI-style providers (#52179) 2026-11-17 03:14:09 +00:00
test_azure_fine_tuning_api.py test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
test_azure_ptu_capacity.py feat(proxy): split Azure PTU deployments across teams with per-team PTU ceilings and PTU-hour reporting (#43043) 2026-10-15 18:44:30 +00:00
test_azure_speech_audio_transcription.py refactor(types): replace Any with proven types in 137 files (#44478) 2026-10-05 11:01:45 -07:00