Backport: fix(provider/google): fix Gemini service tier enum after upstream update#14091
Merged
vercel-ai-sdk[bot] merged 1 commit intorelease-v6.0from Apr 3, 2026
Merged
Conversation
…ate (#14090) ## Background Google updated their Gemini API to use lowercase service tier values (`standard`, `flex`, `priority`) instead of the previous uppercase prefixed format (`SERVICE_TIER_STANDARD`, `SERVICE_TIER_FLEX`, `SERVICE_TIER_PRIORITY`). The old values no longer work. See [googleapis/js-genai@9bdc2ae](googleapis/js-genai@9bdc2ae). Also outlined in their docs: - https://ai.google.dev/gemini-api/docs/priority-inference - https://ai.google.dev/gemini-api/docs/flex-inference ## Summary - Updated the `serviceTier` provider option enum in google to accept `'standard' | 'flex' | 'priority'` - Updated tests, examples, and documentation to reflect the new values ## Manual Verification Ran the `generate-text` and `stream-text` service tier examples against the live Gemini API. ## Checklist - [x] Tests have been added / updated (for bug fixes / features) - [x] Documentation has been added / updated (for bug fixes / features) - [x] A _patch_ changeset for relevant packages has been added (for bug fixes / features - run `pnpm changeset` in the project root) - [x] I have reviewed this pull request (self-review) ## Future Work N/A ## Related Issues N/A
4 tasks
felixarntz
approved these changes
Apr 3, 2026
Contributor
Author
|
|
felixarntz
added a commit
that referenced
this pull request
Apr 3, 2026
…m after upstream update (#14093) This is an automated backport of #14091 to the release-v5.0 branch. FYI @vercel-ai-sdk[bot] ~~This backport has conflicts that need to be resolved manually.~~ Conflicts resolved. ### `git cherry-pick` output ``` Auto-merging content/providers/01-ai-sdk-providers/15-google-generative-ai.mdx Auto-merging examples/ai-core/src/generate-text/google-service-tier.ts CONFLICT (content): Merge conflict in examples/ai-core/src/generate-text/google-service-tier.ts Auto-merging examples/ai-core/src/stream-text/google-service-tier.ts CONFLICT (content): Merge conflict in examples/ai-core/src/stream-text/google-service-tier.ts Auto-merging packages/google/src/google-generative-ai-language-model.test.ts Auto-merging packages/google/src/google-generative-ai-options.ts error: could not apply 0f2b2f1... Backport: fix(provider/google): fix Gemini service tier enum after upstream update (#14091) 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: vercel-ai-sdk[bot] <225926702+vercel-ai-sdk[bot]@users.noreply.github.com> Co-authored-by: Felix Arntz <felix.arntz@vercel.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is an automated backport of #14090 to the release-v6.0 branch. FYI @felixarntz