Skip to content

Gemini 3.7 flash default, deploy-time project picker, prompt image upload - #59

Merged
sgardoll merged 2 commits into
mainfrom
feat/model-upgrade-and-deploy-images
Aug 16, 2026
Merged

Gemini 3.7 flash default, deploy-time project picker, prompt image upload#59
sgardoll merged 2 commits into
mainfrom
feat/model-upgrade-and-deploy-images

Conversation

@sgardoll

@sgardoll sgardoll commented Aug 16, 2026

Copy link
Copy Markdown
Owner

Summary

Three changes. The feature branch is client-side (this repo); the image feature also required an update to the BuildShip service-runpipeline pipeline 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_MODEL and the dropdown option all updated to google/gemini-3.7-flash / "Gemini 3.7 Flash".
  • Model routing is unchanged — the client sends the model id to BuildShip, which forwards it to OpenRouter.

2. FlutterFlow project chosen at deploy time

  • The "Confirm Commit to FlutterFlow" modal now shows a Target Project dropdown, populated live from FlutterFlow's API and pre-selected to the API Keys default.
  • The user can change the target right before deploying. It's a per-deploy override — the API Keys default is untouched.
  • Both single-artifact and bundle deploys route through this same modal (legacy showPreCommitSummary path removed).

3. Prompt image upload (client + buildship)

Client (this repo):

  • Elegant "Add images" button + thumbnails under the prompt box; up to 4 images, individually removable.
  • The control appears only when the selected model supports vision (Gemini, Claude, OpenAI, GLM, Kimi, OpenRouter Auto). Non-vision models (DeepSeek, OpenRouter Free) hide it and drop any attached images.
  • Images are sent to BuildShip as a top-level images array (plus context.images); the prompt stays a plain text string.

BuildShip pipeline (service-runpipeline) — committed on the buildship repo (62206d8):

  • The workflow now accepts an images input (array of image data URLs).
  • All three OpenRouter nodes (architect, generator, review) accept an images input and merge the image_url content 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 via scripts/deploy_ftp.py.
  • No client change is required for generator/review — they pass an empty images array and behave exactly as before.

Tests

  • npm test — 196 passed.
  • npm run build — succeeds.

…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-apps

greptile-apps Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR updates the default Gemini model, adds deploy-time FlutterFlow project selection, and introduces prompt image attachments.

  • Routes single and bundle deployments through a shared confirmation modal.
  • Populates the deployment target from the configured FlutterFlow account.
  • Sends attached image data to the prompt-architect pipeline for supported models.

Confidence Score: 2/5

The 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

Filename Overview
app.js Updates model configuration and adds image handling, project-selection state, pipeline payloads, and shared deployment-confirmation behavior.
index.html Adds prompt-image controls, the deploy project selector, related styling, and the Gemini 3.7 model option.

Sequence Diagram

sequenceDiagram
    actor User
    participant UI
    participant BuildShip
    participant FlutterFlow
    User->>UI: Enter prompt and optionally attach images
    UI->>BuildShip: Run architect, generator, and review
    BuildShip-->>UI: Generated and reviewed code
    User->>UI: Open deploy confirmation
    UI->>FlutterFlow: List available projects
    FlutterFlow-->>UI: Project options
    User->>UI: Select target and confirm
    UI->>FlutterFlow: Deploy generated artifacts
Loading

Reviews (2): Last reviewed commit: "refactor: send prompt images via BuildSh..." | Re-trigger Greptile

Comment thread app.js
Comment thread app.js
Comment on lines +194 to +196
Promise.all(readPromises).then((images) => {
const added = images.filter(Boolean)
promptImages.push(...added)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 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.

Comment thread app.js
Comment on lines +187 to +190
const reader = new FileReader()
reader.onload = () => resolve({ dataUrl: reader.result, name: file.name })
reader.onerror = () => resolve(null)
reader.readAsDataURL(file)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 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>
@sgardoll

Copy link
Copy Markdown
Owner Author

@greptileai

@sgardoll
sgardoll merged commit b30924e into main Aug 16, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant