feat(image-generator): add gpt-image-2 model support#4436
feat(image-generator): add gpt-image-2 model support#4436waleedlatif1 wants to merge 48 commits intostagingfrom
Conversation
…ership workflow edits via sockets, ui improvements
…ng improvements, posthog, secrets mutations
…ration, signup method feature flags, SSO improvements
…nts, secrets performance, polling refactors, drag resources in mothership
…y invalidation, HITL docs
…endar triggers, docs updates, integrations/models pages improvements
…ions, jira forms endpoints
…mat, logs performance improvements fix(csp): add missing analytics domains, remove unsafe-eval, fix workspace CSP gap (#4179) fix(landing): return 404 for invalid dynamic route slugs (#4182) improvement(seo): optimize sitemaps, robots.txt, and core web vitals across sim and docs (#4170) fix(gemini): support structured output with tools on Gemini 3 models (#4184) feat(brightdata): add Bright Data integration with 8 tools (#4183) fix(mothership): fix superagent credentials (#4185) fix(logs): close sidebar when selected log disappears from filtered list; cleanup (#4186)
v0.6.46: mothership streaming fixes, brightdata integration
…m integration, atlassian triggers
…rity hardening, contact page, 404 page, access control, SES, SNS
v0.6.54: migration error logs
…ze, subagent thinking, files sorting, agentphone integration
fix(db): revert statement_timeout startup options breaking pooled connections (#4284)
v0.6.57: mothership reliability, ashby refactor, tables row count, copilot id fix, bun upgrade
…rizations, mothership positional table row insertion, CI improvements, org-external users, file viewer improvements
v0.6.62: fix new copilot chat creation and selection on refresh
…ixes, db query optimizations, contract boundaries code hygiene, CORS, toast improvements, tables infinite query, executor robustness, reranker support
…tion blocks/connectors updates
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| 29606901 | Triggered | Generic High Entropy Secret | a54dcbe | apps/sim/providers/utils.test.ts | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
PR SummaryMedium Risk Overview Introduces GPT-image-specific options for Reviewed by Cursor Bugbot for commit b487934. Configure here. |
|
Closing — recreating with clean history (single commit only). |
Greptile SummaryThis PR adds Confidence Score: 4/5Safe to merge; only P2 cosmetic/observability findings, no correctness or security issues. All parameter routing is correct: camelCase→snake_case mapping for output_format, moderation gated to gpt-image-2 only, size defaults updated properly. The two findings are a stale log string and missing outputFormat in response metadata — neither affects functional correctness. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Block: params function] -->|model=dall-e-3| B[quality, style → baseParams]
A -->|model=gpt-image-1| C[quality, background, outputFormat → baseParams]
A -->|model=gpt-image-2| D[quality, background, outputFormat, moderation → baseParams]
B --> E[Tool: body builder]
C --> E
D --> E
E -->|dall-e-3| F[body.quality, body.style]
E -->|gpt-image-1 or gpt-image-2| G[body.quality, body.background, body.output_format]
G -->|gpt-image-2 only| H[body.moderation]
F --> I[POST /v1/images/generations]
G --> I
H --> I
I -->|url| J[Fetch via proxy → base64]
I -->|b64_json| K[Use directly]
J --> L[Return image + metadata]
K --> L
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit b487934. Configure here.
| ...(params.quality && { quality: params.quality }), | ||
| ...(params.background && { background: params.background }), | ||
| ...(params.outputFormat && { outputFormat: params.outputFormat }), | ||
| ...(params.moderation && { moderation: params.moderation }), |
There was a problem hiding this comment.
Duplicated params logic for gpt-image-1 and gpt-image-2
Low Severity
The gpt-image-1 and gpt-image-2 branches in the block's params function share three identical lines (quality, background, outputFormat spreads), differing only by the extra moderation line. Meanwhile, the tool's body function in image.ts already consolidates these two models into a single else if branch with a nested check for moderation. The block params function could follow the same consolidated pattern, reducing the risk of future changes being applied to one branch but not the other.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit b487934. Configure here.


Summary
gpt-image-2as a model option in the Image Generator blockType of Change
Testing
Tested manually. Type check passes.
Checklist