Backport: fix(google): fix serviceTier to be correctly formatted for Vertex API#14397
Merged
vercel-ai-sdk[bot] merged 1 commit intorelease-v6.0from Apr 13, 2026
Merged
Conversation
…PI (#14393) ## Background Follow up to #13915 and #14090: Turns out the Vertex API did _not_ apply the same change the Gemini API did, which originally prompted the #14090 follow-up. The Vertex API does not support the values `standard`, `flex`, and `priority` - instead it expects `SERVICE_TIER_{UPPERCASE_VALUE}`. ## Summary Sanitizes the input value accordingly if the Google provider implementation is used with Vertex. ## Manual Verification Run the new examples to verify. ## Checklist <!-- Do not edit this list. Leave items unchecked that don't apply. If you need to track subtasks, create a new "## Tasks" section Please check if the PR fulfills the following requirements: --> - [x] Tests have been added / updated (for bug fixes / features) - [ ] 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)
4 tasks
felixarntz
approved these changes
Apr 13, 2026
Contributor
Author
|
|
Contributor
Author
felixarntz
added a commit
that referenced
this pull request
Apr 13, 2026
…rmatted for Vertex API (#14399) This is an automated backport of #14397 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 ``` CONFLICT (file location): examples/ai-functions/src/generate-text/google/vertex-service-tier.ts added in 1e1a5ab (Backport: fix(google): fix `serviceTier` to be correctly formatted for Vertex API (#14397)) inside a directory that was renamed in HEAD, suggesting it should perhaps be moved to examples/ai-core/src/generate-text/vertex-service-tier.ts. CONFLICT (file location): examples/ai-functions/src/stream-text/google/vertex-service-tier.ts added in 1e1a5ab (Backport: fix(google): fix `serviceTier` to be correctly formatted for Vertex API (#14397)) inside a directory that was renamed in HEAD, suggesting it should perhaps be moved to examples/ai-core/src/stream-text/vertex-service-tier.ts. Auto-merging packages/google/src/google-generative-ai-language-model.test.ts Auto-merging packages/google/src/google-generative-ai-language-model.ts CONFLICT (content): Merge conflict in packages/google/src/google-generative-ai-language-model.ts Auto-merging packages/google/src/google-generative-ai-options.ts error: could not apply 1e1a5ab... Backport: fix(google): fix `serviceTier` to be correctly formatted for Vertex API (#14397) 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 #14393 to the release-v6.0 branch. FYI @felixarntz