@ai-sdk/groq 2.0.0-canary.2 → 2.0.0-canary.20

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,181 @@
1
1
  # @ai-sdk/groq
2
2
 
3
+ ## 2.0.0-canary.20
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [faf8446]
8
+ - @ai-sdk/provider-utils@3.0.0-canary.19
9
+
10
+ ## 2.0.0-canary.19
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [40acf9b]
15
+ - @ai-sdk/provider-utils@3.0.0-canary.18
16
+
17
+ ## 2.0.0-canary.18
18
+
19
+ ### Patch Changes
20
+
21
+ - Updated dependencies [ea7a7c9]
22
+ - @ai-sdk/provider-utils@3.0.0-canary.17
23
+
24
+ ## 2.0.0-canary.17
25
+
26
+ ### Patch Changes
27
+
28
+ - Updated dependencies [87b828f]
29
+ - @ai-sdk/provider-utils@3.0.0-canary.16
30
+
31
+ ## 2.0.0-canary.16
32
+
33
+ ### Patch Changes
34
+
35
+ - 6f231db: fix(providers): always use optional instead of mix of nullish for providerOptions
36
+ - Updated dependencies [a571d6e]
37
+ - Updated dependencies [a8c8bd5]
38
+ - Updated dependencies [7979f7f]
39
+ - Updated dependencies [41fa418]
40
+ - @ai-sdk/provider-utils@3.0.0-canary.15
41
+ - @ai-sdk/provider@2.0.0-canary.14
42
+
43
+ ## 2.0.0-canary.15
44
+
45
+ ### Patch Changes
46
+
47
+ - Updated dependencies [957b739]
48
+ - Updated dependencies [9bd5ab5]
49
+ - @ai-sdk/provider-utils@3.0.0-canary.14
50
+ - @ai-sdk/provider@2.0.0-canary.13
51
+
52
+ ## 2.0.0-canary.14
53
+
54
+ ### Patch Changes
55
+
56
+ - Updated dependencies [7b3ae3f]
57
+ - Updated dependencies [0ff02bb]
58
+ - @ai-sdk/provider@2.0.0-canary.12
59
+ - @ai-sdk/provider-utils@3.0.0-canary.13
60
+
61
+ ## 2.0.0-canary.13
62
+
63
+ ### Patch Changes
64
+
65
+ - Updated dependencies [9bf7291]
66
+ - Updated dependencies [4617fab]
67
+ - Updated dependencies [e030615]
68
+ - @ai-sdk/provider@2.0.0-canary.11
69
+ - @ai-sdk/provider-utils@3.0.0-canary.12
70
+
71
+ ## 2.0.0-canary.12
72
+
73
+ ### Patch Changes
74
+
75
+ - Updated dependencies [66962ed]
76
+ - Updated dependencies [9301f86]
77
+ - Updated dependencies [a3f768e]
78
+ - @ai-sdk/provider-utils@3.0.0-canary.11
79
+ - @ai-sdk/provider@2.0.0-canary.10
80
+
81
+ ## 2.0.0-canary.11
82
+
83
+ ### Patch Changes
84
+
85
+ - Updated dependencies [e86be6f]
86
+ - @ai-sdk/provider@2.0.0-canary.9
87
+ - @ai-sdk/provider-utils@3.0.0-canary.10
88
+
89
+ ## 2.0.0-canary.10
90
+
91
+ ### Patch Changes
92
+
93
+ - Updated dependencies [95857aa]
94
+ - Updated dependencies [7ea4132]
95
+ - @ai-sdk/provider@2.0.0-canary.8
96
+ - @ai-sdk/provider-utils@3.0.0-canary.9
97
+
98
+ ## 2.0.0-canary.9
99
+
100
+ ### Patch Changes
101
+
102
+ - 9bd148e: feat(providers/groq): add transcribe
103
+ - Updated dependencies [5d142ab]
104
+ - Updated dependencies [b6b43c7]
105
+ - Updated dependencies [8aa9e20]
106
+ - Updated dependencies [3795467]
107
+ - @ai-sdk/provider-utils@3.0.0-canary.8
108
+ - @ai-sdk/provider@2.0.0-canary.7
109
+
110
+ ## 2.0.0-canary.8
111
+
112
+ ### Patch Changes
113
+
114
+ - Updated dependencies [26735b5]
115
+ - Updated dependencies [443d8ec]
116
+ - Updated dependencies [14c9410]
117
+ - Updated dependencies [d9c98f4]
118
+ - Updated dependencies [c4a2fec]
119
+ - Updated dependencies [0054544]
120
+ - Updated dependencies [9e9c809]
121
+ - Updated dependencies [32831c6]
122
+ - Updated dependencies [d0f9495]
123
+ - Updated dependencies [fd65bc6]
124
+ - Updated dependencies [393138b]
125
+ - Updated dependencies [7182d14]
126
+ - @ai-sdk/provider@2.0.0-canary.6
127
+ - @ai-sdk/provider-utils@3.0.0-canary.7
128
+
129
+ ## 2.0.0-canary.7
130
+
131
+ ### Patch Changes
132
+
133
+ - ebeac90: chore(providers/groq): convert to providerOptions
134
+ - Updated dependencies [411e483]
135
+ - Updated dependencies [79457bd]
136
+ - Updated dependencies [ad80501]
137
+ - Updated dependencies [1766ede]
138
+ - Updated dependencies [f10304b]
139
+ - @ai-sdk/provider@2.0.0-canary.5
140
+ - @ai-sdk/provider-utils@3.0.0-canary.6
141
+
142
+ ## 2.0.0-canary.6
143
+
144
+ ### Patch Changes
145
+
146
+ - Updated dependencies [6f6bb89]
147
+ - @ai-sdk/provider@2.0.0-canary.4
148
+ - @ai-sdk/provider-utils@3.0.0-canary.5
149
+
150
+ ## 2.0.0-canary.5
151
+
152
+ ### Patch Changes
153
+
154
+ - Updated dependencies [d1a1aa1]
155
+ - @ai-sdk/provider@2.0.0-canary.3
156
+ - @ai-sdk/provider-utils@3.0.0-canary.4
157
+
158
+ ## 2.0.0-canary.4
159
+
160
+ ### Patch Changes
161
+
162
+ - Updated dependencies [a166433]
163
+ - Updated dependencies [abf9a79]
164
+ - Updated dependencies [9f95b35]
165
+ - Updated dependencies [0a87932]
166
+ - Updated dependencies [6dc848c]
167
+ - @ai-sdk/provider-utils@3.0.0-canary.3
168
+ - @ai-sdk/provider@2.0.0-canary.2
169
+
170
+ ## 2.0.0-canary.3
171
+
172
+ ### Patch Changes
173
+
174
+ - Updated dependencies [c57e248]
175
+ - Updated dependencies [33f4a6a]
176
+ - @ai-sdk/provider@2.0.0-canary.1
177
+ - @ai-sdk/provider-utils@3.0.0-canary.2
178
+
3
179
  ## 2.0.0-canary.2
