Skip to content

fix(cli): default Vertex captioning to a live Gemini model - #6857

Open
pcbeingused333 wants to merge 2 commits into
heygen-com:mainfrom
pcbeingused333:fix/vertex-caption-model
Open

pcbeingused333 wants to merge 2 commits into
heygen-com:mainfrom
pcbeingused333:fix/vertex-caption-model

Conversation

@pcbeingused333

@pcbeingused333 pcbeingused333 commented Oct 30, 2026 •

Copy link
Copy Markdown

What

Default the Vertex AI captioning model in hyperframes capture to gemini-3.1-flash-lite instead of gemini-2.5-flash.

Why

With HYPERFRAMES_VERTEX_PROJECT_ID and HYPERFRAMES_VERTEX_SERVICE_ACCOUNT set, captionImagesWithGemini defaults the Vertex model to gemini-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-lite is generally available on Vertex and is the same model family as the existing OpenRouter and Gemini API defaults, so the existing thinkingBudget: 0 request config stays as is. HYPERFRAMES_VERTEX_MODEL still overrides it.

Test plan

  • Unit tests added/updated
  • Manual testing performed
  • Documentation updated (if applicable)
  • Comments follow CONTRIBUTING.md "Comments": they say why, not what, and a bug fix says what the code must do and how to reproduce the bug
    The Vertex default test in packages/cli/src/capture/contentExtractor.test.ts now 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-central1 to global, because gemini-3.1-flash-lite is served on global and the us/eu multi-regions only. HYPERFRAMES_VERTEX_LOCATION still 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.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@heygengenesis heygengenesis 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.

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 example fails 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",

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.

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>
@pcbeingused333

Copy link
Copy Markdown
Author

Done in 0ef576e: location now defaults to global and the Vertex default test pins it; description updated with the fails without the fix: line.

This comment was drafted with Claude Code.

This branch has not been deployed

No deployments
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