@ai-sdk/google 4.0.0-beta.8 → 4.0.0-beta.82

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/CHANGELOG.md +608 -5
  2. package/README.md +6 -4
  3. package/dist/index.d.ts +297 -54
  4. package/dist/index.js +5409 -640
  5. package/dist/index.js.map +1 -1
  6. package/dist/internal/index.d.ts +97 -26
  7. package/dist/internal/index.js +1653 -453
  8. package/dist/internal/index.js.map +1 -1
  9. package/docs/{15-google-generative-ai.mdx → 15-google.mdx} +784 -69
  10. package/package.json +16 -17
  11. package/src/{convert-google-generative-ai-usage.ts → convert-google-usage.ts} +13 -5
  12. package/src/convert-json-schema-to-openapi-schema.ts +1 -1
  13. package/src/convert-to-google-messages.ts +647 -0
  14. package/src/{google-generative-ai-embedding-options.ts → google-embedding-model-options.ts} +9 -2
  15. package/src/{google-generative-ai-embedding-model.ts → google-embedding-model.ts} +31 -18
  16. package/src/google-error.ts +1 -1
  17. package/src/google-files.ts +225 -0
  18. package/src/google-image-model-options.ts +35 -0
  19. package/src/{google-generative-ai-image-model.ts → google-image-model.ts} +116 -65
  20. package/src/{google-generative-ai-image-settings.ts → google-image-settings.ts} +2 -2
  21. package/src/google-json-accumulator.ts +371 -0
  22. package/src/{google-generative-ai-options.ts → google-language-model-options.ts} +50 -5
  23. package/src/{google-generative-ai-language-model.ts → google-language-model.ts} +691 -217
  24. package/src/google-prepare-tools.ts +72 -12
  25. package/src/google-prompt.ts +86 -0
  26. package/src/google-provider.ts +157 -53
  27. package/src/google-speech-api.ts +36 -0
  28. package/src/google-speech-model-options.ts +48 -0
  29. package/src/google-speech-model.ts +311 -0
  30. package/src/google-video-model-options.ts +43 -0
  31. package/src/{google-generative-ai-video-model.ts → google-video-model.ts} +25 -60
  32. package/src/{google-generative-ai-video-settings.ts → google-video-settings.ts} +2 -1
  33. package/src/index.ts +40 -9
  34. package/src/interactions/build-google-interactions-stream-transform.ts +818 -0
  35. package/src/interactions/cancel-google-interaction.ts +60 -0
  36. package/src/interactions/convert-google-interactions-usage.ts +47 -0
  37. package/src/interactions/convert-to-google-interactions-input.ts +557 -0
  38. package/src/interactions/extract-google-interactions-sources.ts +252 -0
  39. package/src/interactions/google-interactions-agent.ts +15 -0
  40. package/src/interactions/google-interactions-api.ts +530 -0
  41. package/src/interactions/google-interactions-language-model-options.ts +262 -0
  42. package/src/interactions/google-interactions-language-model.ts +776 -0
  43. package/src/interactions/google-interactions-prompt.ts +582 -0
  44. package/src/interactions/google-interactions-provider-metadata.ts +23 -0
  45. package/src/interactions/map-google-interactions-finish-reason.ts +31 -0
  46. package/src/interactions/parse-google-interactions-outputs.ts +252 -0
  47. package/src/interactions/poll-google-interactions.ts +129 -0
  48. package/src/interactions/prepare-google-interactions-tools.ts +245 -0
  49. package/src/interactions/stream-google-interactions.ts +242 -0
  50. package/src/interactions/synthesize-google-interactions-agent-stream.ts +185 -0
  51. package/src/internal/index.ts +3 -2
  52. package/src/{map-google-generative-ai-finish-reason.ts → map-google-finish-reason.ts} +3 -3
  53. package/src/realtime/google-realtime-event-mapper.ts +383 -0
  54. package/src/realtime/google-realtime-model-options.ts +3 -0
  55. package/src/realtime/google-realtime-model.ts +160 -0
  56. package/src/realtime/index.ts +2 -0
  57. package/src/tool/code-execution.ts +2 -2
  58. package/src/tool/enterprise-web-search.ts +9 -3
  59. package/src/tool/file-search.ts +5 -7
  60. package/src/tool/google-maps.ts +3 -2
  61. package/src/tool/google-search.ts +11 -12
  62. package/src/tool/url-context.ts +4 -2
  63. package/src/tool/vertex-rag-store.ts +9 -6
  64. package/dist/index.d.mts +0 -384
  65. package/dist/index.mjs +0 -2519
  66. package/dist/index.mjs.map +0 -1
  67. package/dist/internal/index.d.mts +0 -287
  68. package/dist/internal/index.mjs +0 -1708
  69. package/dist/internal/index.mjs.map +0 -1
  70. package/src/convert-to-google-generative-ai-messages.ts +0 -239
  71. package/src/google-generative-ai-prompt.ts +0 -47
