Skip to content

feat(ai-gemini): add gemini-3.7-flash - #1105

Merged
AlemTuzlak merged 1 commit into
TanStack:mainfrom
8times4:feat/gemini-3.7-flash
Aug 14, 2026
Merged

feat(ai-gemini): add gemini-3.7-flash#1105
AlemTuzlak merged 1 commit into
TanStack:mainfrom
8times4:feat/gemini-3.7-flash

Conversation

@8times4

@8times4 8times4 commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

🎯 Changes

Adds gemini-3.7-flash to the Gemini adapter's model metadata and type maps, with tests for supported inputs, built-in tools, thinking, structured output, and caching.

The React chat examples now list 3.7 Flash and use it as the default Gemini model for structured output.

Pricing uses the current promotional rates: $0.75 input, $0.075 cached input, and $3.75 output per million tokens. Google says these rates are 50% off through December 31, 2026.

Sources: model card and pricing.

✅ 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 the Gemini 3.7 Flash model.
    • Enabled multimodal input, thinking, structured output, caching, and supported tools.
    • Added Gemini 3.7 Flash to model selection and structured-output examples.
    • Updated the default structured-output example to use Gemini 3.7 Flash.
  • Tests

    • Added coverage validating model capabilities, configuration options, multimodal inputs, and supported tools.

@coderabbitai

coderabbitai Bot commented Aug 14, 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: 217a6504-edcf-481b-9ddd-a7f05bf2660b

📥 Commits

Reviewing files that changed from the base of the PR and between efe3b07 and 7429885.

📒 Files selected for processing (7)
  • .changeset/gemini-3-7-flash.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

📝 Walkthrough

Walkthrough

Adds Gemini 3.7 Flash support to @tanstack/ai-gemini, including model metadata, multimodal and tool type mappings, compile-time tests, example selectors, a structured-output default, and a minor-release changeset.

Changes

Gemini 3.7 Flash support

Layer / File(s) Summary
Model metadata and type registration
packages/ai-gemini/src/model-meta.ts
Registers Gemini 3.7 Flash with token limits, modalities, capabilities, tools, pricing, provider options, tool capabilities, and input modalities.
Model capability validation
packages/ai-gemini/tests/model-meta.test.ts, packages/ai-gemini/tests/tools-per-model-type-safety.test.ts
Adds assertions for provider options, multimodal inputs, structured output, thinking, caching, safety settings, and supported tools.
Example integration and release declaration
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-7-flash.md
Adds Gemini 3.7 Flash to example model lists, uses it as the structured-output default, and declares a minor release.
Estimated code review effort: 2 (Simple) ~10 minutes

Mergeability Score: ⚪ Minimal · up to 74298

This localized model metadata, test, and example update is merge-ready after normal checks and review; no actionable merge-blocking risk remains.

Possibly related PRs

  • TanStack/ai#1040: Adds a different AI model with similar metadata, type-map, test, changeset, and example updates.
  • TanStack/ai#1041: Adds a related Gemini Flash model across metadata, type maps, tests, and example selectors.

Suggested reviewers: nachovazquez, tombeckenham

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely identifies the primary change: adding Gemini 3.7 Flash support to ai-gemini.
Description check ✅ Passed The description explains the changes, testing, contributing checklist, release impact, changeset, and supporting pricing sources.
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 unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration.


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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 74298852be

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

'code_execution',
'file_search',
'google_search',
'google_maps',

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Filter Maps from the Interactions tool type

When geminiTextInteractions('gemini-3.7-flash') is used, its ResolveToolCapabilities reuses this tool list, so googleMapsTool() now passes compile-time gating even though convertToolsToInteractionsFormat explicitly throws for google_maps. This turns a supposedly type-safe call into a runtime RUN_ERROR; keep Maps enabled for geminiText() but filter it from the Interactions-specific capability resolution.

Useful? React with 👍 / 👎.

@github-actions github-actions Bot added the waiting-on: maintainer The ball is in the maintainers’ court label Aug 14, 2026
@nx-cloud

nx-cloud Bot commented Aug 14, 2026

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 7429885

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

☁️ Nx Cloud last updated this comment at 2026-08-14 10:14:56 UTC

@pkg-pr-new

pkg-pr-new Bot commented Aug 14, 2026

Copy link
Copy Markdown

Open in StackBlitz

@tanstack/ai

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

@tanstack/ai-acp

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

@tanstack/ai-angular

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

@tanstack/ai-anthropic

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

@tanstack/ai-bedrock

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

@tanstack/ai-byteplus

npm i https://pkg.pr.new/TanStack/ai/@tanstack/ai-byteplus@1105

@tanstack/ai-claude-code

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

@tanstack/ai-client

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

@tanstack/ai-code-mode

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

@tanstack/ai-code-mode-skills

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

@tanstack/ai-codex

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

@tanstack/ai-cohere

npm i https://pkg.pr.new/TanStack/ai/@tanstack/ai-cohere@1105

@tanstack/ai-devtools-core

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

@tanstack/ai-durable-stream

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

@tanstack/ai-elevenlabs

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

@tanstack/ai-event-client

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

@tanstack/ai-fal

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

@tanstack/ai-gemini

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

@tanstack/ai-grok

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

@tanstack/ai-grok-build

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

@tanstack/ai-groq

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

@tanstack/ai-isolate-cloudflare

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

@tanstack/ai-isolate-daytona

npm i https://pkg.pr.new/TanStack/ai/@tanstack/ai-isolate-daytona@1105

@tanstack/ai-isolate-node

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

@tanstack/ai-isolate-quickjs

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

@tanstack/ai-isolate-quickjs-bun

npm i https://pkg.pr.new/TanStack/ai/@tanstack/ai-isolate-quickjs-bun@1105

@tanstack/ai-mcp

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

@tanstack/ai-memory

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

@tanstack/ai-mistral

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

@tanstack/ai-ollama

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

@tanstack/ai-openai

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

@tanstack/ai-opencode

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

@tanstack/ai-openrouter

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

@tanstack/ai-perplexity

npm i https://pkg.pr.new/TanStack/ai/@tanstack/ai-perplexity@1105

@tanstack/ai-persistence

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

@tanstack/ai-preact

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

@tanstack/ai-react

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

@tanstack/ai-react-ui

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

@tanstack/ai-sandbox

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

@tanstack/ai-sandbox-cloudflare

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

@tanstack/ai-sandbox-daytona

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

@tanstack/ai-sandbox-docker

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

@tanstack/ai-sandbox-local-process

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

@tanstack/ai-sandbox-sprites

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

@tanstack/ai-sandbox-vercel

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

@tanstack/ai-solid

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

@tanstack/ai-solid-ui

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

@tanstack/ai-svelte

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

@tanstack/ai-utils

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

@tanstack/ai-vercel-gateway

npm i https://pkg.pr.new/TanStack/ai/@tanstack/ai-vercel-gateway@1105

@tanstack/ai-vue

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

@tanstack/ai-vue-ui

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

@tanstack/openai-base

npm i https://pkg.pr.new/TanStack/ai/@tanstack/openai-base@1105

@tanstack/preact-ai-devtools

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

@tanstack/react-ai-devtools

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

@tanstack/solid-ai-devtools

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

commit: 7429885

@github-actions github-actions Bot added waiting-on: author Waiting for the author to respond or update and removed waiting-on: maintainer The ball is in the maintainers’ court labels Aug 14, 2026
@AlemTuzlak
AlemTuzlak merged commit 03f0f5d into TanStack:main Aug 14, 2026
9 checks passed
@github-actions github-actions Bot mentioned this pull request Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting-on: author Waiting for the author to respond or update

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants