Gemini 3.7 flash default, deploy-time project picker, prompt image upload - #59
Conversation
…age upload - Upgrade default/free/fallback model from Gemini 3.6 Flash to 3.7 Flash everywhere (dropdown, labels, architect/review/fallback). Routed via the existing OpenRouter-through-BuildShip path. - Deploy-time FlutterFlow project selection: the commit confirm modal now has a project dropdown populated from the FF API, pre-selected to the API Keys default but changeable per deploy. Both single-artifact and bundle deploys route through this modal; removes the legacy showPreCommitSummary path. - Prompt image upload: elegant multi-image attachment under the prompt box, shown only when the selected model supports vision (Gemini, Claude, OpenAI, GLM, Kimi, Auto). Non-vision models (DeepSeek, OpenRouter free) hide the button and drop any attached images. Images flow to BuildShip as OpenRouter multimodal content parts. Co-Authored-By: Claude <noreply@anthropic.com>
Greptile SummaryThe PR updates the default Gemini model, adds deploy-time FlutterFlow project selection, and introduces prompt image attachments.
Confidence Score: 2/5The PR is not safe to merge while stale asynchronous project and image state can be applied and image payloads remain unbounded. Earlier project-list responses can still replace the active deployment target, pending FileReader callbacks can restore hidden attachments after a non-vision model switch, and unrestricted base64 images are duplicated in the pipeline request. Files Needing Attention: app.js Important Files Changed
|
| Promise.all(readPromises).then((images) => { | ||
| const added = images.filter(Boolean) | ||
| promptImages.push(...added) |
There was a problem hiding this comment.
Completed reads restore cleared images
When a user selects an image and switches to a non-vision model before FileReader finishes, this callback appends the image after the model-change handler cleared it, causing the hidden attachment to be forwarded on the next pipeline run.
Prompt To Fix With AI
This is a comment left during a code review.
Path: app.js
Line: 194-196
Comment:
**Completed reads restore cleared images**
When a user selects an image and switches to a non-vision model before `FileReader` finishes, this callback appends the image after the model-change handler cleared it, causing the hidden attachment to be forwarded on the next pipeline run.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| const reader = new FileReader() | ||
| reader.onload = () => resolve({ dataUrl: reader.result, name: file.name }) | ||
| reader.onerror = () => resolve(null) | ||
| reader.readAsDataURL(file) |
There was a problem hiding this comment.
Image payload size remains unbounded
Uploaded files are read without a byte-size limit, and each base64-expanded image is subsequently duplicated in the architect prompt, context, and multimodal content. Large attachments therefore consume excessive browser memory and produce oversized requests that fail before generation completes.
Prompt To Fix With AI
This is a comment left during a code review.
Path: app.js
Line: 187-190
Comment:
**Image payload size remains unbounded**
Uploaded files are read without a byte-size limit, and each base64-expanded image is subsequently duplicated in the architect prompt, context, and multimodal content. Large attachments therefore consume excessive browser memory and produce oversized requests that fail before generation completes.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Align with the service-runpipeline OpenRouter nodes, which now accept a dedicated images input and merge the image_url parts into the user message server-side. The client sends a plain text prompt plus a top-level images array (and context.images) instead of embedding OpenAI content-parts into the prompt, keeping the prompt field schema-compliant and avoiding duplicate image data in the message text. Co-Authored-By: Claude <noreply@anthropic.com>
Summary
Three changes. The feature branch is client-side (this repo); the image feature also required an update to the BuildShip
service-runpipelinepipeline to accept and forward images to the vision models.1. Gemini 3.6 Flash → 3.7 Flash (default, everywhere)
FREE_MODEL,PROMPT_ARCHITECT_MODEL,CODE_REVIEW_MODEL,FALLBACK_MODELand the dropdown option all updated togoogle/gemini-3.7-flash/ "Gemini 3.7 Flash".2. FlutterFlow project chosen at deploy time
showPreCommitSummarypath removed).3. Prompt image upload (client + buildship)
Client (this repo):
imagesarray (pluscontext.images); the prompt stays a plain text string.BuildShip pipeline (
service-runpipeline) — committed on the buildship repo (62206d8):imagesinput (array of image data URLs).imagesinput and merge theimage_urlcontent parts into the user message server-side, so the model sees text + images together.Notes
dist/is intentionally not committed here — the web deploy runs separately viascripts/deploy_ftp.py.imagesarray and behave exactly as before.Tests
npm test— 196 passed.npm run build— succeeds.