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

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,223 @@
1
1
  # @ai-sdk/groq
2
2
 
3
- ## 1.2.9
3
+ ## 2.0.0-alpha.2
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - Updated dependencies [d87b9d1]
8
- - @ai-sdk/provider-utils@2.2.8
7
+ - Updated dependencies [26535e0]
8
+ - @ai-sdk/provider@2.0.0-alpha.2
9
+ - @ai-sdk/provider-utils@3.0.0-alpha.2
9
10
 
10
- ## 1.2.8
11
+ ## 2.0.0-alpha.1
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 [3f2f00c]
16
+ - @ai-sdk/provider@2.0.0-alpha.1
17
+ - @ai-sdk/provider-utils@3.0.0-alpha.1
18
18
 
19
- ## 1.2.7
19
+ ## 2.0.0-canary.20
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 [faf8446]
24
+ - @ai-sdk/provider-utils@3.0.0-canary.19
26
25
 
27
- ## 1.2.6
26
+ ## 2.0.0-canary.19
28
27
 
29
28
  ### Patch Changes
30
29
 
31
- - Updated dependencies [c21fa6d]
32
- - @ai-sdk/provider-utils@2.2.5
33
- - @ai-sdk/provider@1.1.1
30
+ - Updated dependencies [40acf9b]
31
+ - @ai-sdk/provider-utils@3.0.0-canary.18
34
32
 
35
- ## 1.2.5
33
+ ## 2.0.0-canary.18
36
34
 
37
35
  ### Patch Changes
38
36
 
39
- - 8fdc8fe: feat (provider/groq): add llama 4 model
37
+ - Updated dependencies [ea7a7c9]
38
+ - @ai-sdk/provider-utils@3.0.0-canary.17
40
39
 
41
- ## 1.2.4
40
+ ## 2.0.0-canary.17
42
41
 
43
42
  ### Patch Changes
44
43
 
