@adaline/groq 1.2.4 → 1.4.0

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/dist/index.d.mts CHANGED
@@ -178,12 +178,12 @@ declare class Llama_3_1_8b extends BaseChatModelGroq {
178
178
  constructor(options: Llama_3_1_8b_OptionsType);
179
179
  }
180
180
 
181
- declare const Llama_3_2_11b_VisionLiteral: "llama-3.2-11b-vision-preview";
182
- declare const Llama_3_2_11b_VisionSchema: {
181
+ declare const Llama_3_3_70b_VersatileLiteral: "llama-3.3-70b-versatile";
182
+ declare const Llama_3_3_70b_VersatileSchema: {
183
183
  name: string;
184
184
  description: string;
185
185
  roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
186
- modalities: ["text" | "image" | "tool-call" | "tool-response", ...("text" | "image" | "tool-call" | "tool-response")[]];
186
+ modalities: ["text" | "tool-call" | "tool-response", ...("text" | "tool-call" | "tool-response")[]];
187
187
  maxInputTokens: number;
188
188
  maxOutputTokens: number;
189
189
  config: {
@@ -240,7 +240,7 @@ declare const Llama_3_2_11b_VisionSchema: {
240
240
  };
241
241
  maxReasoningTokens?: number | undefined;
242
242
  };
243
- declare const Llama_3_2_11b_VisionOptions: z.ZodObject<{
243
+ declare const Llama_3_3_70b_Versatile_Options: z.ZodObject<{
244
244
  modelName: z.ZodString;
245
245
  apiKey: z.ZodString;
246
246
  }, "strip", z.ZodTypeAny, {
@@ -250,13 +250,13 @@ declare const Llama_3_2_11b_VisionOptions: z.ZodObject<{
250
250
  modelName: string;
251
251
  apiKey: string;
252
252
  }>;
253
- type Llama_3_2_11b_VisionOptionsType = z.infer<typeof Llama_3_2_11b_VisionOptions>;
254
- declare class Llama_3_2_11b_Vision extends BaseChatModelGroq {
255
- constructor(options: Llama_3_2_11b_VisionOptionsType);
253
+ type Llama_3_3_70b_Versatile_OptionsType = z.infer<typeof Llama_3_3_70b_Versatile_Options>;
254
+ declare class Llama_3_3_70b_Versatile extends BaseChatModelGroq {
255
+ constructor(options: Llama_3_3_70b_Versatile_OptionsType);
256
256
  }
257
257
 
258
- declare const Llama_3_2_1bLiteral: "llama-3.2-1b-preview";
259
- declare const Llama_3_2_1bSchema: {
258
+ declare const Llama_Guard_4_12bLiteral: "meta-llama/llama-guard-4-12b";
259
+ declare const Llama_Guard_4_12bSchema: {
260
260
  name: string;
261
261
  description: string;
262
262
  roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
@@ -317,7 +317,7 @@ declare const Llama_3_2_1bSchema: {
317
317
  };
318
318
  maxReasoningTokens?: number | undefined;
319
319
  };
320
- declare const Llama_3_2_1b_Options: z.ZodObject<{
320
+ declare const Llama_Guard_4_12b_Options: z.ZodObject<{
321
321
  modelName: z.ZodString;
322
322
  apiKey: z.ZodString;
323
323
  }, "strip", z.ZodTypeAny, {
@@ -327,13 +327,13 @@ declare const Llama_3_2_1b_Options: z.ZodObject<{
327
327
  modelName: string;
328
328
  apiKey: string;
329
329
  }>;
330
- type Llama_3_2_1b_OptionsType = z.infer<typeof Llama_3_2_1b_Options>;
331
- declare class Llama_3_2_1b extends BaseChatModelGroq {
332
- constructor(options: Llama_3_2_1b_OptionsType);
330
+ type Llama_Guard_4_12b_OptionsType = z.infer<typeof Llama_Guard_4_12b_Options>;
331
+ declare class Llama_Guard_4_12b extends BaseChatModelGroq {
332
+ constructor(options: Llama_Guard_4_12b_OptionsType);
333
333
  }
334
334
 
335
- declare const Llama_3_2_3bLiteral: "llama-3.2-3b-preview";
336
- declare const Llama_3_2_3bSchema: {
335
+ declare const Qwen3_32bLiteral: "qwen/qwen3-32b";
336
+ declare const Qwen3_32bSchema: {
337
337
  name: string;
338
338
  description: string;
339
339
  roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
@@ -394,7 +394,7 @@ declare const Llama_3_2_3bSchema: {
394
394
  };
395
395
  maxReasoningTokens?: number | undefined;
396
396
  };
397
- declare const Llama_3_2_3b_Options: z.ZodObject<{
397
+ declare const Qwen3_32b_Options: z.ZodObject<{
398
398
  modelName: z.ZodString;
399
399
  apiKey: z.ZodString;
400
400
  }, "strip", z.ZodTypeAny, {
@@ -404,17 +404,17 @@ declare const Llama_3_2_3b_Options: z.ZodObject<{
404
404
  modelName: string;
405
405
  apiKey: string;
406
406
  }>;
407
- type Llama_3_2_3b_OptionsType = z.infer<typeof Llama_3_2_3b_Options>;
408
- declare class Llama_3_2_3b extends BaseChatModelGroq {
409
- constructor(options: Llama_3_2_3b_OptionsType);
407
+ type Qwen3_32b_OptionsType = z.infer<typeof Qwen3_32b_Options>;
408
+ declare class Qwen3_32b extends BaseChatModelGroq {
409
+ constructor(options: Qwen3_32b_OptionsType);
410
410
  }
411
411
 
412
- declare const Llama_3_2_90b_VisionLiteral: "llama-3.2-90b-vision-preview";
413
- declare const Llama_3_2_90b_VisionSchema: {
412
+ declare const Deepseek_R1_Distill_Llama_70bLiteral: "deepseek-r1-distill-llama-70b";
413
+ declare const Deepseek_R1_Distill_Llama_70bSchema: {
414
414
  name: string;
415
415
  description: string;
416
416
  roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
417
- modalities: ["text" | "image" | "tool-call" | "tool-response", ...("text" | "image" | "tool-call" | "tool-response")[]];
417
+ modalities: ["text" | "tool-call" | "tool-response", ...("text" | "tool-call" | "tool-response")[]];
418
418
  maxInputTokens: number;
419
419
  maxOutputTokens: number;
420
420
  config: {
@@ -471,7 +471,7 @@ declare const Llama_3_2_90b_VisionSchema: {
471
471
  };
472
472
  maxReasoningTokens?: number | undefined;
473
473
  };
474
- declare const Llama_3_2_90b_VisionOptions: z.ZodObject<{
474
+ declare const Deepseek_R1_Distill_Llama_70b_Options: z.ZodObject<{
475
475
  modelName: z.ZodString;
476
476
  apiKey: z.ZodString;
477
477
  }, "strip", z.ZodTypeAny, {
@@ -481,13 +481,13 @@ declare const Llama_3_2_90b_VisionOptions: z.ZodObject<{
481
481
  modelName: string;
482
482
  apiKey: string;
483
483
  }>;
484
- type Llama_3_2_90b_VisionOptionsType = z.infer<typeof Llama_3_2_90b_VisionOptions>;
485
- declare class Llama_3_2_90b_Vision extends BaseChatModelGroq {
486
- constructor(options: Llama_3_2_90b_VisionOptionsType);
484
+ type Deepseek_R1_Distill_Llama_70b_OptionsType = z.infer<typeof Deepseek_R1_Distill_Llama_70b_Options>;
485
+ declare class Deepseek_R1_Distill_Llama_70b extends BaseChatModelGroq {
486
+ constructor(options: Deepseek_R1_Distill_Llama_70b_OptionsType);
487
487
  }
488
488
 
489
- declare const Llama_3_70bLiteral: "llama3-70b-8192";
490
- declare const Llama_3_70bSchema: {
489
+ declare const Kimi_K2_InstructLiteral: "moonshotai/kimi-k2-instruct";
490
+ declare const Kimi_K2_InstructSchema: {
491
491
  name: string;
492
492
  description: string;
493
493
  roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
@@ -548,7 +548,7 @@ declare const Llama_3_70bSchema: {
548
548
  };
549
549
  maxReasoningTokens?: number | undefined;
550
550
  };
551
- declare const Llama_3_70bOptions: z.ZodObject<{
551
+ declare const Kimi_K2_Instruct_Options: z.ZodObject<{
552
552
  modelName: z.ZodString;
553
553
  apiKey: z.ZodString;
554
554
  }, "strip", z.ZodTypeAny, {
@@ -558,17 +558,17 @@ declare const Llama_3_70bOptions: z.ZodObject<{
558
558
  modelName: string;
559
559
  apiKey: string;
560
560
  }>;
561
- type Llama_3_70bOptionsType = z.infer<typeof Llama_3_70bOptions>;
562
- declare class Llama_3_70b extends BaseChatModelGroq {
563
- constructor(options: Llama_3_70bOptionsType);
561
+ type Kimi_K2_Instruct_OptionsType = z.infer<typeof Kimi_K2_Instruct_Options>;
562
+ declare class Kimi_K2_Instruct extends BaseChatModelGroq {
563
+ constructor(options: Kimi_K2_Instruct_OptionsType);
564
564
  }
565
565
 
566
- declare const Llama_3_8bLiteral: "llama3-8b-8192";
567
- declare const Llama_3_8bSchema: {
566
+ declare const Llama_4_Maverick_17b_128e_InstructLiteral: "meta-llama/llama-4-maverick-17b-128e-instruct";
567
+ declare const Llama_4_Maverick_17b_128e_InstructSchema: {
568
568
  name: string;
569
569
  description: string;
570
570
  roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
571
- modalities: ["text" | "tool-call" | "tool-response", ...("text" | "tool-call" | "tool-response")[]];
571
+ modalities: ["text" | "image" | "tool-call" | "tool-response", ...("text" | "image" | "tool-call" | "tool-response")[]];
572
572
  maxInputTokens: number;
573
573
  maxOutputTokens: number;
574
574
  config: {
@@ -625,7 +625,7 @@ declare const Llama_3_8bSchema: {
625
625
  };
626
626
  maxReasoningTokens?: number | undefined;
627
627
  };
628
- declare const Llama_3_8bOptions: z.ZodObject<{
628
+ declare const Llama_4_Maverick_17b_128e_Instruct_Options: z.ZodObject<{
629
629
  modelName: z.ZodString;
630
630
  apiKey: z.ZodString;
631
631
  }, "strip", z.ZodTypeAny, {
@@ -635,17 +635,17 @@ declare const Llama_3_8bOptions: z.ZodObject<{
635
635
  modelName: string;
636
636
  apiKey: string;
637
637
  }>;
638
- type Llama_3_8bOptionsType = z.infer<typeof Llama_3_8bOptions>;
639
- declare class Llama_3_8b extends BaseChatModelGroq {
640
- constructor(options: Llama_3_8bOptionsType);
638
+ type Llama_4_Maverick_17b_128e_Instruct_OptionsType = z.infer<typeof Llama_4_Maverick_17b_128e_Instruct_Options>;
639
+ declare class Llama_4_Maverick_17b_128e_Instruct extends BaseChatModelGroq {
640
+ constructor(options: Llama_4_Maverick_17b_128e_Instruct_OptionsType);
641
641
  }
642
642
 
643
- declare const LlamaGuard_3_8bLiteral: "llama-guard-3-8b";
644
- declare const LlamaGuard_3_8bSchema: {
643
+ declare const Llama_4_Scout_17b_16e_InstructLiteral: "meta-llama/llama-4-scout-17b-16e-instruct";
644
+ declare const Llama_4_Scout_17b_16e_InstructSchema: {
645
645
  name: string;
646
646
  description: string;
647
647
  roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
648
- modalities: ["text" | "tool-call" | "tool-response", ...("text" | "tool-call" | "tool-response")[]];
648
+ modalities: ["text" | "image" | "tool-call" | "tool-response", ...("text" | "image" | "tool-call" | "tool-response")[]];
649
649
  maxInputTokens: number;
650
650
  maxOutputTokens: number;
651
651
  config: {
@@ -702,7 +702,7 @@ declare const LlamaGuard_3_8bSchema: {
702
702
  };
703
703
  maxReasoningTokens?: number | undefined;
704
704
  };
705
- declare const LlamaGuard_3_8bOptions: z.ZodObject<{
705
+ declare const Llama_4_Scout_17b_16e_Instruct_Options: z.ZodObject<{
706
706
  modelName: z.ZodString;
707
707
  apiKey: z.ZodString;
708
708
  }, "strip", z.ZodTypeAny, {
@@ -712,9 +712,9 @@ declare const LlamaGuard_3_8bOptions: z.ZodObject<{
712
712
  modelName: string;
713
713
  apiKey: string;
714
714
  }>;
715
- type LlamaGuard_3_8bOptionsType = z.infer<typeof LlamaGuard_3_8bOptions>;
716
- declare class LlamaGuard_3_8b extends BaseChatModelGroq {
717
- constructor(options: LlamaGuard_3_8bOptionsType);
715
+ type Llama_4_Scout_17b_16e_Instruct_OptionsType = z.infer<typeof Llama_4_Scout_17b_16e_Instruct_Options>;
716
+ declare class Llama_4_Scout_17b_16e_Instruct extends BaseChatModelGroq {
717
+ constructor(options: Llama_4_Scout_17b_16e_Instruct_OptionsType);
718
718
  }
719
719
 
720
720
  declare class Groq<C extends BaseChatModelOptionsType, E extends Record<string, any> = Record<string, any>> implements ProviderV1<C, E> {
@@ -731,4 +731,4 @@ declare class Groq<C extends BaseChatModelOptionsType, E extends Record<string,
731
731
  embeddingModel(options: E): EmbeddingModelV1;
732
732
  }
733
733
 
734
- export { BaseChatModelGroq, BaseChatModelOptions, type BaseChatModelOptionsType, Gemma2_9b_IT, Gemma2_9b_ITLiteral, Gemma2_9b_ITOptions, type Gemma2_9b_ITOptionsType, Gemma2_9b_ITSchema, Groq, LlamaGuard_3_8b, LlamaGuard_3_8bLiteral, LlamaGuard_3_8bOptions, type LlamaGuard_3_8bOptionsType, LlamaGuard_3_8bSchema, Llama_3_1_8b, Llama_3_1_8bLiteral, Llama_3_1_8bSchema, Llama_3_1_8b_Options, type Llama_3_1_8b_OptionsType, Llama_3_2_11b_Vision, Llama_3_2_11b_VisionLiteral, Llama_3_2_11b_VisionOptions, type Llama_3_2_11b_VisionOptionsType, Llama_3_2_11b_VisionSchema, Llama_3_2_1b, Llama_3_2_1bLiteral, Llama_3_2_1bSchema, Llama_3_2_1b_Options, type Llama_3_2_1b_OptionsType, Llama_3_2_3b, Llama_3_2_3bLiteral, Llama_3_2_3bSchema, Llama_3_2_3b_Options, type Llama_3_2_3b_OptionsType, Llama_3_2_90b_Vision, Llama_3_2_90b_VisionLiteral, Llama_3_2_90b_VisionOptions, type Llama_3_2_90b_VisionOptionsType, Llama_3_2_90b_VisionSchema, Llama_3_70b, Llama_3_70bLiteral, Llama_3_70bOptions, type Llama_3_70bOptionsType, Llama_3_70bSchema, Llama_3_8b, Llama_3_8bLiteral, Llama_3_8bOptions, type Llama_3_8bOptionsType, Llama_3_8bSchema };
734
+ export { BaseChatModelGroq, BaseChatModelOptions, type BaseChatModelOptionsType, Deepseek_R1_Distill_Llama_70b, Deepseek_R1_Distill_Llama_70bLiteral, Deepseek_R1_Distill_Llama_70bSchema, Deepseek_R1_Distill_Llama_70b_Options, type Deepseek_R1_Distill_Llama_70b_OptionsType, Gemma2_9b_IT, Gemma2_9b_ITLiteral, Gemma2_9b_ITOptions, type Gemma2_9b_ITOptionsType, Gemma2_9b_ITSchema, Groq, Kimi_K2_Instruct, Kimi_K2_InstructLiteral, Kimi_K2_InstructSchema, Kimi_K2_Instruct_Options, type Kimi_K2_Instruct_OptionsType, Llama_3_1_8b, Llama_3_1_8bLiteral, Llama_3_1_8bSchema, Llama_3_1_8b_Options, type Llama_3_1_8b_OptionsType, Llama_3_3_70b_Versatile, Llama_3_3_70b_VersatileLiteral, Llama_3_3_70b_VersatileSchema, Llama_3_3_70b_Versatile_Options, type Llama_3_3_70b_Versatile_OptionsType, Llama_4_Maverick_17b_128e_Instruct, Llama_4_Maverick_17b_128e_InstructLiteral, Llama_4_Maverick_17b_128e_InstructSchema, Llama_4_Maverick_17b_128e_Instruct_Options, type Llama_4_Maverick_17b_128e_Instruct_OptionsType, Llama_4_Scout_17b_16e_Instruct, Llama_4_Scout_17b_16e_InstructLiteral, Llama_4_Scout_17b_16e_InstructSchema, Llama_4_Scout_17b_16e_Instruct_Options, type Llama_4_Scout_17b_16e_Instruct_OptionsType, Llama_Guard_4_12b, Llama_Guard_4_12bLiteral, Llama_Guard_4_12bSchema, Llama_Guard_4_12b_Options, type Llama_Guard_4_12b_OptionsType, Qwen3_32b, Qwen3_32bLiteral, Qwen3_32bSchema, Qwen3_32b_Options, type Qwen3_32b_OptionsType };
package/dist/index.d.ts CHANGED
@@ -178,12 +178,12 @@ declare class Llama_3_1_8b extends BaseChatModelGroq {
178
178
  constructor(options: Llama_3_1_8b_OptionsType);
179
179
  }
180
180
 
181
- declare const Llama_3_2_11b_VisionLiteral: "llama-3.2-11b-vision-preview";
182
- declare const Llama_3_2_11b_VisionSchema: {
181
+ declare const Llama_3_3_70b_VersatileLiteral: "llama-3.3-70b-versatile";
182
+ declare const Llama_3_3_70b_VersatileSchema: {
183
183
  name: string;
184
184
  description: string;
185
185
  roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
186
- modalities: ["text" | "image" | "tool-call" | "tool-response", ...("text" | "image" | "tool-call" | "tool-response")[]];
186
+ modalities: ["text" | "tool-call" | "tool-response", ...("text" | "tool-call" | "tool-response")[]];
187
187
  maxInputTokens: number;
188
188
  maxOutputTokens: number;
189
189
  config: {
@@ -240,7 +240,7 @@ declare const Llama_3_2_11b_VisionSchema: {
240
240
  };
241
241
  maxReasoningTokens?: number | undefined;
242
242
  };
243
- declare const Llama_3_2_11b_VisionOptions: z.ZodObject<{
243
+ declare const Llama_3_3_70b_Versatile_Options: z.ZodObject<{
244
244
  modelName: z.ZodString;
245
245
  apiKey: z.ZodString;
246
246
  }, "strip", z.ZodTypeAny, {
@@ -250,13 +250,13 @@ declare const Llama_3_2_11b_VisionOptions: z.ZodObject<{
250
250
  modelName: string;
251
251
  apiKey: string;
252
252
  }>;
253
- type Llama_3_2_11b_VisionOptionsType = z.infer<typeof Llama_3_2_11b_VisionOptions>;
254
- declare class Llama_3_2_11b_Vision extends BaseChatModelGroq {
255
- constructor(options: Llama_3_2_11b_VisionOptionsType);
253
+ type Llama_3_3_70b_Versatile_OptionsType = z.infer<typeof Llama_3_3_70b_Versatile_Options>;
254
+ declare class Llama_3_3_70b_Versatile extends BaseChatModelGroq {
255
+ constructor(options: Llama_3_3_70b_Versatile_OptionsType);
256
256
  }
257
257
 
258
- declare const Llama_3_2_1bLiteral: "llama-3.2-1b-preview";
259
- declare const Llama_3_2_1bSchema: {
258
+ declare const Llama_Guard_4_12bLiteral: "meta-llama/llama-guard-4-12b";
259
+ declare const Llama_Guard_4_12bSchema: {
260
260
  name: string;
261
261
  description: string;
262
262
  roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
@@ -317,7 +317,7 @@ declare const Llama_3_2_1bSchema: {
317
317
  };
318
318
  maxReasoningTokens?: number | undefined;
319
319
  };
320
- declare const Llama_3_2_1b_Options: z.ZodObject<{
320
+ declare const Llama_Guard_4_12b_Options: z.ZodObject<{
321
321
  modelName: z.ZodString;
322
322
  apiKey: z.ZodString;
323
323
  }, "strip", z.ZodTypeAny, {
@@ -327,13 +327,13 @@ declare const Llama_3_2_1b_Options: z.ZodObject<{
327
327
  modelName: string;
328
328
  apiKey: string;
329
329
  }>;
330
- type Llama_3_2_1b_OptionsType = z.infer<typeof Llama_3_2_1b_Options>;
331
- declare class Llama_3_2_1b extends BaseChatModelGroq {
332
- constructor(options: Llama_3_2_1b_OptionsType);
330
+ type Llama_Guard_4_12b_OptionsType = z.infer<typeof Llama_Guard_4_12b_Options>;
331
+ declare class Llama_Guard_4_12b extends BaseChatModelGroq {
332
+ constructor(options: Llama_Guard_4_12b_OptionsType);
333
333
  }
334
334
 
335
- declare const Llama_3_2_3bLiteral: "llama-3.2-3b-preview";
336
- declare const Llama_3_2_3bSchema: {
335
+ declare const Qwen3_32bLiteral: "qwen/qwen3-32b";
336
+ declare const Qwen3_32bSchema: {
337
337
  name: string;
338
338
  description: string;
339
339
  roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
@@ -394,7 +394,7 @@ declare const Llama_3_2_3bSchema: {
394
394
  };
395
395
  maxReasoningTokens?: number | undefined;
396
396
  };
397
- declare const Llama_3_2_3b_Options: z.ZodObject<{
397
+ declare const Qwen3_32b_Options: z.ZodObject<{
398
398
  modelName: z.ZodString;
399
399
  apiKey: z.ZodString;
400
400
  }, "strip", z.ZodTypeAny, {
@@ -404,17 +404,17 @@ declare const Llama_3_2_3b_Options: z.ZodObject<{
404
404
  modelName: string;
405
405
  apiKey: string;
406
406
  }>;
407
- type Llama_3_2_3b_OptionsType = z.infer<typeof Llama_3_2_3b_Options>;
408
- declare class Llama_3_2_3b extends BaseChatModelGroq {
409
- constructor(options: Llama_3_2_3b_OptionsType);
407
+ type Qwen3_32b_OptionsType = z.infer<typeof Qwen3_32b_Options>;
408
+ declare class Qwen3_32b extends BaseChatModelGroq {
409
+ constructor(options: Qwen3_32b_OptionsType);
410
410
  }
411
411
 
412
- declare const Llama_3_2_90b_VisionLiteral: "llama-3.2-90b-vision-preview";
413
- declare const Llama_3_2_90b_VisionSchema: {
412
+ declare const Deepseek_R1_Distill_Llama_70bLiteral: "deepseek-r1-distill-llama-70b";
413
+ declare const Deepseek_R1_Distill_Llama_70bSchema: {
414
414
  name: string;
415
415
  description: string;
416
416
  roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
417
- modalities: ["text" | "image" | "tool-call" | "tool-response", ...("text" | "image" | "tool-call" | "tool-response")[]];
417
+ modalities: ["text" | "tool-call" | "tool-response", ...("text" | "tool-call" | "tool-response")[]];
418
418
  maxInputTokens: number;
419
419
  maxOutputTokens: number;
420
420
  config: {
@@ -471,7 +471,7 @@ declare const Llama_3_2_90b_VisionSchema: {
471
471
  };
472
472
  maxReasoningTokens?: number | undefined;
473
473
  };
474
- declare const Llama_3_2_90b_VisionOptions: z.ZodObject<{
474
+ declare const Deepseek_R1_Distill_Llama_70b_Options: z.ZodObject<{
475
475
  modelName: z.ZodString;
476
476
  apiKey: z.ZodString;
477
477
  }, "strip", z.ZodTypeAny, {
@@ -481,13 +481,13 @@ declare const Llama_3_2_90b_VisionOptions: z.ZodObject<{
481
481
  modelName: string;
482
482
  apiKey: string;
483
483
  }>;
484
- type Llama_3_2_90b_VisionOptionsType = z.infer<typeof Llama_3_2_90b_VisionOptions>;
485
- declare class Llama_3_2_90b_Vision extends BaseChatModelGroq {
486
- constructor(options: Llama_3_2_90b_VisionOptionsType);
484
+ type Deepseek_R1_Distill_Llama_70b_OptionsType = z.infer<typeof Deepseek_R1_Distill_Llama_70b_Options>;
485
+ declare class Deepseek_R1_Distill_Llama_70b extends BaseChatModelGroq {
486
+ constructor(options: Deepseek_R1_Distill_Llama_70b_OptionsType);
487
487
  }
488
488
 
489
- declare const Llama_3_70bLiteral: "llama3-70b-8192";
490
- declare const Llama_3_70bSchema: {
489
+ declare const Kimi_K2_InstructLiteral: "moonshotai/kimi-k2-instruct";
490
+ declare const Kimi_K2_InstructSchema: {
491
491
  name: string;
492
492
  description: string;
493
493
  roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
@@ -548,7 +548,7 @@ declare const Llama_3_70bSchema: {
548
548
  };
549
549
  maxReasoningTokens?: number | undefined;
550
550
  };
551
- declare const Llama_3_70bOptions: z.ZodObject<{
551
+ declare const Kimi_K2_Instruct_Options: z.ZodObject<{
552
552
  modelName: z.ZodString;
553
553
  apiKey: z.ZodString;
554
554
  }, "strip", z.ZodTypeAny, {
@@ -558,17 +558,17 @@ declare const Llama_3_70bOptions: z.ZodObject<{
558
558
  modelName: string;
559
559
  apiKey: string;
560
560
  }>;
561
- type Llama_3_70bOptionsType = z.infer<typeof Llama_3_70bOptions>;
562
- declare class Llama_3_70b extends BaseChatModelGroq {
563
- constructor(options: Llama_3_70bOptionsType);
561
+ type Kimi_K2_Instruct_OptionsType = z.infer<typeof Kimi_K2_Instruct_Options>;
562
+ declare class Kimi_K2_Instruct extends BaseChatModelGroq {
563
+ constructor(options: Kimi_K2_Instruct_OptionsType);
564
564
  }
565
565
 
566
- declare const Llama_3_8bLiteral: "llama3-8b-8192";
567
- declare const Llama_3_8bSchema: {
566
+ declare const Llama_4_Maverick_17b_128e_InstructLiteral: "meta-llama/llama-4-maverick-17b-128e-instruct";
567
+ declare const Llama_4_Maverick_17b_128e_InstructSchema: {
568
568
  name: string;
569
569
  description: string;
570
570
  roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
571
- modalities: ["text" | "tool-call" | "tool-response", ...("text" | "tool-call" | "tool-response")[]];
571
+ modalities: ["text" | "image" | "tool-call" | "tool-response", ...("text" | "image" | "tool-call" | "tool-response")[]];
572
572
  maxInputTokens: number;
573
573
  maxOutputTokens: number;
574
574
  config: {
@@ -625,7 +625,7 @@ declare const Llama_3_8bSchema: {
625
625
  };
626
626
  maxReasoningTokens?: number | undefined;
627
627
  };
628
- declare const Llama_3_8bOptions: z.ZodObject<{
628
+ declare const Llama_4_Maverick_17b_128e_Instruct_Options: z.ZodObject<{
629
629
  modelName: z.ZodString;
630
630
  apiKey: z.ZodString;
631
631
  }, "strip", z.ZodTypeAny, {
@@ -635,17 +635,17 @@ declare const Llama_3_8bOptions: z.ZodObject<{
635
635
  modelName: string;
636
636
  apiKey: string;
637
637
  }>;
638
- type Llama_3_8bOptionsType = z.infer<typeof Llama_3_8bOptions>;
639
- declare class Llama_3_8b extends BaseChatModelGroq {
640
- constructor(options: Llama_3_8bOptionsType);
638
+ type Llama_4_Maverick_17b_128e_Instruct_OptionsType = z.infer<typeof Llama_4_Maverick_17b_128e_Instruct_Options>;
639
+ declare class Llama_4_Maverick_17b_128e_Instruct extends BaseChatModelGroq {
640
+ constructor(options: Llama_4_Maverick_17b_128e_Instruct_OptionsType);
641
641
  }
642
642
 
643
- declare const LlamaGuard_3_8bLiteral: "llama-guard-3-8b";
644
- declare const LlamaGuard_3_8bSchema: {
643
+ declare const Llama_4_Scout_17b_16e_InstructLiteral: "meta-llama/llama-4-scout-17b-16e-instruct";
644
+ declare const Llama_4_Scout_17b_16e_InstructSchema: {
645
645
  name: string;
646
646
  description: string;
647
647
  roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
648
- modalities: ["text" | "tool-call" | "tool-response", ...("text" | "tool-call" | "tool-response")[]];
648
+ modalities: ["text" | "image" | "tool-call" | "tool-response", ...("text" | "image" | "tool-call" | "tool-response")[]];
649
649
  maxInputTokens: number;
650
650
  maxOutputTokens: number;
651
651
  config: {
@@ -702,7 +702,7 @@ declare const LlamaGuard_3_8bSchema: {
702
702
  };
703
703
  maxReasoningTokens?: number | undefined;
704
704
  };
705
- declare const LlamaGuard_3_8bOptions: z.ZodObject<{
705
+ declare const Llama_4_Scout_17b_16e_Instruct_Options: z.ZodObject<{
706
706
  modelName: z.ZodString;
707
707
  apiKey: z.ZodString;
708
708
  }, "strip", z.ZodTypeAny, {
@@ -712,9 +712,9 @@ declare const LlamaGuard_3_8bOptions: z.ZodObject<{
712
712
  modelName: string;
713
713
  apiKey: string;
714
714
  }>;
715
- type LlamaGuard_3_8bOptionsType = z.infer<typeof LlamaGuard_3_8bOptions>;
716
- declare class LlamaGuard_3_8b extends BaseChatModelGroq {
717
- constructor(options: LlamaGuard_3_8bOptionsType);
715
+ type Llama_4_Scout_17b_16e_Instruct_OptionsType = z.infer<typeof Llama_4_Scout_17b_16e_Instruct_Options>;
716
+ declare class Llama_4_Scout_17b_16e_Instruct extends BaseChatModelGroq {
717
+ constructor(options: Llama_4_Scout_17b_16e_Instruct_OptionsType);
718
718
  }
719
719
 
720
720
  declare class Groq<C extends BaseChatModelOptionsType, E extends Record<string, any> = Record<string, any>> implements ProviderV1<C, E> {
@@ -731,4 +731,4 @@ declare class Groq<C extends BaseChatModelOptionsType, E extends Record<string,
731
731
  embeddingModel(options: E): EmbeddingModelV1;
732
732
  }
733
733
 
734
- export { BaseChatModelGroq, BaseChatModelOptions, type BaseChatModelOptionsType, Gemma2_9b_IT, Gemma2_9b_ITLiteral, Gemma2_9b_ITOptions, type Gemma2_9b_ITOptionsType, Gemma2_9b_ITSchema, Groq, LlamaGuard_3_8b, LlamaGuard_3_8bLiteral, LlamaGuard_3_8bOptions, type LlamaGuard_3_8bOptionsType, LlamaGuard_3_8bSchema, Llama_3_1_8b, Llama_3_1_8bLiteral, Llama_3_1_8bSchema, Llama_3_1_8b_Options, type Llama_3_1_8b_OptionsType, Llama_3_2_11b_Vision, Llama_3_2_11b_VisionLiteral, Llama_3_2_11b_VisionOptions, type Llama_3_2_11b_VisionOptionsType, Llama_3_2_11b_VisionSchema, Llama_3_2_1b, Llama_3_2_1bLiteral, Llama_3_2_1bSchema, Llama_3_2_1b_Options, type Llama_3_2_1b_OptionsType, Llama_3_2_3b, Llama_3_2_3bLiteral, Llama_3_2_3bSchema, Llama_3_2_3b_Options, type Llama_3_2_3b_OptionsType, Llama_3_2_90b_Vision, Llama_3_2_90b_VisionLiteral, Llama_3_2_90b_VisionOptions, type Llama_3_2_90b_VisionOptionsType, Llama_3_2_90b_VisionSchema, Llama_3_70b, Llama_3_70bLiteral, Llama_3_70bOptions, type Llama_3_70bOptionsType, Llama_3_70bSchema, Llama_3_8b, Llama_3_8bLiteral, Llama_3_8bOptions, type Llama_3_8bOptionsType, Llama_3_8bSchema };
734
+ export { BaseChatModelGroq, BaseChatModelOptions, type BaseChatModelOptionsType, Deepseek_R1_Distill_Llama_70b, Deepseek_R1_Distill_Llama_70bLiteral, Deepseek_R1_Distill_Llama_70bSchema, Deepseek_R1_Distill_Llama_70b_Options, type Deepseek_R1_Distill_Llama_70b_OptionsType, Gemma2_9b_IT, Gemma2_9b_ITLiteral, Gemma2_9b_ITOptions, type Gemma2_9b_ITOptionsType, Gemma2_9b_ITSchema, Groq, Kimi_K2_Instruct, Kimi_K2_InstructLiteral, Kimi_K2_InstructSchema, Kimi_K2_Instruct_Options, type Kimi_K2_Instruct_OptionsType, Llama_3_1_8b, Llama_3_1_8bLiteral, Llama_3_1_8bSchema, Llama_3_1_8b_Options, type Llama_3_1_8b_OptionsType, Llama_3_3_70b_Versatile, Llama_3_3_70b_VersatileLiteral, Llama_3_3_70b_VersatileSchema, Llama_3_3_70b_Versatile_Options, type Llama_3_3_70b_Versatile_OptionsType, Llama_4_Maverick_17b_128e_Instruct, Llama_4_Maverick_17b_128e_InstructLiteral, Llama_4_Maverick_17b_128e_InstructSchema, Llama_4_Maverick_17b_128e_Instruct_Options, type Llama_4_Maverick_17b_128e_Instruct_OptionsType, Llama_4_Scout_17b_16e_Instruct, Llama_4_Scout_17b_16e_InstructLiteral, Llama_4_Scout_17b_16e_InstructSchema, Llama_4_Scout_17b_16e_Instruct_Options, type Llama_4_Scout_17b_16e_Instruct_OptionsType, Llama_Guard_4_12b, Llama_Guard_4_12bLiteral, Llama_Guard_4_12bSchema, Llama_Guard_4_12b_Options, type Llama_Guard_4_12b_OptionsType, Qwen3_32b, Qwen3_32bLiteral, Qwen3_32bSchema, Qwen3_32b_Options, type Qwen3_32b_OptionsType };
package/dist/index.js CHANGED
@@ -4,49 +4,49 @@ var provider = require('@adaline/provider');
4
4
  var zod = require('zod');
5
5
  var openai = require('@adaline/openai');
6
6
 
7
- var a={"gemma2-9b-it":{modelName:"gemma2-9b-it",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.2,outputPricePerMillion:.2}}}]},"llama-3.1-8b-instant":{modelName:"llama-3.1-8b-instant",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.05,outputPricePerMillion:.08}}}]},"llama-3.2-11b-vision-preview":{modelName:"llama-3.2-11b-vision-preview",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.18,outputPricePerMillion:.18}}}]},"llama-3.2-1b-preview":{modelName:"llama-3.2-1b-preview",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.04,outputPricePerMillion:.04}}}]},"llama-3.2-3b-preview":{modelName:"llama-3.2-3b-preview",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.06,outputPricePerMillion:.06}}}]},"llama-3.2-90b-vision-preview":{modelName:"llama-3.2-90b-vision-preview",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.7,outputPricePerMillion:.8}}}]},"llama3-70b-8192":{modelName:"llama3-70b-8192",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.59,outputPricePerMillion:.79}}}]},"llama3-8b-8192":{modelName:"llama3-8b-8192",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.05,outputPricePerMillion:.08}}}]},"llama-guard-3-8b":{modelName:"llama-guard-3-8b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.2,outputPricePerMillion:.2}}}]}};var n=zod.z.object({modelName:zod.z.string().min(1),apiKey:zod.z.string().min(1)}),t=class extends openai.BaseChatModel{constructor(i,c){let r=n.parse(c),p=h.baseUrl;super(i,{modelName:r.modelName,apiKey:r.apiKey,baseUrl:p,completeChatUrl:`${p}/chat/completions`,streamChatUrl:`${p}/chat/completions`});this.version="v1";this.modelSchema=i,this.modelName=r.modelName,this.groqApiKey=r.apiKey;}transformMessages(i){let c=i.some(l=>l.role==="system"),r=i.some(l=>l.content.some(_=>_.modality==="image"));if(c&&r)throw new provider.InvalidMessagesError({info:`Invalid message content for model : '${this.modelName}'`,cause:new Error("Prompting with images is incompatible with system messages`)")});let p=super.transformMessages(i);return p.messages.forEach(l=>{l.role==="system"?typeof l.content!="string"&&(l.content=l.content.map(_=>_.text).join(`
8
- `)):l.role==="assistant"&&l.content&&typeof l.content!="string"&&(l.content=l.content.map(_=>_.text).join(`
9
- `));}),p}getModelPricing(){if(!(this.modelName in a))throw new provider.ModelResponseError({info:`Invalid model pricing for model : '${this.modelName}'`,cause:new Error(`No pricing configuration found for model "${this.modelName}"`)});return a[this.modelName]}};var v=provider.RangeConfigItem({param:"temperature",title:provider.CHAT_CONFIG.TEMPERATURE.title,description:provider.CHAT_CONFIG.TEMPERATURE.description,min:0,max:2,step:.01,default:1}),N=s=>provider.RangeConfigItem({param:"max_tokens",title:provider.CHAT_CONFIG.MAX_TOKENS.title,description:provider.CHAT_CONFIG.MAX_TOKENS.description,min:0,max:s,step:1,default:0}),q=provider.MultiStringConfigItem({param:"stop",title:provider.CHAT_CONFIG.STOP(4).title,description:provider.CHAT_CONFIG.STOP(4).description,max:4}),w=provider.RangeConfigItem({param:"top_p",title:provider.CHAT_CONFIG.TOP_P.title,description:provider.CHAT_CONFIG.TOP_P.description,min:0,max:1,step:.01,default:1}),z=provider.RangeConfigItem({param:"frequency_penalty",title:provider.CHAT_CONFIG.FREQUENCY_PENALTY.title,description:provider.CHAT_CONFIG.FREQUENCY_PENALTY.description,min:-2,max:2,step:.01,default:0}),B=provider.RangeConfigItem({param:"presence_penalty",title:provider.CHAT_CONFIG.PRESENCE_PENALTY.title,description:provider.CHAT_CONFIG.PRESENCE_PENALTY.description,min:-2,max:2,step:.01,default:0}),D=provider.RangeConfigItem({param:"seed",title:provider.CHAT_CONFIG.SEED.title,description:provider.CHAT_CONFIG.SEED.description,min:0,max:1e6,step:1,default:0}),V=provider.SelectStringConfigItem({param:"response_format",title:provider.CHAT_CONFIG.RESPONSE_FORMAT.title,description:provider.CHAT_CONFIG.RESPONSE_FORMAT.description,default:"text",choices:["text","json_object"]}),F=provider.SelectStringConfigItem({param:"tool_choice",title:"Tool choice",description:"Controls which (if any) tool is called by the model. 'none' means the model will not call a function. 'auto' means the model can pick between generating a message or calling a tool.",default:"auto",choices:["auto","required","none"]});var W=s=>zod.z.object({temperature:v.schema,maxTokens:N(s).schema,stop:q.schema,topP:w.schema,frequencyPenalty:z.schema,presencePenalty:B.schema,seed:D.schema.transform(e=>e===0?void 0:e),responseFormat:V.schema,toolChoice:F.schema}),ee=s=>({temperature:v.def,maxTokens:N(s).def,stop:q.def,topP:w.def,frequencyPenalty:z.def,presencePenalty:B.def,seed:D.def,responseFormat:V.def,toolChoice:F.def});var o={base:s=>({def:ee(s),schema:W(s)})};var u="gemma2-9b-it",ge="Gemma is a family of lightweight, state-of-the-art open models from Google, built from the same research and technology used to create the Gemini models.",U=provider.ChatModelSchema(openai.OpenAIChatModelRoles,openai.OpenAIChatModelTextToolModalitiesEnum).parse({name:u,description:ge,maxInputTokens:8192,maxOutputTokens:4096,roles:openai.OpenAIChatModelRolesMap,modalities:openai.OpenAIChatModelTextToolModalities,config:{def:o.base(4096).def,schema:o.base(4096).schema},price:a[u]}),oe=n,M=class extends t{constructor(e){super(U,e);}};var f="llama-3.1-8b-instant",Ie="The Llama 3.1 instruction tuned text only models (8B, 70B, 405B) are optimized for multilingual dialogue use cases and outperform many of the available open source and closed chat models on common industry benchmarks.",j=provider.ChatModelSchema(openai.OpenAIChatModelRoles,openai.OpenAIChatModelTextToolModalitiesEnum).parse({name:f,description:Ie,maxInputTokens:128e3,maxOutputTokens:8192,roles:openai.OpenAIChatModelRolesMap,modalities:openai.OpenAIChatModelTextToolModalities,config:{def:o.base(8192).def,schema:o.base(8192).schema},price:a[f]}),ae=n,b=class extends t{constructor(e){super(j,e);}};var y="llama-3.2-11b-vision-preview",ve="The Llama 3.2-Vision instruction-tuned models are optimized for visual recognition, image reasoning, captioning, and answering general questions about an image. The models outperform many of the available open source and closed multimodal models on common industry benchmarks.",K=provider.ChatModelSchema(openai.OpenAIChatModelRoles,openai.OpenAIChatModelModalitiesEnum).parse({name:y,description:ve,maxInputTokens:128e3,maxOutputTokens:8192,roles:openai.OpenAIChatModelRolesMap,modalities:openai.OpenAIChatModelModalities,config:{def:o.base(8192).def,schema:o.base(8192).schema},price:a[y]}),te=n,T=class extends t{constructor(e){super(K,e);}};var O="llama-3.2-1b-preview",De="The Llama 3.2 instruction-tuned text only models are optimized for multilingual dialogue use cases, including agentic retrieval and summarization tasks. They outperform many of the available open source and closed chat models on common industry benchmarks.",$=provider.ChatModelSchema(openai.OpenAIChatModelRoles,openai.OpenAIChatModelTextToolModalitiesEnum).parse({name:O,description:De,maxInputTokens:128e3,maxOutputTokens:8192,roles:openai.OpenAIChatModelRolesMap,modalities:openai.OpenAIChatModelTextToolModalities,config:{def:o.base(8192).def,schema:o.base(8192).schema},price:a[O]}),se=n,g=class extends t{constructor(e){super($,e);}};var C="llama-3.2-3b-preview",$e="The Llama 3.2 instruction-tuned text only models are optimized for multilingual dialogue use cases, including agentic retrieval and summarization tasks. They outperform many of the available open source and closed chat models on common industry benchmarks.",Y=provider.ChatModelSchema(openai.OpenAIChatModelRoles,openai.OpenAIChatModelTextToolModalitiesEnum).parse({name:C,description:$e,maxInputTokens:128e3,maxOutputTokens:8192,roles:openai.OpenAIChatModelRolesMap,modalities:openai.OpenAIChatModelTextToolModalities,config:{def:o.base(8192).def,schema:o.base(8192).schema},price:a[C]}),ie=n,L=class extends t{constructor(e){super(Y,e);}};var x="llama-3.2-90b-vision-preview",Je="The Llama 3.2-90B Vision instruction-tuned models are optimized for advanced visual recognition, complex image reasoning, detailed captioning, and answering intricate questions about images. These models achieve state-of-the-art results on multiple industry benchmarks for multimodal tasks.",Q=provider.ChatModelSchema(openai.OpenAIChatModelRoles,openai.OpenAIChatModelModalitiesEnum).parse({name:x,description:Je,maxInputTokens:131072,maxOutputTokens:8192,roles:openai.OpenAIChatModelRolesMap,modalities:openai.OpenAIChatModelModalities,config:{def:o.base(8192).def,schema:o.base(8192).schema},price:a[x]}),ne=n,S=class extends t{constructor(e){super(Q,e);}};var P="llama3-70b-8192",so="The Llama 3 instruction tuned models are optimized for dialogue use cases and outperform many of the available open source chat models on common industry benchmarks.",X=provider.ChatModelSchema(openai.OpenAIChatModelRoles,openai.OpenAIChatModelTextToolModalitiesEnum).parse({name:P,description:so,maxInputTokens:8192,maxOutputTokens:4096,roles:openai.OpenAIChatModelRolesMap,modalities:openai.OpenAIChatModelTextToolModalities,config:{def:o.base(4096).def,schema:o.base(4096).schema},price:a[P]}),me=n,I=class extends t{constructor(e){super(X,e);}};var k="llama3-8b-8192",po="The Llama 3 instruction tuned models are optimized for dialogue use cases and outperform many of the available open source chat models on common industry benchmarks.",Z=provider.ChatModelSchema(openai.OpenAIChatModelRoles,openai.OpenAIChatModelTextToolModalitiesEnum).parse({name:k,description:po,maxInputTokens:8192,maxOutputTokens:4096,roles:openai.OpenAIChatModelRolesMap,modalities:openai.OpenAIChatModelTextToolModalities,config:{def:o.base(4096).def,schema:o.base(4096).schema},price:a[k]}),le=n,E=class extends t{constructor(e){super(Z,e);}};var R="llama-guard-3-8b",fo="Llama Guard 3 is a Llama-3.1-8B pretrained model, fine-tuned for content safety classification.",H=provider.ChatModelSchema(openai.OpenAIChatModelRoles,openai.OpenAIChatModelTextToolModalitiesEnum).parse({name:R,description:fo,maxInputTokens:8192,maxOutputTokens:4096,roles:openai.OpenAIChatModelRolesMap,modalities:openai.OpenAIChatModelTextToolModalities,config:{def:o.base(4096).def,schema:o.base(4096).schema},price:a[R]}),re=n,A=class extends t{constructor(e){super(H,e);}};var bo="groq",h=class{constructor(){this.version="v1";this.name=bo;this.chatModelFactories={[u]:{model:M,modelOptions:oe,modelSchema:U},[R]:{model:A,modelOptions:re,modelSchema:H},[k]:{model:E,modelOptions:le,modelSchema:Z},[P]:{model:I,modelOptions:me,modelSchema:X},[f]:{model:b,modelOptions:ae,modelSchema:j},[y]:{model:T,modelOptions:te,modelSchema:K},[x]:{model:S,modelOptions:ne,modelSchema:Q},[C]:{model:L,modelOptions:ie,modelSchema:Y},[O]:{model:g,modelOptions:se,modelSchema:$}};this.embeddingModelFactories={};}chatModelLiterals(){return Object.keys(this.chatModelFactories)}chatModelSchemas(){return Object.keys(this.chatModelFactories).reduce((e,i)=>(e[i]=this.chatModelFactories[i].modelSchema,e),{})}chatModel(e){let i=e.modelName;if(!(i in this.chatModelFactories))throw new provider.ProviderError({info:`Groq chat model: ${i} not found`,cause:new Error(`Groq chat model: ${i} not found, available chat models:
10
- ${this.chatModelLiterals().join(", ")}`)});let c=this.chatModelFactories[i].model,r=this.chatModelFactories[i].modelOptions.parse(e);return new c(r)}embeddingModelLiterals(){return Object.keys(this.embeddingModelFactories)}embeddingModelSchemas(){return Object.keys(this.embeddingModelFactories).reduce((e,i)=>(e[i]=this.embeddingModelFactories[i].modelSchema,e),{})}embeddingModel(e){throw new provider.ProviderError({info:"Groq does not support embedding models yet",cause:new Error("Groq does not support embedding models yet")})}};h.baseUrl="https://api.groq.com/openai/v1";
7
+ var t={"gemma2-9b-it":{modelName:"gemma2-9b-it",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.2,outputPricePerMillion:.2}}}]},"llama-3.1-8b-instant":{modelName:"llama-3.1-8b-instant",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.05,outputPricePerMillion:.08}}}]},"llama-3.2-11b-vision-preview":{modelName:"llama-3.2-11b-vision-preview",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.18,outputPricePerMillion:.18}}}]},"llama-3.2-1b-preview":{modelName:"llama-3.2-1b-preview",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.04,outputPricePerMillion:.04}}}]},"llama-3.2-3b-preview":{modelName:"llama-3.2-3b-preview",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.06,outputPricePerMillion:.06}}}]},"llama-3.2-90b-vision-preview":{modelName:"llama-3.2-90b-vision-preview",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.7,outputPricePerMillion:.8}}}]},"llama3-70b-8192":{modelName:"llama3-70b-8192",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.59,outputPricePerMillion:.79}}}]},"llama3-8b-8192":{modelName:"llama3-8b-8192",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.05,outputPricePerMillion:.08}}}]},"llama-guard-3-8b":{modelName:"llama-guard-3-8b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.2,outputPricePerMillion:.2}}}]},"llama-3.3-70b-versatile":{modelName:"llama-3.3-70b-versatile",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.59,outputPricePerMillion:.79}}}]},"meta-llama/llama-guard-4-12b":{modelName:"meta-llama/llama-guard-4-12b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.2,outputPricePerMillion:.2}}}]},"deepseek-r1-distill-llama-70b":{modelName:"deepseek-r1-distill-llama-70b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.75,outputPricePerMillion:.99}}}]},"moonshotai/kimi-k2-instruct":{modelName:"moonshotai/kimi-k2-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:1,outputPricePerMillion:3}}}]},"qwen/qwen3-32b":{modelName:"qwen/qwen3-32b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.29,outputPricePerMillion:.59}}}]},"meta-llama/llama-4-maverick-17b-128e-instruct":{modelName:"meta-llama/llama-4-maverick-17b-128e-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.2,outputPricePerMillion:.6}}}]},"meta-llama/llama-4-scout-17b-16e-instruct":{modelName:"meta-llama/llama-4-scout-17b-16e-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.11,outputPricePerMillion:.34}}}]}};var n=zod.z.object({modelName:zod.z.string().min(1),apiKey:zod.z.string().min(1)}),a=class extends openai.BaseChatModel{constructor(s,d){let m=n.parse(d),p=u.baseUrl;super(s,{modelName:m.modelName,apiKey:m.apiKey,baseUrl:p,completeChatUrl:`${p}/chat/completions`,streamChatUrl:`${p}/chat/completions`});this.version="v1";this.modelSchema=s,this.modelName=m.modelName,this.groqApiKey=m.apiKey;}transformMessages(s){let d=s.some(r=>r.role==="system"),m=s.some(r=>r.content.some(_=>_.modality==="image"));if(d&&m)throw new provider.InvalidMessagesError({info:`Invalid message content for model : '${this.modelName}'`,cause:new Error("Prompting with images is incompatible with system messages`)")});let p=super.transformMessages(s);return p.messages.forEach(r=>{r.role==="system"?typeof r.content!="string"&&(r.content=r.content.map(_=>_.text).join(`
8
+ `)):r.role==="assistant"&&r.content&&typeof r.content!="string"&&(r.content=r.content.map(_=>_.text).join(`
9
+ `));}),p}getModelPricing(){if(!(this.modelName in t))throw new provider.ModelResponseError({info:`Invalid model pricing for model : '${this.modelName}'`,cause:new Error(`No pricing configuration found for model "${this.modelName}"`)});return t[this.modelName]}};var E=provider.RangeConfigItem({param:"temperature",title:provider.CHAT_CONFIG.TEMPERATURE.title,description:provider.CHAT_CONFIG.TEMPERATURE.description,min:0,max:2,step:.01,default:1}),A=i=>provider.RangeConfigItem({param:"max_tokens",title:provider.CHAT_CONFIG.MAX_TOKENS.title,description:provider.CHAT_CONFIG.MAX_TOKENS.description,min:0,max:i,step:1,default:0}),G=provider.MultiStringConfigItem({param:"stop",title:provider.CHAT_CONFIG.STOP(4).title,description:provider.CHAT_CONFIG.STOP(4).description,max:4}),N=provider.RangeConfigItem({param:"top_p",title:provider.CHAT_CONFIG.TOP_P.title,description:provider.CHAT_CONFIG.TOP_P.description,min:0,max:1,step:.01,default:1}),q=provider.RangeConfigItem({param:"frequency_penalty",title:provider.CHAT_CONFIG.FREQUENCY_PENALTY.title,description:provider.CHAT_CONFIG.FREQUENCY_PENALTY.description,min:-2,max:2,step:.01,default:0}),B=provider.RangeConfigItem({param:"presence_penalty",title:provider.CHAT_CONFIG.PRESENCE_PENALTY.title,description:provider.CHAT_CONFIG.PRESENCE_PENALTY.description,min:-2,max:2,step:.01,default:0}),K=provider.RangeConfigItem({param:"seed",title:provider.CHAT_CONFIG.SEED.title,description:provider.CHAT_CONFIG.SEED.description,min:0,max:1e6,step:1,default:0}),z=provider.SelectStringConfigItem({param:"response_format",title:provider.CHAT_CONFIG.RESPONSE_FORMAT.title,description:provider.CHAT_CONFIG.RESPONSE_FORMAT.description,default:"text",choices:["text","json_object"]}),U=provider.SelectStringConfigItem({param:"tool_choice",title:"Tool choice",description:"Controls which (if any) tool is called by the model. 'none' means the model will not call a function. 'auto' means the model can pick between generating a message or calling a tool.",default:"auto",choices:["auto","required","none"]});var J=i=>zod.z.object({temperature:E.schema,maxTokens:A(i).schema,stop:G.schema,topP:N.schema,frequencyPenalty:q.schema,presencePenalty:B.schema,seed:K.schema.transform(e=>e===0?void 0:e),responseFormat:z.schema,toolChoice:U.schema}),ee=i=>({temperature:E.def,maxTokens:A(i).def,stop:G.def,topP:N.def,frequencyPenalty:q.def,presencePenalty:B.def,seed:K.def,responseFormat:z.def,toolChoice:U.def});var o={base:i=>({def:ee(i),schema:J(i)})};var h="gemma2-9b-it",Oe="Gemma is a family of lightweight, state-of-the-art open models from Google, built from the same research and technology used to create the Gemini models.",F=provider.ChatModelSchema(openai.OpenAIChatModelRoles,openai.OpenAIChatModelTextToolModalitiesEnum).parse({name:h,description:Oe,maxInputTokens:8192,maxOutputTokens:4096,roles:openai.OpenAIChatModelRolesMap,modalities:openai.OpenAIChatModelTextToolModalities,config:{def:o.base(4096).def,schema:o.base(4096).schema},price:t[h]}),oe=n,M=class extends a{constructor(e){super(F,e);}};var f="llama-3.1-8b-instant",xe="The Llama 3.1 instruction tuned text only models (8B, 70B, 405B) are optimized for multilingual dialogue use cases and outperform many of the available open source and closed chat models on common industry benchmarks.",V=provider.ChatModelSchema(openai.OpenAIChatModelRoles,openai.OpenAIChatModelTextToolModalitiesEnum).parse({name:f,description:xe,maxInputTokens:128e3,maxOutputTokens:8192,roles:openai.OpenAIChatModelRolesMap,modalities:openai.OpenAIChatModelTextToolModalities,config:{def:o.base(8192).def,schema:o.base(8192).schema},price:t[f]}),te=n,b=class extends a{constructor(e){super(V,e);}};var g="llama-3.3-70b-versatile",Ee="Llama-3.3-70B-Versatile is Meta's advanced multilingual large language model, optimized for a wide range of natural language processing tasks. With 70 billion parameters, it offers high performance across various benchmarks while maintaining efficiency suitable for diverse applications.",Q=provider.ChatModelSchema(openai.OpenAIChatModelRoles,openai.OpenAIChatModelTextToolModalitiesEnum).parse({name:g,description:Ee,maxInputTokens:128e3,maxOutputTokens:32768,roles:openai.OpenAIChatModelRolesMap,modalities:openai.OpenAIChatModelTextToolModalities,config:{def:o.base(32768).def,schema:o.base(32768).schema},price:t[g]}),ae=n,y=class extends a{constructor(e){super(Q,e);}};var T="meta-llama/llama-guard-4-12b",Ke="Llama-Guard-4-12B is Meta's advanced multilingual large language model, optimized for a wide range of natural language processing tasks. With 70 billion parameters, it offers high performance across various benchmarks while maintaining efficiency suitable for diverse applications.",j=provider.ChatModelSchema(openai.OpenAIChatModelRoles,openai.OpenAIChatModelTextToolModalitiesEnum).parse({name:T,description:Ke,maxInputTokens:128e3,maxOutputTokens:1024,roles:openai.OpenAIChatModelRolesMap,modalities:openai.OpenAIChatModelTextModalities,config:{def:o.base(1024).def,schema:o.base(1024).schema},price:t[T]}),ie=n,O=class extends a{constructor(e){super(j,e);}};var C="qwen/qwen3-32b",je="Qwen 3 32B is the latest generation of large language models in the Qwen series, offering groundbreaking advancements in reasoning, instruction-following, agent capabilities, and multilingual support. It uniquely supports seamless switching between thinking mode (for complex logical reasoning, math, and coding) and non-thinking mode (for efficient, general-purpose dialogue) within a single model. ",$=provider.ChatModelSchema(openai.OpenAIChatModelRoles,openai.OpenAIChatModelTextToolModalitiesEnum).parse({name:C,description:je,maxInputTokens:128e3,maxOutputTokens:40960,roles:openai.OpenAIChatModelRolesMap,modalities:openai.OpenAIChatModelTextToolModalities,config:{def:o.base(40960).def,schema:o.base(40960).schema},price:t[C]}),se=n,k=class extends a{constructor(e){super($,e);}};var P="deepseek-r1-distill-llama-70b",He="DeepSeek-R1-Distill-Llama-70B is a distilled version of DeepSeek's R1 model, fine-tuned from the Llama-3.3-70B-Instruct base model. This model leverages knowledge distillation to retain robust reasoning capabilities and deliver exceptional performance on mathematical and logical reasoning tasks with Groq's industry-leading speed.",Y=provider.ChatModelSchema(openai.OpenAIChatModelRoles,openai.OpenAIChatModelTextToolModalitiesEnum).parse({name:P,description:He,maxInputTokens:128e3,maxOutputTokens:128e3,roles:openai.OpenAIChatModelRolesMap,modalities:openai.OpenAIChatModelTextToolModalities,config:{def:o.base(128e3).def,schema:o.base(128e3).schema},price:t[P]}),ne=n,I=class extends a{constructor(e){super(Y,e);}};var S="moonshotai/kimi-k2-instruct",io="Kimi K2 is Moonshot AI's state-of-the-art Mixture-of-Experts (MoE) language model with 1 trillion total parameters and 32 billion activated parameters. Designed for agentic intelligence, it excels at tool use, coding, and autonomous problem-solving across diverse domains.",W=provider.ChatModelSchema(openai.OpenAIChatModelRoles,openai.OpenAIChatModelTextToolModalitiesEnum).parse({name:S,description:io,maxInputTokens:128e3,maxOutputTokens:16384,roles:openai.OpenAIChatModelRolesMap,modalities:openai.OpenAIChatModelTextToolModalities,config:{def:o.base(16384).def,schema:o.base(16384).schema},price:t[S]}),le=n,x=class extends a{constructor(e){super(W,e);}};var L="meta-llama/llama-4-maverick-17b-128e-instruct",po="Llama 4 Maverick is Meta's natively multimodal model that enables text and image understanding. Model offers industry-leading performance for multimodal tasks like natural assistant-like chat, image recognition, and coding tasks.",X=provider.ChatModelSchema(openai.OpenAIChatModelRoles,openai.OpenAIChatModelModalitiesEnum).parse({name:L,description:po,maxInputTokens:131072,maxOutputTokens:8192,roles:openai.OpenAIChatModelRolesMap,modalities:openai.OpenAIChatModelModalities,config:{def:o.base(8192).def,schema:o.base(8192).schema},price:t[L]}),re=n,R=class extends a{constructor(e){super(X,e);}};var D="meta-llama/llama-4-scout-17b-16e-instruct",fo="Llama 4 Scout is Meta's natively multimodal model that enables text and image understanding. Model offers industry-leading performance for multimodal tasks like natural assistant-like chat, image recognition, and coding tasks.",Z=provider.ChatModelSchema(openai.OpenAIChatModelRoles,openai.OpenAIChatModelModalitiesEnum).parse({name:D,description:fo,maxInputTokens:131072,maxOutputTokens:8192,roles:openai.OpenAIChatModelRolesMap,modalities:openai.OpenAIChatModelModalities,config:{def:o.base(8192).def,schema:o.base(8192).schema},price:t[D]}),me=n,v=class extends a{constructor(e){super(Z,e);}};var bo="groq",u=class{constructor(){this.version="v1";this.name=bo;this.chatModelFactories={[h]:{model:M,modelOptions:oe,modelSchema:F},[f]:{model:b,modelOptions:te,modelSchema:V},[g]:{model:y,modelOptions:ae,modelSchema:Q},[T]:{model:O,modelOptions:ie,modelSchema:j},[C]:{model:k,modelOptions:se,modelSchema:$},[P]:{model:I,modelOptions:ne,modelSchema:Y},[S]:{model:x,modelOptions:le,modelSchema:W},[L]:{model:R,modelOptions:re,modelSchema:X},[D]:{model:v,modelOptions:me,modelSchema:Z}};this.embeddingModelFactories={};}chatModelLiterals(){return Object.keys(this.chatModelFactories)}chatModelSchemas(){return Object.keys(this.chatModelFactories).reduce((e,s)=>(e[s]=this.chatModelFactories[s].modelSchema,e),{})}chatModel(e){let s=e.modelName;if(!(s in this.chatModelFactories))throw new provider.ProviderError({info:`Groq chat model: ${s} not found`,cause:new Error(`Groq chat model: ${s} not found, available chat models:
10
+ ${this.chatModelLiterals().join(", ")}`)});let d=this.chatModelFactories[s].model,m=this.chatModelFactories[s].modelOptions.parse(e);return new d(m)}embeddingModelLiterals(){return Object.keys(this.embeddingModelFactories)}embeddingModelSchemas(){return Object.keys(this.embeddingModelFactories).reduce((e,s)=>(e[s]=this.embeddingModelFactories[s].modelSchema,e),{})}embeddingModel(e){throw new provider.ProviderError({info:"Groq does not support embedding models yet",cause:new Error("Groq does not support embedding models yet")})}};u.baseUrl="https://api.groq.com/openai/v1";
11
11
 
12
- exports.BaseChatModelGroq = t;
12
+ exports.BaseChatModelGroq = a;
13
13
  exports.BaseChatModelOptions = n;
14
+ exports.Deepseek_R1_Distill_Llama_70b = I;
15
+ exports.Deepseek_R1_Distill_Llama_70bLiteral = P;
16
+ exports.Deepseek_R1_Distill_Llama_70bSchema = Y;
17
+ exports.Deepseek_R1_Distill_Llama_70b_Options = ne;
14
18
  exports.Gemma2_9b_IT = M;
15
- exports.Gemma2_9b_ITLiteral = u;
19
+ exports.Gemma2_9b_ITLiteral = h;
16
20
  exports.Gemma2_9b_ITOptions = oe;
17
- exports.Gemma2_9b_ITSchema = U;
18
- exports.Groq = h;
19
- exports.LlamaGuard_3_8b = A;
20
- exports.LlamaGuard_3_8bLiteral = R;
21
- exports.LlamaGuard_3_8bOptions = re;
22
- exports.LlamaGuard_3_8bSchema = H;
21
+ exports.Gemma2_9b_ITSchema = F;
22
+ exports.Groq = u;
23
+ exports.Kimi_K2_Instruct = x;
24
+ exports.Kimi_K2_InstructLiteral = S;
25
+ exports.Kimi_K2_InstructSchema = W;
26
+ exports.Kimi_K2_Instruct_Options = le;
23
27
  exports.Llama_3_1_8b = b;
24
28
  exports.Llama_3_1_8bLiteral = f;
25
- exports.Llama_3_1_8bSchema = j;
26
- exports.Llama_3_1_8b_Options = ae;
27
- exports.Llama_3_2_11b_Vision = T;
28
- exports.Llama_3_2_11b_VisionLiteral = y;
29
- exports.Llama_3_2_11b_VisionOptions = te;
30
- exports.Llama_3_2_11b_VisionSchema = K;
31
- exports.Llama_3_2_1b = g;
32
- exports.Llama_3_2_1bLiteral = O;
33
- exports.Llama_3_2_1bSchema = $;
34
- exports.Llama_3_2_1b_Options = se;
35
- exports.Llama_3_2_3b = L;
36
- exports.Llama_3_2_3bLiteral = C;
37
- exports.Llama_3_2_3bSchema = Y;
38
- exports.Llama_3_2_3b_Options = ie;
39
- exports.Llama_3_2_90b_Vision = S;
40
- exports.Llama_3_2_90b_VisionLiteral = x;
41
- exports.Llama_3_2_90b_VisionOptions = ne;
42
- exports.Llama_3_2_90b_VisionSchema = Q;
43
- exports.Llama_3_70b = I;
44
- exports.Llama_3_70bLiteral = P;
45
- exports.Llama_3_70bOptions = me;
46
- exports.Llama_3_70bSchema = X;
47
- exports.Llama_3_8b = E;
48
- exports.Llama_3_8bLiteral = k;
49
- exports.Llama_3_8bOptions = le;
50
- exports.Llama_3_8bSchema = Z;
29
+ exports.Llama_3_1_8bSchema = V;
30
+ exports.Llama_3_1_8b_Options = te;
31
+ exports.Llama_3_3_70b_Versatile = y;
32
+ exports.Llama_3_3_70b_VersatileLiteral = g;
33
+ exports.Llama_3_3_70b_VersatileSchema = Q;
34
+ exports.Llama_3_3_70b_Versatile_Options = ae;
35
+ exports.Llama_4_Maverick_17b_128e_Instruct = R;
36
+ exports.Llama_4_Maverick_17b_128e_InstructLiteral = L;
37
+ exports.Llama_4_Maverick_17b_128e_InstructSchema = X;
38
+ exports.Llama_4_Maverick_17b_128e_Instruct_Options = re;
39
+ exports.Llama_4_Scout_17b_16e_Instruct = v;
40
+ exports.Llama_4_Scout_17b_16e_InstructLiteral = D;
41
+ exports.Llama_4_Scout_17b_16e_InstructSchema = Z;
42
+ exports.Llama_4_Scout_17b_16e_Instruct_Options = me;
43
+ exports.Llama_Guard_4_12b = O;
44
+ exports.Llama_Guard_4_12bLiteral = T;
45
+ exports.Llama_Guard_4_12bSchema = j;
46
+ exports.Llama_Guard_4_12b_Options = ie;
47
+ exports.Qwen3_32b = k;
48
+ exports.Qwen3_32bLiteral = C;
49
+ exports.Qwen3_32bSchema = $;
50
+ exports.Qwen3_32b_Options = se;
51
51
  //# sourceMappingURL=index.js.map
52
52
  //# sourceMappingURL=index.js.map