ImgFlow is not meant to wrap one image endpoint as one command. It keeps input images, prompts, executors, result files, and callback records inside one task model. This week added an OpenAI OAuth provider to the executor system, allowing the same workflow to switch between backends while preserving task folders, result tracking, and background callbacks.
Project Overview
This plugin is maintained around personal image-task organization. It is built around the /imgflow command, workflow definitions, permission checks, task folders, and several image executors. Built-in workflows cover single-image editing, restyling, person replacement, text-to-image, and multi-reference generation. Executors include Vertex, AI Studio, Volcengine, and OpenAI OAuth.
The directory structure keeps backend-specific image calls in executors, request normalization and task state in runtime, input and result files in assets, and command parsing plus foreground or background execution in commands.
Executor Interface
The new OpenAI OAuth executor no longer depends on provider-internal request details. It calls the provider’s exposed generate_image() capability instead. The plugin only needs a unified image request: prompt text, reference images, target size, result count, and action type.
Reference images prefer local file paths from the task folder. Only missing local files fall back to data URLs. This reduces repeated encoding and keeps the task folder useful for resend, rerun, and later review.
Multi-Reference Images and Actions
Text-to-image requests are marked as generate, ordinary reference edits are marked as edit, and the multi-reference workflow keeps auto. That small distinction lets the provider choose an appropriate request shape from the input. The plugin side keeps workflow definitions stable and avoids leaking backend details into the command layer.
Before execution, the plugin also checks whether the provider declares image editing support. Missing capability stops the task before a remote request is attempted and returns a clear error. Empty exception text is supplemented with the exception type, so failed tasks do not end with a blank error message.
Maintenance Lesson
For an image workflow plugin, the most important property is traceability. An executor is only one component of a task; input files, parameter snapshots, step outputs, result images, and callback records are what make later reuse and review possible. Once OAuth image capability is contained behind the same executor interface, new backends can be added without changing the workflow and task model that users see.