@ai-sdk/groq 4.0.0-beta.5 → 4.0.0-beta.55

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,415 @@
1
1
  # @ai-sdk/groq
2
2
 
3
+ ## 4.0.0-beta.55
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [0416e3e]
8
+ - @ai-sdk/provider@4.0.0-beta.20
9
+ - @ai-sdk/provider-utils@5.0.0-beta.50
10
+
11
+ ## 4.0.0-beta.54
12
+
13
+ ### Patch Changes
14
+
15
+ - b8396f0: trigger initial beta release
16
+ - Updated dependencies [b8396f0]
17
+ - @ai-sdk/provider-utils@5.0.0-beta.49
18
+ - @ai-sdk/provider@4.0.0-beta.19
19
+
20
+ ## 4.0.0-canary.53
21
+
22
+ ### Patch Changes
23
+
24
+ - Updated dependencies [aeda373]
25
+ - Updated dependencies [375fdd7]
26
+ - Updated dependencies [b4507d5]
27
+ - @ai-sdk/provider-utils@5.0.0-canary.48
28
+
29
+ ## 4.0.0-canary.52
30
+
31
+ ### Patch Changes
32
+
33
+ - Updated dependencies [bae5e2b]
34
+ - @ai-sdk/provider-utils@5.0.0-canary.47
35
+
36
+ ## 4.0.0-canary.51
37
+
38
+ ### Patch Changes
39
+
40
+ - Updated dependencies [ce769dd]
41
+ - @ai-sdk/provider@4.0.0-canary.18
42
+ - @ai-sdk/provider-utils@5.0.0-canary.46
43
+
44
+ ## 4.0.0-canary.50
45
+
46
+ ### Patch Changes
47
+
48
+ - Updated dependencies [ee798eb]
49
+ - Updated dependencies [daf6637]
50
+ - @ai-sdk/provider-utils@5.0.0-canary.45
51
+
52
+ ## 4.0.0-canary.49
53
+
54
+ ### Patch Changes
55
+
56
+ - 023550e: Deprecate `streamText` result `fullStream` in favor of `stream`.
57
+
58
+ ## 4.0.0-canary.48
59
+
60
+ ### Patch Changes
61
+
62
+ - Updated dependencies [6c93e36]
63
+ - Updated dependencies [f617ac2]
64
+ - @ai-sdk/provider-utils@5.0.0-canary.44
65
+
66
+ ## 4.0.0-canary.47
67
+
68
+ ### Patch Changes
69
+
70
+ - 7fc6bd6: Raise minimum supported Node.js version to 22. Supported versions: 22, 24, and 26.
71
+ - Updated dependencies [7fc6bd6]
72
+ - @ai-sdk/provider-utils@5.0.0-canary.43
73
+ - @ai-sdk/provider@4.0.0-canary.17
74
+
75
+ ## 4.0.0-canary.46
76
+
77
+ ### Patch Changes
78
+
79
+ - Updated dependencies [a6617c5]
80
+ - @ai-sdk/provider-utils@5.0.0-canary.42
81
+
82
+ ## 4.0.0-canary.45
83
+
84
+ ### Patch Changes
85
+
86
+ - Updated dependencies [28dfa06]
87
+ - Updated dependencies [e93fa91]
88
+ - @ai-sdk/provider-utils@5.0.0-canary.41
89
+
90
+ ## 4.0.0-canary.44
91
+
92
+ ### Patch Changes
93
+
94
+ - Updated dependencies [a7de9c9]
95
+ - @ai-sdk/provider-utils@5.0.0-canary.40
96
+
97
+ ## 4.0.0-canary.43
98
+
99
+ ### Patch Changes
100
+
101
+ - Updated dependencies [105f95b]
102
+ - @ai-sdk/provider-utils@5.0.0-canary.39
103
+
104
+ ## 4.0.0-canary.42
105
+
106
+ ### Patch Changes
107
+
108
+ - Updated dependencies [ca446f8]
109
+ - @ai-sdk/provider-utils@5.0.0-canary.38
110
+
111
+ ## 4.0.0-canary.41
112
+
113
+ ### Patch Changes
114
+
115
+ - Updated dependencies [d848405]
116
+ - @ai-sdk/provider-utils@5.0.0-canary.37
117
+
118
+ ## 4.0.0-canary.40
119
+
120
+ ### Patch Changes
121
+
122
+ - Updated dependencies [ca39020]
123
+ - @ai-sdk/provider-utils@5.0.0-canary.36
124
+
125
+ ## 4.0.0-canary.39
126
+
127
+ ### Patch Changes
128
+
129
+ - Updated dependencies [f634bac]
130
+ - @ai-sdk/provider-utils@5.0.0-canary.35
131
+
132
+ ## 4.0.0-canary.38
133
+
134
+ ### Patch Changes
135
+
136
+ - Updated dependencies [69254e0]
137
+ - Updated dependencies [3015fc3]
138
+ - @ai-sdk/provider-utils@5.0.0-canary.34
139
+
140
+ ## 4.0.0-canary.37
141
+
142
+ ### Patch Changes
143
+
144
+ - Updated dependencies [2427d88]
145
+ - @ai-sdk/provider-utils@5.0.0-canary.33
146
+
147
+ ## 4.0.0-canary.36
148
+
149
+ ### Patch Changes
150
+
151
+ - Updated dependencies [5463d0d]
152
+ - @ai-sdk/provider-utils@5.0.0-canary.32
153
+ - @ai-sdk/provider@4.0.0-canary.16
154
+
155
+ ## 4.0.0-canary.35
156
+
157
+ ### Patch Changes
158
+
159
+ - 0c4c275: trigger initial canary release
160
+ - Updated dependencies [0c4c275]
161
+ - @ai-sdk/provider-utils@5.0.0-canary.31
162
+ - @ai-sdk/provider@4.0.0-canary.15
163
+
164
+ ## 4.0.0-beta.34
165
+
166
+ ### Major Changes
167
+
168
+ - 04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols
169
+
170
+ For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases.
171
+
172
+ ### Patch Changes
173
+
174
+ - Updated dependencies [08d2129]
175
+ - @ai-sdk/provider-utils@5.0.0-beta.30
176
+
177
+ ## 4.0.0-beta.33
178
+
179
+ ### Patch Changes
180
+
181
+ - 9bd6512: feat(provider): change file part data property to be tagged with a type and remove the image part type
182
+ - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles
183
+ - Updated dependencies [9bd6512]
184
+ - Updated dependencies [258c093]
185
+ - Updated dependencies [b6783da]
186
+ - @ai-sdk/provider-utils@5.0.0-beta.29
187
+ - @ai-sdk/provider@4.0.0-beta.14
188
+
189
+ ## 4.0.0-beta.32
190
+
191
+ ### Patch Changes
192
+
193
+ - 9f0e36c: trigger release for all packages after provenance setup
194
+ - Updated dependencies [9f0e36c]
195
+ - @ai-sdk/provider@4.0.0-beta.13
196
+ - @ai-sdk/provider-utils@5.0.0-beta.28
197
+
198
+ ## 4.0.0-beta.31
199
+
200
+ ### Patch Changes
201
+
202
+ - 58a2ad7: fix: more precise default message for tool execution denial
203
+ - Updated dependencies [785fe16]
204
+ - Updated dependencies [67df0a0]
205
+ - Updated dependencies [befb78c]
206
+ - Updated dependencies [0458559]
207
+ - Updated dependencies [5852c0a]
208
+ - Updated dependencies [fc92055]
209
+ - @ai-sdk/provider-utils@5.0.0-beta.27
210
+
211
+ ## 4.0.0-beta.30
212
+
213
+ ### Patch Changes
214
+
215
+ - Updated dependencies [2e98477]
216
+ - @ai-sdk/provider-utils@5.0.0-beta.26
217
+
218
+ ## 4.0.0-beta.29
219
+
220
+ ### Patch Changes
221
+
222
+ - Updated dependencies [eea8d98]
223
+ - @ai-sdk/provider-utils@5.0.0-beta.25
224
+
225
+ ## 4.0.0-beta.28
226
+
227
+ ### Patch Changes
228
+
229
+ - f807e45: Extract shared `StreamingToolCallTracker` class into `@ai-sdk/provider-utils` to deduplicate streaming tool call handling across OpenAI-compatible providers. Also adds missing `generateId()` fallback for `toolCallId` in Alibaba's `doGenerate` path and ensures all providers finalize unfinished tool calls during stream flush.
230
+ - Updated dependencies [f807e45]
231
+ - @ai-sdk/provider-utils@5.0.0-beta.24
232
+
233
+ ## 4.0.0-beta.27
234
+
235
+ ### Patch Changes
236
+
237
+ - Updated dependencies [350ea38]
238
+ - @ai-sdk/provider-utils@5.0.0-beta.23
239
+
240
+ ## 4.0.0-beta.26
241
+
242
+ ### Patch Changes
243
+
244
+ - Updated dependencies [083947b]
245
+ - @ai-sdk/provider-utils@5.0.0-beta.22
246
+
247
+ ## 4.0.0-beta.25
248
+
249
+ ### Patch Changes
250
+
251
+ - Updated dependencies [add1126]
252
+ - @ai-sdk/provider-utils@5.0.0-beta.21
253
+
254
+ ## 4.0.0-beta.24
255
+
256
+ ### Patch Changes
257
+
258
+ - b3976a2: Add workflow serialization support to all provider models.
259
+
260
+ **`@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.
261
+
262
+ **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.
263
+
264
+ All provider model classes now include `WORKFLOW_SERIALIZE` and `WORKFLOW_DESERIALIZE` static methods, enabling them to cross workflow step boundaries without serialization errors.
265
+
266
+ - Updated dependencies [b3976a2]
267
+ - Updated dependencies [ff5eba1]
268
+ - @ai-sdk/provider-utils@5.0.0-beta.20
269
+ - @ai-sdk/provider@4.0.0-beta.12
270
+
271
+ ## 4.0.0-beta.23
272
+
273
+ ### Major Changes
274
+
275
+ - ef992f8: Remove CommonJS exports from all packages. All packages are now ESM-only (`"type": "module"`). Consumers using `require()` must switch to ESM `import` syntax.
276
+
277
+ ### Patch Changes
278
+
279
+ - Updated dependencies [ef992f8]
280
+ - @ai-sdk/provider@4.0.0-beta.11
281
+ - @ai-sdk/provider-utils@5.0.0-beta.19
282
+
283
+ ## 4.0.0-beta.22
284
+
285
+ ### Patch Changes
286
+
287
+ - 90e2d8a: chore: fix unused vars not being flagged by our lint tooling
288
+ - Updated dependencies [90e2d8a]
289
+ - @ai-sdk/provider-utils@5.0.0-beta.18
290
+
291
+ ## 4.0.0-beta.21
292
+
293
+ ### Patch Changes
294
+
295
+ - Updated dependencies [3ae1786]
296
+ - @ai-sdk/provider-utils@5.0.0-beta.17
297
+
298
+ ## 4.0.0-beta.20
299
+
300
+ ### Patch Changes
301
+
302
+ - Updated dependencies [176466a]
303
+ - @ai-sdk/provider@4.0.0-beta.10
304
+ - @ai-sdk/provider-utils@5.0.0-beta.16
305
+
306
+ ## 4.0.0-beta.19
307
+
308
+ ### Patch Changes
309
+
310
+ - Updated dependencies [e311194]
311
+ - @ai-sdk/provider@4.0.0-beta.9
312
+ - @ai-sdk/provider-utils@5.0.0-beta.15
313
+
314
+ ## 4.0.0-beta.18
315
+
316
+ ### Patch Changes
317
+
318
+ - Updated dependencies [34bd95d]
319
+ - Updated dependencies [008271d]
320
+ - @ai-sdk/provider@4.0.0-beta.8
321
+ - @ai-sdk/provider-utils@5.0.0-beta.14
322
+
323
+ ## 4.0.0-beta.17
324
+
325
+ ### Patch Changes
326
+
327
+ - Updated dependencies [b0c2869]
328
+ - Updated dependencies [7e26e81]
329
+ - @ai-sdk/provider-utils@5.0.0-beta.13
330
+
331
+ ## 4.0.0-beta.16
332
+
333
+ ### Patch Changes
334
+
335
+ - Updated dependencies [46d1149]
336
+ - @ai-sdk/provider-utils@5.0.0-beta.12
337
+
338
+ ## 4.0.0-beta.15
339
+
340
+ ### Patch Changes
341
+
342
+ - 6fd51c0: fix(provider): preserve error type prefix in getErrorMessage
343
+ - Updated dependencies [6fd51c0]
344
+ - @ai-sdk/provider-utils@5.0.0-beta.11
345
+ - @ai-sdk/provider@4.0.0-beta.7
346
+
347
+ ## 4.0.0-beta.14
348
+
349
+ ### Patch Changes
350
+
351
+ - c29a26f: feat(provider): add support for provider references and uploading files as supported per provider
352
+ - Updated dependencies [c29a26f]
353
+ - @ai-sdk/provider-utils@5.0.0-beta.10
354
+ - @ai-sdk/provider@4.0.0-beta.6
355
+
356
+ ## 4.0.0-beta.13
357
+
358
+ ### Patch Changes
359
+
360
+ - 38fc777: Add AI Gateway hint to provider READMEs
361
+
362
+ ## 4.0.0-beta.12
363
+
364
+ ### Patch Changes
365
+
366
+ - Updated dependencies [2e17091]
367
+ - @ai-sdk/provider-utils@5.0.0-beta.9
368
+
369
+ ## 4.0.0-beta.11
370
+
371
+ ### Patch Changes
372
+
373
+ - Updated dependencies [986c6fd]
374
+ - Updated dependencies [493295c]
375
+ - @ai-sdk/provider-utils@5.0.0-beta.8
376
+
377
+ ## 4.0.0-beta.10
378
+
379
+ ### Patch Changes
380
+
381
+ - 7bf717f: feat: Groq support for performance service tier
382
+
383
+ ## 4.0.0-beta.9
384
+
385
+ ### Patch Changes
386
+
387
+ - Updated dependencies [1f509d4]
388
+ - @ai-sdk/provider-utils@5.0.0-beta.7
389
+ - @ai-sdk/provider@4.0.0-beta.5
390
+
391
+ ## 4.0.0-beta.8
392
+
393
+ ### Patch Changes
394
+
395
+ - 74d520f: feat: migrate providers to support new top-level `reasoning` parameter
396
+
397
+ ## 4.0.0-beta.7
398
+
399
+ ### Patch Changes
400
+
401
+ - Updated dependencies [3887c70]
402
+ - @ai-sdk/provider-utils@5.0.0-beta.6
403
+ - @ai-sdk/provider@4.0.0-beta.4
404
+
405
+ ## 4.0.0-beta.6
406
+
407
+ ### Patch Changes
408
+
409
+ - Updated dependencies [776b617]
410
+ - @ai-sdk/provider-utils@5.0.0-beta.5
411
+ - @ai-sdk/provider@4.0.0-beta.3
412
+
3
413
  ## 4.0.0-beta.5
4
414
 
5
415
  ### Patch Changes
@@ -275,13 +685,13 @@
275
685
  Before
276
686
 
277
687
  ```ts