4
180
 
5
181
  ### Patch Changes
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # AI SDK - Groq Provider
2
2
 
3
- The **[Groq provider](https://sdk.vercel.ai/providers/ai-sdk-providers/groq)** for the [AI SDK](https://sdk.vercel.ai/docs)
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 and embedding model support for the Groq embeddings API.
5
5
 
6
6
  ## Setup
@@ -33,4 +33,4 @@ const { text } = await generateText({
33
33
 
34
34
  ## Documentation
35
35
 
36
- Please check out the **[Groq provider documentation](https://sdk.vercel.ai/providers/ai-sdk-providers/groq)** for more information.
36
+ Please check out the **[Groq provider documentation](https://ai-sdk.dev/providers/ai-sdk-providers/groq)** for more information.
package/dist/index.d.mts CHANGED
@@ -1,36 +1,45 @@
1
- import { ProviderV2, LanguageModelV2 } 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>;
27
+
28
+ type GroqTranscriptionModelId = 'whisper-large-v3-turbo' | 'distil-whisper-large-v3-en' | 'whisper-large-v3' | (string & {});
24
29
 
25
30
  interface GroqProvider extends ProviderV2 {
26
31
  /**
27
32
  Creates a model for text generation.
28
33
  */
29
- (modelId: GroqChatModelId, settings?: GroqChatSettings): LanguageModelV2;
34
+ (modelId: GroqChatModelId): LanguageModelV2;
30
35
  /**
31
36
  Creates an Groq chat model for text generation.
32
37
  */
33
- languageModel(modelId: GroqChatModelId, settings?: GroqChatSettings): LanguageModelV2;
38
+ languageModel(modelId: GroqChatModelId): LanguageModelV2;
39
+ /**
40
+ Creates a model for transcription.
41
+ */
42
+ transcription(modelId: GroqTranscriptionModelId): TranscriptionModelV1;
34
43
  }
35
44
  interface GroqProviderSettings {
36
45
  /**
@@ -60,4 +69,4 @@ Default Groq provider instance.
60
69
  */
61
70
  declare const groq: GroqProvider;
62
71
 
63
- export { type GroqProvider, type GroqProviderSettings, createGroq, groq };
72
+ export { type GroqProvider, type GroqProviderOptions, type GroqProviderSettings, createGroq, groq };
package/dist/index.d.ts CHANGED
@@ -1,36 +1,45 @@
1
- import { ProviderV2, LanguageModelV2 } 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>;
27
+
28
+ type GroqTranscriptionModelId = 'whisper-large-v3-turbo' | 'distil-whisper-large-v3-en' | 'whisper-large-v3' | (string & {});
24
29
 
25
30
  interface GroqProvider extends ProviderV2 {
26
31
  /**
27
32
  Creates a model for text generation.
28
33
  */
29
- (modelId: GroqChatModelId, settings?: GroqChatSettings): LanguageModelV2;
34
+ (modelId: GroqChatModelId): LanguageModelV2;
30
35
  /**
31
36
  Creates an Groq chat model for text generation.
32
37
  */
33
- languageModel(modelId: GroqChatModelId, settings?: GroqChatSettings): LanguageModelV2;
38
+ languageModel(modelId: GroqChatModelId): LanguageModelV2;
39
+ /**
40
+ Creates a model for transcription.
41
+ */
42
+ transcription(modelId: GroqTranscriptionModelId): TranscriptionModelV1;
34
43
  }
35
44
  interface GroqProviderSettings {
36
45
  /**
@@ -60,4 +69,4 @@ Default Groq provider instance.
60
69
  */
61
70
  declare const groq: GroqProvider;
62
71
 
63
- export { type GroqProvider, type GroqProviderSettings, createGroq, groq };
72
+ export { type GroqProvider, type GroqProviderOptions, type GroqProviderSettings, createGroq, groq };