feat: add Azure OpenAI image generation and Responses API support#156
Open
jack-jackhui wants to merge 5 commits into
Open
feat: add Azure OpenAI image generation and Responses API support#156jack-jackhui wants to merge 5 commits into
jack-jackhui wants to merge 5 commits into
Conversation
- Add AzureImageService for Azure OpenAI image generation (GPT-image-2/DALL-E 3)
- Update MediaService to route between ComfyUI and Azure based on config
- Add image_provider config section for provider selection
- Add azure_openai config section for Azure credentials/settings
- Update MediaResult model with local_path field
- Update config.example.yaml with Azure configuration options
Provider selection via config:
image_provider:
provider: comfyui | azure_openai
Azure config supports:
- endpoint, api_key, deployment
- default_size, default_quality, output_format
- Automatic local save with configurable output_dir
Existing ComfyUI workflow behavior unchanged (backward compatible).
When Azure OpenAI image generation returns a local path (base64 decode saves locally), the frame processor should use it directly instead of trying to download from URL. Fixes: UnsupportedProtocol error when Azure returns local path
- Add api_style config option (chat_completions vs azure_responses) - Implement Azure OpenAI Responses API support for GPT-5.5/o3 models - Update config.example.yaml with comprehensive Azure examples - Add Australian English TTS voices (en-AU-NatashaNeural, en-AU-WilliamNeural) - Add unit tests for Azure image adapter, LLM service, and config schema - Update is_llm_configured() to validate both API styles BREAKING: None - existing chat_completions behavior unchanged
GPT-5.5/o3 via Azure Responses API does not support the temperature parameter. Passing it results in a 400 Bad Request error. This fix removes temperature from kwargs before making the API call.
jack-jackhui
force-pushed
the
pr/azure-gpt-image-adapter
branch
from
May 18, 2026 00:15
84397fa to
51b63c3
Compare
Add exponential backoff + jitter retry handling for transient Azure OpenAI image generation errors (429, EngineOverloaded, rate limits). Changes: - Add _generate_with_retry wrapper in AzureImageService - Add _is_retryable_provider_error and _retry_after_seconds helpers - Configurable retry policy: max attempts, initial delay, max delay - Honour Retry-After header when present - Default: 7 attempts, 30s initial, 300s cap - Add unit tests for retry behavior detection and config This addresses production failures where Azure image generation returns 429 EngineOverloaded for several minutes, which exceeds the OpenAI SDK built-in retry window.
Author
|
Hi maintainers — just checking in on this PR. The CLA is now signed and the branch is clean/mergeable. This adds Azure OpenAI image generation and Responses API support while keeping the integration isolated. Happy to adjust anything if you’d prefer a different structure. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Azure OpenAI support to Pixelle-Video for image generation and newer Azure LLM deployments that require the Responses API. Existing ComfyUI and chat-completions configurations remain backward compatible.
Changes
Azure OpenAI image generation
AzureImageServicefor Azure OpenAI image generation.local_paththroughMediaResult.Azure Responses API support for LLMs
llm.api_stylewith:chat_completionsfor existing OpenAI-compatible APIs.azure_responsesfor newer Azure reasoning/Responses API models.responses.create().temperaturefor Responses API calls.Other improvements
en-AU-NatashaNeuralen-AU-WilliamNeuralTesting
Validated locally on the PR branch:
Also smoke-tested end-to-end generation with:
Breaking changes
None. Default provider remains ComfyUI and default LLM style remains chat completions.