Skip to content

feat(ai-gemini): drop retired media models, add Veo 3.1 Lite#875

Merged
AlemTuzlak merged 1 commit into
mainfrom
gemini-drop-retired-media-models
Jul 1, 2026
Merged

feat(ai-gemini): drop retired media models, add Veo 3.1 Lite#875
AlemTuzlak merged 1 commit into
mainfrom
gemini-drop-retired-media-models

Conversation

@tombeckenham

@tombeckenham tombeckenham commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

🎯 Changes

Removes Gemini media models that are no longer reachable via the Gemini Developer API, and adds the new Veo 3.1 Lite model.

Verified against the live API (GET /v1beta/models/{id}): the following all return 404 NOT_FOUND, while gemini-3.1-flash-image-preview, veo-3.1-generate-preview, and imagen-4.0-* return 200 — so the 404s are real deprecations, not an access issue:

Removed model Reason
imagen-3.0-generate-002 404 — superseded by the Imagen 4 family
veo-2.0-generate-001 404 — superseded by Veo 3.1
veo-3.0-generate-001 404 — superseded by Veo 3.1
veo-3.0-fast-generate-001 404 — superseded by Veo 3.1

Added: veo-3.1-lite-generate-preview (Veo 3.1 Lite) — the lowest-cost Veo 3.1 tier ($0.05/sec, 720p, video + audio), durations 4 | 6 | 8.

Changes:

  • model-meta.ts: remove the four consts + their GEMINI_IMAGE_MODELS / GEMINI_VIDEO_MODELS entries; add VEO_3_1_LITE_PREVIEW.
  • video/video-provider-options.ts: drop retired models from GeminiVideoModelDurationByName + GEMINI_VIDEO_DURATIONS; add veo-3.1-lite-generate-preview. (No model has the old Veo-2 5|6|8 set anymore.)
  • image/image-provider-options.ts: drop imagen-3.0-generate-002 from the per-model image caps.
  • Update unit tests (swap retired fixtures to veo-3.1-lite-generate-preview / imagen-4.0-generate-001; remove the Veo-2-specific duration tests) and docs.

Migration: if you referenced a removed id, use a current model — imagen-4.0-generate-001, veo-3.1-generate-preview, or veo-3.1-lite-generate-preview.

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested this code locally with pnpm run test:pr.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

Summary by CodeRabbit

  • New Features

    • Added support for a new Gemini Veo preview model with updated video duration options.
    • Expanded image generation support to newer Imagen 4 models.
  • Bug Fixes

    • Removed retired image and video model IDs from the available model lists.
    • Updated examples and guidance to use currently supported models.
  • Documentation

    • Refreshed Gemini docs and code examples to match the latest model names and capabilities.

Four media models now return 404 NOT_FOUND from the Gemini Developer API
and are removed from the adapter's model lists + type maps:
imagen-3.0-generate-002, veo-2.0-generate-001, veo-3.0-generate-001,
veo-3.0-fast-generate-001.

Add veo-3.1-lite-generate-preview (Veo 3.1 Lite) — the lowest-cost Veo 3.1
tier ($0.05/sec, 720p, video+audio), durations 4|6|8. Update the video
duration maps, Imagen image caps, unit tests, and docs accordingly.

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

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: cfbb8eb1-7dea-4358-9cf4-f43151678670

📥 Commits

Reviewing files that changed from the base of the PR and between 00505fe and b33acb9.

📒 Files selected for processing (11)
  • .changeset/gemini-drop-retired-media-models.md
  • docs/adapters/gemini.md
  • docs/config.json
  • docs/media/image-generation.md
  • docs/media/video-generation.md
  • packages/ai-gemini/src/adapters/image.ts
  • packages/ai-gemini/src/image/image-provider-options.ts
  • packages/ai-gemini/src/model-meta.ts
  • packages/ai-gemini/src/video/video-provider-options.ts
  • packages/ai-gemini/tests/image-adapter.test.ts
  • packages/ai-gemini/tests/video-adapter.test.ts
💤 Files with no reviewable changes (2)
  • docs/adapters/gemini.md
  • docs/media/image-generation.md

📝 Walkthrough

Walkthrough

This PR retires legacy Gemini media models (Imagen 3.0, Veo 3.0/2.0 variants) and introduces Imagen 4 image models and a Veo 3.1 Lite video model. Changes span model metadata, provider option duration/cap tables, adapter JSDoc examples, documentation, a changeset, and corresponding test updates.

