Repository navigation
fix(cli): default Vertex captioning to a live Gemini model - #6857
pcbeingused333 wants to merge 2 commits into
Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Verdict: REQUEST CHANGES · 2 blockers · 0 important · 0 nits · head 82d96806
- blocker: the PR description has no
fails without the fix:line naming the test that fails without the fix. Please add one, for examplefails without the fix: contentExtractor.test.ts › captionImagesWithGemini — Vertex AI provider › <the default-model test>, plus a test for the location below.
Scope
I read the diff and the Vertex request path (contentExtractor.ts around lines 376–420). I checked the model id against Google's model pages (model versions, 3.1 Flash-Lite). gemini-3.1-flash-lite is listed as GA, released 2026-05-07, with retirement no earlier than 2027-05-07. gemini-2.5-flash retired on 2026-10-20, as the PR says. I did not call Vertex itself because I have no GCP credentials. I didn't wait for CI because this is a request-changes verdict.
| const model = { | ||
| openrouter: process.env.HYPERFRAMES_OPENROUTER_MODEL || "google/gemini-3.1-flash-lite", | ||
| vertex: process.env.HYPERFRAMES_VERTEX_MODEL || "gemini-2.5-flash", | ||
| vertex: process.env.HYPERFRAMES_VERTEX_MODEL || "gemini-3.1-flash-lite", |
There was a problem hiding this comment.
blocker: with this default, the id won't resolve at the default location. Google's page lists gemini-3.1-flash-lite only on global and the us/eu multi-regions, with no single region. The client below still defaults to location: process.env.HYPERFRAMES_VERTEX_LOCATION || "us-central1" (around line 394). So the setup this PR targets (HYPERFRAMES_VERTEX_PROJECT_ID and HYPERFRAMES_VERTEX_SERVICE_ACCOUNT set, no location) still sends every caption request to a model us-central1 doesn't serve. Captioning keeps failing, now with a not-found error instead of a retired-model error. Default the location to "global", and pin the location the client is built with in the Vertex default test. @google/genai accepts global.
gemini-3.1-flash-lite is served on global and the us/eu multi-regions, not on a single region, so the us-central1 default still failed every caption request for deployments that set no location. The Vertex default test now pins the location the client is built with. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Done in 0ef576e: location now defaults to This comment was drafted with Claude Code. |
What
Default the Vertex AI captioning model in
hyperframes capturetogemini-3.1-flash-liteinstead ofgemini-2.5-flash.Why
With
HYPERFRAMES_VERTEX_PROJECT_IDandHYPERFRAMES_VERTEX_SERVICE_ACCOUNTset,captionImagesWithGeminidefaults the Vertex model togemini-2.5-flash, which Google retired on Vertex AI on 2026-10-20. Every caption request then fails and the capture continues without captions.Related work
Tiny self-contained correction; no separate issue. Follows #3561, which added Vertex service-account auth for captioning.
How
gemini-3.1-flash-liteis generally available on Vertex and is the same model family as the existing OpenRouter and Gemini API defaults, so the existingthinkingBudget: 0request config stays as is.HYPERFRAMES_VERTEX_MODELstill overrides it.Test plan
The Vertex default test in
packages/cli/src/capture/contentExtractor.test.tsnow expects the new default model and pins the client location (global).fails without the fix: contentExtractor.test.ts › captionImagesWithGemini — Vertex AI provider › prefers a service account over a bare API key, and authenticates against the project
fails without the fix: contentExtractor.test.ts › captionImagesWithGemini — Vertex AI provider › spends no output budget on thinking
Also: the default Vertex location changes from
us-central1toglobal, becausegemini-3.1-flash-liteis served onglobaland theus/eumulti-regions only.HYPERFRAMES_VERTEX_LOCATIONstill overrides it.One unrelated test in that file (
keeps a successful sibling caption when another request times out) fails the same way on main.Disclosure: this change was prepared with the help of an AI coding assistant (Claude Code) under the account owner's direction.