package/CHANGELOG.md CHANGED
@@ -1,5 +1,609 @@
1
1
  # @ai-sdk/google
2
2
 
3
+ ## 4.0.0-beta.82
4
+
5
+ ### Patch Changes
6
+
7
+ - b8396f0: trigger initial beta release
8
+ - Updated dependencies [b8396f0]
9
+ - @ai-sdk/provider-utils@5.0.0-beta.49
10
+ - @ai-sdk/provider@4.0.0-beta.19
11
+
12
+ ## 4.0.0-canary.81
13
+
14
+ ### Patch Changes
15
+
16
+ - 5878b40: fix(google): prevent prototype pollution when streaming tool args
17
+ - aeda373: fix: only send provider credentials to same-origin response-supplied URLs
18
+
19
+ Several provider clients followed a URL taken from the provider's API response (a polling/status URL or a final media URL such as `polling_url`, `urls.get`, `result_url`, `result.sample`, or `video.uri`) and reused the authenticated headers — or appended `?key=<API_KEY>` — on that request. Because the host of the response-supplied URL was never validated, the long-lived API key was sent to whatever host the response named (a CDN in the benign case, or an attacker-chosen host if the provider response was tampered with), allowing credential exfiltration.
20
+
21
+ A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and the affected fetches in `@ai-sdk/black-forest-labs`, `@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`, `@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the followed URL is same-origin with the provider's configured API origin. Requests to a foreign origin are made without the credential.
22
+
23
+ - Updated dependencies [aeda373]
24
+ - Updated dependencies [375fdd7]
25
+ - Updated dependencies [b4507d5]
26
+ - @ai-sdk/provider-utils@5.0.0-canary.48
27
+
28
+ ## 4.0.0-canary.80
29
+
30
+ ### Patch Changes
31
+
32
+ - Updated dependencies [bae5e2b]
33
+ - @ai-sdk/provider-utils@5.0.0-canary.47
34
+
35
+ ## 4.0.0-canary.79
36
+
37
+ ### Patch Changes
38
+
39
+ - ce769dd: feat(provider): add experimental Realtime API support for voice conversations
40
+
41
+ Adds first-class support for realtime (speech-to-speech) APIs:
42
+
43
+ - `Experimental_RealtimeModelV4` spec in `@ai-sdk/provider` with normalized event types and factory
44
+ - OpenAI, Google, and xAI realtime provider implementations
45
+ - `openai.experimental_realtime()` / `google.experimental_realtime()` / `xai.experimental_realtime()` work in both server and browser
46
+ - `.getToken()` static method on each provider for server-side ephemeral token creation
47
+ - `experimental_getRealtimeToolDefinitions` helper for provider session tool definitions
48
+ - `experimental_useRealtime` hook in `@ai-sdk/react` returning `UIMessage[]` (aligned with `useChat`), with `onToolCall` and `addToolOutput` for client-driven tool execution
49
+ - `inputAudioTranscription` session config for showing transcribed user audio messages when supported by the provider
50
+
51
+ - Updated dependencies [ce769dd]
52
+ - @ai-sdk/provider@4.0.0-canary.18
53
+ - @ai-sdk/provider-utils@5.0.0-canary.46
54
+
55
+ ## 4.0.0-canary.78
56
+
57
+ ### Patch Changes
58
+
59
+ - 2ce3c65: feat(provider/google-vertex): add Gemini text-to-speech (speech) model support
60
+
61
+ ## 4.0.0-canary.77
62
+
63
+ ### Patch Changes
64
+
65
+ - Updated dependencies [ee798eb]
66
+ - Updated dependencies [daf6637]
67
+ - @ai-sdk/provider-utils@5.0.0-canary.45
68
+
69
+ ## 4.0.0-canary.76
70
+
71
+ ### Patch Changes
72
+
73
+ - b563707: feat(provider/google): add Gemini text-to-speech (speech) model support
74
+
75
+ ## 4.0.0-canary.75
76
+
77
+ ### Patch Changes
78
+
79
+ - 00a0f36: feat(google, google-vertex): added `gemini-embedding-2`, `deep-research-max-preview-04-2026` and `deep-research-preview-04-2026`
80
+
81
+ ## 4.0.0-canary.74
82
+
83
+ ### Patch Changes
84
+
85
+ - a8d70b6: fix(google): auto-inject `skip_thought_signature_validator` for Gemini 3 tool-call replays without a signature
86
+
87
+ ## 4.0.0-canary.73
88
+
89
+ ### Patch Changes
90
+
91
+ - Updated dependencies [6c93e36]
92
+ - Updated dependencies [f617ac2]
93
+ - @ai-sdk/provider-utils@5.0.0-canary.44
94
+
95
+ ## 4.0.0-canary.72
96
+
97
+ ### Patch Changes
98
+
99
+ - b71c0d7: feat(provider/google): support Google search grounding when using `generateImage` with Gemini
100
+
101
+ ## 4.0.0-canary.71
102
+
103
+ ### Patch Changes
104
+
105
+ - 045d2e8: fix(google): read `serviceTier` from `usageMetadata.serviceTier` in both generate and stream paths
106
+
107
+ The previous implementation read `serviceTier` from the `x-gemini-service-tier`
108
+ response header, which is only populated on non-streaming responses. Gemini
109
+ streaming includes the value in `usageMetadata.serviceTier` on every chunk, so
110
+ `providerMetadata.google.serviceTier` was always `null` for streams. Read from
111
+ `usageMetadata` for both paths instead.
112
+
113
+ ## 4.0.0-canary.70
114
+
115
+ ### Patch Changes
116
+
117
+ - aeea161: feat(google): read `serviceTier` from `x-gemini-service-tier` response header in Gemini API and use PayGo for Vertex
118
+
119
+ ## 4.0.0-canary.69
120
+
121
+ ### Patch Changes
122
+
123
+ - 7f04802: feat(provider/google): add support for managed agents in the Interactions API
124
+
125
+ ## 4.0.0-canary.68
126
+
127
+ ### Patch Changes
128
+
129
+ - a2609df: fix(google): fix streaming tool call args
130
+ - 546cefe: feat(provider/google): add `gemini-3.5-flash`
131
+
132
+ ## 4.0.0-canary.67
133
+
134
+ ### Patch Changes
135
+
136
+ - 7fc6bd6: Raise minimum supported Node.js version to 22. Supported versions: 22, 24, and 26.
137
+ - Updated dependencies [7fc6bd6]
138
+ - @ai-sdk/provider-utils@5.0.0-canary.43
139
+ - @ai-sdk/provider@4.0.0-canary.17
140
+
141
+ ## 4.0.0-canary.66
142
+
143
+ ### Patch Changes
144
+
145
+ - Updated dependencies [a6617c5]
146
+ - @ai-sdk/provider-utils@5.0.0-canary.42
147
+
148
+ ## 4.0.0-canary.65
149
+
150
+ ### Patch Changes
151
+
152
+ - 4e825f3: feat(google): update Interactions API implementation to cater for upstream breaking changes coming May 26
153
+
154
+ ## 4.0.0-canary.64
155
+
156
+ ### Patch Changes
157
+
158
+ - 41da50c: fix(provider/google): support `functionCall.id` when returned by Gemini API and provide matching `functionResponse.id`
159
+
160
+ ## 4.0.0-canary.63
161
+
162
+ ### Patch Changes
163
+
164
+ - Updated dependencies [28dfa06]
165
+ - Updated dependencies [e93fa91]
166
+ - @ai-sdk/provider-utils@5.0.0-canary.41
167
+
168
+ ## 4.0.0-canary.62
169
+
170
+ ### Patch Changes
171
+
172
+ - Updated dependencies [a7de9c9]
173
+ - @ai-sdk/provider-utils@5.0.0-canary.40
174
+
175
+ ## 4.0.0-canary.61
176
+
177
+ ### Patch Changes
178
+
179
+ - Updated dependencies [105f95b]
180
+ - @ai-sdk/provider-utils@5.0.0-canary.39
181
+
182
+ ## 4.0.0-canary.60
183
+
184
+ ### Patch Changes
185
+
186
+ - 6a26901: feat(google): add `fileData` support to embedding model
187
+
188
+ ## 4.0.0-canary.59
189
+
190
+ ### Patch Changes
191
+
192
+ - db394ab: feat(provider/google): support cancelling long-running Interactions API agents via AbortSignal, and process their intermittent stream
193
+ - Updated dependencies [ca446f8]
194
+ - @ai-sdk/provider-utils@5.0.0-canary.38
195
+
196
+ ## 4.0.0-canary.58
197
+
198
+ ### Patch Changes
199
+
200
+ - Updated dependencies [d848405]
201
+ - @ai-sdk/provider-utils@5.0.0-canary.37
202
+
203
+ ## 4.0.0-canary.57
204
+
205
+ ### Patch Changes
206
+
207
+ - Updated dependencies [ca39020]
208
+ - @ai-sdk/provider-utils@5.0.0-canary.36
209
+
210
+ ## 4.0.0-canary.56
211
+
212
+ ### Patch Changes
213
+
214
+ - Updated dependencies [f634bac]
215
+ - @ai-sdk/provider-utils@5.0.0-canary.35
216
+
217
+ ## 4.0.0-canary.55
218
+
219
+ ### Patch Changes
220
+
221
+ - ebbb0f2: fix(provider/google): fix lack of image consistency when using Interactions API in stateless mode
222
+ - Updated dependencies [69254e0]
223
+ - Updated dependencies [3015fc3]
224
+ - @ai-sdk/provider-utils@5.0.0-canary.34
225
+
226
+ ## 4.0.0-canary.54
227
+
228
+ ### Patch Changes
229
+
230
+ - b04e23e: feat(provider/google): add support for the Gemini Interactions API
231
+
232
+ ## 4.0.0-canary.53
233
+
234
+ ### Patch Changes
235
+
236
+ - Updated dependencies [2427d88]
237
+ - @ai-sdk/provider-utils@5.0.0-canary.33
238
+
239
+ ## 4.0.0-canary.52
240
+
241
+ ### Patch Changes
242
+
243
+ - cfca634: fix(google): emit Vertex no-args streaming tool calls and preserve thoughtSignature
244
+
245
+ Vertex emits a no-args function call as a single chunk shaped `{ functionCall: { name: 'X' } }` with no `args`, no `partialArgs`, and no `willContinue`. The streaming parser had no branch for this shape, so the call was dropped along with any `thoughtSignature` it carried. For Gemini 3 thinking models this caused the next multi-turn step to 400 with `missing thought_signature`. The unary (`doGenerate`) path had the same drop.
246
+
247
+ Both paths now emit the call as a complete tool call with `'{}'` input and propagate `thoughtSignature` provider metadata.
248
+
249
+ Fixes #14847.
250
+
251
+ ## 4.0.0-canary.51
252
+
253
+ ### Patch Changes
254
+
255
+ - 5463d0d: feat(provider): align tool result output content file part types with top-level message file part types
256
+ - Updated dependencies [5463d0d]
257
+ - @ai-sdk/provider-utils@5.0.0-canary.32
258
+ - @ai-sdk/provider@4.0.0-canary.16
259
+
260
+ ## 4.0.0-canary.50
261
+
262
+ ### Patch Changes
263
+
264
+ - 0c4c275: trigger initial canary release
265
+ - Updated dependencies [0c4c275]
266
+ - @ai-sdk/provider-utils@5.0.0-canary.31
267
+ - @ai-sdk/provider@4.0.0-canary.15
268
+
269
+ ## 4.0.0-beta.49
270
+
271
+ ### Major Changes
272
+
273
+ - 04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols
274
+
275
+ For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases.
276
+
277
+ ### Patch Changes
278
+
279
+ - Updated dependencies [08d2129]
280
+ - @ai-sdk/provider-utils@5.0.0-beta.30
281
+
282
+ ## 4.0.0-beta.48
283
+
284
+ ### Patch Changes
285
+
286
+ - 9bd6512: feat(provider): change file part data property to be tagged with a type and remove the image part type
287
+ - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles
288
+ - Updated dependencies [9bd6512]
289
+ - Updated dependencies [258c093]
290
+ - Updated dependencies [b6783da]
291
+ - @ai-sdk/provider-utils@5.0.0-beta.29
292
+ - @ai-sdk/provider@4.0.0-beta.14
293
+
294
+ ## 4.0.0-beta.47
295
+
296
+ ### Patch Changes
297
+
298
+ - 9f0e36c: trigger release for all packages after provenance setup
299
+ - Updated dependencies [9f0e36c]
300
+ - @ai-sdk/provider@4.0.0-beta.13
301
+ - @ai-sdk/provider-utils@5.0.0-beta.28
302
+
303
+ ## 4.0.0-beta.46
304
+
305
+ ### Patch Changes
306
+
307
+ - 58a2ad7: fix: more precise default message for tool execution denial
308
+ - 84f36e0: fix(google): omit passing includeServerSideToolInvocations for Vertex tool_config
309
+ - Updated dependencies [785fe16]
310
+ - Updated dependencies [67df0a0]
311
+ - Updated dependencies [befb78c]
312
+ - Updated dependencies [0458559]
313
+ - Updated dependencies [5852c0a]
314
+ - Updated dependencies [fc92055]
315
+ - @ai-sdk/provider-utils@5.0.0-beta.27
316
+
317
+ ## 4.0.0-beta.45
318
+
319
+ ### Major Changes
320
+
321
+ - a3757d7: chore(provider/google): remove useless GenerativeAI affix from types and classes for consistency
322
+
323
+ ### Patch Changes
324
+
325
+ - Updated dependencies [2e98477]
326
+ - @ai-sdk/provider-utils@5.0.0-beta.26
327
+
328
+ ## 4.0.0-beta.44
329
+
330
+ ### Patch Changes
331
+
332
+ - Updated dependencies [eea8d98]
333
+ - @ai-sdk/provider-utils@5.0.0-beta.25
334
+
335
+ ## 4.0.0-beta.43
336
+
337
+ ### Patch Changes
338
+
339
+ - Updated dependencies [f807e45]
340
+ - @ai-sdk/provider-utils@5.0.0-beta.24
341
+
342
+ ## 4.0.0-beta.42
343
+
344
+ ### Patch Changes
345
+
346
+ - Updated dependencies [350ea38]
347
+ - @ai-sdk/provider-utils@5.0.0-beta.23
348
+
349
+ ## 4.0.0-beta.41
350
+
351
+ ### Patch Changes
352
+
353
+ - Updated dependencies [083947b]
354
+ - @ai-sdk/provider-utils@5.0.0-beta.22
355
+
356
+ ## 4.0.0-beta.40
357
+
358
+ ### Patch Changes
359
+
360
+ - 55f0938: chore(provider/google): update available models
361
+
362
+ ## 4.0.0-beta.39
363
+
364
+ ### Patch Changes
365
+
366
+ - Updated dependencies [add1126]
367
+ - @ai-sdk/provider-utils@5.0.0-beta.21
368
+
369
+ ## 4.0.0-beta.38
370
+
371
+ ### Patch Changes
372
+
373
+ - b3976a2: Add workflow serialization support to all provider models.
374
+
375
+ **`@ai-sdk/provider-utils`:** New `serializeModel()` helper that extracts only serializable properties from a model instance, filtering out functions and objects containing functions. Third-party provider authors can use this to add workflow support to their own models.
376
+
377
+ **All providers:** `headers` is now optional in provider config types. This is non-breaking — existing code that passes `headers` continues to work. Custom provider implementations that construct model configs manually can now omit `headers`, which is useful when models are deserialized from a workflow step boundary where auth is provided separately.
378
+
379
+ All provider model classes now include `WORKFLOW_SERIALIZE` and `WORKFLOW_DESERIALIZE` static methods, enabling them to cross workflow step boundaries without serialization errors.
380
+
381
+ - ff5eba1: feat: roll `image-*` tool output types into their equivalent `file-*` types
382
+ - Updated dependencies [b3976a2]
383
+ - Updated dependencies [ff5eba1]
384
+ - @ai-sdk/provider-utils@5.0.0-beta.20
385
+ - @ai-sdk/provider@4.0.0-beta.12
386
+
387
+ ## 4.0.0-beta.37
388
+
389
+ ### Major Changes
390
+
391
+ - ef992f8: Remove CommonJS exports from all packages. All packages are now ESM-only (`"type": "module"`). Consumers using `require()` must switch to ESM `import` syntax.
392
+
393
+ ### Patch Changes
394
+
395
+ - Updated dependencies [ef992f8]
396
+ - @ai-sdk/provider@4.0.0-beta.11
397
+ - @ai-sdk/provider-utils@5.0.0-beta.19
398
+
399
+ ## 4.0.0-beta.36
400
+
401
+ ### Patch Changes
402
+
403
+ - 9a0a618: fix(google): fix `serviceTier` to be correctly formatted for Vertex API
404
+
405
+ ## 4.0.0-beta.35
406
+
407
+ ### Patch Changes
408
+
409
+ - 90e2d8a: chore: fix unused vars not being flagged by our lint tooling
410
+ - Updated dependencies [90e2d8a]
411
+ - @ai-sdk/provider-utils@5.0.0-beta.18
412
+
413
+ ## 4.0.0-beta.34
414
+
415
+ ### Patch Changes
416
+
417
+ - 5b7e7c2: fix(google-vertex): don't send streamFunctionCallArguments for unary API calls and change default to false
418
+
419
+ ## 4.0.0-beta.33
420
+
421
+ ### Patch Changes
422
+
423
+ - Updated dependencies [3ae1786]
424
+ - @ai-sdk/provider-utils@5.0.0-beta.17
425
+
426
+ ## 4.0.0-beta.32
427
+
428
+ ### Patch Changes
429
+
430
+ - 5036db8: feat(google-vertex): add support for streaming tool arguments input
431
+
432
+ ## 4.0.0-beta.31
433
+
434
+ ### Patch Changes
435
+
436
+ - Updated dependencies [176466a]
437
+ - @ai-sdk/provider@4.0.0-beta.10
438
+ - @ai-sdk/provider-utils@5.0.0-beta.16
439
+
440
+ ## 4.0.0-beta.30
441
+
442
+ ### Patch Changes
443
+
444
+ - Updated dependencies [e311194]
445
+ - @ai-sdk/provider@4.0.0-beta.9
446
+ - @ai-sdk/provider-utils@5.0.0-beta.15
447
+
448
+ ## 4.0.0-beta.29
449
+
450
+ ### Patch Changes
451
+
452
+ - Updated dependencies [34bd95d]
453
+ - Updated dependencies [008271d]
454
+ - @ai-sdk/provider@4.0.0-beta.8
455
+ - @ai-sdk/provider-utils@5.0.0-beta.14
456
+
457
+ ## 4.0.0-beta.28
458
+
459
+ ### Patch Changes
460
+
461
+ - Updated dependencies [b0c2869]
462
+ - Updated dependencies [7e26e81]
463
+ - @ai-sdk/provider-utils@5.0.0-beta.13
464
+
465
+ ## 4.0.0-beta.27
466
+
467
+ ### Patch Changes
468
+
469
+ - 46d1149: chore(provider-utils,google): fix grammar errors in error and warning messages
470
+ - Updated dependencies [46d1149]
471
+ - @ai-sdk/provider-utils@5.0.0-beta.12
472
+
473
+ ## 4.0.0-beta.26
474
+
475
+ ### Patch Changes
476
+
477
+ - a05109d: feat(provider/google): preserve per-modality token details in usage data
478
+
479
+ ## 4.0.0-beta.25
480
+
481
+ ### Patch Changes
482
+
483
+ - Updated dependencies [6fd51c0]
484
+ - @ai-sdk/provider-utils@5.0.0-beta.11
485
+ - @ai-sdk/provider@4.0.0-beta.7
486
+
487
+ ## 4.0.0-beta.24
488
+
489
+ ### Patch Changes
490
+
491
+ - 55db546: fix(provider/google): fix Gemini service tier enum after upstream update
492
+
493
+ ## 4.0.0-beta.23
494
+
495
+ ### Patch Changes
496
+
497
+ - c29a26f: feat(provider): add support for provider references and uploading files as supported per provider
498
+ - Updated dependencies [c29a26f]
499
+ - @ai-sdk/provider-utils@5.0.0-beta.10
500
+ - @ai-sdk/provider@4.0.0-beta.6
501
+
502
+ ## 4.0.0-beta.22
503
+
504
+ ### Patch Changes
505
+
506
+ - 38fc777: Add AI Gateway hint to provider READMEs
507
+
508
+ ## 4.0.0-beta.21
509
+
510
+ ### Patch Changes
511
+
512
+ - Updated dependencies [2e17091]
513
+ - @ai-sdk/provider-utils@5.0.0-beta.9
514
+
515
+ ## 4.0.0-beta.20
516
+
517
+ ### Patch Changes
518
+
519
+ - Updated dependencies [986c6fd]
520
+ - Updated dependencies [493295c]
521
+ - @ai-sdk/provider-utils@5.0.0-beta.8
522
+
523
+ ## 4.0.0-beta.19
524
+
525
+ ### Patch Changes
526
+
527
+ - 01fa606: feat(provider/google): support combining built-in tools with function calling on Gemini 3
528
+
529
+ ## 4.0.0-beta.18
530
+
531
+ ### Patch Changes
532
+
533
+ - 9715ec7: feat(provider/google): add support for service tier parameter
534
+
535
+ ## 4.0.0-beta.17
536
+
537
+ ### Patch Changes
538
+
539
+ - Updated dependencies [1f509d4]
540
+ - @ai-sdk/provider-utils@5.0.0-beta.7
541
+ - @ai-sdk/provider@4.0.0-beta.5
542
+
543
+ ## 4.0.0-beta.16
544
+
545
+ ### Patch Changes
546
+
547
+ - 6190649: chore(provider/google): remove obsolete Google image model
548
+
549
+ ## 4.0.0-beta.15
550
+
551
+ ### Patch Changes
552
+
553
+ - 18c1970: feat(provider/google): Add multimodal tool-result support for Google function responses.
554
+
555
+ Tool results with `output.type = 'content'` now map media parts into
556
+ `functionResponse.parts` for Google models, including `image-data`,
557
+ `file-data`, and base64 `data:` URLs in URL-style content parts.
558
+ Remote HTTP(S) URLs in URL-style tool-result parts are not supported.
559
+
560
+ ## 4.0.0-beta.14
561
+
562
+ ### Patch Changes
563
+
564
+ - 3887c70: feat(provider): add new top-level reasoning parameter to spec and support it in `generateText` and `streamText`
565
+ - Updated dependencies [3887c70]
566
+ - @ai-sdk/provider-utils@5.0.0-beta.6
567
+ - @ai-sdk/provider@4.0.0-beta.4
568
+
569
+ ## 4.0.0-beta.13
570
+
571
+ ### Patch Changes
572
+
573
+ - Updated dependencies [776b617]
574
+ - @ai-sdk/provider-utils@5.0.0-beta.5
575
+ - @ai-sdk/provider@4.0.0-beta.3
576
+
577
+ ## 4.0.0-beta.12
578
+
579
+ ### Patch Changes
580
+
581
+ - Updated dependencies [61753c3]
582
+ - @ai-sdk/provider-utils@5.0.0-beta.4
583
+
584
+ ## 4.0.0-beta.11
585
+
586
+ ### Patch Changes
587
+
588
+ - f7d4f01: feat(provider): add support for `reasoning-file` type for files that are part of reasoning
589
+ - Updated dependencies [f7d4f01]
590
+ - @ai-sdk/provider-utils@5.0.0-beta.3
591
+ - @ai-sdk/provider@4.0.0-beta.2
592
+
593
+ ## 4.0.0-beta.10
594
+
595
+ ### Patch Changes
596
+
597
+ - Updated dependencies [5c2a5a2]
598
+ - @ai-sdk/provider@4.0.0-beta.1
599
+ - @ai-sdk/provider-utils@5.0.0-beta.2
600
+
601
+ ## 4.0.0-beta.9
602
+
603
+ ### Patch Changes
604
+
605
+ - e59176c: chore(google): update v3 specs to v4
606
+
3
607
  ## 4.0.0-beta.8
4
608
 
5
609
  ### Patch Changes
@@ -375,13 +979,13 @@
375
979
  Before
376
980
 
377
981
  ```ts
