feat(image-gen): add OpenAI image edit provider - #26969
Conversation
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
05c04e5 to
f91189d
Compare
|
Addressed review feedback in the updated stack:
|
f91189d to
a259cd6
Compare
|
Refreshed the PR branch with a small OpenAI-Codex image stream fallback fix: if the Responses SDK final-response parser raises |
|
Updated with an additional Codex image stream fallback: if the Responses stream iterator raises TypeError after yielding an image event, the provider now preserves that streamed image; iterator TypeError before any image still fails.\n\nValidation run locally:\n- pytest tests/plugins/image_gen/test_openai_codex_provider.py -q\n- python -m py_compile plugins/image_gen/openai-codex/init.py tests/plugins/image_gen/test_openai_codex_provider.py\n- git diff --check |
3698bce to
fe6f9dd
Compare
|
Closing this cumulative OpenAI API edit-provider branch in favor of the clean provider replacement #40491. The replacement keeps the provider work isolated from the contract/validation/tool layers and targets the current OpenAI Codex image-edit path. |
Summary
Relationship to #26967 / #26968
This PR is intentionally stacked on the clean image-edit foundation series:
Recommended merge order: #26967 → #26968 → #26969 → #21765. Please merge this PR after #26967 and #26968; after they land, I will rebase/refresh this branch onto
mainso the diff only shows the OpenAI provider delta.Until the earlier PRs merge, GitHub will show their commits in this PR too. The provider-only delta in this PR is limited to:
plugins/image_gen/openai/__init__.pytests/plugins/image_gen/test_openai_provider.pyImplementation
OpenAIImageProvider.supports_edit() -> TrueOpenAIImageProvider.edit(...)usingclient.images.edit(...)agent.image_reference.validate_image_reference(...)Testing
python3 -m pytest tests/plugins/image_gen/test_openai_provider.py tests/agent/test_image_gen_provider_edit_contract.py tests/agent/test_image_reference.py -q -o 'addopts='python3 -m py_compile plugins/image_gen/openai/__init__.py tests/plugins/image_gen/test_openai_provider.py agent/image_gen_provider.py agent/image_reference.pygit diff --check HEAD~1..HEADNo live OpenAI API calls used; tests mock SDK request behavior.