Skip to content

fix: add Gemini 3.x before 2.5 retirement - #2942

Open
CorieW wants to merge 6 commits into
nextfrom
fix/gemini-model-lifecycle
Open

fix: add Gemini 3.x before 2.5 retirement#2942
CorieW wants to merge 6 commits into
nextfrom
fix/gemini-model-lifecycle

Conversation

@CorieW

@CorieW CorieW commented Aug 13, 2026

Copy link
Copy Markdown
Member

Summary

  • Add Gemini 3.6 Flash, 3.5 Flash, 3.5 Flash Lite, 3.1 Flash Lite, and 3.1 Pro Preview to firestore-translate-text and default to 3.6 Flash. Gemini 2.5 options remain until they retire in October 2026.
  • Switch storage-resize-images content filter from gemini-2.5-flash to gemini-3.1-flash-lite.
  • Both Vertex AI call sites now target the global endpoint instead of the Cloud Functions location — the translate Genkit client and the resize content filter.
  • Bump firestore-translate-text to 0.1.31 and storage-resize-images to 0.3.7, with CHANGELOG and generated README updates.

Vertex AI location

gemini-3.6-flash and the other Gemini 3.x models are only served from the Vertex AI global, us and eu endpoints (locations); a single region such as us-central1 returns a 404. Translate passed process.env.LOCATION into the Vertex plugin, so a Vertex install on the new default model would have failed. It now uses global, matching the content filter. Neither extension exposes a Vertex location param, so this is hardcoded with a comment rather than added to the installer.

The old @genkit-ai/vertexai plugin rejects global, which is why the content filter moves to @genkit-ai/google-genai.

Sampling controls

Not applicable here — neither firestore-translate-text nor storage-resize-images exposes TEMPERATURE, TOP_P or TOP_K. (Gemini 3.x deprecates those controls; that is handled in the chatbot extensions.)

Why gemini-3.1-flash-lite (not gemini-3.5-flash-lite or higher)

The resize content filter is a high-volume yes/no image check, previously hardcoded to gemini-2.5-flash. We picked gemini-3.1-flash-lite because it is similar in price to that previous default ($0.25/$1.50 vs $0.30/$2.50 per 1M tokens) and performs better (Google: similar or better quality than 2.5 Flash, ~2.5× faster time-to-first-token). gemini-3.5-flash-lite is the same sticker as 2.5 Flash; gemini-3.5-flash and gemini-3.6-flash are about 5× input.

Test plan

  • Confirm translate installer lists 3.x models and defaults to gemini-3.6-flash
  • Confirm 2.5 models still selectable for existing installs
  • Run firestore-translate-text unit tests and tsc --noEmit
  • Run storage-resize-images content-filter unit tests
  • Smoke a Gemini translation with the new default model on Vertex at global
  • Smoke resize with content filter enabled (Vertex global; regional us-central1 404s this model)
  • Regenerate firestore-translate-text/README.md via npm run generate-readme

Translate and resize-images pin Gemini 2.5, which shuts
down in October 2026. Default to 3.6 Flash.

@gemini-code-assist gemini-code-assist Bot left a comment

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.

Code Review

This pull request updates the Gemini models used in the firestore-translate-text and storage-resize-images extensions. Specifically, it introduces Gemini 3.6 Flash, 3.1 Flash Lite, and 3.1 Pro Preview model options, setting Gemini 3.6 Flash as the new default model. It also updates the content filter in the image resizing extension to use Gemini 3.6 Flash, and updates the corresponding documentation, configuration files, and tests. There are no review comments, so I have no feedback to provide.

Picker listed every 2.5 model; add 3.5 Flash and Flash Lite
to match the current Gemini set.
CorieW added 2 commits August 13, 2026 20:21
Similar price to previous gemini-2.5-flash and better quality.
Avoid 3.5-flash-lite and higher cost.
gemini-3.1-flash-lite is not served on us-central1.
Old @genkit-ai/vertexai rejects global; switch to
@genkit-ai/google-genai.
@CorieW
CorieW requested a review from a team as a code owner August 17, 2026 22:23
CorieW added 2 commits August 18, 2026 00:09
@google-cloud/vertexai was a transitive dep of the old
plugin. Use SafetyThreshold string literals instead.
Gemini 3.x is served from the Vertex AI `global`, `us` and `eu` endpoints only,
so passing the Cloud Functions location (for example `us-central1`) makes the
new `gemini-3.6-flash` default fail with a 404. Use `global` instead, matching
the storage-resize-images content filter, and document it on the GEMINI_MODEL
param.
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.

2 participants