@ai-sdk/groq 2.0.0-canary.1 → 2.0.0-canary.11

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,109 @@
1
1
  # @ai-sdk/groq
2
2
 
3
+ ## 2.0.0-canary.11
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [e86be6f]
8
+ - @ai-sdk/provider@2.0.0-canary.9
9
+ - @ai-sdk/provider-utils@3.0.0-canary.10
10
+
11
+ ## 2.0.0-canary.10
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies [95857aa]
16
+ - Updated dependencies [7ea4132]
17
+ - @ai-sdk/provider@2.0.0-canary.8
18
+ - @ai-sdk/provider-utils@3.0.0-canary.9
19
+
20
+ ## 2.0.0-canary.9
21
+
22
+ ### Patch Changes
23
+
24
+ - 9bd148e: feat(providers/groq): add transcribe
25
+ - Updated dependencies [5d142ab]
26
+ - Updated dependencies [b6b43c7]
27
+ - Updated dependencies [8aa9e20]
28
+ - Updated dependencies [3795467]
29
+ - @ai-sdk/provider-utils@3.0.0-canary.8
30
+ - @ai-sdk/provider@2.0.0-canary.7
31
+
32
+ ## 2.0.0-canary.8
33
+
34
+ ### Patch Changes
35
+
36
+ - Updated dependencies [26735b5]
37
+ - Updated dependencies [443d8ec]
38
+ - Updated dependencies [14c9410]
39
+ - Updated dependencies [d9c98f4]
40
+ - Updated dependencies [c4a2fec]
41
+ - Updated dependencies [0054544]
42
+ - Updated dependencies [9e9c809]
43
+ - Updated dependencies [32831c6]
44
+ - Updated dependencies [d0f9495]
45
+ - Updated dependencies [fd65bc6]
46
+ - Updated dependencies [393138b]
47
+ - Updated dependencies [7182d14]
48
+ - @ai-sdk/provider@2.0.0-canary.6
49
+ - @ai-sdk/provider-utils@3.0.0-canary.7
50
+
51
+ ## 2.0.0-canary.7
52
+
53
+ ### Patch Changes
54
+
55
+ - ebeac90: chore(providers/groq): convert to providerOptions
56
+ - Updated dependencies [411e483]
57
+ - Updated dependencies [79457bd]
58
+ - Updated dependencies [ad80501]
59
+ - Updated dependencies [1766ede]
60
+ - Updated dependencies [f10304b]
61
+ - @ai-sdk/provider@2.0.0-canary.5
62
+ - @ai-sdk/provider-utils@3.0.0-canary.6
63
+
64
+ ## 2.0.0-canary.6
65
+
66
+ ### Patch Changes
67
+
68
+ - Updated dependencies [6f6bb89]
69
+ - @ai-sdk/provider@2.0.0-canary.4
70
+ - @ai-sdk/provider-utils@3.0.0-canary.5
71
+
72
+ ## 2.0.0-canary.5
73
+
74
+ ### Patch Changes
75
+
76
+ - Updated dependencies [d1a1aa1]
77
+ - @ai-sdk/provider@2.0.0-canary.3
78
+ - @ai-sdk/provider-utils@3.0.0-canary.4
79
+
80
+ ## 2.0.0-canary.4
81
+
82
+ ### Patch Changes
83
+
84
+ - Updated dependencies [a166433]
85
+ - Updated dependencies [abf9a79]
86
+ - Updated dependencies [9f95b35]
87
+ - Updated dependencies [0a87932]
88
+ - Updated dependencies [6dc848c]
89
+ - @ai-sdk/provider-utils@3.0.0-canary.3
90
+ - @ai-sdk/provider@2.0.0-canary.2
91
+
92
+ ## 2.0.0-canary.3
93
+
94
+ ### Patch Changes
95
+
96
+ - Updated dependencies [c57e248]
97
+ - Updated dependencies [33f4a6a]
98
+ - @ai-sdk/provider@2.0.0-canary.1
99
+ - @ai-sdk/provider-utils@3.0.0-canary.2
100
+
101
+ ## 2.0.0-canary.2
102
+
103
+ ### Patch Changes
104
+
105
+ - 67b9604: feat (provider/groq): add llama 4 model
106
+
3
107
  ## 2.0.0-canary.1
4
108
 
5
109
  ### Patch Changes
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
- 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' | 'qwen-qwq-32b' | 'mistral-saba-24b' | 'qwen-2.5-32b' | 'deepseek-r1-distill-qwen-32b' | 'deepseek-r1-distill-llama-70b' | (string & {});
5
- interface GroqChatSettings {
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 & {});
6
+ declare const groqProviderOptions: z.ZodObject<{
7
+ reasoningFormat: z.ZodOptional<z.ZodNullable<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.ZodNullable<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.ZodNullable<z.ZodString>>;
17
+ }, "strip", z.ZodTypeAny, {
18
+ user?: string | null | undefined;
19
+ reasoningFormat?: "parsed" | "raw" | "hidden" | null | undefined;
20
+ parallelToolCalls?: boolean | null | undefined;
21
+ }, {
22
+ user?: string | null | undefined;
23
+ reasoningFormat?: "parsed" | "raw" | "hidden" | null | undefined;
24
+ parallelToolCalls?: boolean | null | 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
- 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' | 'qwen-qwq-32b' | 'mistral-saba-24b' | 'qwen-2.5-32b' | 'deepseek-r1-distill-qwen-32b' | 'deepseek-r1-distill-llama-70b' | (string & {});
5
- interface GroqChatSettings {
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 & {});
6
+ declare const groqProviderOptions: z.ZodObject<{
7
+ reasoningFormat: z.ZodOptional<z.ZodNullable<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.ZodNullable<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.ZodNullable<z.ZodString>>;
17
+ }, "strip", z.ZodTypeAny, {
18
+ user?: string | null | undefined;
19
+ reasoningFormat?: "parsed" | "raw" | "hidden" | null | undefined;
20
+ parallelToolCalls?: boolean | null | undefined;
21
+ }, {
22
+ user?: string | null | undefined;
23
+ reasoningFormat?: "parsed" | "raw" | "hidden" | null | undefined;
24
+ parallelToolCalls?: boolean | null | 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 };