feat(ai-gemini): support Nano Banana 2 Lite (gemini-3.1-flash-lite-image)#874
Conversation
…age) Add proper support for the Nano Banana 2 Lite native image model. The automated OpenRouter model sync had landed this model mis-classified as a text-only chat model (output: ['text'], in GEMINI_MODELS + chat type maps). Correct it and wire it into the image surface: routed through the generateContent API with output: ['text','image'], template-literal sizes (aspectRatio_resolution), and image-conditioned prompts — matching the other native image models. Also fix scripts/sync-provider-models.ts so native image models that output both text and image are skipped for manual curation (via outputsImage) instead of being inserted as chat models with a bogus output: ['text']. Closes #870. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (9)
📝 WalkthroughWalkthroughReclassifies ChangesNano Banana 2 Lite image model registration
Estimated code review effort: 2 (Simple) | ~15 minutes Sequence Diagram(s)Not applicable — changes are model registration/metadata and documentation updates without new multi-component control flow. Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
🚀 Changeset Version Preview3 package(s) bumped directly, 0 bumped as dependents. 🟨 Minor bumps
🟩 Patch bumps
|
|
View your CI Pipeline Execution ↗ for commit a7b672d
☁️ Nx Cloud last updated this comment at |
@tanstack/ai
@tanstack/ai-acp
@tanstack/ai-angular
@tanstack/ai-anthropic
@tanstack/ai-bedrock
@tanstack/ai-claude-code
@tanstack/ai-client
@tanstack/ai-code-mode
@tanstack/ai-code-mode-skills
@tanstack/ai-codex
@tanstack/ai-devtools-core
@tanstack/ai-elevenlabs
@tanstack/ai-event-client
@tanstack/ai-fal
@tanstack/ai-gemini
@tanstack/ai-grok
@tanstack/ai-grok-build
@tanstack/ai-groq
@tanstack/ai-isolate-cloudflare
@tanstack/ai-isolate-node
@tanstack/ai-isolate-quickjs
@tanstack/ai-mcp
@tanstack/ai-mistral
@tanstack/ai-ollama
@tanstack/ai-openai
@tanstack/ai-opencode
@tanstack/ai-openrouter
@tanstack/ai-preact
@tanstack/ai-react
@tanstack/ai-react-ui
@tanstack/ai-sandbox
@tanstack/ai-sandbox-cloudflare
@tanstack/ai-sandbox-daytona
@tanstack/ai-sandbox-docker
@tanstack/ai-sandbox-local-process
@tanstack/ai-sandbox-vercel
@tanstack/ai-solid
@tanstack/ai-solid-ui
@tanstack/ai-svelte
@tanstack/ai-utils
@tanstack/ai-vue
@tanstack/ai-vue-ui
@tanstack/openai-base
@tanstack/preact-ai-devtools
@tanstack/react-ai-devtools
@tanstack/solid-ai-devtools
commit: |
🎯 Changes
Adds proper support for Nano Banana 2 Lite (
gemini-3.1-flash-lite-image) to the Gemini adapter, and fixes the model-sync bug that mis-landed it.Background: the automated OpenRouter sync (#772) had already added
gemini-3.1-flash-lite-imagetomain— but mis-classified as a text-only chat model (output: ['text'], listed inGEMINI_MODELS+ the chat type maps). Verified against the live Gemini API, it's a native image model (generateContent→ inline image, ~1120 tokens/1K image).This PR:
output: ['text', 'image'], in the image-model region +GEMINI_IMAGE_MODELS, added to theGeminiNativeImageModelsunion (template-literal sizes like"1:1_2K", image-conditioned prompts) — matching the other native image models. Removed from the chat arrays/type maps.scripts/sync-provider-models.ts): the guardisImageOnlyModel(image output and not text) →outputsImage(any image output), so native text+image image models are skipped for manual curation instead of being inserted as chat models. Verified againstscripts/openrouter.models.json: all sixgemini-*-imagemodels flip from "added to chat" → "skipped".generateContentrouting + size parsing for the new model.docs/adapters/gemini.md,docs/media/image-generation.md+updatedAt), and themedia-generationskill model list.Scope note: this issue was split — Gemini Omni Flash (
gemini-omni-flash-preview) needs a separate Interactions-API path and is tracked in #871.Closes #870.
✅ Checklist
pnpm run test:pr.🚀 Release Impact
Summary by CodeRabbit
New Features
Bug Fixes
Documentation