378
- model.textEmbeddingModel('my-model-id');
982
+ model.textEmbeddingModel("my-model-id");
379
983
  ```
380
984
 
381
985
  After
382
986
 
383
987
  ```ts
384
- model.embeddingModel('my-model-id');
988
+ model.embeddingModel("my-model-id");
385
989
  ```
386
990
 
387
991
  - 2625a04: feat(openai); update spec for mcp approval
@@ -690,13 +1294,13 @@
690
1294
  Before
691
1295
 
692
1296
  ```ts
693
- model.textEmbeddingModel('my-model-id');
1297
+ model.textEmbeddingModel("my-model-id");
694
1298
  ```
695
1299
 
696
1300
  After
697
1301
 
698
1302
  ```ts
699
- model.embeddingModel('my-model-id');
1303
+ model.embeddingModel("my-model-id");
700
1304
  ```
701
1305
 
702
1306
  - Updated dependencies [8d9e8ad]
@@ -1391,7 +1995,6 @@
1391
1995
  ### Patch Changes
1392
1996
 
1393
1997
  - 2e06f14: feat (provider/google): Change to provider defined tools
1394
-
1395
1998
  - Change the google search tool to be a provider defined tool
1396
1999
  - Added new URL context tool as a provider defined tool
1397
2000
 
package/README.md CHANGED
@@ -1,10 +1,12 @@
1
- # AI SDK - Google Generative AI Provider
1
+ # AI SDK - Google Provider
2
2
 
3
- The **[Google Generative AI provider](https://ai-sdk.dev/providers/ai-sdk-providers/google-generative-ai)** for the [AI SDK](https://ai-sdk.dev/docs) contains language model support for the [Google Generative AI](https://ai.google/discover/generativeai/) APIs.
3
+ The **[Google provider](https://ai-sdk.dev/providers/ai-sdk-providers/google-generative-ai)** for the [AI SDK](https://ai-sdk.dev/docs) contains language model support for the [Google Generative AI](https://ai.google/discover/generativeai/) APIs.
4
+
5
+ > **Deploying to Vercel?** With Vercel's AI Gateway you can access Google (and hundreds of models from other providers) — no additional packages, API keys, or extra cost. [Get started with AI Gateway](https://vercel.com/ai-gateway).
4
6
 
5
7
  ## Setup
6
8
 
7
- The Google Generative AI provider is available in the `@ai-sdk/google` module. You can install it with
9
+ The Google provider is available in the `@ai-sdk/google` module. You can install it with
8
10
 
9
11
  ```bash
10
12
  npm i @ai-sdk/google
@@ -40,4 +42,4 @@ const { text } = await generateText({
40
42
 
41
43
  ## Documentation
42
44
 
43
- Please check out the **[Google Generative AI provider documentation](https://ai-sdk.dev/providers/ai-sdk-providers/google-generative-ai)** for more information.
45
+ Please check out the **[Google provider documentation](https://ai-sdk.dev/providers/ai-sdk-providers/google-generative-ai)** for more information.