Skip to content

feat(ai-gemini): add gemini-3.6-flash and gemini-3.5-flash-lite - #1041

Merged
AlemTuzlak merged 3 commits into
TanStack:mainfrom
NachoVazquez:feat/gemini-3.5-3.6-models
Aug 4, 2026
Merged

feat(ai-gemini): add gemini-3.6-flash and gemini-3.5-flash-lite#1041
AlemTuzlak merged 3 commits into
TanStack:mainfrom
NachoVazquez:feat/gemini-3.5-3.6-models

Conversation

@NachoVazquez

@NachoVazquezNachoVazquez commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

🎯 Changes

Google GA'd gemini-3.6-flash and gemini-3.5-flash-lite; only gemini-3.5-flash was already in @tanstack/ai-gemini. Without meta entries the new IDs are absent from GEMINI_MODELS, the combined tools+schema allow-list, and the per-model type maps that gate provider options, tools, and input modalities.

This PR adds both stable chat models, puts them on the combined tools+schema path, and corrects adjacent 3.5 Flash tool metadata against the official model cards:

ModelIn / out tokens$/1M in · cached · outTools (notable)
gemini-3.6-flash(new)1,048,576 / 65,536$1.50 · $0.15 · $7.50+ google_maps, computer_use
gemini-3.5-flash-lite(new)1,048,576 / 65,536$0.30 · $0.03 · $2.50+ google_maps; nocomputer_use
gemini-3.5-flash(existing, fixed)unchanged limits/pricingunchangedwas missing google_maps + computer_use

No cyber-only / image / TTS / video variants. No removals. gemini-3.5-pro is not GA on the checked Gemini API model pages.

Files to review (7, +308 / −31):

FileWhy
packages/ai-gemini/src/model-meta.ts(start here)New consts, GEMINI_MODELS, combined-tools set, all three type maps, 3.5 Flash tool fix
packages/ai-gemini/tests/tools-per-model-type-safety.test.tsTool accept/reject cases for 3.6, 3.5 Flash, 3.5 Flash-Lite
packages/ai-gemini/tests/model-meta.test.tsProvider-options + modality type coverage
examples/ts-react-chat/...Dropdowns + structured-output default → gemini-3.6-flash
.changeset/gemini-3-6-flash-3-5-flash-lite.mdminor on @tanstack/ai-gemini

Sources:models index · 3.6 Flash · 3.5 Flash-Lite · latest-model · pricing

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested this code locally with pnpm run test:pr.
    • Scoped equivalent: pnpm --filter @tanstack/ai-gemini test:types · test:lib (244 pass) · test:oxlint (0 errors)

🚀 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 Gemini 3.6 Flash and Gemini 3.5 Flash-Lite chat models.
    • Added multimodal input, structured output, thinking, caching, batch processing, and expanded tool integrations.
    • Added the new models to model selectors and structured-output examples.
    • Expanded Gemini 3.5 Flash support for Google Maps and computer-use tools.
  • Documentation

    • Documented model capabilities, supported tools, and feature limitations.

@coderabbitai

coderabbitaiBot commented Aug 2, 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 Plus

Run ID: 6f6f8f62-d852-4e44-bf4f-2b5f34cf9030

📥 Commits

Reviewing files that changed from the base of the PR and between 3a572cb and 5c6c867.

📒 Files selected for processing (1)
  • packages/ai-gemini/src/model-meta.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/ai-gemini/src/model-meta.ts

📝 Walkthrough

Walkthrough

Gemini 3.6 Flash and Gemini 3.5 Flash Lite are added to Gemini provider metadata, capability and tool type checks, example model selectors, structured-output examples, and release documentation. Gemini 3.5 Flash gains Google Maps and computer-use support.

Changes

Gemini model support

Layer / File(s)Summary
Model metadata and type mappings
packages/ai-gemini/src/model-meta.ts
Adds metadata, capabilities, pricing, tool support, provider options, combined tool and schema support, and multimodal input mappings for Gemini 3.6 Flash and Gemini 3.5 Flash Lite. Expands Gemini 3.5 Flash tool support.
Capability and tool type validation
packages/ai-gemini/tests/model-meta.test.ts, packages/ai-gemini/tests/tools-per-model-type-safety.test.ts
Adds coverage for provider options, safety settings, cached content, thinking, structured output, multimodal inputs, inherited capabilities, and model-specific tool restrictions.
Example integration and release documentation
examples/ts-react-chat/src/lib/model-selection.ts, examples/ts-react-chat/src/routes/api.structured-output.ts, examples/ts-react-chat/src/routes/generations.structured-output.tsx, .changeset/gemini-3-6-flash-3-5-flash-lite.md
Adds Gemini models to example selectors, changes the structured-output default to Gemini 3.6 Flash, and documents the release.

Estimated code review effort: 3 (Moderate) | ~20 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Title check✅ PassedThe title clearly identifies the main change: adding Gemini 3.6 Flash and Gemini 3.5 Flash-Lite support to @tanstack/ai-gemini.
Description check✅ PassedThe description covers the changes, testing, checklist, release impact, affected files, and generated changeset.
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

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

Actionable comments posted: 2

