@ai-sdk/groq 1.2.9 → 2.0.0-alpha.10

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,49 +1,280 @@
1
1
  # @ai-sdk/groq
2
2
 
3
- ## 1.2.9
3
+ ## 2.0.0-alpha.10
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - Updated dependencies [d87b9d1]
8
- - @ai-sdk/provider-utils@2.2.8
7
+ - Updated dependencies [c4df419]
8
+ - @ai-sdk/provider@2.0.0-alpha.10
9
+ - @ai-sdk/provider-utils@3.0.0-alpha.10
9
10
 
10
- ## 1.2.8
11
+ ## 2.0.0-alpha.9
11
12
 
12
13
  ### Patch Changes
13
14
 
14
- - 74688db: feat(providers/groq): add transcribe
15
- - Updated dependencies [beef951]
16
- - @ai-sdk/provider@1.1.3
17
- - @ai-sdk/provider-utils@2.2.7
15
+ - Updated dependencies [811dff3]
16
+ - @ai-sdk/provider@2.0.0-alpha.9
17
+ - @ai-sdk/provider-utils@3.0.0-alpha.9
18
18
 
19
- ## 1.2.7
19
+ ## 2.0.0-alpha.8
20
20
 
21
21
  ### Patch Changes
22
22
 
23
- - Updated dependencies [013faa8]
24
- - @ai-sdk/provider@1.1.2
25
- - @ai-sdk/provider-utils@2.2.6
23
+ - Updated dependencies [4fef487]
24
+ - Updated dependencies [9222aeb]
25
+ - @ai-sdk/provider-utils@3.0.0-alpha.8
26
+ - @ai-sdk/provider@2.0.0-alpha.8
26
27
 
27
- ## 1.2.6
28
+ ## 2.0.0-alpha.7
28
29
 
29
30
  ### Patch Changes
30
31
 
31
- - Updated dependencies [c21fa6d]
32
- - @ai-sdk/provider-utils@2.2.5
33
- - @ai-sdk/provider@1.1.1
32
+ - Updated dependencies [5c56081]
33
+ - @ai-sdk/provider@2.0.0-alpha.7
34
+ - @ai-sdk/provider-utils@3.0.0-alpha.7
34
35
 
35
- ## 1.2.5
36
+ ## 2.0.0-alpha.6
36
37
 
37
38
  ### Patch Changes
38
39
 
39
- - 8fdc8fe: feat (provider/groq): add llama 4 model
40
+ - Updated dependencies [0d2c085]
41
+ - @ai-sdk/provider@2.0.0-alpha.6
42
+ - @ai-sdk/provider-utils@3.0.0-alpha.6
40
43
 
41
- ## 1.2.4
44
+ ## 2.0.0-alpha.4
42
45
 
43
46
  ### Patch Changes
44
47
 
