Skip to content

Fix Azure deployment model request body#3437

Open
fengjikui wants to merge 1 commit into
openai:mainfrom
fengjikui:codex/azure-strip-deployment-model-body
Open

Fix Azure deployment model request body#3437
fengjikui wants to merge 1 commit into
openai:mainfrom
fengjikui:codex/azure-strip-deployment-model-body

Conversation

@fengjikui

Copy link
Copy Markdown

Fixes #2892.

Summary

  • omit model from Azure deployment-based request bodies after using it to route /deployments/{deployment}
  • preserve the caller-provided JSON body by copying request options before removing model
  • add sync/async Azure regression coverage for image generation deployments whose names differ from model IDs

Validation

  • env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy uv run --with pytest --with pytest-xdist --with pytest-asyncio --with respx --with httpx --with rich pytest tests/lib/test_azure.py -q
  • env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy uv run --with ruff ruff check src/openai/lib/azure.py tests/lib/test_azure.py
  • env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy uv run python -m py_compile src/openai/lib/azure.py tests/lib/test_azure.py

@fengjikui fengjikui requested a review from a team as a code owner June 24, 2026 06:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Azure OpenAI - model parameter in request body causes failures when deployment name differs from model name

1 participant