Feature/new models#841
Conversation
- Add gpt-image-2 to OpenAI direct and Azure OpenAI backends with background = "unavailable" rule (model rejects transparent bg) - Generalize BackgroundTaxonomy: GPT -> AVAILABLE / UNAVAILABLE - Refactor OpenAI img-gen worker to consult rules; defaults to AVAILABLE for models without a rules table so gpt-image-1 family keeps transparent support unchanged - Update Azure rules tables for gpt-image-1 family to "available" - Refresh auto-generated gateway model docs (gemini 3.x renames) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…mpatibility - Set `quality` default to `medium` for OpenAI direct image generation, aligning with Azure OpenAI. - Introduce `output_compression` parameter for OpenAI models, defaulting to `100` for JPEG/WEBP outputs. - Update TOML configuration files for both OpenAI and Azure backends to include `output_compression`. - Modify `ImgGenArgsFactory` to handle new output compression logic and ensure compatibility with existing models. - Enhance unit tests to cover new defaults and parameter handling, ensuring robust functionality across image generation workflows.
Convention: `gpt_image` for taxonomies/values shared across all OpenAI GPT Image models (legacy + gpt-image-2); `gpt_image_legacy` when the value applies only to gpt-image-1/-1-mini/-1.5 (gpt-image-2 = `unavailable`). Local backend TOMLs and the remote Pipelex Gateway config updated in lockstep. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Parse usage tokens from Azure img gen response into job report - Bump Azure img gen HTTP timeout to 600s for slow gpt-image-2 calls - Pass model name in gateway img gen args; add debug logging - Drop hardcoded gpt-image-2 model_id to use deck default - Simplify img_gen test fixtures and prompt Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Rename ImgGenArgTopic.MODEL_NAME → MODEL_CHOICE; ModelNameTaxonomy → ModelChoiceTaxonomy - Replace STANDARD arm with MODEL_ID (passes model_id) and MODEL_NAME (passes model name) - Thread model_name through ImgGenArgsFactory and all img-gen workers (Azure, OpenAI, Gateway, Fal, HuggingFace) - Drop now-redundant model_choice rule from legacy gpt-image-* entries (default behavior) - Gateway worker no longer overrides args_dict["model"] — driven by rules instead - Refresh gateway model docs to include gpt-image-2 - Update unit tests for the new taxonomy and model_name plumbing Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds gpt-5.5 (Azure deployment gpt-5.5-2026-04-24, fixed_temperature=1) on openai, azure_openai, and the gateway. Live LLM inference verified on all three backends. Also declares pdf in inputs for gpt-5.4, gpt-5.4-mini, gpt-5.4-nano, gpt-5.4-pro, and gpt-5.5 on azure_openai and the gateway, matching the existing OpenAI direct entries. PDF capability verified end-to-end with TestLLMDocument (path + URL) on all three backends. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
@lchoquel I have started the AI code review. It will take a few minutes to complete. |
Greptile Summary
Confidence Score: 3/5Not safe to merge — all OpenAI image API calls will use the wrong default model or fail outright until model_choice is added to TOML rules. A single P1 bug (missing pipelex/kit/configs/inference/backends/openai.toml and pipelex/kit/configs/inference/backends/azure_openai.toml — every Important Files Changed
Sequence DiagramsequenceDiagram
participant PipeImgGen
participant ImgGenParamSupport
participant OpenAIImgGenWorker
participant ImgGenArgsFactory
participant OpenAIAPI
PipeImgGen->>ImgGenParamSupport: check_blueprint_params(rules, aspect_ratio, background, output_format)
ImgGenParamSupport-->>PipeImgGen: unsupported reasons (or empty)
PipeImgGen->>OpenAIImgGenWorker: _gen_image_list(img_gen_job, nb_images)
OpenAIImgGenWorker->>ImgGenArgsFactory: make_args_for_model(rules, job, nb_images, model_id, model_name)
ImgGenArgsFactory-->>OpenAIImgGenWorker: args_dict (prompt, size, quality, n, ...)
alt has input images
OpenAIImgGenWorker->>OpenAIAPI: images.edit(**args_dict)
else text-to-image
OpenAIImgGenWorker->>OpenAIAPI: images.generate(**args_dict)
end
OpenAIAPI-->>OpenAIImgGenWorker: ImagesResponse (b64_json, size, output_format)
OpenAIImgGenWorker-->>PipeImgGen: list[GeneratedImageRawDetails]
|
There was a problem hiding this comment.
2 issues found across 34 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="pipelex/plugins/openai/openai_img_gen_worker.py">
<violation number="1" location="pipelex/plugins/openai/openai_img_gen_worker.py:69">
P2: Don’t drop the `moderation` argument for `images.edit`. The OpenAI API supports `moderation` on edits, so this removes a requested safety setting.</violation>
</file>
<file name="pipelex/cogt/img_gen/img_gen_param_support.py">
<violation number="1" location="pipelex/cogt/img_gen/img_gen_param_support.py:196">
P2: `check_blueprint_params` omits `input_fidelity` validation, so unsupported blueprint `input_fidelity` values are not caught during static blueprint checks.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 19bae2c459
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
OpenAI img-gen was silently falling back to DALL-E 2: rules omitted model_choice, so args_dict reached images.generate() without "model". HF and Fal workers hardcoded inference_model.model_id and ignored the rule entirely. - Declare `model_choice = "model_id"` on OpenAI gpt-image-* rules, HF qwen-image, and all 5 Fal models — in both kit configs and the .pipelex/ project overrides. - HF and Fal workers now pop "model" from args_dict (mirroring prompt) and raise ImgGenParameterError if missing. - Auto-regenerated gateway model docs reflect PDF inputs on the gpt-5.4 series and gpt-5.5. Verified live against fal/fast-lightning-sdxl, huggingface/qwen-image, google/nano-banana. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary by cubic
Adds
gpt-5.5andgpt-image-2, moves image generation to a rule‑driven pipeline with parameter checks, and fixes model routing acrossopenai/huggingface/fal. Also declares PDF input for GPT‑5.4/5.5 onazure_openaiand the gateway. Error messages now include themodel_namefor clarity.New Features
gpt-5.5onopenai,azure_openai, and the gateway (text/images/pdf).gpt-image-2with per‑model rules (no transparent background); updated aliasbest-gpt→gpt-image-2.ImgGenParamSupportand PipeImgGen static validation; added e2e/integration/unit tests.pdfinput for GPT‑5.4 series andgpt-5.5onazure_openaiand the gateway.Refactors
ImgGenArgsFactory; OpenAI worker now rule‑driven with defaultsquality=mediumandoutput_compression=100; positive size validation for OpenAI img‑gen.MODEL_NAME→MODEL_CHOICE(supportsmodel_id/model_name); standardized taxonomies (gpt_imagevsgpt_image_legacy); addedInputFidelityandOutputCompression; threadedmodel_namethrough all workers and errors, and now forward it to the arg factory.model_choice = "model_id"onopenai/huggingface/falrules; workers require/pass the correct model (prevents OpenAI fallback to DALL‑E 2).TODOS.md.Written for commit f93bed7. Summary will update on new commits. Review in cubic