45
- - Updated dependencies [2c19b9a]
46
- - @ai-sdk/provider-utils@2.2.4
48
+ - Updated dependencies [dc714f3]
49
+ - @ai-sdk/provider@2.0.0-alpha.4
50
+ - @ai-sdk/provider-utils@3.0.0-alpha.4
51
+
52
+ ## 2.0.0-alpha.3
53
+
54
+ ### Patch Changes
55
+
56
+ - Updated dependencies [6b98118]
57
+ - @ai-sdk/provider@2.0.0-alpha.3
58
+ - @ai-sdk/provider-utils@3.0.0-alpha.3
59
+
60
+ ## 2.0.0-alpha.2
61
+
62
+ ### Patch Changes
63
+
64
+ - Updated dependencies [26535e0]
65
+ - @ai-sdk/provider@2.0.0-alpha.2
66
+ - @ai-sdk/provider-utils@3.0.0-alpha.2
67
+
68
+ ## 2.0.0-alpha.1
69
+
70
+ ### Patch Changes
71
+
72
+ - Updated dependencies [3f2f00c]
73
+ - @ai-sdk/provider@2.0.0-alpha.1
74
+ - @ai-sdk/provider-utils@3.0.0-alpha.1
75
+
76
+ ## 2.0.0-canary.20
77
+
78
+ ### Patch Changes
79
+
80
+ - Updated dependencies [faf8446]
81
+ - @ai-sdk/provider-utils@3.0.0-canary.19
82
+
83
+ ## 2.0.0-canary.19
84
+
85
+ ### Patch Changes
86
+
87
+ - Updated dependencies [40acf9b]
88
+ - @ai-sdk/provider-utils@3.0.0-canary.18
89
+
90
+ ## 2.0.0-canary.18
91
+
92
+ ### Patch Changes
93
+
94
+ - Updated dependencies [ea7a7c9]
95
+ - @ai-sdk/provider-utils@3.0.0-canary.17
96
+
97
+ ## 2.0.0-canary.17
98
+
99
+ ### Patch Changes
100
+
101
+ - Updated dependencies [87b828f]
102
+ - @ai-sdk/provider-utils@3.0.0-canary.16
103
+
104
+ ## 2.0.0-canary.16
105
+
106
+ ### Patch Changes
107
+
108
+ - 6f231db: fix(providers): always use optional instead of mix of nullish for providerOptions
109
+ - Updated dependencies [a571d6e]
110
+ - Updated dependencies [a8c8bd5]
111
+ - Updated dependencies [7979f7f]
112
+ - Updated dependencies [41fa418]
113
+ - @ai-sdk/provider-utils@3.0.0-canary.15
114
+ - @ai-sdk/provider@2.0.0-canary.14
115
+
116
+ ## 2.0.0-canary.15
117
+
118
+ ### Patch Changes
119
+
120
+ - Updated dependencies [957b739]
121
+ - Updated dependencies [9bd5ab5]
122
+ - @ai-sdk/provider-utils@3.0.0-canary.14
123
+ - @ai-sdk/provider@2.0.0-canary.13
124
+
125
+ ## 2.0.0-canary.14
126
+
127
+ ### Patch Changes
128
+
129
+ - Updated dependencies [7b3ae3f]
130
+ - Updated dependencies [0ff02bb]
131
+ - @ai-sdk/provider@2.0.0-canary.12
132
+ - @ai-sdk/provider-utils@3.0.0-canary.13
133
+
134
+ ## 2.0.0-canary.13
135
+
136
+ ### Patch Changes
137
+
138
+ - Updated dependencies [9bf7291]
139
+ - Updated dependencies [4617fab]
140
+ - Updated dependencies [e030615]
141
+ - @ai-sdk/provider@2.0.0-canary.11
142
+ - @ai-sdk/provider-utils@3.0.0-canary.12
143
+
144
+ ## 2.0.0-canary.12
145
+
146
+ ### Patch Changes
147
+
148
+ - Updated dependencies [66962ed]
149
+ - Updated dependencies [9301f86]
150
+ - Updated dependencies [a3f768e]
151
+ - @ai-sdk/provider-utils@3.0.0-canary.11
152
+ - @ai-sdk/provider@2.0.0-canary.10
153
+
154
+ ## 2.0.0-canary.11
155
+
156
+ ### Patch Changes
157
+
158
+ - Updated dependencies [e86be6f]
159
+ - @ai-sdk/provider@2.0.0-canary.9
160
+ - @ai-sdk/provider-utils@3.0.0-canary.10
161
+
162
+ ## 2.0.0-canary.10
163
+
164
+ ### Patch Changes
165
+
166
+ - Updated dependencies [95857aa]
167
+ - Updated dependencies [7ea4132]
168
+ - @ai-sdk/provider@2.0.0-canary.8
169
+ - @ai-sdk/provider-utils@3.0.0-canary.9
170
+
171
+ ## 2.0.0-canary.9
172
+
173
+ ### Patch Changes
174
+
175
+ - 9bd148e: feat(providers/groq): add transcribe
176
+ - Updated dependencies [5d142ab]
177
+ - Updated dependencies [b6b43c7]
178
+ - Updated dependencies [8aa9e20]
179
+ - Updated dependencies [3795467]
180
+ - @ai-sdk/provider-utils@3.0.0-canary.8
181
+ - @ai-sdk/provider@2.0.0-canary.7
182
+
183
+ ## 2.0.0-canary.8
184
+
185
+ ### Patch Changes
186
+
187
+ - Updated dependencies [26735b5]
188
+ - Updated dependencies [443d8ec]
189
+ - Updated dependencies [14c9410]
190
+ - Updated dependencies [d9c98f4]
191
+ - Updated dependencies [c4a2fec]
192
+ - Updated dependencies [0054544]
193
+ - Updated dependencies [9e9c809]
194
+ - Updated dependencies [32831c6]
195
+ - Updated dependencies [d0f9495]
196
+ - Updated dependencies [fd65bc6]
197
+ - Updated dependencies [393138b]
198
+ - Updated dependencies [7182d14]
199
+ - @ai-sdk/provider@2.0.0-canary.6
200
+ - @ai-sdk/provider-utils@3.0.0-canary.7
201
+
202
+ ## 2.0.0-canary.7
203
+
204
+ ### Patch Changes
205
+
206
+ - ebeac90: chore(providers/groq): convert to providerOptions
207
+ - Updated dependencies [411e483]
208
+ - Updated dependencies [79457bd]
209
+ - Updated dependencies [ad80501]
210
+ - Updated dependencies [1766ede]
211
+ - Updated dependencies [f10304b]
212
+ - @ai-sdk/provider@2.0.0-canary.5
213
+ - @ai-sdk/provider-utils@3.0.0-canary.6
214
+
215
+ ## 2.0.0-canary.6
216
+
217
+ ### Patch Changes
218
+
219
+ - Updated dependencies [6f6bb89]
220
+ - @ai-sdk/provider@2.0.0-canary.4
221
+ - @ai-sdk/provider-utils@3.0.0-canary.5
222
+
223
+ ## 2.0.0-canary.5
224
+
225
+ ### Patch Changes
226
+
227
+ - Updated dependencies [d1a1aa1]
228
+ - @ai-sdk/provider@2.0.0-canary.3
229
+ - @ai-sdk/provider-utils@3.0.0-canary.4
230
+
231
+ ## 2.0.0-canary.4
232
+
233
+ ### Patch Changes
234
+
235
+ - Updated dependencies [a166433]
236
+ - Updated dependencies [abf9a79]
237
+ - Updated dependencies [9f95b35]
238
+ - Updated dependencies [0a87932]
239
+ - Updated dependencies [6dc848c]
240
+ - @ai-sdk/provider-utils@3.0.0-canary.3
241
+ - @ai-sdk/provider@2.0.0-canary.2
242
+
243
+ ## 2.0.0-canary.3
244
+
245
+ ### Patch Changes
246
+
247
+ - Updated dependencies [c57e248]
248
+ - Updated dependencies [33f4a6a]
249
+ - @ai-sdk/provider@2.0.0-canary.1
250
+ - @ai-sdk/provider-utils@3.0.0-canary.2
251
+
252
+ ## 2.0.0-canary.2
253
+
254
+ ### Patch Changes
255
+
256
+ - 67b9604: feat (provider/groq): add llama 4 model
257
+
258
+ ## 2.0.0-canary.1
259
+
260
+ ### Patch Changes
261
+
262
+ - Updated dependencies [060370c]
263
+ - Updated dependencies [0c0c0b3]
264
+ - Updated dependencies [63d791d]
265
+ - @ai-sdk/provider-utils@3.0.0-canary.1
266
+
267
+ ## 2.0.0-canary.0
268
+
269
+ ### Major Changes
270
+
271
+ - d5f588f: AI SDK 5
272
+
273
+ ### Patch Changes
274
+
275
+ - Updated dependencies [d5f588f]
276
+ - @ai-sdk/provider-utils@3.0.0-canary.0
277
+ - @ai-sdk/provider@2.0.0-canary.0
47
278
 
