Repository navigation
fix(video): use GA Veo 3.1 model IDs on Vertex AI - #2082
Conversation
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>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughSwitches Google Vertex Veo 3.1 mappings from preview to production model identifiers ( Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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 | 🟠 MajorTest suite assertions need updates for internal model name change.
The code change in lines 778–794 is correct: the internal gate now checks
provider.modelNameagainst the GAveo-3.1-generate-001, and user-facing error messages correctly retain the*-previewslugs. However, the extensive test suite inapps/gateway/src/videos/videos.spec.tscontains 40+ explicit assertions and fixtures that still expect the old preview model IDs.Specifically, these need updating:
usedModelfield 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:1364still defaults to"veo-3.1-generate-preview"and may need alignmentUpdate 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
📒 Files selected for processing (3)
apps/gateway/src/videos/videos.tsapps/playground/src/lib/video-gen.tspackages/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>
Summary
veo-3.1-generate-previewandveo-3.1-fast-generate-previewmodel IDs on Vertex AI on 2026-04-02, causing the playground errorsPublisher Model ... was not foundandPermission 'aiplatform.endpoints.predict' denied.modelNamefor thegoogle-vertexprovider to the GA IDsveo-3.1-generate-001andveo-3.1-fast-generate-001.veo-3.1-generate-preview/veo-3.1-fast-generate-preview) unchanged so existing API consumers are not broken.modelNamecomparison in the gateway and playground that gates reference-image support.Test plan
Veo 3.1in the playground (no inputs)Veo 3.1 Fastin the playground (no inputs)Veo 3.1using a reference image (verify gating still allows it)avalanche/veo-3.1-*routes still work🤖 Generated with Claude Code
Summary by CodeRabbit