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

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