Skip to content

feat(provider/google): add support for gemini-3.1-flash-image-preview#12883

Merged
felixarntz merged 4 commits intomainfrom
add-gemini-3-1-flash-image
Feb 26, 2026
Merged

feat(provider/google): add support for gemini-3.1-flash-image-preview#12883
felixarntz merged 4 commits intomainfrom
add-gemini-3-1-flash-image

Conversation

@felixarntz
Copy link
Copy Markdown
Collaborator

Background

Google released gemini-3.1-flash-image-preview, a new Gemini image model:

Summary

Adds gemini-3.1-flash-image-preview to the model ID type unions in google, google-vertex, and gateway packages (both language model and image model ID lists). Updates documentation capability tables for both providers. Adds two ai-functions examples: one using generateImage, one using generateText with multimodal output.

Manual Verification

Model ID additions are type-only changes. Examples can be verified by running:

aif examples/ai-functions/src/generate-image/google/gemini-3-1-flash-image.ts
aif examples/ai-functions/src/generate-text/google/gemini-3-1-flash-image-output.ts

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 #12882

@tigent tigent bot added ai/core core functions like generateText, streamText, etc. Provider utils, and provider spec. ai/gateway ai/provider related to a provider package. Must be assigned together with at least one `provider/*` label documentation Improvements or additions to documentation feature New feature or request provider/google Issues related to the @ai-sdk/google provider provider/google-vertex Issues related to the @ai-sdk/google-vertex provider labels Feb 26, 2026
@felixarntz felixarntz added the backport Admins only: add this label to a pull request in order to backport it to the prior version label Feb 26, 2026
@felixarntz felixarntz requested a review from R-Taneja February 26, 2026 16:23
@felixarntz felixarntz requested a review from shaper February 26, 2026 16:23
@felixarntz felixarntz merged commit 45f0a7f into main Feb 26, 2026
40 checks passed
@felixarntz felixarntz deleted the add-gemini-3-1-flash-image branch February 26, 2026 16:25
vercel-ai-sdk bot pushed a commit that referenced this pull request Feb 26, 2026
@vercel-ai-sdk vercel-ai-sdk bot removed the backport Admins only: add this label to a pull request in order to backport it to the prior version label Feb 26, 2026
@vercel-ai-sdk
Copy link
Copy Markdown
Contributor

vercel-ai-sdk bot commented Feb 26, 2026

⚠️ Backport to release-v5.0 created but has conflicts: #12885

felixarntz added a commit that referenced this pull request Feb 26, 2026
…ge-preview (#12885)

This is an automated backport of #12883 to the release-v5.0 branch. FYI
@felixarntz
This backport has conflicts that need to be resolved manually.

### `git cherry-pick` output

```
Auto-merging content/providers/01-ai-sdk-providers/15-google-generative-ai.mdx
CONFLICT (content): Merge conflict in content/providers/01-ai-sdk-providers/15-google-generative-ai.mdx
Auto-merging content/providers/01-ai-sdk-providers/16-google-vertex.mdx
CONFLICT (content): Merge conflict in content/providers/01-ai-sdk-providers/16-google-vertex.mdx
CONFLICT (file location): examples/ai-functions/src/generate-image/google/gemini-3-1-flash-image.ts added in 45f0a7f (feat(provider/google): add support for gemini-3.1-flash-image-preview (#12883)) inside a directory that was renamed in HEAD, suggesting it should perhaps be moved to examples/ai-core/src/generate-image/gemini-3-1-flash-image.ts.
CONFLICT (file location): examples/ai-functions/src/generate-text/google/gemini-3-1-flash-image-output.ts added in 45f0a7f (feat(provider/google): add support for gemini-3.1-flash-image-preview (#12883)) inside a directory that was renamed in HEAD, suggesting it should perhaps be moved to examples/ai-core/src/generate-text/gemini-3-1-flash-image-output.ts.
Auto-merging packages/gateway/src/gateway-language-model-settings.ts
Auto-merging packages/google-vertex/src/google-vertex-image-settings.ts
CONFLICT (content): Merge conflict in packages/google-vertex/src/google-vertex-image-settings.ts
Auto-merging packages/google/src/google-generative-ai-image-settings.ts
CONFLICT (content): Merge conflict in packages/google/src/google-generative-ai-image-settings.ts
Auto-merging packages/google/src/google-generative-ai-options.ts
CONFLICT (content): Merge conflict in packages/google/src/google-generative-ai-options.ts
error: could not apply 45f0a7f... feat(provider/google): add support for gemini-3.1-flash-image-preview (#12883)
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
```

---------

Co-authored-by: Felix Arntz <felix.arntz@vercel.com>
@gr2m gr2m added provider/gateway Issues related to the @ai-sdk/gateway provider and removed ai/gateway labels Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai/core core functions like generateText, streamText, etc. Provider utils, and provider spec. ai/provider related to a provider package. Must be assigned together with at least one `provider/*` label documentation Improvements or additions to documentation feature New feature or request provider/gateway Issues related to the @ai-sdk/gateway provider provider/google Issues related to the @ai-sdk/google provider provider/google-vertex Issues related to the @ai-sdk/google-vertex provider

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🤖 Provider model changes - google

3 participants