278
- model.textEmbeddingModel('my-model-id');
688
+ model.textEmbeddingModel("my-model-id");
279
689
  ```
280
690
 
281
691
  After
282
692
 
283
693
  ```ts
284
- model.embeddingModel('my-model-id');
694
+ model.embeddingModel("my-model-id");
285
695
  ```
286
696
 
287
697
  - 2625a04: feat(openai); update spec for mcp approval
@@ -502,13 +912,13 @@
502
912
  Before
503
913
 
504
914
  ```ts
505
- model.textEmbeddingModel('my-model-id');
915
+ model.textEmbeddingModel("my-model-id");
506
916
  ```
507
917
 
508
918
  After
509
919
 
510
920
  ```ts
511
- model.embeddingModel('my-model-id');
921
+ model.embeddingModel("my-model-id");
512
922
  ```
513
923
 
514
924
  - Updated dependencies [8d9e8ad]
package/README.md CHANGED
@@ -3,6 +3,8 @@
3
3
  The **[Groq provider](https://ai-sdk.dev/providers/ai-sdk-providers/groq)** for the [AI SDK](https://ai-sdk.dev/docs)
4
4
  contains language model support for the Groq chat and completion APIs, transcription support, and browser search tool.
5
5
 
6
+ > **Deploying to Vercel?** With Vercel's AI Gateway you can access Groq (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).
7
+
6
8
  ## Setup
7
9
 
8
10
  The Groq provider is available in the `@ai-sdk/groq` module. You can install it with
@@ -74,7 +76,7 @@ const result = streamText({
74
76
  toolChoice: 'required',
75
77
  });
76
78
 
77
- for await (const delta of result.fullStream) {
79
+ for await (const delta of result.stream) {
78
80
  if (delta.type === 'text-delta') {
79
81
  process.stdout.write(delta.text);
80
82
  }
package/dist/index.d.ts CHANGED
@@ -4,7 +4,7 @@ import { InferSchema, FetchFunction } from '@ai-sdk/provider-utils';
4
4
  import { z } from 'zod/v4';
5
5
 
6
6
  type GroqChatModelId = 'gemma2-9b-it' | 'llama-3.1-8b-instant' | 'llama-3.3-70b-versatile' | 'meta-llama/llama-guard-4-12b' | 'openai/gpt-oss-120b' | 'openai/gpt-oss-20b' | 'deepseek-r1-distill-llama-70b' | 'meta-llama/llama-4-maverick-17b-128e-instruct' | 'meta-llama/llama-4-scout-17b-16e-instruct' | 'meta-llama/llama-prompt-guard-2-22m' | 'meta-llama/llama-prompt-guard-2-86m' | 'moonshotai/kimi-k2-instruct-0905' | 'qwen/qwen3-32b' | 'llama-guard-3-8b' | 'llama3-70b-8192' | 'llama3-8b-8192' | 'mixtral-8x7b-32768' | 'qwen-qwq-32b' | 'qwen-2.5-32b' | 'deepseek-r1-distill-qwen-32b' | (string & {});
7
- declare const groqLanguageModelOptions: z.ZodObject<{
7
+ declare const groqLanguageModelChatOptions: z.ZodObject<{
8
8
  reasoningFormat: z.ZodOptional<z.ZodEnum<{
9
9
  parsed: "parsed";
10
10
  raw: "raw";
@@ -23,11 +23,12 @@ declare const groqLanguageModelOptions: z.ZodObject<{
23
23
  strictJsonSchema: z.ZodOptional<z.ZodBoolean>;
24
24
  serviceTier: z.ZodOptional<z.ZodEnum<{
25
25
  on_demand: "on_demand";
26
+ performance: "performance";
26
27
  flex: "flex";
27
28
  auto: "auto";
28
29
  }>>;
29
30
  }, z.core.$strip>;
30
- type GroqLanguageModelOptions = z.infer<typeof groqLanguageModelOptions>;
31
+ type GroqLanguageModelChatOptions = z.infer<typeof groqLanguageModelChatOptions>;
31
32
 
32
33
  type GroqTranscriptionModelId = 'whisper-large-v3-turbo' | 'whisper-large-v3' | (string & {});
33
34
  declare const groqTranscriptionModelOptions: _ai_sdk_provider_utils.LazySchema<{
@@ -40,7 +41,7 @@ declare const groqTranscriptionModelOptions: _ai_sdk_provider_utils.LazySchema<{
40
41
  type GroqTranscriptionModelOptions = InferSchema<typeof groqTranscriptionModelOptions>;
41
42
 
42
43
  declare const groqTools: {
43
- browserSearch: _ai_sdk_provider_utils.ProviderToolFactory<{}, {}>;
44
+ browserSearch: _ai_sdk_provider_utils.ProviderExecutedToolFactory<{}, {}, {}, {}>;
44
45
  };
45
46
 
46
47
  interface GroqProvider extends ProviderV4 {
@@ -105,8 +106,8 @@ declare const groq: GroqProvider;
105
106
  *
106
107
  * @see https://console.groq.com/docs/browser-search
107
108
  */
108
- declare const browserSearch: _ai_sdk_provider_utils.ProviderToolFactory<{}, {}>;
109
+ declare const browserSearch: _ai_sdk_provider_utils.ProviderExecutedToolFactory<{}, {}, {}, {}>;
109
110
 
110
111
  declare const VERSION: string;
111
112
 
112
- export { type GroqLanguageModelOptions, type GroqProvider, type GroqLanguageModelOptions as GroqProviderOptions, type GroqProviderSettings, type GroqTranscriptionModelOptions, VERSION, browserSearch, createGroq, groq };
113
+ export { type GroqLanguageModelChatOptions, type GroqLanguageModelChatOptions as GroqLanguageModelOptions, type GroqProvider, type GroqLanguageModelChatOptions as GroqProviderOptions, type GroqProviderSettings, type GroqTranscriptionModelOptions, VERSION, browserSearch, createGroq, groq };