GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(image-generator): add gpt-image-2 model support by waleedlatif1 · Pull Request #4437 · simstudioai/sim

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented May 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add gpt-image-2 as a model option in the Image Generator block
  • Wire up gpt-image-2 specific params: size (auto, 1024², 1536×1024, 1024×1536, 2048², 3840×2160), quality (auto/low/medium/high), background (auto/opaque — transparent not supported per docs), output_format (png/jpeg/webp), moderation (auto/low)
  • Share quality/background/output_format wiring with gpt-image-1; moderation is gpt-image-2 only
  • Verified parameter values against OpenAI's official gpt-image-2 docs

Type of Change

  • New feature

Testing

Tested manually. Type check passes.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

greptile-apps[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@vercel

vercel Bot commented May 4, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment May 4, 2026 8:51pm

Request Review

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@cursor

cursor Bot commented May 4, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

PR Summary

Medium Risk
Moderate risk because it expands the image generation parameter surface and request shaping for a new OpenAI model, and flips a block’s authType from none to api-key, which could affect access/config in production.

Overview
Adds gpt-image-2 support to the Image Generator block and openai_image tool, including new UI options and request params (quality, background, outputFormat, moderation) plus model-specific validation/defaulting for size and other fields.

Updates docs and integration metadata to reflect the new image model capabilities, refreshes Knowledge tool docs with new reranker inputs, updates Mem0 docs to match new async/paginated response fields, and adds a new table trigger docs page and entry in triggers meta.json. Also changes one integration’s authType in integrations.json from none to api-key.

Reviewed by Cursor Bugbot for commit 4073f0d. Configure here.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vercel
vercel Bot temporarily deployed to Preview May 4, 2026 20:31 Inactive
@greptile-apps

greptile-apps Bot commented May 4, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds gpt-image-2 as a third model option in the Image Generator block, wiring up its dedicated size options (up to 3840×2160), quality levels, background (opaque/auto only), output format, and moderation parameters. The implementation correctly validates size, quality, and background via ALLOWED_* allowlists in the block params function, maps camelCase outputFormat → snake_case output_format in the tool, and shares the quality/outputFormat/moderation path with gpt-image-1. The PR also includes several unrelated documentation changes (knowledge, mem0, table trigger docs) and a authType: "none" → "api-key" fix for the knowledge integration entry in integrations.json.

Confidence Score: 5/5

Safe to merge — no P0 or P1 issues found in the feature implementation.

The core feature code is correct: new params are validated against allowlists, the camelCase → snake_case mapping is handled in the right layer, the response handler already supports b64_json for gpt-image-2, and dall-e-3 is not affected. The one open comment is a P2 documentation nit on an unrelated table trigger doc file.

No files require special attention; the documentation in apps/docs/content/docs/en/triggers/table.mdx has a minor duplicate description worth cleaning up.

Important Files Changed

Filename Overview
apps/sim/blocks/blocks/image_generator.ts Added gpt-image-2 model with dedicated size/quality/background/outputFormat/moderation dropdowns; validation via ALLOWED_* allowlists for size, quality, and background; outputFormat and moderation are passed through without server-side validation (consistent with pre-existing background handling).
apps/sim/tools/openai/image.ts Extended request builder to forward quality, outputFormat (→ output_format), and moderation for gpt-image-1 and gpt-image-2; updated size default fallback; improved log message to interpolate model name.
apps/sim/app/(landing)/integrations/data/integrations.json Two changes: image-generator longDescription updated to mention GPT Image 2; knowledge block authType changed from "none" to "api-key" (likely coincidental, correct given the Cohere API key now documented for the knowledge block).
apps/docs/content/docs/en/triggers/table.mdx New trigger documentation; tableSelector and manualTableId share the identical description "The table to monitor." and are both marked Required, which is misleading.
apps/docs/content/docs/en/tools/image_generator.mdx Updated parameter table to document gpt-image-2 size options, quality levels, background, outputFormat, and moderation; correctly reflects the block implementation.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Image Generator Block] --> B{Model Selection}
    B -->|dall-e-3| C[Size: 1024x1024 / 1024x1792 / 1792x1024\nQuality: standard / hd\nStyle: vivid / natural]
    B -->|gpt-image-1| D[Size: auto / 1024x1024 / 1536x1024 / 1024x1536\nQuality: auto / low / medium / high\nBackground: auto / transparent / opaque\nOutputFormat: png / jpeg / webp\nModeration: auto / low]
    B -->|gpt-image-2 NEW| E[Size: auto / 1024x1024 / 1536x1024 / 1024x1536 / 2560x1440 / 3840x2160\nQuality: auto / low / medium / high\nBackground: auto / opaque\nOutputFormat: png / jpeg / webp\nModeration: auto / low]
    C --> F[ALLOWED_* Validation in block params]
    D --> F
    E --> F
    F --> G[imageTool POST /v1/images/generations]
    G -->|dall-e-3| H[url response → proxy fetch → base64]
    G -->|gpt-image-1 / gpt-image-2| I[b64_json response → base64]
    H --> J[Output: image base64 + metadata]
    I --> J
Loading

Reviews (4): Last reviewed commit: "docs" | Re-trigger Greptile

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@waleedlatif1
waleedlatif1 force-pushed the waleedlatif1/gpt-image-2 branch from e3b2210 to 9b0dfdc Compare May 4, 2026 20:33
@vercel
vercel Bot temporarily deployed to Preview May 4, 2026 20:33 Inactive
@waleedlatif1
waleedlatif1 force-pushed the waleedlatif1/gpt-image-2 branch from 9b0dfdc to ef93928 Compare May 4, 2026 20:33
@vercel
vercel Bot temporarily deployed to Preview May 4, 2026 20:33 Inactive
@waleedlatif1

waleedlatif1 commented May 4, 2026

Copy link
Copy Markdown
Collaborator Author

@greptile

greptile-apps[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@waleedlatif1

waleedlatif1 commented May 4, 2026

Copy link
Copy Markdown
Collaborator Author

@cursor review

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@waleedlatif1
waleedlatif1 force-pushed the waleedlatif1/gpt-image-2 branch from ef93928 to 4d7079b Compare May 4, 2026 20:39
@vercel
vercel Bot temporarily deployed to Preview May 4, 2026 20:39 Inactive
@waleedlatif1
waleedlatif1 force-pushed the waleedlatif1/gpt-image-2 branch from 4d7079b to bbb6ba1 Compare May 4, 2026 20:40
@vercel
vercel Bot temporarily deployed to Preview May 4, 2026 20:40 Inactive
cursor[bot]
cursor Bot reviewed May 4, 2026
View reviewed changes
Comment thread apps/sim/blocks/blocks/image_generator.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@waleedlatif1
feat(image-generator): add gpt-image-2 model support
8b052b9
@waleedlatif1
waleedlatif1 force-pushed the waleedlatif1/gpt-image-2 branch from bbb6ba1 to 8b052b9 Compare May 4, 2026 20:45
@vercel
vercel Bot temporarily deployed to Preview May 4, 2026 20:45 Inactive
@waleedlatif1

waleedlatif1 commented May 4, 2026

Copy link
Copy Markdown
Collaborator Author

@greptile

greptile-apps[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@waleedlatif1

waleedlatif1 commented May 4, 2026

Copy link
Copy Markdown
Collaborator Author

@cursor review

cursor[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@waleedlatif1
docs
4073f0d
greptile-apps[bot]
greptile-apps Bot reviewed May 4, 2026
View reviewed changes
Comment thread apps/sim/blocks/blocks/image_generator.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread apps/sim/blocks/blocks/image_generator.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread apps/sim/blocks/blocks/image_generator.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread apps/sim/tools/openai/image.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@vercel
vercel Bot deployed to Preview May 4, 2026 20:51
View deployment
@waleedlatif1

waleedlatif1 commented May 4, 2026

Copy link
Copy Markdown
Collaborator Author

@greptileai please re-review — all prior comments resolved.

greptile-apps[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@waleedlatif1

waleedlatif1 commented May 4, 2026

Copy link
Copy Markdown
Collaborator Author

@cursor review

cursor[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

cursor[bot]
cursor Bot reviewed May 4, 2026
View reviewed changes

@cursor cursor Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 8b052b9. Configure here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
cursor[bot]
cursor Bot reviewed May 4, 2026
View reviewed changes

@cursor cursor Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 4073f0d. Configure here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@waleedlatif1
waleedlatif1 merged commit 6d044a9 into staging May 4, 2026
14 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@waleedlatif1
waleedlatif1 deleted the waleedlatif1/gpt-image-2 branch May 4, 2026 22:26
@waleedlatif1 waleedlatif1 mentioned this pull request May 5, 2026
v0.6.66: child trace spans, reranker controls, attachment previews, logs block, parallel-in-loop wall clock, gpt-image-2 #4444
Merged

This branch was successfully deployed

1 active deployment
Preview — 4073f0d2 Deployed May 4, 2026 by vercel[bot]
View deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@greptile-apps greptile-apps[bot] greptile-apps[bot] left review comments
@cursor cursor[bot] cursor[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@waleedlatif1
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.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.