Skip to content

Support non-OpenAI image providers in design skill (Gemini as first alt) #990

Closed

Description

@nbzy1995

Problem

The design binary (design/src/{generate,iterate,evolve,check}.ts) is hardcoded to OpenAI's Responses API with the image_generation tool + gpt-4o vision. Users without OpenAI billing hit a hard wall — /design-shotgun, /design-review, and /design-html all fall back to HTML wireframes instead of real mockups.

Use case

I'd like to use /design-review and /design-shotgun on personal projects without paying OpenAI per mockup. Gemini 2.5 Flash Image ("nano-banana") has a usable free tier and produces quality close enough to gpt-image-1 for UI mockups.

Proposal

Opt-in provider selection, OpenAI stays default — no quality regression for existing users:

  • New env var: GSTACK_DESIGN_PROVIDER=openai|gemini (default openai)
  • auth.ts extended to resolve ~/.gstack/gemini.json or GEMINI_API_KEY
  • Thin provider interface abstracted over:
    • generate.ts → image generation
    • iterate.ts → iterate on prior mockup
    • evolve.ts → evolve from screenshot
    • check.ts → vision quality gate
  • $D setup extended to guide Gemini key setup
  • Docs note: Gemini path is "fallback for users without OpenAI billing; gpt-image-1 remains recommended for best quality"

Architecture stays small — one Provider interface with four methods (generateImage, iterateImage, evolveImage, checkImage), two implementations.

Scope

~600 lines touched across 5 files + tests. I'm happy to open the PR if you're open to merging it. Wanted to check direction first before investing the work.

Questions

  1. Are you open to this in principle, or do you want design to stay OpenAI-only?
  2. Preference between (a) runtime env var vs (b) compile-time flag vs (c) auto-fallback when no OpenAI key present?
  3. Any providers you'd reject upfront (e.g. "no Pollinations, quality too low")?