48
279
  ## 1.2.3
49
280
 
package/dist/index.d.mts CHANGED
@@ -1,38 +1,41 @@
1
- import { ProviderV1, LanguageModelV1, TranscriptionModelV1 } from '@ai-sdk/provider';
1
+ import { ProviderV2, LanguageModelV2, TranscriptionModelV1 } from '@ai-sdk/provider';
2
2
  import { FetchFunction } from '@ai-sdk/provider-utils';
3
+ import { z } from 'zod';
3
4
 
4
5
  type GroqChatModelId = 'gemma2-9b-it' | 'llama-3.3-70b-versatile' | 'llama-3.1-8b-instant' | 'llama-guard-3-8b' | 'llama3-70b-8192' | 'llama3-8b-8192' | 'mixtral-8x7b-32768' | 'meta-llama/llama-4-scout-17b-16e-instruct' | 'qwen-qwq-32b' | 'mistral-saba-24b' | 'qwen-2.5-32b' | 'deepseek-r1-distill-qwen-32b' | 'deepseek-r1-distill-llama-70b' | (string & {});
5
- interface GroqChatSettings {
6
+ declare const groqProviderOptions: z.ZodObject<{
7
+ reasoningFormat: z.ZodOptional<z.ZodEnum<["parsed", "raw", "hidden"]>>;
6
8
  /**
7
- Whether to enable parallel function calling during tool use. Default to true.
9
+ * Whether to enable parallel function calling during tool use. Default to true.
8
10
  */
9
- parallelToolCalls?: boolean;
11
+ parallelToolCalls: z.ZodOptional<z.ZodBoolean>;
10
12
  /**
11
- A unique identifier representing your end-user, which can help OpenAI to
12
- monitor and detect abuse. Learn more.
13
- */
14
- user?: string;
15
- /**
16
- Automatically download images and pass the image as data to the model.
17
- Groq supports image URLs for public models, so this is only needed for
18
- private models or when the images are not publicly accessible.
19
-
20
- Defaults to `false`.
13
+ * A unique identifier representing your end-user, which can help OpenAI to
14
+ * monitor and detect abuse. Learn more.
21
15
  */
22
- downloadImages?: boolean;
23
- }
16
+ user: z.ZodOptional<z.ZodString>;
17
+ }, "strip", z.ZodTypeAny, {
18
+ user?: string | undefined;
19
+ reasoningFormat?: "parsed" | "raw" | "hidden" | undefined;
20
+ parallelToolCalls?: boolean | undefined;
21
+ }, {
22
+ user?: string | undefined;
23
+ reasoningFormat?: "parsed" | "raw" | "hidden" | undefined;
24
+ parallelToolCalls?: boolean | undefined;
25
+ }>;
26
+ type GroqProviderOptions = z.infer<typeof groqProviderOptions>;
24
27
 
