Skip to content

feat(provider/google-vertex): allow using Gemini image models with generateImage#12502

Merged
felixarntz merged 7 commits intomainfrom
fa-add-google-vertex-nano-banana-with-generate-image
Feb 12, 2026
Merged

feat(provider/google-vertex): allow using Gemini image models with generateImage#12502
felixarntz merged 7 commits intomainfrom
fa-add-google-vertex-nano-banana-with-generate-image

Conversation

@felixarntz
Copy link
Collaborator

Background

Follow-up to #12252 (which added Gemini image generation to the google provider). This wasn't yet wired up for the google-vertex provider.

Summary

  • Adds Gemini image model support to google-vertex's generateImage(). When a gemini-* model ID is detected, the image model internally delegates to GoogleGenerativeAILanguageModel with responseModalities: ['IMAGE'], matching the approach used in the google provider. Existing Imagen model behavior is unchanged.
  • Includes docs for this new generateImage capability for google-vertex
  • Also improves provider options typing in both google and google-vertex image models to use satisfies GoogleLanguageModelOptions

Manual Verification

Ran google-vertex-gemini-image.ts and google-vertex-gemini-editing.ts examples against Vertex AI with real credentials. Both image generation and image editing produce correct results.

Checklist

  • Tests have been added / updated (for bug fixes / features)
  • Documentation has been added / updated (for bug fixes / features)
  • A patch changeset for relevant packages has been added (for bug fixes / features - run pnpm changeset in the project root)
  • I have reviewed this pull request (self-review)

Future Work

N/A

Related Issues

Fixes #12452

@vercel-ai-sdk vercel-ai-sdk bot added the ai/provider related to a provider package. Must be assigned together with at least one `provider/*` label label Feb 12, 2026
@@ -0,0 +1,7 @@
---
'@ai-sdk/google-vertex': patch
'@example/ai-functions': patch
Copy link
Collaborator

Choose a reason for hiding this comment

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

do not add @example/* packages to changeset.

If we don't have that in our skill yet we should

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ah, good to know! I have done that several times before - noted for the future.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed in 8490ecc

Copy link
Collaborator

@gr2m gr2m left a comment

Choose a reason for hiding this comment

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

look at the other comments, but otherwise good to go 👍🏼

@felixarntz felixarntz merged commit 5a307f5 into main Feb 12, 2026
18 checks passed
@felixarntz felixarntz deleted the fa-add-google-vertex-nano-banana-with-generate-image branch February 12, 2026 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai/provider related to a provider package. Must be assigned together with at least one `provider/*` label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support using Gemini image models with generateImage for google-vertex provider

2 participants