Release v0.25.0#842
Merged
Merged
Conversation
* Add gpt-image-2 model and per-model background rule - 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> * Expand img-gen refactor plan in TODOS, wire gpt-image-2 rules Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Refactor image generation parameters to unify defaults and enhance compatibility - 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. * Unify img-gen taxonomy naming on `gpt_image` / `gpt_image_legacy` 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> * Capture img-gen token usage and extend Azure timeout - 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 ModelName taxonomy to ModelChoice with model_id/model_name arms - 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> * Add gpt-5.5 and declare PDF input on Azure/gateway for gpt-5.4 series 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> * changelog * cleanup TODO * Fix img-gen model arg via model_choice rule on OpenAI/HF/Fal 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> * Validate positive dimensions for OpenAI img-gen sizes Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Forward model_name (not model_id) to img-gen arg factories Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Update test to assert model_name in img-gen error message Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Greptile Summary
Confidence Score: 4/5Safe to merge; only P2 style/logic findings, core paths look correct No P0/P1 findings. Two P2 issues: an error message uses model_id instead of model_name, and an or-based token extraction can silently swap token categories on a zero count. Neither affects the happy path. pipelex/plugins/azure_rest/azure_img_gen_worker.py (token extraction logic), pipelex/cogt/img_gen/img_gen_args_factory.py (error message variable) Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[OpenAIImgGenWorker._gen_image_list] --> B[ImgGenArgsFactory.make_args_for_model]
B --> C{model_rules loop}
C --> D[model_choice → model key]
C --> E[aspect_ratio → size string]
C --> F[inference → quality/steps]
C --> G[input_images → image data URLs]
C --> H[output_format / compression]
B --> I[args_dict]
I --> J{image key present?}
J -- yes --> K[_convert_image_data_urls_for_openai_sdk]
K --> L[images.edit **args_dict]
J -- no --> M[images.generate **args_dict]
L --> N[ImagesResponse]
M --> N
N --> O{response.size?}
O -- yes --> P[parse WxH from response]
O -- no --> Q[_get_requested_size from args_dict]
Q --> P
N --> R{response.output_format?}
R -- yes --> S[use reported format]
R -- no --> T[detect from bytes]
T --> S
P --> U[GeneratedImageRawDetails]
S --> U
Prompt To Fix All With AIThis is a comment left during a code review.
Path: pipelex/cogt/img_gen/img_gen_args_factory.py
Line: 192
Comment:
**Inconsistent variable in error message**
`model_id` is used here while all other error messages in this method use `model_name`. An operator will see the raw `model_id` (e.g., `"gpt-image-2-2026-04-21"`) instead of the human-readable config name (e.g., `"gpt-image-2"`), making the message harder to act on.
```suggestion
msg = f"Model '{model_name}' does not support input_fidelity"
```
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: pipelex/plugins/azure_rest/azure_img_gen_worker.py
Line: 107-112
Comment:
**`or` short-circuits on zero token count**
`usage_dict.get("prompt_tokens") or usage_dict.get("input_tokens")` evaluates the right-hand side when the left is falsy — including when it is `0`. A zero `prompt_tokens` value (rare but valid) would fall through to `input_tokens`, potentially misattributing token categories. The same applies to the output-tokens line.
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "Release v0.25.0" | Re-trigger Greptile |
There was a problem hiding this comment.
3 issues found across 41 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/gateway/gateway_img_gen_worker.py">
<violation number="1" location="pipelex/plugins/gateway/gateway_img_gen_worker.py:77">
P1: Avoid logging the full image-generation args payload; it can leak prompt and input image data. Log only non-sensitive metadata (e.g., model, endpoint, arg keys).</violation>
</file>
<file name="pipelex/plugins/azure_rest/azure_img_gen_worker.py">
<violation number="1" location="pipelex/plugins/azure_rest/azure_img_gen_worker.py:110">
P2: Use `is not None` checks when reading token counts; current truthiness checks drop valid `0` token values.</violation>
</file>
<file name="tests/e2e/pipelex/pipes/pipe_operators/pipe_img_gen/test_pipe_img_gen_validation.py">
<violation number="1" location="tests/e2e/pipelex/pipes/pipe_operators/pipe_img_gen/test_pipe_img_gen_validation.py:112">
P3: Skip these checks when the model exists but has no img-gen rules; otherwise the test can become routing-dependent and flaky.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
- Use model_name in input_fidelity error message for consistency - Replace walrus + or with explicit is None checks for token counts to preserve valid 0 values - Remove args_dict debug log in gateway worker to avoid leaking prompt and input image data Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
thomashebrard
approved these changes
Apr 28, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Release v0.25.0
Bumps version from
0.24.1to0.25.0.Changelog
Added
GPT-5.5 model support. New
gpt-5.5entry on theopenai,azure_openaiand gateway backends.gpt-image-2image generation (OpenAI). New model entry with img-gen routing and constraints onopenai,azure_openai.Fixed
gpt-5.4,gpt-5.4-mini,gpt-5.4-nano,gpt-5.4-pro(andgpt-5.5) now advertisepdfin theirinputsonazure_openaiand the gateway, matching the existing OpenAI direct entries. Verified end-to-end with live document tests against both backends.Changed
Img-gen taxonomies aligned for
gpt-image-2. Convention:gpt_imagefor taxonomies/values shared across all OpenAI GPT Image models (legacy + gpt-image-2);gpt_image_legacywhen the value applies only to gpt-image-1/-1-mini/-1.5 (gpt-image-2 usesunavailablewhere a legacy-only option does not apply). Renames:AspectRatioTaxonomy.OPENAI_GPT_IMAGE_LEGACY→GPT_IMAGE_LEGACY(value"openai_gpt_image_legacy"→"gpt_image_legacy")AspectRatioTaxonomy.OPENAI_GPT_IMAGE_2→GPT_IMAGE_2(value"openai_gpt_image_2"→"gpt_image_2")OutputFormatTaxonomy.GPT→GPT_IMAGE_LEGACY(value"gpt"→"gpt_image_legacy")OutputCompressionTaxonomy.GPT_IMAGE→GPT_IMAGE_LEGACY(value"gpt_image"→"gpt_image_legacy")InputFidelityTaxonomy.OPENAI_IMAGE→GPT_IMAGE_LEGACY(value"openai_image"→"gpt_image_legacy")NumImagesTaxonomy.GPT→GPT_IMAGE(value"gpt"→"gpt_image")InferenceTaxonomy.GPT→GPT_IMAGE(value"gpt"→"gpt_image")AspectRatioTaxonomy.GPT.InputImagesTaxonomy.GPT_IMAGEunchanged (already correct — shared across legacy and gpt-image-2).HuggingFace and Fal img-gen workers honor
model_choicerule.huggingface_img_genandfalworkers now pop"model"fromargs_dictinstead of hardcodinginference_model.model_id, mirroring howpromptis already extracted. Themodel_choice = "model_id"rule is now required on every model under these backends; missing it raisesImgGenParameterErrorat call time. Rules added toqwen-image(HF) and to all Fal models (flux-pro,flux-pro/v1.1,flux-pro/v1.1-ultra,flux-2,fast-lightning-sdxl).Summary by cubic
Release v0.25.0 adds
gpt-5.5andgpt-image-2, aligns image‑gen rules, and fixes PDF input support onazure_openaiand the gateway. It also adds parameter support checks and polishes img‑gen workers.New Features
gpt-5.5acrossopenai,azure_openai, and the gateway.gpt-image-2with routing and constraints;best-gptnow points togpt-image-2.ImgGenParamSupportand staticPipeImgGenvalidation; expanded unit, integration, and e2e tests.Bug Fixes
pdfinput for the GPT‑5.4 series andgpt-5.5onazure_openaiand the gateway.model_choiceand unified img‑gen taxonomies (gpt_image/gpt_image_legacy) to prevent wrong model selection onopenai,fal, andhuggingface.Written for commit a549a29. Summary will update on new commits. Review in cubic