25
28
  type GroqTranscriptionModelId = 'whisper-large-v3-turbo' | 'distil-whisper-large-v3-en' | 'whisper-large-v3' | (string & {});
26
29
 
27
- interface GroqProvider extends ProviderV1 {
30
+ interface GroqProvider extends ProviderV2 {
28
31
  /**
29
32
  Creates a model for text generation.
30
33
  */
31
- (modelId: GroqChatModelId, settings?: GroqChatSettings): LanguageModelV1;
34
+ (modelId: GroqChatModelId): LanguageModelV2;
32
35
  /**
33
36
  Creates an Groq chat model for text generation.
34
37
  */
35
- languageModel(modelId: GroqChatModelId, settings?: GroqChatSettings): LanguageModelV1;
38
+ languageModel(modelId: GroqChatModelId): LanguageModelV2;
36
39
  /**
37
40
  Creates a model for transcription.
38
41
  */
@@ -66,4 +69,4 @@ Default Groq provider instance.
66
69
  */
67
70
  declare const groq: GroqProvider;
68
71
 
69
- export { type GroqProvider, type GroqProviderSettings, createGroq, groq };
72
+ export { type GroqProvider, type GroqProviderOptions, type GroqProviderSettings, createGroq, groq };
package/dist/index.d.ts CHANGED
@@ -1,38 +1,41 @@
1
- import { ProviderV1, LanguageModelV1, TranscriptionModelV1 } from '@ai-sdk/provider';
1
+ import { ProviderV2, LanguageModelV2, TranscriptionModelV1 } from '@ai-sdk/provider';
2
2
  import { FetchFunction } from '@ai-sdk/provider-utils';
3
+ import { z } from 'zod';
3
4
 
4
5
  type GroqChatModelId = 'gemma2-9b-it' | 'llama-3.3-70b-versatile' | 'llama-3.1-8b-instant' | 'llama-guard-3-8b' | 'llama3-70b-8192' | 'llama3-8b-8192' | 'mixtral-8x7b-32768' | 'meta-llama/llama-4-scout-17b-16e-instruct' | 'qwen-qwq-32b' | 'mistral-saba-24b' | 'qwen-2.5-32b' | 'deepseek-r1-distill-qwen-32b' | 'deepseek-r1-distill-llama-70b' | (string & {});
5
- interface GroqChatSettings {
6
+ declare const groqProviderOptions: z.ZodObject<{
7
+ reasoningFormat: z.ZodOptional<z.ZodEnum<["parsed", "raw", "hidden"]>>;
6
8
  /**
7
- Whether to enable parallel function calling during tool use. Default to true.
9
+ * Whether to enable parallel function calling during tool use. Default to true.
8
10
  */
9
- parallelToolCalls?: boolean;
11
+ parallelToolCalls: z.ZodOptional<z.ZodBoolean>;
10
12
  /**
11
- A unique identifier representing your end-user, which can help OpenAI to
12
- monitor and detect abuse. Learn more.
13
- */
14
- user?: string;
15
- /**
16
- Automatically download images and pass the image as data to the model.
17
- Groq supports image URLs for public models, so this is only needed for
18
- private models or when the images are not publicly accessible.
19
-
20
- Defaults to `false`.
13
+ * A unique identifier representing your end-user, which can help OpenAI to
14
+ * monitor and detect abuse. Learn more.
21
15
  */
22
- downloadImages?: boolean;
23
- }
16
+ user: z.ZodOptional<z.ZodString>;
17
+ }, "strip", z.ZodTypeAny, {
18
+ user?: string | undefined;
19
+ reasoningFormat?: "parsed" | "raw" | "hidden" | undefined;
20
+ parallelToolCalls?: boolean | undefined;
21
+ }, {
22
+ user?: string | undefined;
23
+ reasoningFormat?: "parsed" | "raw" | "hidden" | undefined;
24
+ parallelToolCalls?: boolean | undefined;
25
+ }>;
26
+ type GroqProviderOptions = z.infer<typeof groqProviderOptions>;
24
27
 
25
28
  type GroqTranscriptionModelId = 'whisper-large-v3-turbo' | 'distil-whisper-large-v3-en' | 'whisper-large-v3' | (string & {});
26
29
 
27
- interface GroqProvider extends ProviderV1 {
30
+ interface GroqProvider extends ProviderV2 {
28
31
  /**
29
32
  Creates a model for text generation.
30
33
  */
31
- (modelId: GroqChatModelId, settings?: GroqChatSettings): LanguageModelV1;
34
+ (modelId: GroqChatModelId): LanguageModelV2;
32
35
  /**
33
36
  Creates an Groq chat model for text generation.
34
37
  */
35
- languageModel(modelId: GroqChatModelId, settings?: GroqChatSettings): LanguageModelV1;
38
+ languageModel(modelId: GroqChatModelId): LanguageModelV2;
36
39
  /**
37
40
  Creates a model for transcription.
38
41
  */
@@ -66,4 +69,4 @@ Default Groq provider instance.
66
69
  */
67
70
  declare const groq: GroqProvider;
68
71
 
69
- export { type GroqProvider, type GroqProviderSettings, createGroq, groq };
72
+ export { type GroqProvider, type GroqProviderOptions, type GroqProviderSettings, createGroq, groq };