Changes

Gemini Model Catalog Update

Layer / File(s) Summary
Model metadata catalog
packages/ai-gemini/src/model-meta.ts
Removes IMAGEN_3 and adds VEO_3_1_LITE_PREVIEW with pricing; updates GEMINI_IMAGE_MODELS and GEMINI_VIDEO_MODELS exported arrays accordingly.
Image provider options and docs
packages/ai-gemini/src/image/image-provider-options.ts, packages/ai-gemini/src/adapters/image.ts
Refines the image cap comment and updates the createGeminiImage JSDoc example to reference Imagen 4.
Video duration mapping
packages/ai-gemini/src/video/video-provider-options.ts
Replaces retired Veo duration entries with veo-3.1-lite-generate-preview mapped to durations [4, 6, 8].
Image adapter tests
packages/ai-gemini/tests/image-adapter.test.ts
Updates model instantiations and assertions from Imagen 3.0 to Imagen 4.0 across size, count, and prompt validation tests.
Video adapter tests
packages/ai-gemini/tests/video-adapter.test.ts
Switches adapter instantiations from Veo 3.0/2.0 to Veo 3.1 Lite across duration, snapDuration, job creation, and error tests.
Docs, config, and changeset
docs/adapters/gemini.md, docs/media/image-generation.md, docs/media/video-generation.md, docs/config.json, .changeset/gemini-drop-retired-media-models.md
Updates model tables/examples to Imagen 4 and Veo 3.1 Lite, refreshes updatedAt timestamps, and documents the minor release with migration guidance.

Estimated code review effort: 2 (Simple) | ~15 minutes

Possibly related issues

Poem

A hop, a skip, old models retire,
Imagen 4 and Veo Lite catch fire! 🐇
Out with the 3.0, in with the new,
Durations of four, six, eight too.
Docs all updated, tests all pass —
This bunny's release notes are pure class! 🥕

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: removing retired Gemini media models and adding Veo 3.1 Lite.
Description check ✅ Passed The description follows the template and includes changes, checklist items, release impact, and migration guidance.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ 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 gemini-drop-retired-media-models

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.

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

🚀 Changeset Version Preview

3 package(s) bumped directly, 0 bumped as dependents.

🟨 Minor bumps

Package Version Reason
@tanstack/ai-gemini 0.18.4 → 0.19.0 Changeset

🟩 Patch bumps

Package Version Reason
@tanstack/ai-anthropic 0.15.12 → 0.15.13 Changeset
@tanstack/ai-react 0.16.1 → 0.16.2 Changeset

@nx-cloud

nx-cloud Bot commented Jul 1, 2026

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit b33acb9

Command Status Duration Result
nx run-many --targets=build --exclude=examples/... ✅ Succeeded 2s View ↗

☁️ Nx Cloud last updated this comment at 2026-07-01 02:56:58 UTC

@pkg-pr-new

pkg-pr-new Bot commented Jul 1, 2026

Copy link
Copy Markdown

Open in StackBlitz

@tanstack/ai

npm i https://pkg.pr.new/@tanstack/ai@875

@tanstack/ai-acp

npm i https://pkg.pr.new/@tanstack/ai-acp@875

@tanstack/ai-angular

npm i https://pkg.pr.new/@tanstack/ai-angular@875

@tanstack/ai-anthropic

npm i https://pkg.pr.new/@tanstack/ai-anthropic@875

@tanstack/ai-bedrock

npm i https://pkg.pr.new/@tanstack/ai-bedrock@875

@tanstack/ai-claude-code

npm i https://pkg.pr.new/@tanstack/ai-claude-code@875

@tanstack/ai-client

npm i https://pkg.pr.new/@tanstack/ai-client@875

@tanstack/ai-code-mode

npm i https://pkg.pr.new/@tanstack/ai-code-mode@875

@tanstack/ai-code-mode-skills

npm i https://pkg.pr.new/@tanstack/ai-code-mode-skills@875

@tanstack/ai-codex

npm i https://pkg.pr.new/@tanstack/ai-codex@875

@tanstack/ai-devtools-core

npm i https://pkg.pr.new/@tanstack/ai-devtools-core@875

@tanstack/ai-elevenlabs

