You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Build the Google Gemini Veo video adapter on top of the per-model typed-duration contract introduced in #534.
Why now
#534 ships the typed-duration VideoAdapter contract (availableDurations + snapDuration + per-model duration union). Building the Veo adapter directly on the new contract means it never ships with the old duration?: number API and never breaks.
Current state
packages/typescript/ai-gemini/src/adapters/ has no video.ts.
packages/typescript/ai-gemini/src/model-meta.ts contains commented-out Veo model entries at lines 827–940 (VEO_3_1_PREVIEW, VEO_3_1_FAST_PREVIEW, VEO_3, VEO_3_FAST, VEO_2).
testing/e2e/src/lib/feature-support.ts does not list 'gemini' for 'video-gen'.
Scope
Uncomment + finalize the Veo entries in model-meta.ts and add a GeminiVideoModel union.
Add packages/typescript/ai-gemini/src/video/video-provider-options.ts with GeminiVideoModelDurationByName, GeminiVideoModelSizeByName, and a GEMINI_VIDEO_DURATIONS map sourced from @tanstack/ai-schemas (the gemini OpenAPI spec is already in feat(schemas): @tanstack/ai-schemas with nightly OpenAPI sync (closes #619) #622's pipeline).
Build packages/typescript/ai-gemini/src/adapters/video.ts extending BaseVideoAdapter with the fifth generic and implementing the three core methods (createVideoJob, getVideoStatus, getVideoUrl) plus overriding availableDurations / snapDuration.
Export geminiVideo / createGeminiVideo factories from packages/typescript/ai-gemini/src/index.ts.
Add 'gemini' to the video-gen feature-support set and record an E2E fixture.
Build the Google Gemini Veo video adapter on top of the per-model typed-duration contract introduced in #534.
Why now
#534 ships the typed-duration
VideoAdaptercontract (availableDurations+snapDuration+ per-modeldurationunion). Building the Veo adapter directly on the new contract means it never ships with the oldduration?: numberAPI and never breaks.Current state
packages/typescript/ai-gemini/src/adapters/has novideo.ts.packages/typescript/ai-gemini/src/model-meta.tscontains commented-out Veo model entries at lines 827–940 (VEO_3_1_PREVIEW,VEO_3_1_FAST_PREVIEW,VEO_3,VEO_3_FAST,VEO_2).testing/e2e/src/lib/feature-support.tsdoes not list'gemini'for'video-gen'.Scope
model-meta.tsand add aGeminiVideoModelunion.packages/typescript/ai-gemini/src/video/video-provider-options.tswithGeminiVideoModelDurationByName,GeminiVideoModelSizeByName, and aGEMINI_VIDEO_DURATIONSmap sourced from@tanstack/ai-schemas(the gemini OpenAPI spec is already in feat(schemas): @tanstack/ai-schemas with nightly OpenAPI sync (closes #619) #622's pipeline).packages/typescript/ai-gemini/src/adapters/video.tsextendingBaseVideoAdapterwith the fifth generic and implementing the three core methods (createVideoJob,getVideoStatus,getVideoUrl) plus overridingavailableDurations/snapDuration.geminiVideo/createGeminiVideofactories frompackages/typescript/ai-gemini/src/index.ts.'gemini'to thevideo-genfeature-support set and record an E2E fixture.Per-model duration shapes (from Veo API docs)
veo-2.0-generate-001: integer seconds5 | 6 | 7 | 8veo-3.0-generate-001,veo-3.0-fast-generate-001:4 | 8veo-3.1-generate-preview,veo-3.1-fast-generate-preview:4 | 8(Confirm against
@tanstack/ai-schemasGemini endpoint Zod map before locking the constants — schema should be the source of truth.)API surface
Veo uses Google's
:predictLongRunningendpoint. Map:createVideoJob→POST {model}:predictLongRunningwithparameters: { durationSeconds }.getVideoStatus→GET /operations/{name}and mapdone/error.getVideoUrl→ extractresponse.generatedSamples[0].video.uri(GCS signed URL).Acceptance
geminiVideo('veo-3.0-generate-001')hasduration?: 4 | 8typed at compile time.adapter.availableDurations()returns{ kind: 'discrete', values: [4, 8] }.adapter.snapDuration(7)returns8.