1.8 KiB
1.8 KiB
Change: Add GPT Image edit support
Why
Official GPT Image editing uses /images/edits with a different request contract from text-to-image generation. The first GPT Image compatibility phase intentionally shipped only /images/generations; users now need image-to-image/edit support without replacing the existing Tuzi/basic compatibility fallback.
What Changes
- Add an official GPT Image edit request schema for
/images/edits. - Let image invocation planning prefer a request schema when the current request requires edit semantics.
- Extend the image adapter request shape with lightweight edit fields while keeping
TaskType.IMAGE. - Extend the GPT Image adapter to build official multipart edit requests from reference images.
- Keep Tuzi/basic GPT Image compatibility on the existing default adapter path.
- Add tests for generation-vs-edit routing, request bodies, and adapter selection.
Non-Goals
- Do not add
TaskType.IMAGE_EDIT. - Do not add a public
edit_imageMCP tool in this change. - Do not build full mask drawing UI in this change.
- Do not convert all image providers to a common
image.generate/image.editabstraction.
Impact
- Affected specs:
provider-routingimage-generation
- Affected code:
packages/drawnix/src/services/provider-routing/types.tspackages/drawnix/src/services/provider-routing/invocation-planner.tspackages/drawnix/src/services/provider-routing/settings-repository.tspackages/drawnix/src/services/provider-routing/binding-inference.tspackages/drawnix/src/services/provider-routing/endpoint-binding-inference.tspackages/drawnix/src/services/model-adapters/types.tspackages/drawnix/src/services/model-adapters/context.tspackages/drawnix/src/services/model-adapters/gpt-image-adapter.tspackages/drawnix/src/services/generation-api-service.ts