Skip to content

Support Google Nano Banana 2 Lite image model (gemini-3.1-flash-lite-image) #870

Description

@tombeckenham

Update the Gemini adapter to support the two newly-released Google models: Gemini Omni Flash (video) and Nano Banana 2 Lite (image).

Scope split

Live-API verification (2026-07-01) showed the two models need very different work, so they've been split:

Nano Banana 2 Lite — verified facts

  • Model id: gemini-3.1-flash-lite-image
  • Method: generateContent (native path) → returns inline image/jpeg; ~1120 image tokens per 1K image
  • Inputs: text + image (image-conditioned generation); Output: text + image
  • Sizes: template-literal aspectRatio_resolution (e.g. 1:1_2K), 1K/2K/4K tiers
  • Pricing: input $0.25 / 1M tokens, output $1.50 / 1M tokens ($0.0336 per 1K image)
  • Positioned as the ultra-low-latency, low-cost tier of the Nano Banana 2 family (~4s/image)

Implementation (this issue)

  • packages/ai-gemini/src/model-meta.ts: add GEMINI_3_1_FLASH_LITE_IMAGE + register in GEMINI_IMAGE_MODELS
  • packages/ai-gemini/src/image/image-provider-options.ts: add to the GeminiNativeImageModels union (template-literal sizes + image input modalities)
  • Unit test asserting native generateContent routing + size parsing
  • Changeset, docs (docs/adapters/gemini.md, docs/media/image-generation.md), and media-generation skill model lists

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions