Repository navigation
Description
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(defaultopenai) auth.tsextended to resolve~/.gstack/gemini.jsonorGEMINI_API_KEY- Thin provider interface abstracted over:
generate.ts→ image generationiterate.ts→ iterate on prior mockupevolve.ts→ evolve from screenshotcheck.ts→ vision quality gate
$D setupextended 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
- Are you open to this in principle, or do you want
designto stay OpenAI-only? - Preference between (a) runtime env var vs (b) compile-time flag vs (c) auto-fallback when no OpenAI key present?
- Any providers you'd reject upfront (e.g. "no Pollinations, quality too low")?
Activity
benlrichards commentedon Apr 17, 2026
Support for grok imagine would also be helpful.
francoisneron commentedon May 21, 2026
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.
timothyclin commentedon May 29, 2026
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)
yolo-jared commentedon Jun 3, 2026
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_KEYcan 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
dall-e-2anddall-e-3from 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.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-reviewfails with no provider to fall back to.Verified against the shipped binary + source (
designv1.55.0.0)design/src/generate.tshardcodesmodel: "gpt-image-2"againsthttps://api.openai.com/v1/responses(orchestratorgpt-4o). No model override, no alternate provider.design/src/auth.tsresolves OpenAI only (~/.gstack/openai.jsonorOPENAI_API_KEY).stringsondesign/dist/design:OPENAI_API_KEYandapi.openai.compresent throughout,gpt-image-2hardcoded; no real Gemini/Imagen/Anthropic/Replicate/Stability tokens (the onlygemini/imagen/replicatesubstring hits in the binary are inside unrelated words likefallbackandVerify— not provider code).Exact repro
Fresh
OPENAI_API_KEYfrom an unverified org →→ fails with the message emitted in
generate.ts: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:
feat(design): add provider abstraction with Gemini support(open, non-draft) — likely the natural base for this.feat(design): multi-provider support — GPT Image 1.5 + Gemini— prior attempt worth reading for context.gpt-4oorchestrator +gpt-image-2tool is an unsupported pairing (400).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.time-attack commentedon Jul 15, 2026
@nbzy1995 Non-OpenAI image-provider support remains undefined, including provider selection, privacy, credentials, failures, capabilities, and cost behavior.
capy-ai commentedon Oct 11, 2026
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.
capy-ai commentedon Oct 25, 2026
Reopened under the
parkedlabel: 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).v1.92.11.0 feat: design mockups with Gemini when there's no OpenAI key (
capy-ai commentedon Nov 1, 2026
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.1makes images andgemini-3.8-flashreads screenshots, so/design-shotgun,/design-review,/plan-design-reviewand/design-htmlproduce real mockups instead of wireframes. Get a free key at https://aistudio.google.com/apikey, thenexport GEMINI_API_KEY=...or run$D setup --provider gemini. OpenAI stays the default whenever its key is set, andGSTACK_DESIGN_PROVIDER=openai|geminipicks 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.