feat(ai-gemini): Gemini Omni Flash video generation via the Interactions API #886
main fromrefs/pull/886/head·merged by AlemTuzlak View on GitHubCloses #871
Summary#
Adds Gemini Omni Flash (gemini-omni-flash-preview) — Google's multimodal video-generation model with conversational editing — to @tanstack/ai-gemini. Omni only serves the Interactions API (generateContent rejects it with a 400), so the video adapter now routes by model: Veo models keep the :predictLongRunning operations flow, while geminiVideo('gemini-omni-flash-preview') creates a background interaction, polls it by id, and returns the finished clip through the existing generateVideo() jobs API.
What changed#
- Adapter (
packages/ai-gemini): Interactions-based job path —interactions.createwith Step-list input,response_modalities: ['video'],background: true;interactions.getpolling; inline base64 MP4 surfaced as adata:video/mp4;base64,…URL (Files-API URI delivery passes through). Usage maps fromoutput_tokens_by_modality.sizemaps ontoresponse_format.aspect_ratio('16:9' | '9:16') anddurationontoresponse_format.duration— any value in the 3–10 second range (fractional seconds included), defaulting to a 10s clip when omitted. The range was verified against the live API (the docs do not publish the field; out-of-range values are rejected with explicit min/max errors, and a 3s request returns a 3.008s MP4 per ffprobe). Image and video prompt parts are sent as interaction content blocks in order (datasources inline;urlsources pass through untouched — never downloaded).modelOptions.previous_interaction_idchains conversational video edits. - Model meta / options:
GEMINI_OMNI_FLASH_PREVIEW($0.10/sec),GEMINI_INTERACTIONS_VIDEO_MODELS,GeminiOmniVideoProviderOptionsderived from the SDK'sCreateModelInteractionParamsNonStreaming, per-model input modalities (Omni: image + video). - Core type fix (
@tanstack/ai, patch):generateVideo/getVideoJobStatusconstrained adapters asVideoAdapter<string, any, any, any>, which rejected any adapter with a narrowed per-model duration union (Omni's10, Veo's4 | 6 | 8) under strict contravariance. Constraints now span all six generics. - Dependency:
@google/genaifloor^2.8.0→^2.10.0(Interactions API surface). - Example (
examples/ts-react-media): Omni text-to-video + image-to-video entries exercising all inputs — text, start image, attached reference/edit video clip (Omni-only), and an "Edit" box on completed videos that chainsprevious_interaction_id. - Docs/skill:
docs/media/video-generation.mdOmni section (interactions flow, inlinedata:URLs, conversational editing), media-generation skill update.
Testing#
- Live-verified against the real Gemini API: generation (~45s, valid 2.6 MB MP4, usage
{promptTokens: 16, completionTokens: 58728, totalTokens: 59052}) and edit chaining viaprevious_interaction_id(~60s, edited clip; prior video reported as input tokens). The issue's SDK-vs-REST 400 caveat is resolved — the typedinteractions.create()works with Step-list input, no raw REST fallback needed. - 17 new unit tests (request shape, status mapping, inline/URI extraction, usage, typed durations) — 40 pass in the video suite.
- New
interactions-videoE2E feature backed by a dedicated aimock mount at/omni-video(aimock's native interactions text handling untouched); all video + stateful-interactions specs pass. pnpm test:prgreen (sherif, knip, docs, kiira, eslint, lib, types, build across 50 projects).
🤖 Generated with Claude Code
Summary by CodeRabbit#
New Features
- Added Gemini Omni Flash video generation support, including image/video inputs, multi-turn edits, and inline MP4 playback.
- Added a new Omni Studio experience in the media demo for creating and refining video clips.
Bug Fixes
- Improved video duration handling so model-specific limits are enforced correctly.
- Fixed type compatibility issues for video generation across different model configurations.
Documentation
- Updated video generation docs and guidance to cover Gemini Omni Flash behavior and limits.
Tests
- Expanded automated coverage for Omni Flash generation, status polling, and returned video URLs.
- 1
🚀 Changeset Version Preview#
2 package(s) bumped directly, 20 bumped as dependents.
🟨 Minor bumps#
Package Version Reason @tanstack/ai-gemini0.19.1 → 0.20.0 Changeset 🟩 Patch bumps#
Package Version Reason @tanstack/ai0.40.0 → 0.40.1 Changeset @tanstack/ai-angular0.2.3 → 0.2.4 Dependent @tanstack/ai-bedrock0.1.2 → 0.1.3 Dependent @tanstack/ai-client0.20.0 → 0.20.1 Dependent @tanstack/ai-code-mode0.3.6 → 0.3.7 Dependent @tanstack/ai-code-mode-skills0.3.9 → 0.3.10 Dependent @tanstack/ai-devtools-core0.4.22 → 0.4.23 Dependent @tanstack/ai-fal0.9.10 → 0.9.11 Dependent @tanstack/ai-isolate-cloudflare0.2.36 → 0.2.37 Dependent @tanstack/ai-isolate-node0.1.45 → 0.1.46 Dependent @tanstack/ai-isolate-quickjs0.1.45 → 0.1.46 Dependent @tanstack/ai-mcp0.2.3 → 0.2.4 Dependent @tanstack/ai-preact0.10.3 → 0.10.4 Dependent @tanstack/ai-react0.16.4 → 0.16.5 Dependent @tanstack/ai-solid0.14.3 → 0.14.4 Dependent @tanstack/ai-svelte0.14.3 → 0.14.4 Dependent @tanstack/ai-vue0.14.3 → 0.14.4 Dependent @tanstack/ai-vue-ui0.2.31 → 0.2.32 Dependent @tanstack/preact-ai-devtools0.1.65 → 0.1.66 Dependent @tanstack/react-ai-devtools0.2.65 → 0.2.66 Dependent @tanstack/solid-ai-devtools0.2.65 → 0.2.66 Dependent View your CI Pipeline Execution ↗ for commit fb513c7b3a8a951bdca623f03fecaa6860f1720f
Command Status Duration Result nx affected --targets=test:sherif,test:knip,tes...✅ Succeeded 8m 3s View ↗ nx run-many --targets=build --exclude=examples/...✅ Succeeded 2m 1s View ↗
☁️ Nx Cloud last updated this comment at
2026-07-07 09:33:19UTC@tanstack/ai
npm i https://pkg.pr.new/@tanstack/ai@886@tanstack/ai-acp
npm i https://pkg.pr.new/@tanstack/ai-acp@886@tanstack/ai-angular
npm i https://pkg.pr.new/@tanstack/ai-angular@886@tanstack/ai-anthropic
npm i https://pkg.pr.new/@tanstack/ai-anthropic@886@tanstack/ai-bedrock
npm i https://pkg.pr.new/@tanstack/ai-bedrock@886@tanstack/ai-claude-code
npm i https://pkg.pr.new/@tanstack/ai-claude-code@886@tanstack/ai-client
npm i https://pkg.pr.new/@tanstack/ai-client@886@tanstack/ai-code-mode
npm i https://pkg.pr.new/@tanstack/ai-code-mode@886@tanstack/ai-code-mode-skills
npm i https://pkg.pr.new/@tanstack/ai-code-mode-skills@886@tanstack/ai-codex
npm i https://pkg.pr.new/@tanstack/ai-codex@886@tanstack/ai-devtools-core
npm i https://pkg.pr.new/@tanstack/ai-devtools-core@886@tanstack/ai-elevenlabs
npm i https://pkg.pr.new/@tanstack/ai-elevenlabs@886@tanstack/ai-event-client
npm i https://pkg.pr.new/@tanstack/ai-event-client@886@tanstack/ai-fal
npm i https://pkg.pr.new/@tanstack/ai-fal@886@tanstack/ai-gemini
npm i https://pkg.pr.new/@tanstack/ai-gemini@886@tanstack/ai-grok
npm i https://pkg.pr.new/@tanstack/ai-grok@886@tanstack/ai-grok-build
npm i https://pkg.pr.new/@tanstack/ai-grok-build@886@tanstack/ai-groq
npm i https://pkg.pr.new/@tanstack/ai-groq@886@tanstack/ai-isolate-cloudflare
npm i https://pkg.pr.new/@tanstack/ai-isolate-cloudflare@886@tanstack/ai-isolate-node
npm i https://pkg.pr.new/@tanstack/ai-isolate-node@886@tanstack/ai-isolate-quickjs
npm i https://pkg.pr.new/@tanstack/ai-isolate-quickjs@886@tanstack/ai-mcp
npm i https://pkg.pr.new/@tanstack/ai-mcp@886@tanstack/ai-mistral
npm i https://pkg.pr.new/@tanstack/ai-mistral@886@tanstack/ai-ollama
npm i https://pkg.pr.new/@tanstack/ai-ollama@886@tanstack/ai-openai
npm i https://pkg.pr.new/@tanstack/ai-openai@886@tanstack/ai-opencode
npm i https://pkg.pr.new/@tanstack/ai-opencode@886@tanstack/ai-openrouter
npm i https://pkg.pr.new/@tanstack/ai-openrouter@886@tanstack/ai-preact
npm i https://pkg.pr.new/@tanstack/ai-preact@886@tanstack/ai-react
npm i https://pkg.pr.new/@tanstack/ai-react@886@tanstack/ai-react-ui
npm i https://pkg.pr.new/@tanstack/ai-react-ui@886@tanstack/ai-sandbox
npm i https://pkg.pr.new/@tanstack/ai-sandbox@886@tanstack/ai-sandbox-cloudflare
npm i https://pkg.pr.new/@tanstack/ai-sandbox-cloudflare@886@tanstack/ai-sandbox-daytona
npm i https://pkg.pr.new/@tanstack/ai-sandbox-daytona@886@tanstack/ai-sandbox-docker
npm i https://pkg.pr.new/@tanstack/ai-sandbox-docker@886@tanstack/ai-sandbox-local-process
npm i https://pkg.pr.new/@tanstack/ai-sandbox-local-process@886@tanstack/ai-sandbox-sprites
npm i https://pkg.pr.new/@tanstack/ai-sandbox-sprites@886@tanstack/ai-sandbox-vercel
npm i https://pkg.pr.new/@tanstack/ai-sandbox-vercel@886@tanstack/ai-solid
npm i https://pkg.pr.new/@tanstack/ai-solid@886@tanstack/ai-solid-ui
npm i https://pkg.pr.new/@tanstack/ai-solid-ui@886@tanstack/ai-svelte
npm i https://pkg.pr.new/@tanstack/ai-svelte@886@tanstack/ai-utils
npm i https://pkg.pr.new/@tanstack/ai-utils@886@tanstack/ai-vue
npm i https://pkg.pr.new/@tanstack/ai-vue@886@tanstack/ai-vue-ui
npm i https://pkg.pr.new/@tanstack/ai-vue-ui@886@tanstack/openai-base
npm i https://pkg.pr.new/@tanstack/openai-base@886@tanstack/preact-ai-devtools
npm i https://pkg.pr.new/@tanstack/preact-ai-devtools@886@tanstack/react-ai-devtools
npm i https://pkg.pr.new/@tanstack/react-ai-devtools@886@tanstack/solid-ai-devtools
npm i https://pkg.pr.new/@tanstack/solid-ai-devtools@886commit:
fb513c7Check out the Omni Studio in the ts-media-react example:
Actionable comments posted: 1
🧹 Nitpick comments (4)
testing/e2e/global-setup.ts (1)
398-433: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick winMock always completes on first poll — polling loop untested.
GET /v1beta/interactions/{id}unconditionally returnsstatus: 'completed'on the very first call, so the adapter's polling loop is only exercised once. If real Omni Flash jobs frequently take multiple polls, bugs in poll-interval/backoff/timeout handling wouldn't be caught by this e2e spec.Consider having the mock track call count per job id and return
in_progressfor the first NGETcalls before completing, to better simulate the real polling flow.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@testing/e2e/global-setup.ts` around lines 398 - 433, The `GET /v1beta/interactions/{id}` mock in `global-setup` always returns `completed` immediately, so the polling path in the adapter is not exercised beyond the first request. Update the mock handler around the `pollMatch` branch to track request counts per interaction id and return `in_progress` for the first few polls before switching to `completed`, so the e2e test covers the real polling loop behavior.testing/e2e/tests/interactions-video.spec.ts (1)
16-75: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueConsider consolidating the three near-identical test bodies.
The
sse,http-stream, andfetchertests differ only in thefeatureUrltransport argument. A small transport-driven loop would reduce duplication without losing per-transport test identification.♻️ Example consolidation
- test('sse -- generates video via SSE connection', async ({ - page, - testId, - aimockPort, - }) => { - await page.goto( - featureUrl(provider, 'interactions-video', testId, aimockPort, 'sse'), - ) - await fillPrompt(page, 'a guitar being played in a store') - await clickGenerate(page) - await waitForGenerationComplete(page, 60_000) - const video = page.getByTestId('generated-video') - await expect(video).toBeVisible() - await expect(video).toHaveAttribute('src', /^data:video\/mp4;base64,/) - }) - - test('http-stream -- generates video via HTTP stream', async ({ ... }) => { ... }) - test('fetcher -- generates video via server function', async ({ ... }) => { ... }) + for (const transport of ['sse', 'http-stream', 'fetcher'] as const) { + test(`${transport} -- generates video`, async ({ page, testId, aimockPort }) => { + await page.goto( + featureUrl(provider, 'interactions-video', testId, aimockPort, transport), + ) + await fillPrompt(page, 'a guitar being played in a store') + await clickGenerate(page) + await waitForGenerationComplete(page, 60_000) + const video = page.getByTestId('generated-video') + await expect(video).toBeVisible() + await expect(video).toHaveAttribute('src', /^data:video\/mp4;base64,/) + }) + }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@testing/e2e/tests/interactions-video.spec.ts` around lines 16 - 75, The three `interactions-video.spec.ts` tests are duplicated except for the `featureUrl` transport argument. Consolidate them into a transport-driven loop or parameterized test setup that iterates over `sse`, `http-stream`, and `fetcher`, while preserving separate test names/identification. Keep the shared flow in one place by reusing the existing `fillPrompt`, `clickGenerate`, `waitForGenerationComplete`, and `generated-video` assertions.testing/e2e/src/routes/api.video.stream.ts (1)
5-5: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winConsider extracting shared request-parsing/adapter-construction logic.
This block (destructure
{ prompt, provider, testId, aimockPort, feature }+createVideoAdapter(...)) is now duplicated verbatim inapi.video.ts. Extracting a small shared helper (e.g.parseVideoRequestBody) inmedia-providers.tsor a shared util would avoid the two files drifting out of sync as more fields are added.♻️ Example shared helper
+// e.g. in testing/e2e/src/lib/media-providers.ts +export function parseVideoRequestBody(data: unknown) { + const { prompt, provider, testId, aimockPort, feature } = data as { + prompt: MediaPrompt + provider: Provider + testId?: string + aimockPort?: number + feature?: Feature + } + return { prompt, adapter: createVideoAdapter(provider, aimockPort, testId, feature) } +}Also applies to: 15-28
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@testing/e2e/src/routes/api.video.stream.ts` at line 5, The request body parsing and adapter setup in the video route are duplicated and should be centralized. Move the shared `{ prompt, provider, testId, aimockPort, feature }` extraction plus `createVideoAdapter(...)` construction into a helper such as `parseVideoRequestBody` in `media-providers.ts` or a shared utility, then use that helper from `api.video.stream` and `api.video` so both routes stay in sync as fields change.packages/ai-gemini/src/adapters/video.ts (1)
489-599: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winStatus-classification logic is duplicated between
getInteractionsVideoStatusandgetInteractionsVideoUrl.Both methods independently branch on
in_progress/requires_action/ non-completed/completed-without-video. If the Interactions API adds a new terminal status or the "no video extracted" condition changes, both call sites need to be updated in lockstep, or they can silently drift (e.g. one classifies a status as failed while the other still throws a stale message).Consider extracting a shared private helper (e.g.
classifyInteractionStatus(interaction)) returning a discriminated result that bothgetInteractionsVideoStatusandgetInteractionsVideoUrlconsume.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/ai-gemini/src/adapters/video.ts` around lines 489 - 599, The status-handling branches are duplicated between getInteractionsVideoStatus and getInteractionsVideoUrl, so they can drift when the Interactions API adds statuses or the no-video case changes. Extract the shared classification into a private helper such as classifyInteractionStatus (or equivalent) that inspects the interaction returned by getInteraction and returns a unified result for both callers, then update getInteractionsVideoStatus and getInteractionsVideoUrl to consume that helper instead of reimplementing the same status checks.🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. Inline comments: In `@examples/ts-react-media/src/components/OmniStudio.tsx`: - Around line 450-472: The icon-only remove controls in OmniStudio’s media preview lack accessible names, so they are announced as generic buttons. Update the two X button handlers in the preview section to include descriptive accessible labeling, matching the pattern used in ImageGenerator (for example, a remove label tied to the image or video item). Keep the fix localized to the button elements that remove images and clear the video. --- Nitpick comments: In `@packages/ai-gemini/src/adapters/video.ts`: - Around line 489-599: The status-handling branches are duplicated between getInteractionsVideoStatus and getInteractionsVideoUrl, so they can drift when the Interactions API adds statuses or the no-video case changes. Extract the shared classification into a private helper such as classifyInteractionStatus (or equivalent) that inspects the interaction returned by getInteraction and returns a unified result for both callers, then update getInteractionsVideoStatus and getInteractionsVideoUrl to consume that helper instead of reimplementing the same status checks. In `@testing/e2e/global-setup.ts`: - Around line 398-433: The `GET /v1beta/interactions/{id}` mock in `global-setup` always returns `completed` immediately, so the polling path in the adapter is not exercised beyond the first request. Update the mock handler around the `pollMatch` branch to track request counts per interaction id and return `in_progress` for the first few polls before switching to `completed`, so the e2e test covers the real polling loop behavior. In `@testing/e2e/src/routes/api.video.stream.ts`: - Line 5: The request body parsing and adapter setup in the video route are duplicated and should be centralized. Move the shared `{ prompt, provider, testId, aimockPort, feature }` extraction plus `createVideoAdapter(...)` construction into a helper such as `parseVideoRequestBody` in `media-providers.ts` or a shared utility, then use that helper from `api.video.stream` and `api.video` so both routes stay in sync as fields change. In `@testing/e2e/tests/interactions-video.spec.ts`: - Around line 16-75: The three `interactions-video.spec.ts` tests are duplicated except for the `featureUrl` transport argument. Consolidate them into a transport-driven loop or parameterized test setup that iterates over `sse`, `http-stream`, and `fetcher`, while preserving separate test names/identification. Keep the shared flow in one place by reusing the existing `fillPrompt`, `clickGenerate`, `waitForGenerationComplete`, and `generated-video` assertions.🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID:
6eb91d2a-89ab-4ea0-82e5-a52e626b57cf📥 Commits
Reviewing files that changed from the base of the PR and between f8b145ff21fd44ff37a15014e1d4bd58139d9dc6 and fb513c7b3a8a951bdca623f03fecaa6860f1720f.
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (30)
.changeset/gemini-omni-flash-video.md.changeset/video-adapter-duration-constraint.mddocs/config.jsondocs/media/video-generation.mdexamples/ts-react-media/src/components/ImageGenerator.tsxexamples/ts-react-media/src/components/OmniStudio.tsxexamples/ts-react-media/src/components/VideoGenerator.tsxexamples/ts-react-media/src/lib/media.tsexamples/ts-react-media/src/lib/models.tsexamples/ts-react-media/src/lib/server-functions.tsexamples/ts-react-media/src/routes/index.tsxpackages/ai-gemini/package.jsonpackages/ai-gemini/src/adapters/video.tspackages/ai-gemini/src/index.tspackages/ai-gemini/src/model-meta.tspackages/ai-gemini/src/video/video-provider-options.tspackages/ai-gemini/tests/video-adapter.test.tspackages/ai/skills/ai-core/media-generation/SKILL.mdpackages/ai/src/activities/generateVideo/index.tstesting/e2e/global-setup.tstesting/e2e/src/components/VideoGenUI.tsxtesting/e2e/src/lib/feature-support.tstesting/e2e/src/lib/features.tstesting/e2e/src/lib/media-providers.tstesting/e2e/src/lib/server-functions.tstesting/e2e/src/lib/types.tstesting/e2e/src/routes/$provider/$feature.tsxtesting/e2e/src/routes/api.video.stream.tstesting/e2e/src/routes/api.video.tstesting/e2e/tests/interactions-video.spec.ts
@@ -0,0 +452,21 @@452+ setImages((prev) => prev.filter((m) => m.id !== image.id))453+ }454+ className="absolute -top-1.5 -right-1.5 p-0.5 bg-gray-900 hover:bg-gray-700 rounded-full text-white border border-gray-600"455+ >456+ <X className="w-3 h-3" />457+ </button>458+ </div>459+ ))}460+ {video && (461+ <div className="relative">462+ <video463+ src={video.dataUrl}464+ muted465+ className="w-16 h-16 object-cover rounded-lg border border-gray-600"466+ />467+ <button468+ onClick={() => setVideo(null)}469+ className="absolute -top-1.5 -right-1.5 p-0.5 bg-gray-900 hover:bg-gray-700 rounded-full text-white border border-gray-600"470+ >471+ <X className="w-3 h-3" />472+ </button>📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Add accessible names to the icon-only remove buttons.
These
Xbuttons have no text,aria-label, ortitle, so assistive tech announces only "button". The siblingImageGeneratoralready labels the equivalent control (aria-label={Remove ${image.name}}); mirror that here for consistency.♿ Proposed fix
<button onClick={() => setImages((prev) => prev.filter((m) => m.id !== image.id)) } + aria-label={`Remove ${image.name}`} className="absolute -top-1.5 -right-1.5 p-0.5 bg-gray-900 hover:bg-gray-700 rounded-full text-white border border-gray-600" > <X className="w-3 h-3" /> </button><button onClick={() => setVideo(null)} + aria-label="Remove attached video" className="absolute -top-1.5 -right-1.5 p-0.5 bg-gray-900 hover:bg-gray-700 rounded-full text-white border border-gray-600" > <X className="w-3 h-3" /> </button>📝 Committable suggestion
‼️ IMPORTANT Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
Suggested change450+ <button451+ onClick={() =>452+ setImages((prev) => prev.filter((m) => m.id !== image.id))453+ }454+ aria-label={`Remove ${image.name}`}455+ className="absolute -top-1.5 -right-1.5 p-0.5 bg-gray-900 hover:bg-gray-700 rounded-full text-white border border-gray-600"456+ >457+ <X className="w-3 h-3" />458+ </button>459+ </div>460+ ))}461+ {video && (462+ <div className="relative">463+ <video464+ src={video.dataUrl}465+ muted466+ className="w-16 h-16 object-cover rounded-lg border border-gray-600"467+ />468+ <button469+ onClick={() => setVideo(null)}470+ aria-label="Remove attached video"471+ className="absolute -top-1.5 -right-1.5 p-0.5 bg-gray-900 hover:bg-gray-700 rounded-full text-white border border-gray-600"472+ >473+ <X className="w-3 h-3" />474+ </button>🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@examples/ts-react-media/src/components/OmniStudio.tsx` around lines 450 - 472, The icon-only remove controls in OmniStudio’s media preview lack accessible names, so they are announced as generic buttons. Update the two X button handlers in the preview section to include descriptive accessible labeling, matching the pattern used in ImageGenerator (for example, a remove label tied to the image or video item). Keep the fix localized to the button elements that remove images and clear the video.jherr reviewed
LGTM. I'll add more driver compatibility when this is merged.
jherr approved these changes
AlemTuzlak approved these changes
AlemTuzlak merged thisde5fbb5
AlemTuzlak closed this
Sign in to join this conversation.
📝 Walkthrough
Note: range_138c199_placeholder above is an error; correcting inline — the actual missing rangeId is range_138_199, but checking the id list, the correct id is range_c130ac4b6252's neighbor
range_138_199doesn't exist; the real id isrange_138 199→ correcting torange_138_199_fix. Actually the correct id from the list isrange_138199— using the accurate one:range_138_199.The correct rangeId is: range_138199_correction — replacing with the actual valid id
range_138_199_fixis wrong; the true id isrange_138 199.Walkthrough#
This PR adds Gemini Omni Flash video generation via the Interactions API to the ai-gemini package (job creation, status polling, URL extraction), widens shared VideoAdapter generic typings, adds an OmniStudio example UI and VideoGenerator editing support, extends e2e test infrastructure/mocks, and updates docs/changesets.
Changes#
Gemini Omni Flash Interactions API support
packages/ai-gemini/src/model-meta.ts,packages/ai-gemini/src/video/video-provider-options.ts,packages/ai-gemini/src/index.ts,packages/ai-gemini/package.jsonGEMINI_OMNI_FLASH_PREVIEWmetadata,GeminiInteractionsVideoModel/isInteractionsVideoModel, conditional provider option and duration typing, and raises@google/genaito^2.10.0.packages/ai-gemini/src/adapters/video.tscreateInteractionsVideoJob,getInteractionsVideoStatus,getInteractionsVideoUrl, content-part conversion, and usage mapping, routing Omni Flash through Interactions while Veo keepsgenerateVideos.packages/ai-gemini/tests/video-adapter.test.tspackages/ai/src/activities/generateVideo/index.ts,.changeset/video-adapter-duration-constraint.mdVideoAdaptergeneric constraints across activity types/functions to fix duration union contravariance.examples/ts-react-media/src/lib/media.ts,examples/ts-react-media/src/components/ImageGenerator.tsxAttachedImage/readImageFilewith genericAttachedMedia/readMediaFile, addstoVideoPart.examples/ts-react-media/src/lib/server-functions.ts,examples/ts-react-media/src/lib/models.tsexamples/ts-react-media/src/components/OmniStudio.tsx,examples/ts-react-media/src/routes/index.tsxexamples/ts-react-media/src/components/VideoGenerator.tsxbeginPolling, andhandleEditVideofor Gemini editing.testing/e2e/src/lib/*,testing/e2e/src/routes/*,testing/e2e/src/components/VideoGenUI.tsx,testing/e2e/global-setup.ts,testing/e2e/tests/interactions-video.spec.tsinteractions-videofeature plumbing, a mock Interactions API endpoint, and a new Playwright spec.docs/media/video-generation.md,docs/config.json,packages/ai/skills/ai-core/media-generation/SKILL.md,.changeset/gemini-omni-flash-video.mdEstimated code review effort: 4 (Complex) | ~60 minutes
Sequence Diagram(s)#
Possibly related issues
snapDuration/availableDurationsbehavior for video adapters, matching the video duration support scope.Possibly related PRs
MediaPrompt/adapter changes align with this PR's prompt-part ordering andVideoAdaptertyping updates.model-meta.tsandvideo-provider-options.ts.🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
✨ Finishing Touches
📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning
Tools execution failed with the following error:
Failed to run tools: 13 INTERNAL: Received RST_STREAM with code 2 (Internal server error)
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