npm i https://pkg.pr.new/@tanstack/ai-elevenlabs@875

@tanstack/ai-event-client

npm i https://pkg.pr.new/@tanstack/ai-event-client@875

@tanstack/ai-fal

npm i https://pkg.pr.new/@tanstack/ai-fal@875

@tanstack/ai-gemini

npm i https://pkg.pr.new/@tanstack/ai-gemini@875

@tanstack/ai-grok

npm i https://pkg.pr.new/@tanstack/ai-grok@875

@tanstack/ai-grok-build

npm i https://pkg.pr.new/@tanstack/ai-grok-build@875

@tanstack/ai-groq

npm i https://pkg.pr.new/@tanstack/ai-groq@875

@tanstack/ai-isolate-cloudflare

npm i https://pkg.pr.new/@tanstack/ai-isolate-cloudflare@875

@tanstack/ai-isolate-node

npm i https://pkg.pr.new/@tanstack/ai-isolate-node@875

@tanstack/ai-isolate-quickjs

npm i https://pkg.pr.new/@tanstack/ai-isolate-quickjs@875

@tanstack/ai-mcp

npm i https://pkg.pr.new/@tanstack/ai-mcp@875

@tanstack/ai-mistral

npm i https://pkg.pr.new/@tanstack/ai-mistral@875

@tanstack/ai-ollama

npm i https://pkg.pr.new/@tanstack/ai-ollama@875

@tanstack/ai-openai

npm i https://pkg.pr.new/@tanstack/ai-openai@875

@tanstack/ai-opencode

npm i https://pkg.pr.new/@tanstack/ai-opencode@875

@tanstack/ai-openrouter

npm i https://pkg.pr.new/@tanstack/ai-openrouter@875

@tanstack/ai-preact

npm i https://pkg.pr.new/@tanstack/ai-preact@875

@tanstack/ai-react

npm i https://pkg.pr.new/@tanstack/ai-react@875

@tanstack/ai-react-ui

npm i https://pkg.pr.new/@tanstack/ai-react-ui@875

@tanstack/ai-sandbox

npm i https://pkg.pr.new/@tanstack/ai-sandbox@875

@tanstack/ai-sandbox-cloudflare

npm i https://pkg.pr.new/@tanstack/ai-sandbox-cloudflare@875

@tanstack/ai-sandbox-daytona

npm i https://pkg.pr.new/@tanstack/ai-sandbox-daytona@875

@tanstack/ai-sandbox-docker

npm i https://pkg.pr.new/@tanstack/ai-sandbox-docker@875

@tanstack/ai-sandbox-local-process

npm i https://pkg.pr.new/@tanstack/ai-sandbox-local-process@875

@tanstack/ai-sandbox-vercel

npm i https://pkg.pr.new/@tanstack/ai-sandbox-vercel@875

@tanstack/ai-solid

npm i https://pkg.pr.new/@tanstack/ai-solid@875

@tanstack/ai-solid-ui

npm i https://pkg.pr.new/@tanstack/ai-solid-ui@875

@tanstack/ai-svelte

npm i https://pkg.pr.new/@tanstack/ai-svelte@875

@tanstack/ai-utils

npm i https://pkg.pr.new/@tanstack/ai-utils@875

@tanstack/ai-vue

npm i https://pkg.pr.new/@tanstack/ai-vue@875

@tanstack/ai-vue-ui

npm i https://pkg.pr.new/@tanstack/ai-vue-ui@875

@tanstack/openai-base

npm i https://pkg.pr.new/@tanstack/openai-base@875

@tanstack/preact-ai-devtools

npm i https://pkg.pr.new/@tanstack/preact-ai-devtools@875

@tanstack/react-ai-devtools

npm i https://pkg.pr.new/@tanstack/react-ai-devtools@875

@tanstack/solid-ai-devtools

npm i https://pkg.pr.new/@tanstack/solid-ai-devtools@875

commit: b33acb9

@tombeckenham tombeckenham requested a review from a team July 1, 2026 03:10
@AlemTuzlak AlemTuzlak merged commit f0c12ba into main Jul 1, 2026
10 checks passed
@AlemTuzlak AlemTuzlak deleted the gemini-drop-retired-media-models branch July 1, 2026 09:04
@github-actions github-actions Bot mentioned this pull request Jul 1, 2026
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.

2 participants