45
- - Updated dependencies [2c19b9a]
46
- - @ai-sdk/provider-utils@2.2.4
44
+ - Updated dependencies [87b828f]
45
+ - @ai-sdk/provider-utils@3.0.0-canary.16
46
+
47
+ ## 2.0.0-canary.16
48
+
49
+ ### Patch Changes
50
+
51
+ - 6f231db: fix(providers): always use optional instead of mix of nullish for providerOptions
52
+ - Updated dependencies [a571d6e]
53
+ - Updated dependencies [a8c8bd5]
54
+ - Updated dependencies [7979f7f]
55
+ - Updated dependencies [41fa418]
56
+ - @ai-sdk/provider-utils@3.0.0-canary.15
57
+ - @ai-sdk/provider@2.0.0-canary.14
58
+
59
+ ## 2.0.0-canary.15
60
+
61
+ ### Patch Changes
62
+
63
+ - Updated dependencies [957b739]
64
+ - Updated dependencies [9bd5ab5]
65
+ - @ai-sdk/provider-utils@3.0.0-canary.14
66
+ - @ai-sdk/provider@2.0.0-canary.13
67
+
68
+ ## 2.0.0-canary.14
69
+
70
+ ### Patch Changes
71
+
72
+ - Updated dependencies [7b3ae3f]
73
+ - Updated dependencies [0ff02bb]
74
+ - @ai-sdk/provider@2.0.0-canary.12
75
+ - @ai-sdk/provider-utils@3.0.0-canary.13
76
+
77
+ ## 2.0.0-canary.13
78
+
79
+ ### Patch Changes
80
+
81
+ - Updated dependencies [9bf7291]
82
+ - Updated dependencies [4617fab]
83
+ - Updated dependencies [e030615]
84
+ - @ai-sdk/provider@2.0.0-canary.11
85
+ - @ai-sdk/provider-utils@3.0.0-canary.12
86
+
87
+ ## 2.0.0-canary.12
88
+
89
+ ### Patch Changes
90
+
91
+ - Updated dependencies [66962ed]
92
+ - Updated dependencies [9301f86]
93
+ - Updated dependencies [a3f768e]
94
+ - @ai-sdk/provider-utils@3.0.0-canary.11
95
+ - @ai-sdk/provider@2.0.0-canary.10
96
+
97
+ ## 2.0.0-canary.11
98
+
99
+ ### Patch Changes
100
+
101
+ - Updated dependencies [e86be6f]
102
+ - @ai-sdk/provider@2.0.0-canary.9
103
+ - @ai-sdk/provider-utils@3.0.0-canary.10
104
+
105
+ ## 2.0.0-canary.10
106
+
107
+ ### Patch Changes
108
+
109
+ - Updated dependencies [95857aa]
110
+ - Updated dependencies [7ea4132]
111
+ - @ai-sdk/provider@2.0.0-canary.8
112
+ - @ai-sdk/provider-utils@3.0.0-canary.9
113
+
114
+ ## 2.0.0-canary.9
115
+
116
+ ### Patch Changes
117
+
118
+ - 9bd148e: feat(providers/groq): add transcribe
119
+ - Updated dependencies [5d142ab]
120
+ - Updated dependencies [b6b43c7]
121
+ - Updated dependencies [8aa9e20]
122
+ - Updated dependencies [3795467]
123
+ - @ai-sdk/provider-utils@3.0.0-canary.8
124
+ - @ai-sdk/provider@2.0.0-canary.7
125
+
126
+ ## 2.0.0-canary.8
127
+
128
+ ### Patch Changes
129
+
130
+ - Updated dependencies [26735b5]
131
+ - Updated dependencies [443d8ec]
132
+ - Updated dependencies [14c9410]
133
+ - Updated dependencies [d9c98f4]
134
+ - Updated dependencies [c4a2fec]
135
+ - Updated dependencies [0054544]
136
+ - Updated dependencies [9e9c809]
137
+ - Updated dependencies [32831c6]
138
+ - Updated dependencies [d0f9495]
139
+ - Updated dependencies [fd65bc6]
140
+ - Updated dependencies [393138b]
141
+ - Updated dependencies [7182d14]
142
+ - @ai-sdk/provider@2.0.0-canary.6
143
+ - @ai-sdk/provider-utils@3.0.0-canary.7
144
+
145
+ ## 2.0.0-canary.7
146
+
147
+ ### Patch Changes
148
+
149
+ - ebeac90: chore(providers/groq): convert to providerOptions
150
+ - Updated dependencies [411e483]
151
+ - Updated dependencies [79457bd]
152
+ - Updated dependencies [ad80501]
153
+ - Updated dependencies [1766ede]
154
+ - Updated dependencies [f10304b]
155
+ - @ai-sdk/provider@2.0.0-canary.5
156
+ - @ai-sdk/provider-utils@3.0.0-canary.6
157
+
158
+ ## 2.0.0-canary.6
159
+
160
+ ### Patch Changes
161
+
162
+ - Updated dependencies [6f6bb89]
163
+ - @ai-sdk/provider@2.0.0-canary.4
164
+ - @ai-sdk/provider-utils@3.0.0-canary.5
165
+
166
+ ## 2.0.0-canary.5
167
+
168
+ ### Patch Changes
169
+
170
+ - Updated dependencies [d1a1aa1]
171
+ - @ai-sdk/provider@2.0.0-canary.3
172
+ - @ai-sdk/provider-utils@3.0.0-canary.4
173
+
174
+ ## 2.0.0-canary.4
175
+
176
+ ### Patch Changes
177
+
178
+ - Updated dependencies [a166433]
179
+ - Updated dependencies [abf9a79]
180
+ - Updated dependencies [9f95b35]
181
+ - Updated dependencies [0a87932]
182
+ - Updated dependencies [6dc848c]
183
+ - @ai-sdk/provider-utils@3.0.0-canary.3
184
+ - @ai-sdk/provider@2.0.0-canary.2
185
+
186
+ ## 2.0.0-canary.3
187
+
188
+ ### Patch Changes
189
+
190
+ - Updated dependencies [c57e248]
191
+ - Updated dependencies [33f4a6a]
192
+ - @ai-sdk/provider@2.0.0-canary.1
193
+ - @ai-sdk/provider-utils@3.0.0-canary.2
194
+
195
+ ## 2.0.0-canary.2
196
+
197
+ ### Patch Changes
198
+
199
+ - 67b9604: feat (provider/groq): add llama 4 model
200
+
201
+ ## 2.0.0-canary.1
202
+
203
+ ### Patch Changes
204
+
205
+ - Updated dependencies [060370c]
206
+ - Updated dependencies [0c0c0b3]
207
+ - Updated dependencies [63d791d]
208
+ - @ai-sdk/provider-utils@3.0.0-canary.1
209
+
210
+ ## 2.0.0-canary.0
211
+
212
+ ### Major Changes
213
+
214
+ - d5f588f: AI SDK 5
215
+
216
+ ### Patch Changes
217
+
218
+ - Updated dependencies [d5f588f]
219
+ - @ai-sdk/provider-utils@3.0.0-canary.0
220
+ - @ai-sdk/provider@2.0.0-canary.0
47
221
 
48
222
  ## 1.2.3
49
223
 
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 };