Skip to content

fix(google-vertex): don't send streamFunctionCallArguments for vertex doGenerate#14352

Merged
aayush-kapoor merged 3 commits intomainfrom
aayush/vertex-stream
Apr 11, 2026
Merged

fix(google-vertex): don't send streamFunctionCallArguments for vertex doGenerate#14352
aayush-kapoor merged 3 commits intomainfrom
aayush/vertex-stream

Conversation

@aayush-kapoor
Copy link
Copy Markdown
Collaborator

@aayush-kapoor aayush-kapoor commented Apr 11, 2026

Background

#14314

introduced in #13929, we added support for streaming tool call arguments for the vertex provider. but the check for passing that parameter seeped through for doGenerate as well, producing an API error (the generate endpoint rejects that option)

Summary

  • add a check to only pass streamFunctionCallArguments for doStream

Manual Verification

verified by running the example examples/ai-functions/src/generate-text/google/vertex-grounding.ts before and after the fix. before, it gave the api error. after: it resolves and produces an answer

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)

Related Issues

fixes #14314

@tigent tigent bot added ai/provider related to a provider package. Must be assigned together with at least one `provider/*` label bug Something isn't working as documented provider/google-vertex Issues related to the @ai-sdk/google-vertex provider labels Apr 11, 2026
@aayush-kapoor aayush-kapoor added the backport Admins only: add this label to a pull request in order to backport it to the prior version label Apr 11, 2026
@aayush-kapoor aayush-kapoor merged commit 5b7e7c2 into main Apr 11, 2026
21 checks passed
@aayush-kapoor aayush-kapoor deleted the aayush/vertex-stream branch April 11, 2026 15:49
vercel-ai-sdk bot pushed a commit that referenced this pull request Apr 11, 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 Apr 11, 2026
@vercel-ai-sdk
Copy link
Copy Markdown
Contributor

vercel-ai-sdk bot commented Apr 11, 2026

⚠️ Backport to release-v6.0 created but has conflicts: #14353

@vercel-ai-sdk
Copy link
Copy Markdown
Contributor

vercel-ai-sdk bot commented Apr 11, 2026

🚀 Published in:

Package Version
@ai-sdk/google 4.0.0-beta.34
@ai-sdk/google-vertex 5.0.0-beta.44

aayush-kapoor added a commit that referenced this pull request Apr 11, 2026
…for vertex doGenerate (#14353)

This is an automated backport of #14352 to the release-v6.0 branch. FYI
@aayush-kapoor
This backport has conflicts that need to be resolved manually.

### `git cherry-pick` output

```
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
error: could not apply 5b7e7c2... fix(google-vertex): don't send streamFunctionCallArguments for vertex doGenerate (#14352)
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: Aayush Kapoor <83492835+aayush-kapoor@users.noreply.github.com>
Co-authored-by: Aayush Kapoor <aayushkapoor34@gmail.com>
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 bug Something isn't working as documented 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.

@ai-sdk/google-vertex@4.0.106: unconditional streamFunctionCallArguments breaks all Vertex unary API calls

2 participants