🤖 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 `@packages/ai-gemini/src/model-meta.ts`:
- Around line 746-750: Update the knowledge_cutoff field in GEMINI_3_6_FLASH to
represent March 2026, using month-level precision rather than inventing a
specific day; preserve the remaining model metadata unchanged.
- Around line 991-1008: Restrict the option contracts for GEMINI_3_6_FLASH,
GEMINI_3_5_FLASH, and GEMINI_3_5_FLASH_LITE in
packages/ai-gemini/src/model-meta.ts:991-1008 to model-specific types that omit
unsupported modalities, generation, and deprecated or restricted sampling
fields; keep the metadata contracts at
packages/ai-gemini/src/model-meta.ts:779-785 and
packages/ai-gemini/src/model-meta.ts:855-861 aligned with the exported map.
Update packages/ai-gemini/tests/model-meta.test.ts:198-215 to assert supported
fields and reject unsupported options instead of relying on generic BaseOptions
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 Plus

Run ID: 762a0488-04f4-4f71-a80a-bccc50cc8b26

📥 Commits

Reviewing files that changed from the base of the PR and between 826cfed and 1583226.

📒 Files selected for processing (7)
  • .changeset/gemini-3-6-flash-3-5-flash-lite.md
  • examples/ts-react-chat/src/lib/model-selection.ts
  • examples/ts-react-chat/src/routes/api.structured-output.ts
  • examples/ts-react-chat/src/routes/generations.structured-output.tsx
  • packages/ai-gemini/src/model-meta.ts
  • packages/ai-gemini/tests/model-meta.test.ts
  • packages/ai-gemini/tests/tools-per-model-type-safety.test.ts

Comment threadpackages/ai-gemini/src/model-meta.ts Outdated
Comment threadpackages/ai-gemini/src/model-meta.ts
Drop computer_use from gemini-3.5-flash-lite (not supported upstream).
Add google_maps and computer_use to existing gemini-3.5-flash to match
the model card.
Aligns with the Gemini 3.6 Flash model card primary cutoff (March 2026).
@nx-cloud

nx-cloudBot commented Aug 4, 2026

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 5c6c867

CommandStatusDurationResult
nx run-many --targets=build --exclude=examples/...✅ Succeeded8sView ↗

☁️ Nx Cloud last updated this comment at 2026-08-04 15:38:54 UTC

1 similar comment
@nx-cloud

nx-cloudBot commented Aug 4, 2026

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 5c6c867

CommandStatusDurationResult
nx run-many --targets=build --exclude=examples/...✅ Succeeded8sView ↗

☁️ Nx Cloud last updated this comment at 2026-08-04 15:38:54 UTC

@pkg-pr-new

pkg-pr-newBot commented Aug 4, 2026

Copy link
Copy Markdown

Open in StackBlitz

@tanstack/ai

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

@tanstack/ai-acp

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

@tanstack/ai-angular

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

@tanstack/ai-anthropic

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

@tanstack/ai-bedrock

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

@tanstack/ai-claude-code

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

@tanstack/ai-client

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

@tanstack/ai-code-mode

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

@tanstack/ai-code-mode-skills

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

@tanstack/ai-codex

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

@tanstack/ai-devtools-core

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

@tanstack/ai-durable-stream

npm i https://pkg.pr.new/@tanstack/ai-durable-stream@1041

@tanstack/ai-elevenlabs

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

@tanstack/ai-event-client

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

@tanstack/ai-fal

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

@tanstack/ai-gemini

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

@tanstack/ai-grok

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

@tanstack/ai-grok-build

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

@tanstack/ai-groq

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

@tanstack/ai-isolate-cloudflare

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

@tanstack/ai-isolate-node

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

@tanstack/ai-isolate-quickjs

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

@tanstack/ai-mcp

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

@tanstack/ai-memory

npm i https://pkg.pr.new/@tanstack/ai-memory@1041

@tanstack/ai-mistral

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

@tanstack/ai-ollama

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

@tanstack/ai-openai

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

@tanstack/ai-opencode

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

@tanstack/ai-openrouter

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

@tanstack/ai-persistence

npm i https://pkg.pr.new/@tanstack/ai-persistence@1041

@tanstack/ai-preact

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

@tanstack/ai-react

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

@tanstack/ai-react-ui

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

@tanstack/ai-sandbox

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

@tanstack/ai-sandbox-cloudflare

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

@tanstack/ai-sandbox-daytona

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

@tanstack/ai-sandbox-docker

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

@tanstack/ai-sandbox-local-process

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

@tanstack/ai-sandbox-sprites

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

@tanstack/ai-sandbox-vercel

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

@tanstack/ai-solid

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

@tanstack/ai-solid-ui

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

@tanstack/ai-svelte

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

@tanstack/ai-utils

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

@tanstack/ai-vue

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

@tanstack/ai-vue-ui

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

@tanstack/openai-base

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

@tanstack/preact-ai-devtools

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

@tanstack/react-ai-devtools

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

@tanstack/solid-ai-devtools

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

commit: 5c6c867

@AlemTuzlak
AlemTuzlak merged commit 399b4b1 into TanStack:mainAug 4, 2026
10 checks passed
Sign up for freeto 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

@NachoVazquez@AlemTuzlak