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

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