Activity

  1. benlrichards commented on Apr 17, 2026

    @benlrichards

    Support for grok imagine would also be helpful.

  2. francoisneron commented on May 21, 2026

    @francoisneron

    If you never used OpenAI before, you are locked in tier 1, and can't even use the tier models... This should be a no-brainer.

  3. timothyclin commented on May 29, 2026

    @timothyclin

    agreed, there shouldn't be any lock-in with openAI and openAI's base API endpoints, especially there are so many capable models (and not to mention, many organizations are now experimenting with LLM proxies to either secure or monitor LLM usage)

  4. yolo-jared commented on Jun 3, 2026

    @yolo-jared
    Contributor

    Update (Jun 2026): this is now a hard blocker, not a billing nuisance — no image model is reachable from a fresh OpenAI key

    This issue was filed (Apr 13) as "users without OpenAI billing fall back to wireframes." As of May 12, 2026 it's worse than that: a brand-new user with a perfectly valid OPENAI_API_KEY can now generate zero mockups, because every OpenAI image model requires per-organization ID verification and the old DALL·E escape hatch is gone.

    What changed on OpenAI's side

    1. May 12, 2026 — OpenAI removed dall-e-2 and dall-e-3 from the API (announced Nov 14, 2025). Sources: developers.openai.com/api/docs/changelog, developers.openai.com/api/docs/deprecations. These were the only image models that did not require org verification.
    2. Every remaining OpenAI image model — gpt-image-1, gpt-image-1-mini, gpt-image-1.5, gpt-image-2 — now requires per-organization ID verification (Persona government-ID + live selfie; one ID verifies only one org per 90 days; ~30 min propagation, image access can lag longer). Sources: developers.openai.com/api/docs/guides/image-generation, help.openai.com/en/articles/10910291-api-organization-verification.

    Net effect: a valid key from an unverified org can't generate ANY mockup. The headline capability of /design-shotgun, /design-review, /design-html, and /plan-design-review fails with no provider to fall back to.

    Verified against the shipped binary + source (design v1.55.0.0)

    • design/src/generate.ts hardcodes model: "gpt-image-2" against https://api.openai.com/v1/responses (orchestrator gpt-4o). No model override, no alternate provider.
    • design/src/auth.ts resolves OpenAI only (~/.gstack/openai.json or OPENAI_API_KEY).
    • strings on design/dist/design: OPENAI_API_KEY and api.openai.com present throughout, gpt-image-2 hardcoded; no real Gemini/Imagen/Anthropic/Replicate/Stability tokens (the only gemini/imagen/replicate substring hits in the binary are inside unrelated words like fallback and Verify — not provider code).

    Exact repro

    Fresh OPENAI_API_KEY from an unverified org →

    design generate --brief "..." --output x.png
    

    → fails with the message emitted in generate.ts:

    OpenAI organization verification required.
    Go to https://platform.openai.com/settings/organization to verify.
    

    Why Gemini (the alt proposed above) is the right first fallback: Google AI Studio keys are free and have no Persona/ID-verification gate, so they unblock the exact users this issue is about. Anthropic image gen / Replicate / fal are reasonable secondary options.

    Minimum ask if full provider abstraction isn't ready: surface the org-verification requirement up front (before the user spends a run) and link the verification page — today it only appears after a failed generation.

    For whoever picks this up

    There is already in-flight work — search this repo's existing issues and PRs before implementing to avoid duplication and to build on what's open:

    Search terms to sweep first: image provider, gemini, imagen, gpt-image, openai verification, org verification, dall-e, design provider. Coordinate with the open PRs above rather than starting a parallel abstraction.

  5. time-attack commented on Jul 15, 2026

    @time-attack
    Contributor

    @nbzy1995 Non-OpenAI image-provider support remains undefined, including provider selection, privacy, credentials, failures, capabilities, and cost behavior.

  6. capy-ai commented on Oct 11, 2026

    @capy-ai
    Contributor

    Thanks @nbzy1995 for the idea. In the Oct 11 triage we grouped the open feature requests by theme so related asks get built together instead of one at a time. This one is part of the Provider pluralism theme in TODOS.md (https://github.com/garrytan/gstack/blob/50d020ad9/TODOS.md#L54-L69), tracked as a whole in #3138. Closing it here so the open list stays actionable; it isn't rejected, and the theme credits every linked reporter when it's picked up.

  7. added
    parked
    on Oct 25, 2026
  8. capy-ai commented on Oct 25, 2026

    @capy-ai
    Contributor

    Reopened under the parked label: this is tracked in the Provider pluralism theme in TODOS.md and tracking issue #3138 (https://github.com/garrytan/gstack/blob/main/TODOS.md#p3-feature-themes-from-the-wave-9-triage-filed-2026-10-11), and what fixes it is the provider seam (#3138), which adds non-OpenAI image providers to the design binary. Closed-but-tracked read as closed, so parked issues now stay open until they ship, are duplicates, or are declined (https://github.com/garrytan/gstack/blob/main/docs/triage.md).

  9. added
    S3
    enhancement
    on Oct 31, 2026
  10. capy-ai commented on Nov 1, 2026

    @capy-ai
    Contributor

    Shipped in #3768 (merged as 71acd83, v1.92.11.0). The design binary now uses Google's Gemini when there's no OpenAI key: gemini-nano-banana-2.1 makes images and gemini-3.8-flash reads screenshots, so /design-shotgun, /design-review, /plan-design-review and /design-html produce real mockups instead of wireframes. Get a free key at https://aistudio.google.com/apikey, then export GEMINI_API_KEY=... or run $D setup --provider gemini. OpenAI stays the default whenever its key is set, and GSTACK_DESIGN_PROVIDER=openai|gemini picks one explicitly. docs/hosts.md has the details.

    Thanks @nbzy1995 for the proposal, and thanks to everyone who suggested providers in #998, #946, #881 and #777. The implementation was written fresh on current main, and no outside code was carried over.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    S3enhancementparked

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions