Skip to content

fix(video): use GA Veo 3.1 model IDs on Vertex AI - #2082

Merged
smakosh merged 2 commits into
mainfrom
fix/veo-3-1-vertex-model-ids
Apr 25, 2026
Merged

smakosh merged 2 commits into
mainfrom
fix/veo-3-1-vertex-model-ids

Conversation

@smakosh

@smakosh smakosh commented Apr 25, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Google deprecated the veo-3.1-generate-preview and veo-3.1-fast-generate-preview model IDs on Vertex AI on 2026-04-02, causing the playground errors Publisher Model ... was not found and Permission 'aiplatform.endpoints.predict' denied.
  • Update the upstream modelName for the google-vertex provider to the GA IDs veo-3.1-generate-001 and veo-3.1-fast-generate-001.
  • Keep the public-facing gateway model IDs (veo-3.1-generate-preview / veo-3.1-fast-generate-preview) unchanged so existing API consumers are not broken.
  • Update the internal modelName comparison in the gateway and playground that gates reference-image support.

Test plan

  • Generate a video with Veo 3.1 in the playground (no inputs)
  • Generate a video with Veo 3.1 Fast in the playground (no inputs)
  • Generate a video with Veo 3.1 using a reference image (verify gating still allows it)
  • Confirm avalanche/veo-3.1-* routes still work

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Updates
    • Updated Veo 3.1 model identifiers from preview to production variants.
    • Improved handling of reference-image video requests for Google Vertex integrations to ensure correct model selection and logging.

Google deprecated the `-preview` Veo 3.1 model IDs on 2026-04-02. Update
the upstream model names sent to Vertex AI to the GA `-001` IDs so video
generation works again. Public-facing model IDs are kept unchanged for
API backwards compatibility.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Apr 25, 2026 •

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 365865a1-bbf9-49d5-bab1-fbb817f28fe9

📥 Commits

Reviewing files that changed from the base of the PR and between d898ae2 and 94763e9.

📒 Files selected for processing (1)
  • apps/gateway/src/videos/videos.spec.ts

Walkthrough

Switches Google Vertex Veo 3.1 mappings from preview to production model identifiers (veo-3.1-generate-001, veo-3.1-fast-generate-001), removes "preview" wording in model descriptions, updates reference-mode eligibility checks, and adjusts tests to expect the new identifiers.

Changes

Cohort / File(s) Summary
Model Definitions
packages/models/src/models/google.ts
Changed google-vertex modelName entries to veo-3.1-generate-001 and veo-3.1-fast-generate-001; removed "preview" wording from the corresponding model descriptions.
Feature Eligibility Logic
apps/gateway/src/videos/videos.ts, apps/playground/src/lib/video-gen.ts
Updated reference-image/video eligibility logic to gate on veo-3.1-generate-001 instead of veo-3.1-generate-preview.
Tests
apps/gateway/src/videos/videos.spec.ts
Updated test expectations to assert veo-3.1-generate-001 as the used model mapping in jobs and logs.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: updating Google Vertex AI to use GA Veo 3.1 model IDs instead of preview versions.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/veo-3-1-vertex-model-ids

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@smakosh smakosh self-assigned this Apr 25, 2026

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/gateway/src/videos/videos.ts (1)

778-794: ⚠️ Potential issue | 🟠 Major

Test suite assertions need updates for internal model name change.

The code change in lines 778–794 is correct: the internal gate now checks provider.modelName against the GA veo-3.1-generate-001, and user-facing error messages correctly retain the *-preview slugs. However, the extensive test suite in apps/gateway/src/videos/videos.spec.ts contains 40+ explicit assertions and fixtures that still expect the old preview model IDs.

Specifically, these need updating:

  • usedModel field assertions (e.g., lines 476, 516, 823, 973, 1155, 1248) currently expect "veo-3.1-generate-preview" but will receive the new GA ID
  • Test request bodies (lines 64, 103, 177, 271, etc.) should be reviewed to ensure they match the new internal flow
  • Mock server fallback in apps/gateway/src/test-utils/mock-openai-server.ts:1364 still defaults to "veo-3.1-generate-preview" and may need alignment

Update all test expectations to match the internal model ID that will now flow through the system.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/gateway/src/videos/videos.ts` around lines 778 - 794, Update the test
expectations and fixtures so the internal model ID flowing through tests is the
GA name "veo-3.1-generate-001" while user-facing error strings remain the
preview slug; specifically, change all assertions that check the usedModel field
(e.g., any expectations on usedModel currently asserting
"veo-3.1-generate-preview") to expect "veo-3.1-generate-001", update test
request bodies/fixtures that construct requests to reflect the new internal
model name, and update the mock server fallback in the mock-openai-server module
(the default model string) so it returns "veo-3.1-generate-001" instead of
"veo-3.1-generate-preview". Ensure no user-facing error message strings are
altered.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@apps/gateway/src/videos/videos.ts`:
- Around line 778-794: Update the test expectations and fixtures so the internal
model ID flowing through tests is the GA name "veo-3.1-generate-001" while
user-facing error strings remain the preview slug; specifically, change all
assertions that check the usedModel field (e.g., any expectations on usedModel
currently asserting "veo-3.1-generate-preview") to expect
"veo-3.1-generate-001", update test request bodies/fixtures that construct
requests to reflect the new internal model name, and update the mock server
fallback in the mock-openai-server module (the default model string) so it
returns "veo-3.1-generate-001" instead of "veo-3.1-generate-preview". Ensure no
user-facing error message strings are altered.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: be1d64b2-3221-4a4d-9ed2-b09efe4fedc3

📥 Commits

Reviewing files that changed from the base of the PR and between a49b8de and d898ae2.

📒 Files selected for processing (3)
  • apps/gateway/src/videos/videos.ts
  • apps/playground/src/lib/video-gen.ts
  • packages/models/src/models/google.ts

`videoJob.usedModel` and `log.usedModelMapping` record the upstream
provider model name, which is now `veo-3.1-generate-001` after the GA
rename. Log filters that use `provider/publicId` format are unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@smakosh
smakosh added this pull request to the merge queue Apr 25, 2026
Merged via the queue into main with commit be872de Apr 25, 2026
17 of 18 checks passed
@smakosh
smakosh deleted the fix/veo-3-1-vertex-model-ids branch April 25, 2026 18:34
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