litellm/tests/test_litellm/llms/azure/response
Yogeshwaran Ravichandran ab274ac3c4
fix(azure response api): flatten tools for responses api to support nested definitions (#19526)
The Azure Responses API uses a different schema (flattened) for tools compared to the standard OpenAI/Azure Chat Completions API (nested). This caused a `BadRequestError` when users passed standard tool definitions.

Changes:
- Implemented tool flattening logic in `AzureOpenAIResponsesAPIConfig.transform_responses_api_request`.
- Added comprehensive unit tests in test_azure_transformation.py to verify nested-to-flat transformation, pass-through of flat tools, and immutability.
- Ensures cross-provider compatibility for tool definitions.

Fixes #19523
2026-01-21 21:08:28 -08:00
..
test_azure_transformation.py fix(azure response api): flatten tools for responses api to support nested definitions (#19526) 2026-01-21 21:08:28 -08:00