@adaline/groq 1.3.0 → 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 +155 -1
- package/dist/index.d.ts +155 -1
- package/dist/index.js +33 -25
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -563,6 +563,160 @@ declare class Kimi_K2_Instruct extends BaseChatModelGroq {
|
|
|
563
563
|
constructor(options: Kimi_K2_Instruct_OptionsType);
|
|
564
564
|
}
|
|
565
565
|
|
|
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
|
+
name: string;
|
|
569
|
+
description: string;
|
|
570
|
+
roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
|
|
571
|
+
modalities: ["text" | "image" | "tool-call" | "tool-response", ...("text" | "image" | "tool-call" | "tool-response")[]];
|
|
572
|
+
maxInputTokens: number;
|
|
573
|
+
maxOutputTokens: number;
|
|
574
|
+
config: {
|
|
575
|
+
def: Record<string, {
|
|
576
|
+
type: "multi-string";
|
|
577
|
+
param: string;
|
|
578
|
+
title: string;
|
|
579
|
+
description: string;
|
|
580
|
+
max: number;
|
|
581
|
+
} | {
|
|
582
|
+
type: "object-schema";
|
|
583
|
+
param: string;
|
|
584
|
+
title: string;
|
|
585
|
+
description: string;
|
|
586
|
+
objectSchema?: any;
|
|
587
|
+
} | {
|
|
588
|
+
type: "range";
|
|
589
|
+
param: string;
|
|
590
|
+
title: string;
|
|
591
|
+
description: string;
|
|
592
|
+
max: number;
|
|
593
|
+
default: number;
|
|
594
|
+
min: number;
|
|
595
|
+
step: number;
|
|
596
|
+
} | {
|
|
597
|
+
type: "select-boolean";
|
|
598
|
+
param: string;
|
|
599
|
+
title: string;
|
|
600
|
+
description: string;
|
|
601
|
+
default: boolean | null;
|
|
602
|
+
} | {
|
|
603
|
+
type: "select-string";
|
|
604
|
+
param: string;
|
|
605
|
+
title: string;
|
|
606
|
+
description: string;
|
|
607
|
+
default: string;
|
|
608
|
+
choices: string[];
|
|
609
|
+
}>;
|
|
610
|
+
schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
|
|
611
|
+
};
|
|
612
|
+
price: {
|
|
613
|
+
modelName: string;
|
|
614
|
+
currency: string;
|
|
615
|
+
tokenRanges: {
|
|
616
|
+
minTokens: number;
|
|
617
|
+
prices: {
|
|
618
|
+
base: {
|
|
619
|
+
inputPricePerMillion: number;
|
|
620
|
+
outputPricePerMillion: number;
|
|
621
|
+
};
|
|
622
|
+
};
|
|
623
|
+
maxTokens?: number | null | undefined;
|
|
624
|
+
}[];
|
|
625
|
+
};
|
|
626
|
+
maxReasoningTokens?: number | undefined;
|
|
627
|
+
};
|
|
628
|
+
declare const Llama_4_Maverick_17b_128e_Instruct_Options: z.ZodObject<{
|
|
629
|
+
modelName: z.ZodString;
|
|
630
|
+
apiKey: z.ZodString;
|
|
631
|
+
}, "strip", z.ZodTypeAny, {
|
|
632
|
+
modelName: string;
|
|
633
|
+
apiKey: string;
|
|
634
|
+
}, {
|
|
635
|
+
modelName: string;
|
|
636
|
+
apiKey: string;
|
|
637
|
+
}>;
|
|
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
|
+
}
|
|
642
|
+
|
|
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
|
+
name: string;
|
|
646
|
+
description: string;
|
|
647
|
+
roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
|
|
648
|
+
modalities: ["text" | "image" | "tool-call" | "tool-response", ...("text" | "image" | "tool-call" | "tool-response")[]];
|
|
649
|
+
maxInputTokens: number;
|
|
650
|
+
maxOutputTokens: number;
|
|
651
|
+
config: {
|
|
652
|
+
def: Record<string, {
|
|
653
|
+
type: "multi-string";
|
|
654
|
+
param: string;
|
|
655
|
+
title: string;
|
|
656
|
+
description: string;
|
|
657
|
+
max: number;
|
|
658
|
+
} | {
|
|
659
|
+
type: "object-schema";
|
|
660
|
+
param: string;
|
|
661
|
+
title: string;
|
|
662
|
+
description: string;
|
|
663
|
+
objectSchema?: any;
|
|
664
|
+
} | {
|
|
665
|
+
type: "range";
|
|
666
|
+
param: string;
|
|
667
|
+
title: string;
|
|
668
|
+
description: string;
|
|
669
|
+
max: number;
|
|
670
|
+
default: number;
|
|
671
|
+
min: number;
|
|
672
|
+
step: number;
|
|
673
|
+
} | {
|
|
674
|
+
type: "select-boolean";
|
|
675
|
+
param: string;
|
|
676
|
+
title: string;
|
|
677
|
+
description: string;
|
|
678
|
+
default: boolean | null;
|
|
679
|
+
} | {
|
|
680
|
+
type: "select-string";
|
|
681
|
+
param: string;
|
|
682
|
+
title: string;
|
|
683
|
+
description: string;
|
|
684
|
+
default: string;
|
|
685
|
+
choices: string[];
|
|
686
|
+
}>;
|
|
687
|
+
schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
|
|
688
|
+
};
|
|
689
|
+
price: {
|
|
690
|
+
modelName: string;
|
|
691
|
+
currency: string;
|
|
692
|
+
tokenRanges: {
|
|
693
|
+
minTokens: number;
|
|
694
|
+
prices: {
|
|
695
|
+
base: {
|
|
696
|
+
inputPricePerMillion: number;
|
|
697
|
+
outputPricePerMillion: number;
|
|
698
|
+
};
|
|
699
|
+
};
|
|
700
|
+
maxTokens?: number | null | undefined;
|
|
701
|
+
}[];
|
|
702
|
+
};
|
|
703
|
+
maxReasoningTokens?: number | undefined;
|
|
704
|
+
};
|
|
705
|
+
declare const Llama_4_Scout_17b_16e_Instruct_Options: z.ZodObject<{
|
|
706
|
+
modelName: z.ZodString;
|
|
707
|
+
apiKey: z.ZodString;
|
|
708
|
+
}, "strip", z.ZodTypeAny, {
|
|
709
|
+
modelName: string;
|
|
710
|
+
apiKey: string;
|
|
711
|
+
}, {
|
|
712
|
+
modelName: string;
|
|
713
|
+
apiKey: string;
|
|
714
|
+
}>;
|
|
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
|
+
}
|
|
719
|
+
|
|
566
720
|
declare class Groq<C extends BaseChatModelOptionsType, E extends Record<string, any> = Record<string, any>> implements ProviderV1<C, E> {
|
|
567
721
|
readonly version: "v1";
|
|
568
722
|
readonly name = "groq";
|
|
@@ -577,4 +731,4 @@ declare class Groq<C extends BaseChatModelOptionsType, E extends Record<string,
|
|
|
577
731
|
embeddingModel(options: E): EmbeddingModelV1;
|
|
578
732
|
}
|
|
579
733
|
|
|
580
|
-
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_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 };
|
|
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
|
@@ -563,6 +563,160 @@ declare class Kimi_K2_Instruct extends BaseChatModelGroq {
|
|
|
563
563
|
constructor(options: Kimi_K2_Instruct_OptionsType);
|
|
564
564
|
}
|
|
565
565
|
|
|
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
|
+
name: string;
|
|
569
|
+
description: string;
|
|
570
|
+
roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
|
|
571
|
+
modalities: ["text" | "image" | "tool-call" | "tool-response", ...("text" | "image" | "tool-call" | "tool-response")[]];
|
|
572
|
+
maxInputTokens: number;
|
|
573
|
+
maxOutputTokens: number;
|
|
574
|
+
config: {
|
|
575
|
+
def: Record<string, {
|
|
576
|
+
type: "multi-string";
|
|
577
|
+
param: string;
|
|
578
|
+
title: string;
|
|
579
|
+
description: string;
|
|
580
|
+
max: number;
|
|
581
|
+
} | {
|
|
582
|
+
type: "object-schema";
|
|
583
|
+
param: string;
|
|
584
|
+
title: string;
|
|
585
|
+
description: string;
|
|
586
|
+
objectSchema?: any;
|
|
587
|
+
} | {
|
|
588
|
+
type: "range";
|
|
589
|
+
param: string;
|
|
590
|
+
title: string;
|
|
591
|
+
description: string;
|
|
592
|
+
max: number;
|
|
593
|
+
default: number;
|
|
594
|
+
min: number;
|
|
595
|
+
step: number;
|
|
596
|
+
} | {
|
|
597
|
+
type: "select-boolean";
|
|
598
|
+
param: string;
|
|
599
|
+
title: string;
|
|
600
|
+
description: string;
|
|
601
|
+
default: boolean | null;
|
|
602
|
+
} | {
|
|
603
|
+
type: "select-string";
|
|
604
|
+
param: string;
|
|
605
|
+
title: string;
|
|
606
|
+
description: string;
|
|
607
|
+
default: string;
|
|
608
|
+
choices: string[];
|
|
609
|
+
}>;
|
|
610
|
+
schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
|
|
611
|
+
};
|
|
612
|
+
price: {
|
|
613
|
+
modelName: string;
|
|
614
|
+
currency: string;
|
|
615
|
+
tokenRanges: {
|
|
616
|
+
minTokens: number;
|
|
617
|
+
prices: {
|
|
618
|
+
base: {
|
|
619
|
+
inputPricePerMillion: number;
|
|
620
|
+
outputPricePerMillion: number;
|
|
621
|
+
};
|
|
622
|
+
};
|
|
623
|
+
maxTokens?: number | null | undefined;
|
|
624
|
+
}[];
|
|
625
|
+
};
|
|
626
|
+
maxReasoningTokens?: number | undefined;
|
|
627
|
+
};
|
|
628
|
+
declare const Llama_4_Maverick_17b_128e_Instruct_Options: z.ZodObject<{
|
|
629
|
+
modelName: z.ZodString;
|
|
630
|
+
apiKey: z.ZodString;
|
|
631
|
+
}, "strip", z.ZodTypeAny, {
|
|
632
|
+
modelName: string;
|
|
633
|
+
apiKey: string;
|
|
634
|
+
}, {
|
|
635
|
+
modelName: string;
|
|
636
|
+
apiKey: string;
|
|
637
|
+
}>;
|
|
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
|
+
}
|
|
642
|
+
|
|
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
|
+
name: string;
|
|
646
|
+
description: string;
|
|
647
|
+
roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
|
|
648
|
+
modalities: ["text" | "image" | "tool-call" | "tool-response", ...("text" | "image" | "tool-call" | "tool-response")[]];
|
|
649
|
+
maxInputTokens: number;
|
|
650
|
+
maxOutputTokens: number;
|
|
651
|
+
config: {
|
|
652
|
+
def: Record<string, {
|
|
653
|
+
type: "multi-string";
|
|
654
|
+
param: string;
|
|
655
|
+
title: string;
|
|
656
|
+
description: string;
|
|
657
|
+
max: number;
|
|
658
|
+
} | {
|
|
659
|
+
type: "object-schema";
|
|
660
|
+
param: string;
|
|
661
|
+
title: string;
|
|
662
|
+
description: string;
|
|
663
|
+
objectSchema?: any;
|
|
664
|
+
} | {
|
|
665
|
+
type: "range";
|
|
666
|
+
param: string;
|
|
667
|
+
title: string;
|
|
668
|
+
description: string;
|
|
669
|
+
max: number;
|
|
670
|
+
default: number;
|
|
671
|
+
min: number;
|
|
672
|
+
step: number;
|
|
673
|
+
} | {
|
|
674
|
+
type: "select-boolean";
|
|
675
|
+
param: string;
|
|
676
|
+
title: string;
|
|
677
|
+
description: string;
|
|
678
|
+
default: boolean | null;
|
|
679
|
+
} | {
|
|
680
|
+
type: "select-string";
|
|
681
|
+
param: string;
|
|
682
|
+
title: string;
|
|
683
|
+
description: string;
|
|
684
|
+
default: string;
|
|
685
|
+
choices: string[];
|
|
686
|
+
}>;
|
|
687
|
+
schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
|
|
688
|
+
};
|
|
689
|
+
price: {
|
|
690
|
+
modelName: string;
|
|
691
|
+
currency: string;
|
|
692
|
+
tokenRanges: {
|
|
693
|
+
minTokens: number;
|
|
694
|
+
prices: {
|
|
695
|
+
base: {
|
|
696
|
+
inputPricePerMillion: number;
|
|
697
|
+
outputPricePerMillion: number;
|
|
698
|
+
};
|
|
699
|
+
};
|
|
700
|
+
maxTokens?: number | null | undefined;
|
|
701
|
+
}[];
|
|
702
|
+
};
|
|
703
|
+
maxReasoningTokens?: number | undefined;
|
|
704
|
+
};
|
|
705
|
+
declare const Llama_4_Scout_17b_16e_Instruct_Options: z.ZodObject<{
|
|
706
|
+
modelName: z.ZodString;
|
|
707
|
+
apiKey: z.ZodString;
|
|
708
|
+
}, "strip", z.ZodTypeAny, {
|
|
709
|
+
modelName: string;
|
|
710
|
+
apiKey: string;
|
|
711
|
+
}, {
|
|
712
|
+
modelName: string;
|
|
713
|
+
apiKey: string;
|
|
714
|
+
}>;
|
|
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
|
+
}
|
|
719
|
+
|
|
566
720
|
declare class Groq<C extends BaseChatModelOptionsType, E extends Record<string, any> = Record<string, any>> implements ProviderV1<C, E> {
|
|
567
721
|
readonly version: "v1";
|
|
568
722
|
readonly name = "groq";
|
|
@@ -577,4 +731,4 @@ declare class Groq<C extends BaseChatModelOptionsType, E extends Record<string,
|
|
|
577
731
|
embeddingModel(options: E): EmbeddingModelV1;
|
|
578
732
|
}
|
|
579
733
|
|
|
580
|
-
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_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 };
|
|
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,41 +4,49 @@ var provider = require('@adaline/provider');
|
|
|
4
4
|
var zod = require('zod');
|
|
5
5
|
var openai = require('@adaline/openai');
|
|
6
6
|
|
|
7
|
-
var
|
|
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
8
|
`)):r.role==="assistant"&&r.content&&typeof r.content!="string"&&(r.content=r.content.map(_=>_.text).join(`
|
|
9
|
-
`));}),p}getModelPricing(){if(!(this.modelName in
|
|
10
|
-
${this.chatModelLiterals().join(", ")}`)});let
|
|
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 =
|
|
13
|
-
exports.BaseChatModelOptions =
|
|
14
|
-
exports.Deepseek_R1_Distill_Llama_70b =
|
|
12
|
+
exports.BaseChatModelGroq = a;
|
|
13
|
+
exports.BaseChatModelOptions = n;
|
|
14
|
+
exports.Deepseek_R1_Distill_Llama_70b = I;
|
|
15
15
|
exports.Deepseek_R1_Distill_Llama_70bLiteral = P;
|
|
16
|
-
exports.Deepseek_R1_Distill_Llama_70bSchema =
|
|
17
|
-
exports.Deepseek_R1_Distill_Llama_70b_Options =
|
|
16
|
+
exports.Deepseek_R1_Distill_Llama_70bSchema = Y;
|
|
17
|
+
exports.Deepseek_R1_Distill_Llama_70b_Options = ne;
|
|
18
18
|
exports.Gemma2_9b_IT = M;
|
|
19
|
-
exports.Gemma2_9b_ITLiteral =
|
|
20
|
-
exports.Gemma2_9b_ITOptions =
|
|
21
|
-
exports.Gemma2_9b_ITSchema =
|
|
22
|
-
exports.Groq =
|
|
23
|
-
exports.Kimi_K2_Instruct =
|
|
19
|
+
exports.Gemma2_9b_ITLiteral = h;
|
|
20
|
+
exports.Gemma2_9b_ITOptions = oe;
|
|
21
|
+
exports.Gemma2_9b_ITSchema = F;
|
|
22
|
+
exports.Groq = u;
|
|
23
|
+
exports.Kimi_K2_Instruct = x;
|
|
24
24
|
exports.Kimi_K2_InstructLiteral = S;
|
|
25
|
-
exports.Kimi_K2_InstructSchema =
|
|
26
|
-
exports.Kimi_K2_Instruct_Options =
|
|
25
|
+
exports.Kimi_K2_InstructSchema = W;
|
|
26
|
+
exports.Kimi_K2_Instruct_Options = le;
|
|
27
27
|
exports.Llama_3_1_8b = b;
|
|
28
28
|
exports.Llama_3_1_8bLiteral = f;
|
|
29
|
-
exports.Llama_3_1_8bSchema =
|
|
30
|
-
exports.Llama_3_1_8b_Options =
|
|
31
|
-
exports.Llama_3_3_70b_Versatile =
|
|
29
|
+
exports.Llama_3_1_8bSchema = V;
|
|
30
|
+
exports.Llama_3_1_8b_Options = te;
|
|
31
|
+
exports.Llama_3_3_70b_Versatile = y;
|
|
32
32
|
exports.Llama_3_3_70b_VersatileLiteral = g;
|
|
33
|
-
exports.Llama_3_3_70b_VersatileSchema =
|
|
34
|
-
exports.Llama_3_3_70b_Versatile_Options =
|
|
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;
|
|
35
43
|
exports.Llama_Guard_4_12b = O;
|
|
36
|
-
exports.Llama_Guard_4_12bLiteral =
|
|
37
|
-
exports.Llama_Guard_4_12bSchema =
|
|
38
|
-
exports.Llama_Guard_4_12b_Options =
|
|
44
|
+
exports.Llama_Guard_4_12bLiteral = T;
|
|
45
|
+
exports.Llama_Guard_4_12bSchema = j;
|
|
46
|
+
exports.Llama_Guard_4_12b_Options = ie;
|
|
39
47
|
exports.Qwen3_32b = k;
|
|
40
48
|
exports.Qwen3_32bLiteral = C;
|
|
41
|
-
exports.Qwen3_32bSchema =
|
|
42
|
-
exports.Qwen3_32b_Options =
|
|
49
|
+
exports.Qwen3_32bSchema = $;
|
|
50
|
+
exports.Qwen3_32b_Options = se;
|
|
43
51
|
//# sourceMappingURL=index.js.map
|
|
44
52
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/models/pricing.json","../src/models/chat-models/base-chat-model.groq.ts","../src/configs/chat-model/common.config.chat-model.groq.ts","../src/configs/chat-model/base.config.chat-model.groq.ts","../src/configs/configs.groq.ts","../src/models/chat-models/gemma2-9b-it.groq.ts","../src/models/chat-models/llama-3-1-8b.groq.ts","../src/models/chat-models/llama-3-3-70b-versatile.groq.ts","../src/models/chat-models/llama-guard-4-12b.groq.ts","../src/models/chat-models/qwen3-32b.groq.ts","../src/models/chat-models/deepseek-r1-distill-llama-70b.groq.ts","../src/models/chat-models/kimi-k2-instruct.groq.ts","../src/provider/provider.groq.ts"],"names":["pricing_default","BaseChatModelOptions","z","BaseChatModelGroq","BaseChatModel","modelSchema","options","parsedOptions","baseUrl","Groq","messages","hasSystemRole","msg","hasImageModality","content","InvalidMessagesError","transformedMessages","message","ModelResponseError","temperature","RangeConfigItem","CHAT_CONFIG","maxTokens","maxOutputTokens","stop","MultiStringConfigItem","topP","frequencyPenalty","presencePenalty","seed","responseFormat","SelectStringConfigItem","toolChoice","ChatModelBaseConfigSchema","value","ChatModelBaseConfigDef","GroqChatModelConfigs","Gemma2_9b_ITLiteral","Gemma2_9b_ITDescription","Gemma2_9b_ITSchema","ChatModelSchema","OpenAIChatModelRoles","OpenAIChatModelTextToolModalitiesEnum","OpenAIChatModelRolesMap","OpenAIChatModelTextToolModalities","Gemma2_9b_ITOptions","Gemma2_9b_IT","Llama_3_1_8bLiteral","Llama_3_1_8bDescription","Llama_3_1_8bSchema","Llama_3_1_8b_Options","Llama_3_1_8b","Llama_3_3_70b_VersatileLiteral","Llama_3_3_70b_VersatileDescription","Llama_3_3_70b_VersatileSchema","Llama_3_3_70b_Versatile_Options","Llama_3_3_70b_Versatile","Llama_Guard_4_12bLiteral","Llama_Guard_4_12bDescription","Llama_Guard_4_12bSchema","OpenAIChatModelTextModalities","Llama_Guard_4_12b_Options","Llama_Guard_4_12b","Qwen3_32bLiteral","Qwen3_32bDescription","Qwen3_32bSchema","Qwen3_32b_Options","Qwen3_32b","Deepseek_R1_Distill_Llama_70bLiteral","Deepseek_R1_Distill_Llama_70bDescription","Deepseek_R1_Distill_Llama_70bSchema","Deepseek_R1_Distill_Llama_70b_Options","Deepseek_R1_Distill_Llama_70b","Kimi_K2_InstructLiteral","Kimi_K2_InstructDescription","Kimi_K2_InstructSchema","Kimi_K2_Instruct_Options","Kimi_K2_Instruct","ProviderLiteral","acc","key","modelName","ProviderError","model"],"mappings":";;;;;;AAAA,IAAAA,CAAA,CAAA,CACE,cAAgB,CAAA,CACd,SAAa,CAAA,cAAA,CACb,QAAY,CAAA,KAAA,CACZ,WAAe,CAAA,CACb,CACE,SAAa,CAAA,CAAA,CACb,SAAa,CAAA,IAAA,CACb,MAAU,CAAA,CACR,IAAQ,CAAA,CACN,oBAAwB,CAAA,EAAA,CACxB,qBAAyB,CAAA,EAC3B,CACF,CACF,CACF,CACF,CACA,CAAA,sBAAA,CAAwB,CACtB,SAAA,CAAa,sBACb,CAAA,QAAA,CAAY,KACZ,CAAA,WAAA,CAAe,CACb,CACE,SAAa,CAAA,CAAA,CACb,SAAa,CAAA,IAAA,CACb,MAAU,CAAA,CACR,KAAQ,CACN,oBAAA,CAAwB,GACxB,CAAA,qBAAA,CAAyB,GAC3B,CACF,CACF,CACF,CACF,CAAA,CACA,8BAAgC,CAAA,CAC9B,SAAa,CAAA,8BAAA,CACb,QAAY,CAAA,KAAA,CACZ,WAAe,CAAA,CACb,CACE,SAAA,CAAa,CACb,CAAA,SAAA,CAAa,IACb,CAAA,MAAA,CAAU,CACR,IAAA,CAAQ,CACN,oBAAA,CAAwB,GACxB,CAAA,qBAAA,CAAyB,GAC3B,CACF,CACF,CACF,CACF,CACA,CAAA,sBAAA,CAAwB,CACtB,SAAA,CAAa,sBACb,CAAA,QAAA,CAAY,KACZ,CAAA,WAAA,CAAe,CACb,CACE,SAAa,CAAA,CAAA,CACb,SAAa,CAAA,IAAA,CACb,OAAU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C,UAAA,CAAA,CAAA,KAAA,CAAO,IAAI,KAAA,CAAM,oBAAoBA,CAAS,CAAA;AAAA,UAAA,EAC1C,KAAK,iBAAkB,EAAA,CAAE,KAAK,IAAI,CAAC,EAAE,CAC3C,CAAC,CAGH,CAAA,IAAME,EAAQ,IAAK,CAAA,kBAAA,CAAmBF,CAAS,CAAE,CAAA,KAAA,CAC3C1E,EAAgB,IAAK,CAAA,kBAAA,CAAmB0E,CAAS,CAAA,CAAE,aAAa,KAAM3E,CAAAA,CAAO,EACnF,OAAO,IAAI6E,EAAM5E,CAAa,CAChC,CAEA,sBAAA,EAAmC,CACjC,OAAO,MAAA,CAAO,KAAK,IAAK,CAAA,uBAAuB,CACjD,CAEA,qBAAA,EAAkE,CAChE,OAAO,OAAO,IAAK,CAAA,IAAA,CAAK,uBAAuB,CAAE,CAAA,MAAA,CAC/C,CAACwE,CAAKC,CAAAA,CAAAA,IACJD,CAAIC,CAAAA,CAAG,EAAI,IAAK,CAAA,uBAAA,CAAwBA,CAAG,CAAE,CAAA,WAAA,CACtCD,GAET,EACF,CACF,CAGA,eAAezE,CAA8B,CAAA,CAC3C,MAAM,IAAI4E,sBAAAA,CAAc,CACtB,IAAM,CAAA,4CAAA,CACN,MAAO,IAAI,KAAA,CAAM,4CAA4C,CAC/D,CAAC,CACH,CACF,EA7GMzE,EAGY,OAAU,CAAA,gCAAA","file":"index.js","sourcesContent":["{\n \"gemma2-9b-it\": {\n \"modelName\": \"gemma2-9b-it\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.2,\n \"outputPricePerMillion\": 0.2\n }\n }\n }\n ]\n },\n \"llama-3.1-8b-instant\": {\n \"modelName\": \"llama-3.1-8b-instant\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.05,\n \"outputPricePerMillion\": 0.08\n }\n }\n }\n ]\n },\n \"llama-3.2-11b-vision-preview\": {\n \"modelName\": \"llama-3.2-11b-vision-preview\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.18,\n \"outputPricePerMillion\": 0.18\n }\n }\n }\n ]\n },\n \"llama-3.2-1b-preview\": {\n \"modelName\": \"llama-3.2-1b-preview\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.04,\n \"outputPricePerMillion\": 0.04\n }\n }\n }\n ]\n },\n \"llama-3.2-3b-preview\": {\n \"modelName\": \"llama-3.2-3b-preview\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.06,\n \"outputPricePerMillion\": 0.06\n }\n }\n }\n ]\n },\n \"llama-3.2-90b-vision-preview\": {\n \"modelName\": \"llama-3.2-90b-vision-preview\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.7,\n \"outputPricePerMillion\": 0.8\n }\n }\n }\n ]\n },\n \"llama3-70b-8192\": {\n \"modelName\": \"llama3-70b-8192\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.59,\n \"outputPricePerMillion\": 0.79\n }\n }\n }\n ]\n },\n \"llama3-8b-8192\": {\n \"modelName\": \"llama3-8b-8192\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.05,\n \"outputPricePerMillion\": 0.08\n }\n }\n }\n ]\n },\n \"llama-guard-3-8b\": {\n \"modelName\": \"llama-guard-3-8b\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.2,\n \"outputPricePerMillion\": 0.2\n }\n }\n }\n ]\n },\n \"llama-3.3-70b-versatile\": {\n \"modelName\": \"llama-3.3-70b-versatile\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.59,\n \"outputPricePerMillion\": 0.79\n }\n }\n }\n ]\n },\n \"meta-llama/llama-guard-4-12b\": {\n \"modelName\": \"meta-llama/llama-guard-4-12b\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.2,\n \"outputPricePerMillion\": 0.2\n }\n }\n }\n ]\n },\n \"deepseek-r1-distill-llama-70b\": {\n \"modelName\": \"deepseek-r1-distill-llama-70b\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.75,\n \"outputPricePerMillion\": 0.99\n }\n }\n }\n ]\n },\n \"moonshotai/kimi-k2-instruct\": {\n \"modelName\": \"moonshotai/kimi-k2-instruct\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 1.0,\n \"outputPricePerMillion\": 3.0\n }\n }\n }\n ]\n },\n \"qwen/qwen3-32b\": {\n \"modelName\": \"qwen/qwen3-32b\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.29,\n \"outputPricePerMillion\": 0.59\n }\n }\n }\n ]\n }\n}\n","import { z } from \"zod\";\n\nimport { BaseChatModel, OpenAIChatRequestMessageType } from \"@adaline/openai\";\nimport { ChatModelSchemaType, InvalidMessagesError, ModelResponseError, ParamsType } from \"@adaline/provider\";\nimport { ChatModelPriceType, MessageType } from \"@adaline/types\";\n\nimport { Groq } from \"../../provider\";\nimport pricingData from \"../pricing.json\";\n\nconst BaseChatModelOptions = z.object({\n modelName: z.string().min(1),\n apiKey: z.string().min(1),\n});\ntype BaseChatModelOptionsType = z.infer<typeof BaseChatModelOptions>;\n\nclass BaseChatModelGroq extends BaseChatModel {\n readonly version = \"v1\" as const;\n modelSchema: ChatModelSchemaType;\n readonly modelName: string;\n\n private readonly groqApiKey: string;\n\n constructor(modelSchema: ChatModelSchemaType, options: BaseChatModelOptionsType) {\n const parsedOptions = BaseChatModelOptions.parse(options);\n const baseUrl = Groq.baseUrl;\n super(modelSchema, {\n modelName: parsedOptions.modelName,\n apiKey: parsedOptions.apiKey,\n baseUrl: baseUrl,\n completeChatUrl: `${baseUrl}/chat/completions`,\n streamChatUrl: `${baseUrl}/chat/completions`,\n });\n this.modelSchema = modelSchema;\n this.modelName = parsedOptions.modelName;\n this.groqApiKey = parsedOptions.apiKey;\n }\n\n transformMessages(messages: MessageType[]): ParamsType {\n const hasSystemRole = messages.some((msg) => msg.role === \"system\");\n const hasImageModality = messages.some((msg) => msg.content.some((content: any) => content.modality === \"image\"));\n\n if (hasSystemRole && hasImageModality) {\n throw new InvalidMessagesError({\n info: `Invalid message content for model : '${this.modelName}'`,\n cause: new Error(\"Prompting with images is incompatible with system messages`)\"),\n });\n }\n\n const transformedMessages = super.transformMessages(messages) as { messages: OpenAIChatRequestMessageType[] };\n\n // Groq expects the content to be a string for system and assistant messages\n // OpenAI transformer takes care of validating role and modality\n transformedMessages.messages.forEach((message) => {\n if (message.role === \"system\") {\n if (typeof message.content !== \"string\") {\n message.content = message.content.map((content) => content.text).join(\"\\n\");\n }\n } else if (message.role === \"assistant\") {\n if (message.content && typeof message.content !== \"string\") {\n message.content = message.content.map((content) => content.text).join(\"\\n\");\n }\n }\n });\n\n return transformedMessages;\n }\n getModelPricing(): ChatModelPriceType {\n // Check if the modelName exists in pricingData before accessing it\n if (!(this.modelName in pricingData)) {\n throw new ModelResponseError({\n info: `Invalid model pricing for model : '${this.modelName}'`,\n cause: new Error(`No pricing configuration found for model \"${this.modelName}\"`),\n });\n }\n\n const entry = pricingData[this.modelName as keyof typeof pricingData];\n return entry as ChatModelPriceType;\n }\n}\n\nexport { BaseChatModelGroq, BaseChatModelOptions, type BaseChatModelOptionsType };\n","import { CHAT_CONFIG, MultiStringConfigItem, RangeConfigItem, SelectStringConfigItem } from \"@adaline/provider\";\n\nconst temperature = RangeConfigItem({\n param: \"temperature\",\n title: CHAT_CONFIG.TEMPERATURE.title,\n description: CHAT_CONFIG.TEMPERATURE.description,\n min: 0,\n max: 2,\n step: 0.01,\n default: 1,\n});\n\nconst maxTokens = (maxOutputTokens: number) =>\n RangeConfigItem({\n param: \"max_tokens\",\n title: CHAT_CONFIG.MAX_TOKENS.title,\n description: CHAT_CONFIG.MAX_TOKENS.description,\n min: 0,\n max: maxOutputTokens,\n step: 1,\n default: 0,\n });\n\nconst stop = MultiStringConfigItem({\n param: \"stop\",\n title: CHAT_CONFIG.STOP(4).title,\n description: CHAT_CONFIG.STOP(4).description,\n max: 4,\n});\n\nconst topP = RangeConfigItem({\n param: \"top_p\",\n title: CHAT_CONFIG.TOP_P.title,\n description: CHAT_CONFIG.TOP_P.description,\n min: 0,\n max: 1,\n step: 0.01,\n default: 1,\n});\n\nconst frequencyPenalty = RangeConfigItem({\n param: \"frequency_penalty\",\n title: CHAT_CONFIG.FREQUENCY_PENALTY.title,\n description: CHAT_CONFIG.FREQUENCY_PENALTY.description,\n min: -2,\n max: 2,\n step: 0.01,\n default: 0,\n});\n\nconst presencePenalty = RangeConfigItem({\n param: \"presence_penalty\",\n title: CHAT_CONFIG.PRESENCE_PENALTY.title,\n description: CHAT_CONFIG.PRESENCE_PENALTY.description,\n min: -2,\n max: 2,\n step: 0.01,\n default: 0,\n});\n\nconst seed = RangeConfigItem({\n param: \"seed\",\n title: CHAT_CONFIG.SEED.title,\n description: CHAT_CONFIG.SEED.description,\n min: 0,\n max: 1000000,\n step: 1,\n default: 0,\n});\n\nconst responseFormat = SelectStringConfigItem({\n param: \"response_format\",\n title: CHAT_CONFIG.RESPONSE_FORMAT.title,\n description: CHAT_CONFIG.RESPONSE_FORMAT.description,\n default: \"text\",\n choices: [\"text\", \"json_object\"],\n});\n\nconst toolChoice = SelectStringConfigItem({\n param: \"tool_choice\",\n title: \"Tool choice\",\n description:\n \"Controls which (if any) tool is called by the model. \\\n 'none' means the model will not call a function. \\\n 'auto' means the model can pick between generating a message or calling a tool.\",\n default: \"auto\",\n choices: [\"auto\", \"required\", \"none\"],\n});\n\nexport { frequencyPenalty, maxTokens, presencePenalty, seed, stop, temperature, toolChoice, topP, responseFormat };\n","import { z } from \"zod\";\n\nimport {\n frequencyPenalty,\n maxTokens,\n presencePenalty,\n responseFormat,\n seed,\n stop,\n temperature,\n toolChoice,\n topP,\n} from \"./common.config.chat-model.groq\";\n\nconst ChatModelBaseConfigSchema = (maxOutputTokens: number) =>\n z.object({\n temperature: temperature.schema,\n maxTokens: maxTokens(maxOutputTokens).schema,\n stop: stop.schema,\n topP: topP.schema,\n frequencyPenalty: frequencyPenalty.schema,\n presencePenalty: presencePenalty.schema,\n seed: seed.schema.transform((value) => (value === 0 ? undefined : value)),\n responseFormat: responseFormat.schema,\n toolChoice: toolChoice.schema,\n });\n\nconst ChatModelBaseConfigDef = (maxOutputTokens: number) =>\n ({\n temperature: temperature.def,\n maxTokens: maxTokens(maxOutputTokens).def,\n stop: stop.def,\n topP: topP.def,\n frequencyPenalty: frequencyPenalty.def,\n presencePenalty: presencePenalty.def,\n seed: seed.def,\n responseFormat: responseFormat.def,\n toolChoice: toolChoice.def,\n }) as const;\n\nexport { ChatModelBaseConfigDef, ChatModelBaseConfigSchema };\n","import { ChatModelBaseConfigDef, ChatModelBaseConfigSchema } from \"./chat-model\";\n\nconst GroqChatModelConfigs = {\n base: (maxOutputTokens: number) => ({\n def: ChatModelBaseConfigDef(maxOutputTokens),\n schema: ChatModelBaseConfigSchema(maxOutputTokens),\n }),\n} as const;\n\nexport { GroqChatModelConfigs };\n","import { z } from \"zod\";\n\nimport {\n OpenAIChatModelRoles,\n OpenAIChatModelRolesMap,\n OpenAIChatModelTextToolModalities,\n OpenAIChatModelTextToolModalitiesEnum,\n} from \"@adaline/openai\";\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GroqChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModelGroq, BaseChatModelOptions } from \"./base-chat-model.groq\";\n\nconst Gemma2_9b_ITLiteral = \"gemma2-9b-it\" as const;\n// https://huggingface.co/google/gemma-2-9b-it\nconst Gemma2_9b_ITDescription =\n \"Gemma is a family of lightweight, state-of-the-art open models from Google, \\\n built from the same research and technology used to create the Gemini models.\";\n\nconst Gemma2_9b_ITSchema = ChatModelSchema(OpenAIChatModelRoles, OpenAIChatModelTextToolModalitiesEnum).parse({\n name: Gemma2_9b_ITLiteral,\n description: Gemma2_9b_ITDescription,\n maxInputTokens: 8192,\n maxOutputTokens: 4096,\n roles: OpenAIChatModelRolesMap,\n modalities: OpenAIChatModelTextToolModalities,\n config: {\n def: GroqChatModelConfigs.base(4096).def,\n schema: GroqChatModelConfigs.base(4096).schema,\n },\n price: pricingData[Gemma2_9b_ITLiteral],\n});\n\nconst Gemma2_9b_ITOptions = BaseChatModelOptions;\ntype Gemma2_9b_ITOptionsType = z.infer<typeof Gemma2_9b_ITOptions>;\n\nclass Gemma2_9b_IT extends BaseChatModelGroq {\n constructor(options: Gemma2_9b_ITOptionsType) {\n super(Gemma2_9b_ITSchema, options);\n }\n}\n\nexport { Gemma2_9b_IT, Gemma2_9b_ITLiteral, Gemma2_9b_ITOptions, Gemma2_9b_ITSchema, type Gemma2_9b_ITOptionsType };\n","import { z } from \"zod\";\n\nimport {\n OpenAIChatModelRoles,\n OpenAIChatModelRolesMap,\n OpenAIChatModelTextToolModalities,\n OpenAIChatModelTextToolModalitiesEnum,\n} from \"@adaline/openai\";\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GroqChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModelGroq, BaseChatModelOptions } from \"./base-chat-model.groq\";\n\nconst Llama_3_1_8bLiteral = \"llama-3.1-8b-instant\" as const;\n// https://github.com/meta-llama/llama-models/blob/main/models/llama3_1/MODEL_CARD.md\nconst Llama_3_1_8bDescription =\n \"The Llama 3.1 instruction tuned text only models (8B, 70B, 405B) are optimized for multilingual dialogue use cases and \\\n outperform many of the available open source and closed chat models on common industry benchmarks.\";\n\nconst Llama_3_1_8bSchema = ChatModelSchema(OpenAIChatModelRoles, OpenAIChatModelTextToolModalitiesEnum).parse({\n name: Llama_3_1_8bLiteral,\n description: Llama_3_1_8bDescription,\n maxInputTokens: 128000,\n maxOutputTokens: 8192,\n roles: OpenAIChatModelRolesMap,\n modalities: OpenAIChatModelTextToolModalities,\n config: {\n def: GroqChatModelConfigs.base(8192).def,\n schema: GroqChatModelConfigs.base(8192).schema,\n },\n price: pricingData[Llama_3_1_8bLiteral],\n});\n\nconst Llama_3_1_8b_Options = BaseChatModelOptions;\ntype Llama_3_1_8b_OptionsType = z.infer<typeof Llama_3_1_8b_Options>;\n\nclass Llama_3_1_8b extends BaseChatModelGroq {\n constructor(options: Llama_3_1_8b_OptionsType) {\n super(Llama_3_1_8bSchema, options);\n }\n}\n\nexport { Llama_3_1_8b, Llama_3_1_8b_Options, Llama_3_1_8bLiteral, Llama_3_1_8bSchema, type Llama_3_1_8b_OptionsType };\n","import { z } from \"zod\";\n\nimport {\n OpenAIChatModelRoles,\n OpenAIChatModelRolesMap,\n OpenAIChatModelTextToolModalities,\n OpenAIChatModelTextToolModalitiesEnum,\n} from \"@adaline/openai\";\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GroqChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModelGroq, BaseChatModelOptions } from \"./base-chat-model.groq\";\n\nconst Llama_3_3_70b_VersatileLiteral = \"llama-3.3-70b-versatile\" as const;\nconst Llama_3_3_70b_VersatileDescription =\n \"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.\";\n\nconst Llama_3_3_70b_VersatileSchema = ChatModelSchema(OpenAIChatModelRoles, OpenAIChatModelTextToolModalitiesEnum).parse({\n name: Llama_3_3_70b_VersatileLiteral,\n description: Llama_3_3_70b_VersatileDescription,\n maxInputTokens: 128000,\n maxOutputTokens: 32768,\n roles: OpenAIChatModelRolesMap,\n modalities: OpenAIChatModelTextToolModalities,\n config: {\n def: GroqChatModelConfigs.base(32768).def,\n schema: GroqChatModelConfigs.base(32768).schema,\n },\n price: pricingData[Llama_3_3_70b_VersatileLiteral],\n});\n\nconst Llama_3_3_70b_Versatile_Options = BaseChatModelOptions;\ntype Llama_3_3_70b_Versatile_OptionsType = z.infer<typeof Llama_3_3_70b_Versatile_Options>;\n\nclass Llama_3_3_70b_Versatile extends BaseChatModelGroq {\n constructor(options: Llama_3_3_70b_Versatile_OptionsType) {\n super(Llama_3_3_70b_VersatileSchema, options);\n }\n}\n\nexport { Llama_3_3_70b_Versatile, Llama_3_3_70b_Versatile_Options, Llama_3_3_70b_VersatileLiteral, Llama_3_3_70b_VersatileSchema, type Llama_3_3_70b_Versatile_OptionsType };\n","import { z } from \"zod\";\n\nimport {\n OpenAIChatModelRoles,\n OpenAIChatModelRolesMap,\n OpenAIChatModelTextModalities,\n OpenAIChatModelTextToolModalitiesEnum,\n} from \"@adaline/openai\";\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GroqChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModelGroq, BaseChatModelOptions } from \"./base-chat-model.groq\";\n\nconst Llama_Guard_4_12bLiteral = \"meta-llama/llama-guard-4-12b\" as const;\nconst Llama_Guard_4_12bDescription =\n \"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.\";\n\nconst Llama_Guard_4_12bSchema = ChatModelSchema(OpenAIChatModelRoles, OpenAIChatModelTextToolModalitiesEnum).parse({\n name: Llama_Guard_4_12bLiteral,\n description: Llama_Guard_4_12bDescription,\n maxInputTokens: 128000,\n maxOutputTokens: 1024,\n roles: OpenAIChatModelRolesMap,\n modalities: OpenAIChatModelTextModalities,\n config: {\n def: GroqChatModelConfigs.base(1024).def,\n schema: GroqChatModelConfigs.base(1024).schema,\n },\n price: pricingData[Llama_Guard_4_12bLiteral],\n});\n\nconst Llama_Guard_4_12b_Options = BaseChatModelOptions;\ntype Llama_Guard_4_12b_OptionsType = z.infer<typeof Llama_Guard_4_12b_Options>;\n\nclass Llama_Guard_4_12b extends BaseChatModelGroq {\n constructor(options: Llama_Guard_4_12b_OptionsType) {\n super(Llama_Guard_4_12bSchema, options);\n }\n}\n\nexport { Llama_Guard_4_12b, Llama_Guard_4_12b_Options, Llama_Guard_4_12bLiteral, Llama_Guard_4_12bSchema, type Llama_Guard_4_12b_OptionsType };\n","import { z } from \"zod\";\n\nimport {\n OpenAIChatModelRoles,\n OpenAIChatModelRolesMap,\n OpenAIChatModelTextToolModalities,\n OpenAIChatModelTextToolModalitiesEnum,\n} from \"@adaline/openai\";\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GroqChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModelGroq, BaseChatModelOptions } from \"./base-chat-model.groq\";\n\nconst Qwen3_32bLiteral = \"qwen/qwen3-32b\" as const;\nconst Qwen3_32bDescription =\n \"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. \";\n\nconst Qwen3_32bSchema = ChatModelSchema(OpenAIChatModelRoles, OpenAIChatModelTextToolModalitiesEnum).parse({\n name: Qwen3_32bLiteral,\n description: Qwen3_32bDescription,\n maxInputTokens: 128000,\n maxOutputTokens: 40960,\n roles: OpenAIChatModelRolesMap,\n modalities: OpenAIChatModelTextToolModalities,\n config: {\n def: GroqChatModelConfigs.base(40960).def,\n schema: GroqChatModelConfigs.base(40960).schema,\n },\n price: pricingData[Qwen3_32bLiteral],\n});\n\nconst Qwen3_32b_Options = BaseChatModelOptions;\ntype Qwen3_32b_OptionsType = z.infer<typeof Qwen3_32b_Options>;\n\nclass Qwen3_32b extends BaseChatModelGroq {\n constructor(options: Qwen3_32b_OptionsType) {\n super(Qwen3_32bSchema, options);\n }\n}\n\nexport { Qwen3_32b, Qwen3_32b_Options, Qwen3_32bLiteral, Qwen3_32bSchema, type Qwen3_32b_OptionsType };\n","import { z } from \"zod\";\n\nimport {\n OpenAIChatModelRoles,\n OpenAIChatModelRolesMap,\n OpenAIChatModelTextToolModalities,\n OpenAIChatModelTextToolModalitiesEnum,\n} from \"@adaline/openai\";\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GroqChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModelGroq, BaseChatModelOptions } from \"./base-chat-model.groq\";\n\nconst Deepseek_R1_Distill_Llama_70bLiteral = \"deepseek-r1-distill-llama-70b\" as const;\nconst Deepseek_R1_Distill_Llama_70bDescription =\n \"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.\";\n\nconst Deepseek_R1_Distill_Llama_70bSchema = ChatModelSchema(OpenAIChatModelRoles, OpenAIChatModelTextToolModalitiesEnum).parse({\n name: Deepseek_R1_Distill_Llama_70bLiteral,\n description: Deepseek_R1_Distill_Llama_70bDescription,\n maxInputTokens: 128000,\n maxOutputTokens: 128000,\n roles: OpenAIChatModelRolesMap,\n modalities: OpenAIChatModelTextToolModalities,\n config: {\n def: GroqChatModelConfigs.base(128000).def,\n schema: GroqChatModelConfigs.base(128000).schema,\n },\n price: pricingData[Deepseek_R1_Distill_Llama_70bLiteral],\n});\n\nconst Deepseek_R1_Distill_Llama_70b_Options = BaseChatModelOptions;\ntype Deepseek_R1_Distill_Llama_70b_OptionsType = z.infer<typeof Deepseek_R1_Distill_Llama_70b_Options>;\n\nclass Deepseek_R1_Distill_Llama_70b extends BaseChatModelGroq {\n constructor(options: Deepseek_R1_Distill_Llama_70b_OptionsType) {\n super(Deepseek_R1_Distill_Llama_70bSchema, options);\n }\n}\n\nexport { Deepseek_R1_Distill_Llama_70b, Deepseek_R1_Distill_Llama_70b_Options, Deepseek_R1_Distill_Llama_70bLiteral, Deepseek_R1_Distill_Llama_70bSchema, type Deepseek_R1_Distill_Llama_70b_OptionsType };\n","import { z } from \"zod\";\n\nimport {\n OpenAIChatModelRoles,\n OpenAIChatModelRolesMap,\n OpenAIChatModelTextToolModalities,\n OpenAIChatModelTextToolModalitiesEnum,\n} from \"@adaline/openai\";\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GroqChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModelGroq, BaseChatModelOptions } from \"./base-chat-model.groq\";\n\nconst Kimi_K2_InstructLiteral = \"moonshotai/kimi-k2-instruct\" as const;\nconst Kimi_K2_InstructDescription =\n \"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.\";\n\nconst Kimi_K2_InstructSchema = ChatModelSchema(OpenAIChatModelRoles, OpenAIChatModelTextToolModalitiesEnum).parse({\n name: Kimi_K2_InstructLiteral,\n description: Kimi_K2_InstructDescription,\n maxInputTokens: 128000,\n maxOutputTokens: 16384,\n roles: OpenAIChatModelRolesMap,\n modalities: OpenAIChatModelTextToolModalities,\n config: {\n def: GroqChatModelConfigs.base(16384).def,\n schema: GroqChatModelConfigs.base(16384).schema,\n },\n price: pricingData[Kimi_K2_InstructLiteral],\n});\n\nconst Kimi_K2_Instruct_Options = BaseChatModelOptions;\ntype Kimi_K2_Instruct_OptionsType = z.infer<typeof Kimi_K2_Instruct_Options>;\n\nclass Kimi_K2_Instruct extends BaseChatModelGroq {\n constructor(options: Kimi_K2_Instruct_OptionsType) {\n super(Kimi_K2_InstructSchema, options);\n }\n}\n\nexport { Kimi_K2_Instruct, Kimi_K2_Instruct_Options, Kimi_K2_InstructLiteral, Kimi_K2_InstructSchema, type Kimi_K2_Instruct_OptionsType };\n","import { z } from \"zod\";\n\nimport { ChatModelSchemaType, ChatModelV1, EmbeddingModelSchemaType, EmbeddingModelV1, ProviderError, ProviderV1 } from \"@adaline/provider\";\n\nimport * as Models from \"../models\";\n\nconst ProviderLiteral = \"groq\";\nclass Groq<C extends Models.BaseChatModelOptionsType, E extends Record<string, any> = Record<string, any>> implements ProviderV1<C, E> {\n readonly version = \"v1\" as const;\n readonly name = ProviderLiteral;\n static readonly baseUrl = \"https://api.groq.com/openai/v1\";\n\n private readonly chatModelFactories: Record<\n string,\n {\n model: { new (options: any): ChatModelV1 };\n modelOptions: z.ZodType<any>;\n modelSchema: ChatModelSchemaType;\n }\n > = {\n [Models.Gemma2_9b_ITLiteral]: {\n model: Models.Gemma2_9b_IT,\n modelOptions: Models.Gemma2_9b_ITOptions,\n modelSchema: Models.Gemma2_9b_ITSchema,\n },\n [Models.Llama_3_1_8bLiteral]: {\n model: Models.Llama_3_1_8b,\n modelOptions: Models.Llama_3_1_8b_Options,\n modelSchema: Models.Llama_3_1_8bSchema,\n },\n [Models.Llama_3_3_70b_VersatileLiteral]: {\n model: Models.Llama_3_3_70b_Versatile,\n modelOptions: Models.Llama_3_3_70b_Versatile_Options,\n modelSchema: Models.Llama_3_3_70b_VersatileSchema,\n },\n [Models.Llama_Guard_4_12bLiteral]: {\n model: Models.Llama_Guard_4_12b,\n modelOptions: Models.Llama_Guard_4_12b_Options,\n modelSchema: Models.Llama_Guard_4_12bSchema,\n },\n [Models.Qwen3_32bLiteral]: {\n model: Models.Qwen3_32b,\n modelOptions: Models.Qwen3_32b_Options,\n modelSchema: Models.Qwen3_32bSchema,\n },\n [Models.Deepseek_R1_Distill_Llama_70bLiteral]: {\n model: Models.Deepseek_R1_Distill_Llama_70b,\n modelOptions: Models.Deepseek_R1_Distill_Llama_70b_Options,\n modelSchema: Models.Deepseek_R1_Distill_Llama_70bSchema,\n },\n [Models.Kimi_K2_InstructLiteral]: {\n model: Models.Kimi_K2_Instruct,\n modelOptions: Models.Kimi_K2_Instruct_Options,\n modelSchema: Models.Kimi_K2_InstructSchema,\n },\n };\n\n private readonly embeddingModelFactories: Record<\n string,\n {\n model: { new (options: any): EmbeddingModelV1 };\n modelOptions: z.ZodType<any>;\n modelSchema: EmbeddingModelSchemaType;\n }\n > = {};\n\n chatModelLiterals(): string[] {\n return Object.keys(this.chatModelFactories);\n }\n\n chatModelSchemas(): Record<string, ChatModelSchemaType> {\n return Object.keys(this.chatModelFactories).reduce(\n (acc, key) => {\n acc[key] = this.chatModelFactories[key].modelSchema;\n return acc;\n },\n {} as Record<string, ChatModelSchemaType>\n );\n }\n\n chatModel(options: C): ChatModelV1 {\n const modelName = options.modelName;\n if (!(modelName in this.chatModelFactories)) {\n throw new ProviderError({\n info: `Groq chat model: ${modelName} not found`,\n cause: new Error(`Groq chat model: ${modelName} not found, available chat models: \n ${this.chatModelLiterals().join(\", \")}`),\n });\n }\n\n const model = this.chatModelFactories[modelName].model;\n const parsedOptions = this.chatModelFactories[modelName].modelOptions.parse(options);\n return new model(parsedOptions);\n }\n\n embeddingModelLiterals(): string[] {\n return Object.keys(this.embeddingModelFactories);\n }\n\n embeddingModelSchemas(): Record<string, EmbeddingModelSchemaType> {\n return Object.keys(this.embeddingModelFactories).reduce(\n (acc, key) => {\n acc[key] = this.embeddingModelFactories[key].modelSchema;\n return acc;\n },\n {} as Record<string, EmbeddingModelSchemaType>\n );\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n embeddingModel(options: E): EmbeddingModelV1 {\n throw new ProviderError({\n info: \"Groq does not support embedding models yet\",\n cause: new Error(\"Groq does not support embedding models yet\"),\n });\n }\n}\n\nexport { Groq };\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/models/pricing.json","../src/models/chat-models/base-chat-model.groq.ts","../src/configs/chat-model/common.config.chat-model.groq.ts","../src/configs/chat-model/base.config.chat-model.groq.ts","../src/configs/configs.groq.ts","../src/models/chat-models/gemma2-9b-it.groq.ts","../src/models/chat-models/llama-3-1-8b.groq.ts","../src/models/chat-models/llama-3-3-70b-versatile.groq.ts","../src/models/chat-models/llama-guard-4-12b.groq.ts","../src/models/chat-models/qwen3-32b.groq.ts","../src/models/chat-models/deepseek-r1-distill-llama-70b.groq.ts","../src/models/chat-models/kimi-k2-instruct.groq.ts","../src/models/chat-models/llama-4-maverick-17b-128e-instruct.groq.ts","../src/models/chat-models/llama-4-scout-17b-16e-instruct.groq.ts","../src/provider/provider.groq.ts"],"names":["pricing_default","BaseChatModelOptions","z","BaseChatModelGroq","BaseChatModel","modelSchema","options","parsedOptions","baseUrl","Groq","messages","hasSystemRole","msg","hasImageModality","content","InvalidMessagesError","transformedMessages","message","ModelResponseError","temperature","RangeConfigItem","CHAT_CONFIG","maxTokens","maxOutputTokens","stop","MultiStringConfigItem","topP","frequencyPenalty","presencePenalty","seed","responseFormat","SelectStringConfigItem","toolChoice","ChatModelBaseConfigSchema","value","ChatModelBaseConfigDef","GroqChatModelConfigs","Gemma2_9b_ITLiteral","Gemma2_9b_ITDescription","Gemma2_9b_ITSchema","ChatModelSchema","OpenAIChatModelRoles","OpenAIChatModelTextToolModalitiesEnum","OpenAIChatModelRolesMap","OpenAIChatModelTextToolModalities","Gemma2_9b_ITOptions","Gemma2_9b_IT","Llama_3_1_8bLiteral","Llama_3_1_8bDescription","Llama_3_1_8bSchema","Llama_3_1_8b_Options","Llama_3_1_8b","Llama_3_3_70b_VersatileLiteral","Llama_3_3_70b_VersatileDescription","Llama_3_3_70b_VersatileSchema","Llama_3_3_70b_Versatile_Options","Llama_3_3_70b_Versatile","Llama_Guard_4_12bLiteral","Llama_Guard_4_12bDescription","Llama_Guard_4_12bSchema","OpenAIChatModelTextModalities","Llama_Guard_4_12b_Options","Llama_Guard_4_12b","Qwen3_32bLiteral","Qwen3_32bDescription","Qwen3_32bSchema","Qwen3_32b_Options","Qwen3_32b","Deepseek_R1_Distill_Llama_70bLiteral","Deepseek_R1_Distill_Llama_70bDescription","Deepseek_R1_Distill_Llama_70bSchema","Deepseek_R1_Distill_Llama_70b_Options","Deepseek_R1_Distill_Llama_70b","Kimi_K2_InstructLiteral","Kimi_K2_InstructDescription","Kimi_K2_InstructSchema","Kimi_K2_Instruct_Options","Kimi_K2_Instruct","Llama_4_Maverick_17b_128e_InstructLiteral","Llama_4_Maverick_17b_128e_InstructDescription","Llama_4_Maverick_17b_128e_InstructSchema","OpenAIChatModelModalitiesEnum","OpenAIChatModelModalities","Llama_4_Maverick_17b_128e_Instruct_Options","Llama_4_Maverick_17b_128e_Instruct","Llama_4_Scout_17b_16e_InstructLiteral","Llama_4_Scout_17b_16e_InstructDescription","Llama_4_Scout_17b_16e_InstructSchema","Llama_4_Scout_17b_16e_Instruct_Options","Llama_4_Scout_17b_16e_Instruct","ProviderLiteral","acc","key","modelName","ProviderError","model"],"mappings":";;;;;;AAAA,IAAA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CAAAA,CAAO,EACnF,OAAO,IAAIyF,EAAMxF,CAAa,CAChC,CAEA,sBAAA,EAAmC,CACjC,OAAO,MAAA,CAAO,KAAK,IAAK,CAAA,uBAAuB,CACjD,CAEA,qBAAA,EAAkE,CAChE,OAAO,OAAO,IAAK,CAAA,IAAA,CAAK,uBAAuB,CAAE,CAAA,MAAA,CAC/C,CAACoF,CAAKC,CAAAA,CAAAA,IACJD,CAAIC,CAAAA,CAAG,EAAI,IAAK,CAAA,uBAAA,CAAwBA,CAAG,CAAE,CAAA,WAAA,CACtCD,GAET,EACF,CACF,CAGA,eAAerF,CAA8B,CAAA,CAC3C,MAAM,IAAIwF,sBAAAA,CAAc,CACtB,IAAM,CAAA,4CAAA,CACN,MAAO,IAAI,KAAA,CAAM,4CAA4C,CAC/D,CAAC,CACH,CACF,EAvHMrF,EAGY,OAAU,CAAA,gCAAA","file":"index.js","sourcesContent":["{\n \"gemma2-9b-it\": {\n \"modelName\": \"gemma2-9b-it\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.2,\n \"outputPricePerMillion\": 0.2\n }\n }\n }\n ]\n },\n \"llama-3.1-8b-instant\": {\n \"modelName\": \"llama-3.1-8b-instant\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.05,\n \"outputPricePerMillion\": 0.08\n }\n }\n }\n ]\n },\n \"llama-3.2-11b-vision-preview\": {\n \"modelName\": \"llama-3.2-11b-vision-preview\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.18,\n \"outputPricePerMillion\": 0.18\n }\n }\n }\n ]\n },\n \"llama-3.2-1b-preview\": {\n \"modelName\": \"llama-3.2-1b-preview\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.04,\n \"outputPricePerMillion\": 0.04\n }\n }\n }\n ]\n },\n \"llama-3.2-3b-preview\": {\n \"modelName\": \"llama-3.2-3b-preview\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.06,\n \"outputPricePerMillion\": 0.06\n }\n }\n }\n ]\n },\n \"llama-3.2-90b-vision-preview\": {\n \"modelName\": \"llama-3.2-90b-vision-preview\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.7,\n \"outputPricePerMillion\": 0.8\n }\n }\n }\n ]\n },\n \"llama3-70b-8192\": {\n \"modelName\": \"llama3-70b-8192\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.59,\n \"outputPricePerMillion\": 0.79\n }\n }\n }\n ]\n },\n \"llama3-8b-8192\": {\n \"modelName\": \"llama3-8b-8192\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.05,\n \"outputPricePerMillion\": 0.08\n }\n }\n }\n ]\n },\n \"llama-guard-3-8b\": {\n \"modelName\": \"llama-guard-3-8b\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.2,\n \"outputPricePerMillion\": 0.2\n }\n }\n }\n ]\n },\n \"llama-3.3-70b-versatile\": {\n \"modelName\": \"llama-3.3-70b-versatile\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.59,\n \"outputPricePerMillion\": 0.79\n }\n }\n }\n ]\n },\n \"meta-llama/llama-guard-4-12b\": {\n \"modelName\": \"meta-llama/llama-guard-4-12b\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.2,\n \"outputPricePerMillion\": 0.2\n }\n }\n }\n ]\n },\n \"deepseek-r1-distill-llama-70b\": {\n \"modelName\": \"deepseek-r1-distill-llama-70b\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.75,\n \"outputPricePerMillion\": 0.99\n }\n }\n }\n ]\n },\n \"moonshotai/kimi-k2-instruct\": {\n \"modelName\": \"moonshotai/kimi-k2-instruct\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 1.0,\n \"outputPricePerMillion\": 3.0\n }\n }\n }\n ]\n },\n \"qwen/qwen3-32b\": {\n \"modelName\": \"qwen/qwen3-32b\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.29,\n \"outputPricePerMillion\": 0.59\n }\n }\n }\n ]\n },\n \"meta-llama/llama-4-maverick-17b-128e-instruct\": {\n \"modelName\": \"meta-llama/llama-4-maverick-17b-128e-instruct\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.2,\n \"outputPricePerMillion\": 0.6\n }\n }\n }\n ]\n },\n \"meta-llama/llama-4-scout-17b-16e-instruct\": {\n \"modelName\": \"meta-llama/llama-4-scout-17b-16e-instruct\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.11,\n \"outputPricePerMillion\": 0.34\n }\n }\n }\n ]\n }\n}\n","import { z } from \"zod\";\n\nimport { BaseChatModel, OpenAIChatRequestMessageType } from \"@adaline/openai\";\nimport { ChatModelSchemaType, InvalidMessagesError, ModelResponseError, ParamsType } from \"@adaline/provider\";\nimport { ChatModelPriceType, MessageType } from \"@adaline/types\";\n\nimport { Groq } from \"../../provider\";\nimport pricingData from \"../pricing.json\";\n\nconst BaseChatModelOptions = z.object({\n modelName: z.string().min(1),\n apiKey: z.string().min(1),\n});\ntype BaseChatModelOptionsType = z.infer<typeof BaseChatModelOptions>;\n\nclass BaseChatModelGroq extends BaseChatModel {\n readonly version = \"v1\" as const;\n modelSchema: ChatModelSchemaType;\n readonly modelName: string;\n\n private readonly groqApiKey: string;\n\n constructor(modelSchema: ChatModelSchemaType, options: BaseChatModelOptionsType) {\n const parsedOptions = BaseChatModelOptions.parse(options);\n const baseUrl = Groq.baseUrl;\n super(modelSchema, {\n modelName: parsedOptions.modelName,\n apiKey: parsedOptions.apiKey,\n baseUrl: baseUrl,\n completeChatUrl: `${baseUrl}/chat/completions`,\n streamChatUrl: `${baseUrl}/chat/completions`,\n });\n this.modelSchema = modelSchema;\n this.modelName = parsedOptions.modelName;\n this.groqApiKey = parsedOptions.apiKey;\n }\n\n transformMessages(messages: MessageType[]): ParamsType {\n const hasSystemRole = messages.some((msg) => msg.role === \"system\");\n const hasImageModality = messages.some((msg) => msg.content.some((content: any) => content.modality === \"image\"));\n\n if (hasSystemRole && hasImageModality) {\n throw new InvalidMessagesError({\n info: `Invalid message content for model : '${this.modelName}'`,\n cause: new Error(\"Prompting with images is incompatible with system messages`)\"),\n });\n }\n\n const transformedMessages = super.transformMessages(messages) as { messages: OpenAIChatRequestMessageType[] };\n\n // Groq expects the content to be a string for system and assistant messages\n // OpenAI transformer takes care of validating role and modality\n transformedMessages.messages.forEach((message) => {\n if (message.role === \"system\") {\n if (typeof message.content !== \"string\") {\n message.content = message.content.map((content) => content.text).join(\"\\n\");\n }\n } else if (message.role === \"assistant\") {\n if (message.content && typeof message.content !== \"string\") {\n message.content = message.content.map((content) => content.text).join(\"\\n\");\n }\n }\n });\n\n return transformedMessages;\n }\n getModelPricing(): ChatModelPriceType {\n // Check if the modelName exists in pricingData before accessing it\n if (!(this.modelName in pricingData)) {\n throw new ModelResponseError({\n info: `Invalid model pricing for model : '${this.modelName}'`,\n cause: new Error(`No pricing configuration found for model \"${this.modelName}\"`),\n });\n }\n\n const entry = pricingData[this.modelName as keyof typeof pricingData];\n return entry as ChatModelPriceType;\n }\n}\n\nexport { BaseChatModelGroq, BaseChatModelOptions, type BaseChatModelOptionsType };\n","import { CHAT_CONFIG, MultiStringConfigItem, RangeConfigItem, SelectStringConfigItem } from \"@adaline/provider\";\n\nconst temperature = RangeConfigItem({\n param: \"temperature\",\n title: CHAT_CONFIG.TEMPERATURE.title,\n description: CHAT_CONFIG.TEMPERATURE.description,\n min: 0,\n max: 2,\n step: 0.01,\n default: 1,\n});\n\nconst maxTokens = (maxOutputTokens: number) =>\n RangeConfigItem({\n param: \"max_tokens\",\n title: CHAT_CONFIG.MAX_TOKENS.title,\n description: CHAT_CONFIG.MAX_TOKENS.description,\n min: 0,\n max: maxOutputTokens,\n step: 1,\n default: 0,\n });\n\nconst stop = MultiStringConfigItem({\n param: \"stop\",\n title: CHAT_CONFIG.STOP(4).title,\n description: CHAT_CONFIG.STOP(4).description,\n max: 4,\n});\n\nconst topP = RangeConfigItem({\n param: \"top_p\",\n title: CHAT_CONFIG.TOP_P.title,\n description: CHAT_CONFIG.TOP_P.description,\n min: 0,\n max: 1,\n step: 0.01,\n default: 1,\n});\n\nconst frequencyPenalty = RangeConfigItem({\n param: \"frequency_penalty\",\n title: CHAT_CONFIG.FREQUENCY_PENALTY.title,\n description: CHAT_CONFIG.FREQUENCY_PENALTY.description,\n min: -2,\n max: 2,\n step: 0.01,\n default: 0,\n});\n\nconst presencePenalty = RangeConfigItem({\n param: \"presence_penalty\",\n title: CHAT_CONFIG.PRESENCE_PENALTY.title,\n description: CHAT_CONFIG.PRESENCE_PENALTY.description,\n min: -2,\n max: 2,\n step: 0.01,\n default: 0,\n});\n\nconst seed = RangeConfigItem({\n param: \"seed\",\n title: CHAT_CONFIG.SEED.title,\n description: CHAT_CONFIG.SEED.description,\n min: 0,\n max: 1000000,\n step: 1,\n default: 0,\n});\n\nconst responseFormat = SelectStringConfigItem({\n param: \"response_format\",\n title: CHAT_CONFIG.RESPONSE_FORMAT.title,\n description: CHAT_CONFIG.RESPONSE_FORMAT.description,\n default: \"text\",\n choices: [\"text\", \"json_object\"],\n});\n\nconst toolChoice = SelectStringConfigItem({\n param: \"tool_choice\",\n title: \"Tool choice\",\n description:\n \"Controls which (if any) tool is called by the model. \\\n 'none' means the model will not call a function. \\\n 'auto' means the model can pick between generating a message or calling a tool.\",\n default: \"auto\",\n choices: [\"auto\", \"required\", \"none\"],\n});\n\nexport { frequencyPenalty, maxTokens, presencePenalty, seed, stop, temperature, toolChoice, topP, responseFormat };\n","import { z } from \"zod\";\n\nimport {\n frequencyPenalty,\n maxTokens,\n presencePenalty,\n responseFormat,\n seed,\n stop,\n temperature,\n toolChoice,\n topP,\n} from \"./common.config.chat-model.groq\";\n\nconst ChatModelBaseConfigSchema = (maxOutputTokens: number) =>\n z.object({\n temperature: temperature.schema,\n maxTokens: maxTokens(maxOutputTokens).schema,\n stop: stop.schema,\n topP: topP.schema,\n frequencyPenalty: frequencyPenalty.schema,\n presencePenalty: presencePenalty.schema,\n seed: seed.schema.transform((value) => (value === 0 ? undefined : value)),\n responseFormat: responseFormat.schema,\n toolChoice: toolChoice.schema,\n });\n\nconst ChatModelBaseConfigDef = (maxOutputTokens: number) =>\n ({\n temperature: temperature.def,\n maxTokens: maxTokens(maxOutputTokens).def,\n stop: stop.def,\n topP: topP.def,\n frequencyPenalty: frequencyPenalty.def,\n presencePenalty: presencePenalty.def,\n seed: seed.def,\n responseFormat: responseFormat.def,\n toolChoice: toolChoice.def,\n }) as const;\n\nexport { ChatModelBaseConfigDef, ChatModelBaseConfigSchema };\n","import { ChatModelBaseConfigDef, ChatModelBaseConfigSchema } from \"./chat-model\";\n\nconst GroqChatModelConfigs = {\n base: (maxOutputTokens: number) => ({\n def: ChatModelBaseConfigDef(maxOutputTokens),\n schema: ChatModelBaseConfigSchema(maxOutputTokens),\n }),\n} as const;\n\nexport { GroqChatModelConfigs };\n","import { z } from \"zod\";\n\nimport {\n OpenAIChatModelRoles,\n OpenAIChatModelRolesMap,\n OpenAIChatModelTextToolModalities,\n OpenAIChatModelTextToolModalitiesEnum,\n} from \"@adaline/openai\";\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GroqChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModelGroq, BaseChatModelOptions } from \"./base-chat-model.groq\";\n\nconst Gemma2_9b_ITLiteral = \"gemma2-9b-it\" as const;\n// https://huggingface.co/google/gemma-2-9b-it\nconst Gemma2_9b_ITDescription =\n \"Gemma is a family of lightweight, state-of-the-art open models from Google, \\\n built from the same research and technology used to create the Gemini models.\";\n\nconst Gemma2_9b_ITSchema = ChatModelSchema(OpenAIChatModelRoles, OpenAIChatModelTextToolModalitiesEnum).parse({\n name: Gemma2_9b_ITLiteral,\n description: Gemma2_9b_ITDescription,\n maxInputTokens: 8192,\n maxOutputTokens: 4096,\n roles: OpenAIChatModelRolesMap,\n modalities: OpenAIChatModelTextToolModalities,\n config: {\n def: GroqChatModelConfigs.base(4096).def,\n schema: GroqChatModelConfigs.base(4096).schema,\n },\n price: pricingData[Gemma2_9b_ITLiteral],\n});\n\nconst Gemma2_9b_ITOptions = BaseChatModelOptions;\ntype Gemma2_9b_ITOptionsType = z.infer<typeof Gemma2_9b_ITOptions>;\n\nclass Gemma2_9b_IT extends BaseChatModelGroq {\n constructor(options: Gemma2_9b_ITOptionsType) {\n super(Gemma2_9b_ITSchema, options);\n }\n}\n\nexport { Gemma2_9b_IT, Gemma2_9b_ITLiteral, Gemma2_9b_ITOptions, Gemma2_9b_ITSchema, type Gemma2_9b_ITOptionsType };\n","import { z } from \"zod\";\n\nimport {\n OpenAIChatModelRoles,\n OpenAIChatModelRolesMap,\n OpenAIChatModelTextToolModalities,\n OpenAIChatModelTextToolModalitiesEnum,\n} from \"@adaline/openai\";\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GroqChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModelGroq, BaseChatModelOptions } from \"./base-chat-model.groq\";\n\nconst Llama_3_1_8bLiteral = \"llama-3.1-8b-instant\" as const;\n// https://github.com/meta-llama/llama-models/blob/main/models/llama3_1/MODEL_CARD.md\nconst Llama_3_1_8bDescription =\n \"The Llama 3.1 instruction tuned text only models (8B, 70B, 405B) are optimized for multilingual dialogue use cases and \\\n outperform many of the available open source and closed chat models on common industry benchmarks.\";\n\nconst Llama_3_1_8bSchema = ChatModelSchema(OpenAIChatModelRoles, OpenAIChatModelTextToolModalitiesEnum).parse({\n name: Llama_3_1_8bLiteral,\n description: Llama_3_1_8bDescription,\n maxInputTokens: 128000,\n maxOutputTokens: 8192,\n roles: OpenAIChatModelRolesMap,\n modalities: OpenAIChatModelTextToolModalities,\n config: {\n def: GroqChatModelConfigs.base(8192).def,\n schema: GroqChatModelConfigs.base(8192).schema,\n },\n price: pricingData[Llama_3_1_8bLiteral],\n});\n\nconst Llama_3_1_8b_Options = BaseChatModelOptions;\ntype Llama_3_1_8b_OptionsType = z.infer<typeof Llama_3_1_8b_Options>;\n\nclass Llama_3_1_8b extends BaseChatModelGroq {\n constructor(options: Llama_3_1_8b_OptionsType) {\n super(Llama_3_1_8bSchema, options);\n }\n}\n\nexport { Llama_3_1_8b, Llama_3_1_8b_Options, Llama_3_1_8bLiteral, Llama_3_1_8bSchema, type Llama_3_1_8b_OptionsType };\n","import { z } from \"zod\";\n\nimport {\n OpenAIChatModelRoles,\n OpenAIChatModelRolesMap,\n OpenAIChatModelTextToolModalities,\n OpenAIChatModelTextToolModalitiesEnum,\n} from \"@adaline/openai\";\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GroqChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModelGroq, BaseChatModelOptions } from \"./base-chat-model.groq\";\n\nconst Llama_3_3_70b_VersatileLiteral = \"llama-3.3-70b-versatile\" as const;\nconst Llama_3_3_70b_VersatileDescription =\n \"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.\";\n\nconst Llama_3_3_70b_VersatileSchema = ChatModelSchema(OpenAIChatModelRoles, OpenAIChatModelTextToolModalitiesEnum).parse({\n name: Llama_3_3_70b_VersatileLiteral,\n description: Llama_3_3_70b_VersatileDescription,\n maxInputTokens: 128000,\n maxOutputTokens: 32768,\n roles: OpenAIChatModelRolesMap,\n modalities: OpenAIChatModelTextToolModalities,\n config: {\n def: GroqChatModelConfigs.base(32768).def,\n schema: GroqChatModelConfigs.base(32768).schema,\n },\n price: pricingData[Llama_3_3_70b_VersatileLiteral],\n});\n\nconst Llama_3_3_70b_Versatile_Options = BaseChatModelOptions;\ntype Llama_3_3_70b_Versatile_OptionsType = z.infer<typeof Llama_3_3_70b_Versatile_Options>;\n\nclass Llama_3_3_70b_Versatile extends BaseChatModelGroq {\n constructor(options: Llama_3_3_70b_Versatile_OptionsType) {\n super(Llama_3_3_70b_VersatileSchema, options);\n }\n}\n\nexport { Llama_3_3_70b_Versatile, Llama_3_3_70b_Versatile_Options, Llama_3_3_70b_VersatileLiteral, Llama_3_3_70b_VersatileSchema, type Llama_3_3_70b_Versatile_OptionsType };\n","import { z } from \"zod\";\n\nimport {\n OpenAIChatModelRoles,\n OpenAIChatModelRolesMap,\n OpenAIChatModelTextModalities,\n OpenAIChatModelTextToolModalitiesEnum,\n} from \"@adaline/openai\";\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GroqChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModelGroq, BaseChatModelOptions } from \"./base-chat-model.groq\";\n\nconst Llama_Guard_4_12bLiteral = \"meta-llama/llama-guard-4-12b\" as const;\nconst Llama_Guard_4_12bDescription =\n \"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.\";\n\nconst Llama_Guard_4_12bSchema = ChatModelSchema(OpenAIChatModelRoles, OpenAIChatModelTextToolModalitiesEnum).parse({\n name: Llama_Guard_4_12bLiteral,\n description: Llama_Guard_4_12bDescription,\n maxInputTokens: 128000,\n maxOutputTokens: 1024,\n roles: OpenAIChatModelRolesMap,\n modalities: OpenAIChatModelTextModalities,\n config: {\n def: GroqChatModelConfigs.base(1024).def,\n schema: GroqChatModelConfigs.base(1024).schema,\n },\n price: pricingData[Llama_Guard_4_12bLiteral],\n});\n\nconst Llama_Guard_4_12b_Options = BaseChatModelOptions;\ntype Llama_Guard_4_12b_OptionsType = z.infer<typeof Llama_Guard_4_12b_Options>;\n\nclass Llama_Guard_4_12b extends BaseChatModelGroq {\n constructor(options: Llama_Guard_4_12b_OptionsType) {\n super(Llama_Guard_4_12bSchema, options);\n }\n}\n\nexport { Llama_Guard_4_12b, Llama_Guard_4_12b_Options, Llama_Guard_4_12bLiteral, Llama_Guard_4_12bSchema, type Llama_Guard_4_12b_OptionsType };\n","import { z } from \"zod\";\n\nimport {\n OpenAIChatModelRoles,\n OpenAIChatModelRolesMap,\n OpenAIChatModelTextToolModalities,\n OpenAIChatModelTextToolModalitiesEnum,\n} from \"@adaline/openai\";\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GroqChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModelGroq, BaseChatModelOptions } from \"./base-chat-model.groq\";\n\nconst Qwen3_32bLiteral = \"qwen/qwen3-32b\" as const;\nconst Qwen3_32bDescription =\n \"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. \";\n\nconst Qwen3_32bSchema = ChatModelSchema(OpenAIChatModelRoles, OpenAIChatModelTextToolModalitiesEnum).parse({\n name: Qwen3_32bLiteral,\n description: Qwen3_32bDescription,\n maxInputTokens: 128000,\n maxOutputTokens: 40960,\n roles: OpenAIChatModelRolesMap,\n modalities: OpenAIChatModelTextToolModalities,\n config: {\n def: GroqChatModelConfigs.base(40960).def,\n schema: GroqChatModelConfigs.base(40960).schema,\n },\n price: pricingData[Qwen3_32bLiteral],\n});\n\nconst Qwen3_32b_Options = BaseChatModelOptions;\ntype Qwen3_32b_OptionsType = z.infer<typeof Qwen3_32b_Options>;\n\nclass Qwen3_32b extends BaseChatModelGroq {\n constructor(options: Qwen3_32b_OptionsType) {\n super(Qwen3_32bSchema, options);\n }\n}\n\nexport { Qwen3_32b, Qwen3_32b_Options, Qwen3_32bLiteral, Qwen3_32bSchema, type Qwen3_32b_OptionsType };\n","import { z } from \"zod\";\n\nimport {\n OpenAIChatModelRoles,\n OpenAIChatModelRolesMap,\n OpenAIChatModelTextToolModalities,\n OpenAIChatModelTextToolModalitiesEnum,\n} from \"@adaline/openai\";\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GroqChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModelGroq, BaseChatModelOptions } from \"./base-chat-model.groq\";\n\nconst Deepseek_R1_Distill_Llama_70bLiteral = \"deepseek-r1-distill-llama-70b\" as const;\nconst Deepseek_R1_Distill_Llama_70bDescription =\n \"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.\";\n\nconst Deepseek_R1_Distill_Llama_70bSchema = ChatModelSchema(OpenAIChatModelRoles, OpenAIChatModelTextToolModalitiesEnum).parse({\n name: Deepseek_R1_Distill_Llama_70bLiteral,\n description: Deepseek_R1_Distill_Llama_70bDescription,\n maxInputTokens: 128000,\n maxOutputTokens: 128000,\n roles: OpenAIChatModelRolesMap,\n modalities: OpenAIChatModelTextToolModalities,\n config: {\n def: GroqChatModelConfigs.base(128000).def,\n schema: GroqChatModelConfigs.base(128000).schema,\n },\n price: pricingData[Deepseek_R1_Distill_Llama_70bLiteral],\n});\n\nconst Deepseek_R1_Distill_Llama_70b_Options = BaseChatModelOptions;\ntype Deepseek_R1_Distill_Llama_70b_OptionsType = z.infer<typeof Deepseek_R1_Distill_Llama_70b_Options>;\n\nclass Deepseek_R1_Distill_Llama_70b extends BaseChatModelGroq {\n constructor(options: Deepseek_R1_Distill_Llama_70b_OptionsType) {\n super(Deepseek_R1_Distill_Llama_70bSchema, options);\n }\n}\n\nexport { Deepseek_R1_Distill_Llama_70b, Deepseek_R1_Distill_Llama_70b_Options, Deepseek_R1_Distill_Llama_70bLiteral, Deepseek_R1_Distill_Llama_70bSchema, type Deepseek_R1_Distill_Llama_70b_OptionsType };\n","import { z } from \"zod\";\n\nimport {\n OpenAIChatModelRoles,\n OpenAIChatModelRolesMap,\n OpenAIChatModelTextToolModalities,\n OpenAIChatModelTextToolModalitiesEnum,\n} from \"@adaline/openai\";\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GroqChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModelGroq, BaseChatModelOptions } from \"./base-chat-model.groq\";\n\nconst Kimi_K2_InstructLiteral = \"moonshotai/kimi-k2-instruct\" as const;\nconst Kimi_K2_InstructDescription =\n \"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.\";\n\nconst Kimi_K2_InstructSchema = ChatModelSchema(OpenAIChatModelRoles, OpenAIChatModelTextToolModalitiesEnum).parse({\n name: Kimi_K2_InstructLiteral,\n description: Kimi_K2_InstructDescription,\n maxInputTokens: 128000,\n maxOutputTokens: 16384,\n roles: OpenAIChatModelRolesMap,\n modalities: OpenAIChatModelTextToolModalities,\n config: {\n def: GroqChatModelConfigs.base(16384).def,\n schema: GroqChatModelConfigs.base(16384).schema,\n },\n price: pricingData[Kimi_K2_InstructLiteral],\n});\n\nconst Kimi_K2_Instruct_Options = BaseChatModelOptions;\ntype Kimi_K2_Instruct_OptionsType = z.infer<typeof Kimi_K2_Instruct_Options>;\n\nclass Kimi_K2_Instruct extends BaseChatModelGroq {\n constructor(options: Kimi_K2_Instruct_OptionsType) {\n super(Kimi_K2_InstructSchema, options);\n }\n}\n\nexport { Kimi_K2_Instruct, Kimi_K2_Instruct_Options, Kimi_K2_InstructLiteral, Kimi_K2_InstructSchema, type Kimi_K2_Instruct_OptionsType };\n","import { z } from \"zod\";\n\nimport { OpenAIChatModelModalities, OpenAIChatModelModalitiesEnum, OpenAIChatModelRoles, OpenAIChatModelRolesMap } from \"@adaline/openai\";\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GroqChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModelGroq, BaseChatModelOptions } from \"./base-chat-model.groq\";\n\nconst Llama_4_Maverick_17b_128e_InstructLiteral = \"meta-llama/llama-4-maverick-17b-128e-instruct\" as const;\nconst Llama_4_Maverick_17b_128e_InstructDescription =\n \"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.\";\n\nconst Llama_4_Maverick_17b_128e_InstructSchema = ChatModelSchema(OpenAIChatModelRoles, OpenAIChatModelModalitiesEnum).parse({\n name: Llama_4_Maverick_17b_128e_InstructLiteral,\n description: Llama_4_Maverick_17b_128e_InstructDescription,\n maxInputTokens: 131072,\n maxOutputTokens: 8192,\n roles: OpenAIChatModelRolesMap,\n modalities: OpenAIChatModelModalities,\n config: {\n def: GroqChatModelConfigs.base(8192).def,\n schema: GroqChatModelConfigs.base(8192).schema,\n },\n price: pricingData[Llama_4_Maverick_17b_128e_InstructLiteral],\n});\n\nconst Llama_4_Maverick_17b_128e_Instruct_Options = BaseChatModelOptions;\ntype Llama_4_Maverick_17b_128e_Instruct_OptionsType = z.infer<typeof Llama_4_Maverick_17b_128e_Instruct_Options>;\n\nclass Llama_4_Maverick_17b_128e_Instruct extends BaseChatModelGroq {\n constructor(options: Llama_4_Maverick_17b_128e_Instruct_OptionsType) {\n super(Llama_4_Maverick_17b_128e_InstructSchema, options);\n }\n}\n\nexport {\n Llama_4_Maverick_17b_128e_Instruct,\n Llama_4_Maverick_17b_128e_Instruct_Options,\n Llama_4_Maverick_17b_128e_InstructLiteral,\n Llama_4_Maverick_17b_128e_InstructSchema,\n type Llama_4_Maverick_17b_128e_Instruct_OptionsType,\n};\n","import { z } from \"zod\";\n\nimport { OpenAIChatModelModalities, OpenAIChatModelModalitiesEnum, OpenAIChatModelRoles, OpenAIChatModelRolesMap } from \"@adaline/openai\";\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GroqChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModelGroq, BaseChatModelOptions } from \"./base-chat-model.groq\";\n\nconst Llama_4_Scout_17b_16e_InstructLiteral = \"meta-llama/llama-4-scout-17b-16e-instruct\" as const;\nconst Llama_4_Scout_17b_16e_InstructDescription =\n \"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.\";\n\nconst Llama_4_Scout_17b_16e_InstructSchema = ChatModelSchema(OpenAIChatModelRoles, OpenAIChatModelModalitiesEnum).parse({\n name: Llama_4_Scout_17b_16e_InstructLiteral,\n description: Llama_4_Scout_17b_16e_InstructDescription,\n maxInputTokens: 131072,\n maxOutputTokens: 8192,\n roles: OpenAIChatModelRolesMap,\n modalities: OpenAIChatModelModalities,\n config: {\n def: GroqChatModelConfigs.base(8192).def,\n schema: GroqChatModelConfigs.base(8192).schema,\n },\n price: pricingData[Llama_4_Scout_17b_16e_InstructLiteral],\n});\n\nconst Llama_4_Scout_17b_16e_Instruct_Options = BaseChatModelOptions;\ntype Llama_4_Scout_17b_16e_Instruct_OptionsType = z.infer<typeof Llama_4_Scout_17b_16e_Instruct_Options>;\n\nclass Llama_4_Scout_17b_16e_Instruct extends BaseChatModelGroq {\n constructor(options: Llama_4_Scout_17b_16e_Instruct_OptionsType) {\n super(Llama_4_Scout_17b_16e_InstructSchema, options);\n }\n}\n\nexport {\n Llama_4_Scout_17b_16e_Instruct,\n Llama_4_Scout_17b_16e_Instruct_Options,\n Llama_4_Scout_17b_16e_InstructLiteral,\n Llama_4_Scout_17b_16e_InstructSchema,\n type Llama_4_Scout_17b_16e_Instruct_OptionsType,\n};\n","import { z } from \"zod\";\n\nimport { ChatModelSchemaType, ChatModelV1, EmbeddingModelSchemaType, EmbeddingModelV1, ProviderError, ProviderV1 } from \"@adaline/provider\";\n\nimport * as Models from \"../models\";\n\nconst ProviderLiteral = \"groq\";\nclass Groq<C extends Models.BaseChatModelOptionsType, E extends Record<string, any> = Record<string, any>> implements ProviderV1<C, E> {\n readonly version = \"v1\" as const;\n readonly name = ProviderLiteral;\n static readonly baseUrl = \"https://api.groq.com/openai/v1\";\n\n private readonly chatModelFactories: Record<\n string,\n {\n model: { new (options: any): ChatModelV1 };\n modelOptions: z.ZodType<any>;\n modelSchema: ChatModelSchemaType;\n }\n > = {\n [Models.Gemma2_9b_ITLiteral]: {\n model: Models.Gemma2_9b_IT,\n modelOptions: Models.Gemma2_9b_ITOptions,\n modelSchema: Models.Gemma2_9b_ITSchema,\n },\n [Models.Llama_3_1_8bLiteral]: {\n model: Models.Llama_3_1_8b,\n modelOptions: Models.Llama_3_1_8b_Options,\n modelSchema: Models.Llama_3_1_8bSchema,\n },\n [Models.Llama_3_3_70b_VersatileLiteral]: {\n model: Models.Llama_3_3_70b_Versatile,\n modelOptions: Models.Llama_3_3_70b_Versatile_Options,\n modelSchema: Models.Llama_3_3_70b_VersatileSchema,\n },\n [Models.Llama_Guard_4_12bLiteral]: {\n model: Models.Llama_Guard_4_12b,\n modelOptions: Models.Llama_Guard_4_12b_Options,\n modelSchema: Models.Llama_Guard_4_12bSchema,\n },\n [Models.Qwen3_32bLiteral]: {\n model: Models.Qwen3_32b,\n modelOptions: Models.Qwen3_32b_Options,\n modelSchema: Models.Qwen3_32bSchema,\n },\n [Models.Deepseek_R1_Distill_Llama_70bLiteral]: {\n model: Models.Deepseek_R1_Distill_Llama_70b,\n modelOptions: Models.Deepseek_R1_Distill_Llama_70b_Options,\n modelSchema: Models.Deepseek_R1_Distill_Llama_70bSchema,\n },\n [Models.Kimi_K2_InstructLiteral]: {\n model: Models.Kimi_K2_Instruct,\n modelOptions: Models.Kimi_K2_Instruct_Options,\n modelSchema: Models.Kimi_K2_InstructSchema,\n },\n [Models.Llama_4_Maverick_17b_128e_InstructLiteral]: {\n model: Models.Llama_4_Maverick_17b_128e_Instruct,\n modelOptions: Models.Llama_4_Maverick_17b_128e_Instruct_Options,\n modelSchema: Models.Llama_4_Maverick_17b_128e_InstructSchema,\n },\n [Models.Llama_4_Scout_17b_16e_InstructLiteral]: {\n model: Models.Llama_4_Scout_17b_16e_Instruct,\n modelOptions: Models.Llama_4_Scout_17b_16e_Instruct_Options,\n modelSchema: Models.Llama_4_Scout_17b_16e_InstructSchema,\n },\n };\n\n private readonly embeddingModelFactories: Record<\n string,\n {\n model: { new (options: any): EmbeddingModelV1 };\n modelOptions: z.ZodType<any>;\n modelSchema: EmbeddingModelSchemaType;\n }\n > = {};\n\n chatModelLiterals(): string[] {\n return Object.keys(this.chatModelFactories);\n }\n\n chatModelSchemas(): Record<string, ChatModelSchemaType> {\n return Object.keys(this.chatModelFactories).reduce(\n (acc, key) => {\n acc[key] = this.chatModelFactories[key].modelSchema;\n return acc;\n },\n {} as Record<string, ChatModelSchemaType>\n );\n }\n\n chatModel(options: C): ChatModelV1 {\n const modelName = options.modelName;\n if (!(modelName in this.chatModelFactories)) {\n throw new ProviderError({\n info: `Groq chat model: ${modelName} not found`,\n cause: new Error(`Groq chat model: ${modelName} not found, available chat models: \n ${this.chatModelLiterals().join(\", \")}`),\n });\n }\n\n const model = this.chatModelFactories[modelName].model;\n const parsedOptions = this.chatModelFactories[modelName].modelOptions.parse(options);\n return new model(parsedOptions);\n }\n\n embeddingModelLiterals(): string[] {\n return Object.keys(this.embeddingModelFactories);\n }\n\n embeddingModelSchemas(): Record<string, EmbeddingModelSchemaType> {\n return Object.keys(this.embeddingModelFactories).reduce(\n (acc, key) => {\n acc[key] = this.embeddingModelFactories[key].modelSchema;\n return acc;\n },\n {} as Record<string, EmbeddingModelSchemaType>\n );\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n embeddingModel(options: E): EmbeddingModelV1 {\n throw new ProviderError({\n info: \"Groq does not support embedding models yet\",\n cause: new Error(\"Groq does not support embedding models yet\"),\n });\n }\n}\n\nexport { Groq };\n"]}
|
package/dist/index.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { RangeConfigItem, CHAT_CONFIG, MultiStringConfigItem, SelectStringConfigItem, ChatModelSchema, InvalidMessagesError, ModelResponseError, ProviderError } from '@adaline/provider';
|
|
2
2
|
import { z as z$1 } from 'zod';
|
|
3
|
-
import { OpenAIChatModelRoles, OpenAIChatModelTextToolModalitiesEnum, OpenAIChatModelRolesMap, OpenAIChatModelTextToolModalities, OpenAIChatModelTextModalities, BaseChatModel } from '@adaline/openai';
|
|
3
|
+
import { OpenAIChatModelRoles, OpenAIChatModelTextToolModalitiesEnum, OpenAIChatModelRolesMap, OpenAIChatModelTextToolModalities, OpenAIChatModelTextModalities, OpenAIChatModelModalitiesEnum, OpenAIChatModelModalities, BaseChatModel } from '@adaline/openai';
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
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=z$1.object({modelName:z$1.string().min(1),apiKey:z$1.string().min(1)}),a=class extends 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 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(`
|
|
6
6
|
`)):r.role==="assistant"&&r.content&&typeof r.content!="string"&&(r.content=r.content.map(_=>_.text).join(`
|
|
7
|
-
`));}),p}getModelPricing(){if(!(this.modelName in
|
|
8
|
-
${this.chatModelLiterals().join(", ")}`)});let
|
|
7
|
+
`));}),p}getModelPricing(){if(!(this.modelName in t))throw new 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=RangeConfigItem({param:"temperature",title:CHAT_CONFIG.TEMPERATURE.title,description:CHAT_CONFIG.TEMPERATURE.description,min:0,max:2,step:.01,default:1}),A=i=>RangeConfigItem({param:"max_tokens",title:CHAT_CONFIG.MAX_TOKENS.title,description:CHAT_CONFIG.MAX_TOKENS.description,min:0,max:i,step:1,default:0}),G=MultiStringConfigItem({param:"stop",title:CHAT_CONFIG.STOP(4).title,description:CHAT_CONFIG.STOP(4).description,max:4}),N=RangeConfigItem({param:"top_p",title:CHAT_CONFIG.TOP_P.title,description:CHAT_CONFIG.TOP_P.description,min:0,max:1,step:.01,default:1}),q=RangeConfigItem({param:"frequency_penalty",title:CHAT_CONFIG.FREQUENCY_PENALTY.title,description:CHAT_CONFIG.FREQUENCY_PENALTY.description,min:-2,max:2,step:.01,default:0}),B=RangeConfigItem({param:"presence_penalty",title:CHAT_CONFIG.PRESENCE_PENALTY.title,description:CHAT_CONFIG.PRESENCE_PENALTY.description,min:-2,max:2,step:.01,default:0}),K=RangeConfigItem({param:"seed",title:CHAT_CONFIG.SEED.title,description:CHAT_CONFIG.SEED.description,min:0,max:1e6,step:1,default:0}),z=SelectStringConfigItem({param:"response_format",title:CHAT_CONFIG.RESPONSE_FORMAT.title,description:CHAT_CONFIG.RESPONSE_FORMAT.description,default:"text",choices:["text","json_object"]}),U=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=>z$1.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=ChatModelSchema(OpenAIChatModelRoles,OpenAIChatModelTextToolModalitiesEnum).parse({name:h,description:Oe,maxInputTokens:8192,maxOutputTokens:4096,roles:OpenAIChatModelRolesMap,modalities: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=ChatModelSchema(OpenAIChatModelRoles,OpenAIChatModelTextToolModalitiesEnum).parse({name:f,description:xe,maxInputTokens:128e3,maxOutputTokens:8192,roles:OpenAIChatModelRolesMap,modalities: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=ChatModelSchema(OpenAIChatModelRoles,OpenAIChatModelTextToolModalitiesEnum).parse({name:g,description:Ee,maxInputTokens:128e3,maxOutputTokens:32768,roles:OpenAIChatModelRolesMap,modalities: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=ChatModelSchema(OpenAIChatModelRoles,OpenAIChatModelTextToolModalitiesEnum).parse({name:T,description:Ke,maxInputTokens:128e3,maxOutputTokens:1024,roles:OpenAIChatModelRolesMap,modalities: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. ",$=ChatModelSchema(OpenAIChatModelRoles,OpenAIChatModelTextToolModalitiesEnum).parse({name:C,description:je,maxInputTokens:128e3,maxOutputTokens:40960,roles:OpenAIChatModelRolesMap,modalities: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=ChatModelSchema(OpenAIChatModelRoles,OpenAIChatModelTextToolModalitiesEnum).parse({name:P,description:He,maxInputTokens:128e3,maxOutputTokens:128e3,roles:OpenAIChatModelRolesMap,modalities: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=ChatModelSchema(OpenAIChatModelRoles,OpenAIChatModelTextToolModalitiesEnum).parse({name:S,description:io,maxInputTokens:128e3,maxOutputTokens:16384,roles:OpenAIChatModelRolesMap,modalities: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=ChatModelSchema(OpenAIChatModelRoles,OpenAIChatModelModalitiesEnum).parse({name:L,description:po,maxInputTokens:131072,maxOutputTokens:8192,roles:OpenAIChatModelRolesMap,modalities: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=ChatModelSchema(OpenAIChatModelRoles,OpenAIChatModelModalitiesEnum).parse({name:D,description:fo,maxInputTokens:131072,maxOutputTokens:8192,roles:OpenAIChatModelRolesMap,modalities: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 ProviderError({info:`Groq chat model: ${s} not found`,cause:new Error(`Groq chat model: ${s} not found, available chat models:
|
|
8
|
+
${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 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";
|
|
9
9
|
|
|
10
|
-
export {
|
|
10
|
+
export { a as BaseChatModelGroq, n as BaseChatModelOptions, I as Deepseek_R1_Distill_Llama_70b, P as Deepseek_R1_Distill_Llama_70bLiteral, Y as Deepseek_R1_Distill_Llama_70bSchema, ne as Deepseek_R1_Distill_Llama_70b_Options, M as Gemma2_9b_IT, h as Gemma2_9b_ITLiteral, oe as Gemma2_9b_ITOptions, F as Gemma2_9b_ITSchema, u as Groq, x as Kimi_K2_Instruct, S as Kimi_K2_InstructLiteral, W as Kimi_K2_InstructSchema, le as Kimi_K2_Instruct_Options, b as Llama_3_1_8b, f as Llama_3_1_8bLiteral, V as Llama_3_1_8bSchema, te as Llama_3_1_8b_Options, y as Llama_3_3_70b_Versatile, g as Llama_3_3_70b_VersatileLiteral, Q as Llama_3_3_70b_VersatileSchema, ae as Llama_3_3_70b_Versatile_Options, R as Llama_4_Maverick_17b_128e_Instruct, L as Llama_4_Maverick_17b_128e_InstructLiteral, X as Llama_4_Maverick_17b_128e_InstructSchema, re as Llama_4_Maverick_17b_128e_Instruct_Options, v as Llama_4_Scout_17b_16e_Instruct, D as Llama_4_Scout_17b_16e_InstructLiteral, Z as Llama_4_Scout_17b_16e_InstructSchema, me as Llama_4_Scout_17b_16e_Instruct_Options, O as Llama_Guard_4_12b, T as Llama_Guard_4_12bLiteral, j as Llama_Guard_4_12bSchema, ie as Llama_Guard_4_12b_Options, k as Qwen3_32b, C as Qwen3_32bLiteral, $ as Qwen3_32bSchema, se as Qwen3_32b_Options };
|
|
11
11
|
//# sourceMappingURL=index.mjs.map
|
|
12
12
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/models/pricing.json","../src/models/chat-models/base-chat-model.groq.ts","../src/configs/chat-model/common.config.chat-model.groq.ts","../src/configs/chat-model/base.config.chat-model.groq.ts","../src/configs/configs.groq.ts","../src/models/chat-models/gemma2-9b-it.groq.ts","../src/models/chat-models/llama-3-1-8b.groq.ts","../src/models/chat-models/llama-3-3-70b-versatile.groq.ts","../src/models/chat-models/llama-guard-4-12b.groq.ts","../src/models/chat-models/qwen3-32b.groq.ts","../src/models/chat-models/deepseek-r1-distill-llama-70b.groq.ts","../src/models/chat-models/kimi-k2-instruct.groq.ts","../src/provider/provider.groq.ts"],"names":["pricing_default","BaseChatModelOptions","z","BaseChatModelGroq","BaseChatModel","modelSchema","options","parsedOptions","baseUrl","Groq","messages","hasSystemRole","msg","hasImageModality","content","InvalidMessagesError","transformedMessages","message","ModelResponseError","temperature","RangeConfigItem","CHAT_CONFIG","maxTokens","maxOutputTokens","stop","MultiStringConfigItem","topP","frequencyPenalty","presencePenalty","seed","responseFormat","SelectStringConfigItem","toolChoice","ChatModelBaseConfigSchema","value","ChatModelBaseConfigDef","GroqChatModelConfigs","Gemma2_9b_ITLiteral","Gemma2_9b_ITDescription","Gemma2_9b_ITSchema","ChatModelSchema","OpenAIChatModelRoles","OpenAIChatModelTextToolModalitiesEnum","OpenAIChatModelRolesMap","OpenAIChatModelTextToolModalities","Gemma2_9b_ITOptions","Gemma2_9b_IT","Llama_3_1_8bLiteral","Llama_3_1_8bDescription","Llama_3_1_8bSchema","Llama_3_1_8b_Options","Llama_3_1_8b","Llama_3_3_70b_VersatileLiteral","Llama_3_3_70b_VersatileDescription","Llama_3_3_70b_VersatileSchema","Llama_3_3_70b_Versatile_Options","Llama_3_3_70b_Versatile","Llama_Guard_4_12bLiteral","Llama_Guard_4_12bDescription","Llama_Guard_4_12bSchema","OpenAIChatModelTextModalities","Llama_Guard_4_12b_Options","Llama_Guard_4_12b","Qwen3_32bLiteral","Qwen3_32bDescription","Qwen3_32bSchema","Qwen3_32b_Options","Qwen3_32b","Deepseek_R1_Distill_Llama_70bLiteral","Deepseek_R1_Distill_Llama_70bDescription","Deepseek_R1_Distill_Llama_70bSchema","Deepseek_R1_Distill_Llama_70b_Options","Deepseek_R1_Distill_Llama_70b","Kimi_K2_InstructLiteral","Kimi_K2_InstructDescription","Kimi_K2_InstructSchema","Kimi_K2_Instruct_Options","Kimi_K2_Instruct","ProviderLiteral","acc","key","modelName","ProviderError","model"],"mappings":";;;;AAAA,IAAAA,CAAA,CAAA,CACE,cAAgB,CAAA,CACd,SAAa,CAAA,cAAA,CACb,QAAY,CAAA,KAAA,CACZ,WAAe,CAAA,CACb,CACE,SAAa,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AK,CAAA,IAAA,CAAK,uBAAuB,CAAE,CAAA,MAAA,CAC/C,CAACwE,CAAKC,CAAAA,CAAAA,IACJD,CAAIC,CAAAA,CAAG,EAAI,IAAK,CAAA,uBAAA,CAAwBA,CAAG,CAAE,CAAA,WAAA,CACtCD,GAET,EACF,CACF,CAGA,eAAezE,CAA8B,CAAA,CAC3C,MAAM,IAAI4E,aAAAA,CAAc,CACtB,IAAM,CAAA,4CAAA,CACN,MAAO,IAAI,KAAA,CAAM,4CAA4C,CAC/D,CAAC,CACH,CACF,EA7GMzE,EAGY,OAAU,CAAA,gCAAA","file":"index.mjs","sourcesContent":["{\n \"gemma2-9b-it\": {\n \"modelName\": \"gemma2-9b-it\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.2,\n \"outputPricePerMillion\": 0.2\n }\n }\n }\n ]\n },\n \"llama-3.1-8b-instant\": {\n \"modelName\": \"llama-3.1-8b-instant\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.05,\n \"outputPricePerMillion\": 0.08\n }\n }\n }\n ]\n },\n \"llama-3.2-11b-vision-preview\": {\n \"modelName\": \"llama-3.2-11b-vision-preview\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.18,\n \"outputPricePerMillion\": 0.18\n }\n }\n }\n ]\n },\n \"llama-3.2-1b-preview\": {\n \"modelName\": \"llama-3.2-1b-preview\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.04,\n \"outputPricePerMillion\": 0.04\n }\n }\n }\n ]\n },\n \"llama-3.2-3b-preview\": {\n \"modelName\": \"llama-3.2-3b-preview\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.06,\n \"outputPricePerMillion\": 0.06\n }\n }\n }\n ]\n },\n \"llama-3.2-90b-vision-preview\": {\n \"modelName\": \"llama-3.2-90b-vision-preview\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.7,\n \"outputPricePerMillion\": 0.8\n }\n }\n }\n ]\n },\n \"llama3-70b-8192\": {\n \"modelName\": \"llama3-70b-8192\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.59,\n \"outputPricePerMillion\": 0.79\n }\n }\n }\n ]\n },\n \"llama3-8b-8192\": {\n \"modelName\": \"llama3-8b-8192\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.05,\n \"outputPricePerMillion\": 0.08\n }\n }\n }\n ]\n },\n \"llama-guard-3-8b\": {\n \"modelName\": \"llama-guard-3-8b\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.2,\n \"outputPricePerMillion\": 0.2\n }\n }\n }\n ]\n },\n \"llama-3.3-70b-versatile\": {\n \"modelName\": \"llama-3.3-70b-versatile\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.59,\n \"outputPricePerMillion\": 0.79\n }\n }\n }\n ]\n },\n \"meta-llama/llama-guard-4-12b\": {\n \"modelName\": \"meta-llama/llama-guard-4-12b\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.2,\n \"outputPricePerMillion\": 0.2\n }\n }\n }\n ]\n },\n \"deepseek-r1-distill-llama-70b\": {\n \"modelName\": \"deepseek-r1-distill-llama-70b\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.75,\n \"outputPricePerMillion\": 0.99\n }\n }\n }\n ]\n },\n \"moonshotai/kimi-k2-instruct\": {\n \"modelName\": \"moonshotai/kimi-k2-instruct\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 1.0,\n \"outputPricePerMillion\": 3.0\n }\n }\n }\n ]\n },\n \"qwen/qwen3-32b\": {\n \"modelName\": \"qwen/qwen3-32b\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.29,\n \"outputPricePerMillion\": 0.59\n }\n }\n }\n ]\n }\n}\n","import { z } from \"zod\";\n\nimport { BaseChatModel, OpenAIChatRequestMessageType } from \"@adaline/openai\";\nimport { ChatModelSchemaType, InvalidMessagesError, ModelResponseError, ParamsType } from \"@adaline/provider\";\nimport { ChatModelPriceType, MessageType } from \"@adaline/types\";\n\nimport { Groq } from \"../../provider\";\nimport pricingData from \"../pricing.json\";\n\nconst BaseChatModelOptions = z.object({\n modelName: z.string().min(1),\n apiKey: z.string().min(1),\n});\ntype BaseChatModelOptionsType = z.infer<typeof BaseChatModelOptions>;\n\nclass BaseChatModelGroq extends BaseChatModel {\n readonly version = \"v1\" as const;\n modelSchema: ChatModelSchemaType;\n readonly modelName: string;\n\n private readonly groqApiKey: string;\n\n constructor(modelSchema: ChatModelSchemaType, options: BaseChatModelOptionsType) {\n const parsedOptions = BaseChatModelOptions.parse(options);\n const baseUrl = Groq.baseUrl;\n super(modelSchema, {\n modelName: parsedOptions.modelName,\n apiKey: parsedOptions.apiKey,\n baseUrl: baseUrl,\n completeChatUrl: `${baseUrl}/chat/completions`,\n streamChatUrl: `${baseUrl}/chat/completions`,\n });\n this.modelSchema = modelSchema;\n this.modelName = parsedOptions.modelName;\n this.groqApiKey = parsedOptions.apiKey;\n }\n\n transformMessages(messages: MessageType[]): ParamsType {\n const hasSystemRole = messages.some((msg) => msg.role === \"system\");\n const hasImageModality = messages.some((msg) => msg.content.some((content: any) => content.modality === \"image\"));\n\n if (hasSystemRole && hasImageModality) {\n throw new InvalidMessagesError({\n info: `Invalid message content for model : '${this.modelName}'`,\n cause: new Error(\"Prompting with images is incompatible with system messages`)\"),\n });\n }\n\n const transformedMessages = super.transformMessages(messages) as { messages: OpenAIChatRequestMessageType[] };\n\n // Groq expects the content to be a string for system and assistant messages\n // OpenAI transformer takes care of validating role and modality\n transformedMessages.messages.forEach((message) => {\n if (message.role === \"system\") {\n if (typeof message.content !== \"string\") {\n message.content = message.content.map((content) => content.text).join(\"\\n\");\n }\n } else if (message.role === \"assistant\") {\n if (message.content && typeof message.content !== \"string\") {\n message.content = message.content.map((content) => content.text).join(\"\\n\");\n }\n }\n });\n\n return transformedMessages;\n }\n getModelPricing(): ChatModelPriceType {\n // Check if the modelName exists in pricingData before accessing it\n if (!(this.modelName in pricingData)) {\n throw new ModelResponseError({\n info: `Invalid model pricing for model : '${this.modelName}'`,\n cause: new Error(`No pricing configuration found for model \"${this.modelName}\"`),\n });\n }\n\n const entry = pricingData[this.modelName as keyof typeof pricingData];\n return entry as ChatModelPriceType;\n }\n}\n\nexport { BaseChatModelGroq, BaseChatModelOptions, type BaseChatModelOptionsType };\n","import { CHAT_CONFIG, MultiStringConfigItem, RangeConfigItem, SelectStringConfigItem } from \"@adaline/provider\";\n\nconst temperature = RangeConfigItem({\n param: \"temperature\",\n title: CHAT_CONFIG.TEMPERATURE.title,\n description: CHAT_CONFIG.TEMPERATURE.description,\n min: 0,\n max: 2,\n step: 0.01,\n default: 1,\n});\n\nconst maxTokens = (maxOutputTokens: number) =>\n RangeConfigItem({\n param: \"max_tokens\",\n title: CHAT_CONFIG.MAX_TOKENS.title,\n description: CHAT_CONFIG.MAX_TOKENS.description,\n min: 0,\n max: maxOutputTokens,\n step: 1,\n default: 0,\n });\n\nconst stop = MultiStringConfigItem({\n param: \"stop\",\n title: CHAT_CONFIG.STOP(4).title,\n description: CHAT_CONFIG.STOP(4).description,\n max: 4,\n});\n\nconst topP = RangeConfigItem({\n param: \"top_p\",\n title: CHAT_CONFIG.TOP_P.title,\n description: CHAT_CONFIG.TOP_P.description,\n min: 0,\n max: 1,\n step: 0.01,\n default: 1,\n});\n\nconst frequencyPenalty = RangeConfigItem({\n param: \"frequency_penalty\",\n title: CHAT_CONFIG.FREQUENCY_PENALTY.title,\n description: CHAT_CONFIG.FREQUENCY_PENALTY.description,\n min: -2,\n max: 2,\n step: 0.01,\n default: 0,\n});\n\nconst presencePenalty = RangeConfigItem({\n param: \"presence_penalty\",\n title: CHAT_CONFIG.PRESENCE_PENALTY.title,\n description: CHAT_CONFIG.PRESENCE_PENALTY.description,\n min: -2,\n max: 2,\n step: 0.01,\n default: 0,\n});\n\nconst seed = RangeConfigItem({\n param: \"seed\",\n title: CHAT_CONFIG.SEED.title,\n description: CHAT_CONFIG.SEED.description,\n min: 0,\n max: 1000000,\n step: 1,\n default: 0,\n});\n\nconst responseFormat = SelectStringConfigItem({\n param: \"response_format\",\n title: CHAT_CONFIG.RESPONSE_FORMAT.title,\n description: CHAT_CONFIG.RESPONSE_FORMAT.description,\n default: \"text\",\n choices: [\"text\", \"json_object\"],\n});\n\nconst toolChoice = SelectStringConfigItem({\n param: \"tool_choice\",\n title: \"Tool choice\",\n description:\n \"Controls which (if any) tool is called by the model. \\\n 'none' means the model will not call a function. \\\n 'auto' means the model can pick between generating a message or calling a tool.\",\n default: \"auto\",\n choices: [\"auto\", \"required\", \"none\"],\n});\n\nexport { frequencyPenalty, maxTokens, presencePenalty, seed, stop, temperature, toolChoice, topP, responseFormat };\n","import { z } from \"zod\";\n\nimport {\n frequencyPenalty,\n maxTokens,\n presencePenalty,\n responseFormat,\n seed,\n stop,\n temperature,\n toolChoice,\n topP,\n} from \"./common.config.chat-model.groq\";\n\nconst ChatModelBaseConfigSchema = (maxOutputTokens: number) =>\n z.object({\n temperature: temperature.schema,\n maxTokens: maxTokens(maxOutputTokens).schema,\n stop: stop.schema,\n topP: topP.schema,\n frequencyPenalty: frequencyPenalty.schema,\n presencePenalty: presencePenalty.schema,\n seed: seed.schema.transform((value) => (value === 0 ? undefined : value)),\n responseFormat: responseFormat.schema,\n toolChoice: toolChoice.schema,\n });\n\nconst ChatModelBaseConfigDef = (maxOutputTokens: number) =>\n ({\n temperature: temperature.def,\n maxTokens: maxTokens(maxOutputTokens).def,\n stop: stop.def,\n topP: topP.def,\n frequencyPenalty: frequencyPenalty.def,\n presencePenalty: presencePenalty.def,\n seed: seed.def,\n responseFormat: responseFormat.def,\n toolChoice: toolChoice.def,\n }) as const;\n\nexport { ChatModelBaseConfigDef, ChatModelBaseConfigSchema };\n","import { ChatModelBaseConfigDef, ChatModelBaseConfigSchema } from \"./chat-model\";\n\nconst GroqChatModelConfigs = {\n base: (maxOutputTokens: number) => ({\n def: ChatModelBaseConfigDef(maxOutputTokens),\n schema: ChatModelBaseConfigSchema(maxOutputTokens),\n }),\n} as const;\n\nexport { GroqChatModelConfigs };\n","import { z } from \"zod\";\n\nimport {\n OpenAIChatModelRoles,\n OpenAIChatModelRolesMap,\n OpenAIChatModelTextToolModalities,\n OpenAIChatModelTextToolModalitiesEnum,\n} from \"@adaline/openai\";\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GroqChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModelGroq, BaseChatModelOptions } from \"./base-chat-model.groq\";\n\nconst Gemma2_9b_ITLiteral = \"gemma2-9b-it\" as const;\n// https://huggingface.co/google/gemma-2-9b-it\nconst Gemma2_9b_ITDescription =\n \"Gemma is a family of lightweight, state-of-the-art open models from Google, \\\n built from the same research and technology used to create the Gemini models.\";\n\nconst Gemma2_9b_ITSchema = ChatModelSchema(OpenAIChatModelRoles, OpenAIChatModelTextToolModalitiesEnum).parse({\n name: Gemma2_9b_ITLiteral,\n description: Gemma2_9b_ITDescription,\n maxInputTokens: 8192,\n maxOutputTokens: 4096,\n roles: OpenAIChatModelRolesMap,\n modalities: OpenAIChatModelTextToolModalities,\n config: {\n def: GroqChatModelConfigs.base(4096).def,\n schema: GroqChatModelConfigs.base(4096).schema,\n },\n price: pricingData[Gemma2_9b_ITLiteral],\n});\n\nconst Gemma2_9b_ITOptions = BaseChatModelOptions;\ntype Gemma2_9b_ITOptionsType = z.infer<typeof Gemma2_9b_ITOptions>;\n\nclass Gemma2_9b_IT extends BaseChatModelGroq {\n constructor(options: Gemma2_9b_ITOptionsType) {\n super(Gemma2_9b_ITSchema, options);\n }\n}\n\nexport { Gemma2_9b_IT, Gemma2_9b_ITLiteral, Gemma2_9b_ITOptions, Gemma2_9b_ITSchema, type Gemma2_9b_ITOptionsType };\n","import { z } from \"zod\";\n\nimport {\n OpenAIChatModelRoles,\n OpenAIChatModelRolesMap,\n OpenAIChatModelTextToolModalities,\n OpenAIChatModelTextToolModalitiesEnum,\n} from \"@adaline/openai\";\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GroqChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModelGroq, BaseChatModelOptions } from \"./base-chat-model.groq\";\n\nconst Llama_3_1_8bLiteral = \"llama-3.1-8b-instant\" as const;\n// https://github.com/meta-llama/llama-models/blob/main/models/llama3_1/MODEL_CARD.md\nconst Llama_3_1_8bDescription =\n \"The Llama 3.1 instruction tuned text only models (8B, 70B, 405B) are optimized for multilingual dialogue use cases and \\\n outperform many of the available open source and closed chat models on common industry benchmarks.\";\n\nconst Llama_3_1_8bSchema = ChatModelSchema(OpenAIChatModelRoles, OpenAIChatModelTextToolModalitiesEnum).parse({\n name: Llama_3_1_8bLiteral,\n description: Llama_3_1_8bDescription,\n maxInputTokens: 128000,\n maxOutputTokens: 8192,\n roles: OpenAIChatModelRolesMap,\n modalities: OpenAIChatModelTextToolModalities,\n config: {\n def: GroqChatModelConfigs.base(8192).def,\n schema: GroqChatModelConfigs.base(8192).schema,\n },\n price: pricingData[Llama_3_1_8bLiteral],\n});\n\nconst Llama_3_1_8b_Options = BaseChatModelOptions;\ntype Llama_3_1_8b_OptionsType = z.infer<typeof Llama_3_1_8b_Options>;\n\nclass Llama_3_1_8b extends BaseChatModelGroq {\n constructor(options: Llama_3_1_8b_OptionsType) {\n super(Llama_3_1_8bSchema, options);\n }\n}\n\nexport { Llama_3_1_8b, Llama_3_1_8b_Options, Llama_3_1_8bLiteral, Llama_3_1_8bSchema, type Llama_3_1_8b_OptionsType };\n","import { z } from \"zod\";\n\nimport {\n OpenAIChatModelRoles,\n OpenAIChatModelRolesMap,\n OpenAIChatModelTextToolModalities,\n OpenAIChatModelTextToolModalitiesEnum,\n} from \"@adaline/openai\";\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GroqChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModelGroq, BaseChatModelOptions } from \"./base-chat-model.groq\";\n\nconst Llama_3_3_70b_VersatileLiteral = \"llama-3.3-70b-versatile\" as const;\nconst Llama_3_3_70b_VersatileDescription =\n \"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.\";\n\nconst Llama_3_3_70b_VersatileSchema = ChatModelSchema(OpenAIChatModelRoles, OpenAIChatModelTextToolModalitiesEnum).parse({\n name: Llama_3_3_70b_VersatileLiteral,\n description: Llama_3_3_70b_VersatileDescription,\n maxInputTokens: 128000,\n maxOutputTokens: 32768,\n roles: OpenAIChatModelRolesMap,\n modalities: OpenAIChatModelTextToolModalities,\n config: {\n def: GroqChatModelConfigs.base(32768).def,\n schema: GroqChatModelConfigs.base(32768).schema,\n },\n price: pricingData[Llama_3_3_70b_VersatileLiteral],\n});\n\nconst Llama_3_3_70b_Versatile_Options = BaseChatModelOptions;\ntype Llama_3_3_70b_Versatile_OptionsType = z.infer<typeof Llama_3_3_70b_Versatile_Options>;\n\nclass Llama_3_3_70b_Versatile extends BaseChatModelGroq {\n constructor(options: Llama_3_3_70b_Versatile_OptionsType) {\n super(Llama_3_3_70b_VersatileSchema, options);\n }\n}\n\nexport { Llama_3_3_70b_Versatile, Llama_3_3_70b_Versatile_Options, Llama_3_3_70b_VersatileLiteral, Llama_3_3_70b_VersatileSchema, type Llama_3_3_70b_Versatile_OptionsType };\n","import { z } from \"zod\";\n\nimport {\n OpenAIChatModelRoles,\n OpenAIChatModelRolesMap,\n OpenAIChatModelTextModalities,\n OpenAIChatModelTextToolModalitiesEnum,\n} from \"@adaline/openai\";\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GroqChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModelGroq, BaseChatModelOptions } from \"./base-chat-model.groq\";\n\nconst Llama_Guard_4_12bLiteral = \"meta-llama/llama-guard-4-12b\" as const;\nconst Llama_Guard_4_12bDescription =\n \"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.\";\n\nconst Llama_Guard_4_12bSchema = ChatModelSchema(OpenAIChatModelRoles, OpenAIChatModelTextToolModalitiesEnum).parse({\n name: Llama_Guard_4_12bLiteral,\n description: Llama_Guard_4_12bDescription,\n maxInputTokens: 128000,\n maxOutputTokens: 1024,\n roles: OpenAIChatModelRolesMap,\n modalities: OpenAIChatModelTextModalities,\n config: {\n def: GroqChatModelConfigs.base(1024).def,\n schema: GroqChatModelConfigs.base(1024).schema,\n },\n price: pricingData[Llama_Guard_4_12bLiteral],\n});\n\nconst Llama_Guard_4_12b_Options = BaseChatModelOptions;\ntype Llama_Guard_4_12b_OptionsType = z.infer<typeof Llama_Guard_4_12b_Options>;\n\nclass Llama_Guard_4_12b extends BaseChatModelGroq {\n constructor(options: Llama_Guard_4_12b_OptionsType) {\n super(Llama_Guard_4_12bSchema, options);\n }\n}\n\nexport { Llama_Guard_4_12b, Llama_Guard_4_12b_Options, Llama_Guard_4_12bLiteral, Llama_Guard_4_12bSchema, type Llama_Guard_4_12b_OptionsType };\n","import { z } from \"zod\";\n\nimport {\n OpenAIChatModelRoles,\n OpenAIChatModelRolesMap,\n OpenAIChatModelTextToolModalities,\n OpenAIChatModelTextToolModalitiesEnum,\n} from \"@adaline/openai\";\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GroqChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModelGroq, BaseChatModelOptions } from \"./base-chat-model.groq\";\n\nconst Qwen3_32bLiteral = \"qwen/qwen3-32b\" as const;\nconst Qwen3_32bDescription =\n \"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. \";\n\nconst Qwen3_32bSchema = ChatModelSchema(OpenAIChatModelRoles, OpenAIChatModelTextToolModalitiesEnum).parse({\n name: Qwen3_32bLiteral,\n description: Qwen3_32bDescription,\n maxInputTokens: 128000,\n maxOutputTokens: 40960,\n roles: OpenAIChatModelRolesMap,\n modalities: OpenAIChatModelTextToolModalities,\n config: {\n def: GroqChatModelConfigs.base(40960).def,\n schema: GroqChatModelConfigs.base(40960).schema,\n },\n price: pricingData[Qwen3_32bLiteral],\n});\n\nconst Qwen3_32b_Options = BaseChatModelOptions;\ntype Qwen3_32b_OptionsType = z.infer<typeof Qwen3_32b_Options>;\n\nclass Qwen3_32b extends BaseChatModelGroq {\n constructor(options: Qwen3_32b_OptionsType) {\n super(Qwen3_32bSchema, options);\n }\n}\n\nexport { Qwen3_32b, Qwen3_32b_Options, Qwen3_32bLiteral, Qwen3_32bSchema, type Qwen3_32b_OptionsType };\n","import { z } from \"zod\";\n\nimport {\n OpenAIChatModelRoles,\n OpenAIChatModelRolesMap,\n OpenAIChatModelTextToolModalities,\n OpenAIChatModelTextToolModalitiesEnum,\n} from \"@adaline/openai\";\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GroqChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModelGroq, BaseChatModelOptions } from \"./base-chat-model.groq\";\n\nconst Deepseek_R1_Distill_Llama_70bLiteral = \"deepseek-r1-distill-llama-70b\" as const;\nconst Deepseek_R1_Distill_Llama_70bDescription =\n \"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.\";\n\nconst Deepseek_R1_Distill_Llama_70bSchema = ChatModelSchema(OpenAIChatModelRoles, OpenAIChatModelTextToolModalitiesEnum).parse({\n name: Deepseek_R1_Distill_Llama_70bLiteral,\n description: Deepseek_R1_Distill_Llama_70bDescription,\n maxInputTokens: 128000,\n maxOutputTokens: 128000,\n roles: OpenAIChatModelRolesMap,\n modalities: OpenAIChatModelTextToolModalities,\n config: {\n def: GroqChatModelConfigs.base(128000).def,\n schema: GroqChatModelConfigs.base(128000).schema,\n },\n price: pricingData[Deepseek_R1_Distill_Llama_70bLiteral],\n});\n\nconst Deepseek_R1_Distill_Llama_70b_Options = BaseChatModelOptions;\ntype Deepseek_R1_Distill_Llama_70b_OptionsType = z.infer<typeof Deepseek_R1_Distill_Llama_70b_Options>;\n\nclass Deepseek_R1_Distill_Llama_70b extends BaseChatModelGroq {\n constructor(options: Deepseek_R1_Distill_Llama_70b_OptionsType) {\n super(Deepseek_R1_Distill_Llama_70bSchema, options);\n }\n}\n\nexport { Deepseek_R1_Distill_Llama_70b, Deepseek_R1_Distill_Llama_70b_Options, Deepseek_R1_Distill_Llama_70bLiteral, Deepseek_R1_Distill_Llama_70bSchema, type Deepseek_R1_Distill_Llama_70b_OptionsType };\n","import { z } from \"zod\";\n\nimport {\n OpenAIChatModelRoles,\n OpenAIChatModelRolesMap,\n OpenAIChatModelTextToolModalities,\n OpenAIChatModelTextToolModalitiesEnum,\n} from \"@adaline/openai\";\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GroqChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModelGroq, BaseChatModelOptions } from \"./base-chat-model.groq\";\n\nconst Kimi_K2_InstructLiteral = \"moonshotai/kimi-k2-instruct\" as const;\nconst Kimi_K2_InstructDescription =\n \"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.\";\n\nconst Kimi_K2_InstructSchema = ChatModelSchema(OpenAIChatModelRoles, OpenAIChatModelTextToolModalitiesEnum).parse({\n name: Kimi_K2_InstructLiteral,\n description: Kimi_K2_InstructDescription,\n maxInputTokens: 128000,\n maxOutputTokens: 16384,\n roles: OpenAIChatModelRolesMap,\n modalities: OpenAIChatModelTextToolModalities,\n config: {\n def: GroqChatModelConfigs.base(16384).def,\n schema: GroqChatModelConfigs.base(16384).schema,\n },\n price: pricingData[Kimi_K2_InstructLiteral],\n});\n\nconst Kimi_K2_Instruct_Options = BaseChatModelOptions;\ntype Kimi_K2_Instruct_OptionsType = z.infer<typeof Kimi_K2_Instruct_Options>;\n\nclass Kimi_K2_Instruct extends BaseChatModelGroq {\n constructor(options: Kimi_K2_Instruct_OptionsType) {\n super(Kimi_K2_InstructSchema, options);\n }\n}\n\nexport { Kimi_K2_Instruct, Kimi_K2_Instruct_Options, Kimi_K2_InstructLiteral, Kimi_K2_InstructSchema, type Kimi_K2_Instruct_OptionsType };\n","import { z } from \"zod\";\n\nimport { ChatModelSchemaType, ChatModelV1, EmbeddingModelSchemaType, EmbeddingModelV1, ProviderError, ProviderV1 } from \"@adaline/provider\";\n\nimport * as Models from \"../models\";\n\nconst ProviderLiteral = \"groq\";\nclass Groq<C extends Models.BaseChatModelOptionsType, E extends Record<string, any> = Record<string, any>> implements ProviderV1<C, E> {\n readonly version = \"v1\" as const;\n readonly name = ProviderLiteral;\n static readonly baseUrl = \"https://api.groq.com/openai/v1\";\n\n private readonly chatModelFactories: Record<\n string,\n {\n model: { new (options: any): ChatModelV1 };\n modelOptions: z.ZodType<any>;\n modelSchema: ChatModelSchemaType;\n }\n > = {\n [Models.Gemma2_9b_ITLiteral]: {\n model: Models.Gemma2_9b_IT,\n modelOptions: Models.Gemma2_9b_ITOptions,\n modelSchema: Models.Gemma2_9b_ITSchema,\n },\n [Models.Llama_3_1_8bLiteral]: {\n model: Models.Llama_3_1_8b,\n modelOptions: Models.Llama_3_1_8b_Options,\n modelSchema: Models.Llama_3_1_8bSchema,\n },\n [Models.Llama_3_3_70b_VersatileLiteral]: {\n model: Models.Llama_3_3_70b_Versatile,\n modelOptions: Models.Llama_3_3_70b_Versatile_Options,\n modelSchema: Models.Llama_3_3_70b_VersatileSchema,\n },\n [Models.Llama_Guard_4_12bLiteral]: {\n model: Models.Llama_Guard_4_12b,\n modelOptions: Models.Llama_Guard_4_12b_Options,\n modelSchema: Models.Llama_Guard_4_12bSchema,\n },\n [Models.Qwen3_32bLiteral]: {\n model: Models.Qwen3_32b,\n modelOptions: Models.Qwen3_32b_Options,\n modelSchema: Models.Qwen3_32bSchema,\n },\n [Models.Deepseek_R1_Distill_Llama_70bLiteral]: {\n model: Models.Deepseek_R1_Distill_Llama_70b,\n modelOptions: Models.Deepseek_R1_Distill_Llama_70b_Options,\n modelSchema: Models.Deepseek_R1_Distill_Llama_70bSchema,\n },\n [Models.Kimi_K2_InstructLiteral]: {\n model: Models.Kimi_K2_Instruct,\n modelOptions: Models.Kimi_K2_Instruct_Options,\n modelSchema: Models.Kimi_K2_InstructSchema,\n },\n };\n\n private readonly embeddingModelFactories: Record<\n string,\n {\n model: { new (options: any): EmbeddingModelV1 };\n modelOptions: z.ZodType<any>;\n modelSchema: EmbeddingModelSchemaType;\n }\n > = {};\n\n chatModelLiterals(): string[] {\n return Object.keys(this.chatModelFactories);\n }\n\n chatModelSchemas(): Record<string, ChatModelSchemaType> {\n return Object.keys(this.chatModelFactories).reduce(\n (acc, key) => {\n acc[key] = this.chatModelFactories[key].modelSchema;\n return acc;\n },\n {} as Record<string, ChatModelSchemaType>\n );\n }\n\n chatModel(options: C): ChatModelV1 {\n const modelName = options.modelName;\n if (!(modelName in this.chatModelFactories)) {\n throw new ProviderError({\n info: `Groq chat model: ${modelName} not found`,\n cause: new Error(`Groq chat model: ${modelName} not found, available chat models: \n ${this.chatModelLiterals().join(\", \")}`),\n });\n }\n\n const model = this.chatModelFactories[modelName].model;\n const parsedOptions = this.chatModelFactories[modelName].modelOptions.parse(options);\n return new model(parsedOptions);\n }\n\n embeddingModelLiterals(): string[] {\n return Object.keys(this.embeddingModelFactories);\n }\n\n embeddingModelSchemas(): Record<string, EmbeddingModelSchemaType> {\n return Object.keys(this.embeddingModelFactories).reduce(\n (acc, key) => {\n acc[key] = this.embeddingModelFactories[key].modelSchema;\n return acc;\n },\n {} as Record<string, EmbeddingModelSchemaType>\n );\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n embeddingModel(options: E): EmbeddingModelV1 {\n throw new ProviderError({\n info: \"Groq does not support embedding models yet\",\n cause: new Error(\"Groq does not support embedding models yet\"),\n });\n }\n}\n\nexport { Groq };\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/models/pricing.json","../src/models/chat-models/base-chat-model.groq.ts","../src/configs/chat-model/common.config.chat-model.groq.ts","../src/configs/chat-model/base.config.chat-model.groq.ts","../src/configs/configs.groq.ts","../src/models/chat-models/gemma2-9b-it.groq.ts","../src/models/chat-models/llama-3-1-8b.groq.ts","../src/models/chat-models/llama-3-3-70b-versatile.groq.ts","../src/models/chat-models/llama-guard-4-12b.groq.ts","../src/models/chat-models/qwen3-32b.groq.ts","../src/models/chat-models/deepseek-r1-distill-llama-70b.groq.ts","../src/models/chat-models/kimi-k2-instruct.groq.ts","../src/models/chat-models/llama-4-maverick-17b-128e-instruct.groq.ts","../src/models/chat-models/llama-4-scout-17b-16e-instruct.groq.ts","../src/provider/provider.groq.ts"],"names":["pricing_default","BaseChatModelOptions","z","BaseChatModelGroq","BaseChatModel","modelSchema","options","parsedOptions","baseUrl","Groq","messages","hasSystemRole","msg","hasImageModality","content","InvalidMessagesError","transformedMessages","message","ModelResponseError","temperature","RangeConfigItem","CHAT_CONFIG","maxTokens","maxOutputTokens","stop","MultiStringConfigItem","topP","frequencyPenalty","presencePenalty","seed","responseFormat","SelectStringConfigItem","toolChoice","ChatModelBaseConfigSchema","value","ChatModelBaseConfigDef","GroqChatModelConfigs","Gemma2_9b_ITLiteral","Gemma2_9b_ITDescription","Gemma2_9b_ITSchema","ChatModelSchema","OpenAIChatModelRoles","OpenAIChatModelTextToolModalitiesEnum","OpenAIChatModelRolesMap","OpenAIChatModelTextToolModalities","Gemma2_9b_ITOptions","Gemma2_9b_IT","Llama_3_1_8bLiteral","Llama_3_1_8bDescription","Llama_3_1_8bSchema","Llama_3_1_8b_Options","Llama_3_1_8b","Llama_3_3_70b_VersatileLiteral","Llama_3_3_70b_VersatileDescription","Llama_3_3_70b_VersatileSchema","Llama_3_3_70b_Versatile_Options","Llama_3_3_70b_Versatile","Llama_Guard_4_12bLiteral","Llama_Guard_4_12bDescription","Llama_Guard_4_12bSchema","OpenAIChatModelTextModalities","Llama_Guard_4_12b_Options","Llama_Guard_4_12b","Qwen3_32bLiteral","Qwen3_32bDescription","Qwen3_32bSchema","Qwen3_32b_Options","Qwen3_32b","Deepseek_R1_Distill_Llama_70bLiteral","Deepseek_R1_Distill_Llama_70bDescription","Deepseek_R1_Distill_Llama_70bSchema","Deepseek_R1_Distill_Llama_70b_Options","Deepseek_R1_Distill_Llama_70b","Kimi_K2_InstructLiteral","Kimi_K2_InstructDescription","Kimi_K2_InstructSchema","Kimi_K2_Instruct_Options","Kimi_K2_Instruct","Llama_4_Maverick_17b_128e_InstructLiteral","Llama_4_Maverick_17b_128e_InstructDescription","Llama_4_Maverick_17b_128e_InstructSchema","OpenAIChatModelModalitiesEnum","OpenAIChatModelModalities","Llama_4_Maverick_17b_128e_Instruct_Options","Llama_4_Maverick_17b_128e_Instruct","Llama_4_Scout_17b_16e_InstructLiteral","Llama_4_Scout_17b_16e_InstructDescription","Llama_4_Scout_17b_16e_InstructSchema","Llama_4_Scout_17b_16e_Instruct_Options","Llama_4_Scout_17b_16e_Instruct","ProviderLiteral","acc","key","modelName","ProviderError","model"],"mappings":";;;;AAAA,IAAAA,CAAA,CAAA,CACE,cAAgB,CAAA,CACd,UAAa,cACb,CAAA,QAAA,CAAY,KACZ,CAAA,WAAA,CAAe,CACb,CACE,SAAa,CAAA,CAAA,CACb,UAAa,IACb,CAAA,MAAA,CAAU,CACR,IAAA,CAAQ,CACN,oBAAA,CAAwB,EACxB,CAAA,qBAAA,CAAyB,EAC3B,CACF,CACF,CACF,CACF,CACA,CAAA,sBAAA,CAAwB,CACtB,SAAA,CAAa,uBACb,QAAY,CAAA,KAAA,CACZ,WAAe,CAAA,CACb,CACE,SAAA,CAAa,CACb,CAAA,SAAA,CAAa,KACb,MAAU,CAAA,CACR,IAAQ,CAAA,CACN,qBAAwB,GACxB,CAAA,qBAAA,CAAyB,GAC3B,CACF,CACF,CACF,CACF,CACA,CAAA,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GY,OAAU,CAAA,gCAAA","file":"index.mjs","sourcesContent":["{\n \"gemma2-9b-it\": {\n \"modelName\": \"gemma2-9b-it\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.2,\n \"outputPricePerMillion\": 0.2\n }\n }\n }\n ]\n },\n \"llama-3.1-8b-instant\": {\n \"modelName\": \"llama-3.1-8b-instant\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.05,\n \"outputPricePerMillion\": 0.08\n }\n }\n }\n ]\n },\n \"llama-3.2-11b-vision-preview\": {\n \"modelName\": \"llama-3.2-11b-vision-preview\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.18,\n \"outputPricePerMillion\": 0.18\n }\n }\n }\n ]\n },\n \"llama-3.2-1b-preview\": {\n \"modelName\": \"llama-3.2-1b-preview\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.04,\n \"outputPricePerMillion\": 0.04\n }\n }\n }\n ]\n },\n \"llama-3.2-3b-preview\": {\n \"modelName\": \"llama-3.2-3b-preview\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.06,\n \"outputPricePerMillion\": 0.06\n }\n }\n }\n ]\n },\n \"llama-3.2-90b-vision-preview\": {\n \"modelName\": \"llama-3.2-90b-vision-preview\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.7,\n \"outputPricePerMillion\": 0.8\n }\n }\n }\n ]\n },\n \"llama3-70b-8192\": {\n \"modelName\": \"llama3-70b-8192\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.59,\n \"outputPricePerMillion\": 0.79\n }\n }\n }\n ]\n },\n \"llama3-8b-8192\": {\n \"modelName\": \"llama3-8b-8192\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.05,\n \"outputPricePerMillion\": 0.08\n }\n }\n }\n ]\n },\n \"llama-guard-3-8b\": {\n \"modelName\": \"llama-guard-3-8b\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.2,\n \"outputPricePerMillion\": 0.2\n }\n }\n }\n ]\n },\n \"llama-3.3-70b-versatile\": {\n \"modelName\": \"llama-3.3-70b-versatile\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.59,\n \"outputPricePerMillion\": 0.79\n }\n }\n }\n ]\n },\n \"meta-llama/llama-guard-4-12b\": {\n \"modelName\": \"meta-llama/llama-guard-4-12b\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.2,\n \"outputPricePerMillion\": 0.2\n }\n }\n }\n ]\n },\n \"deepseek-r1-distill-llama-70b\": {\n \"modelName\": \"deepseek-r1-distill-llama-70b\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.75,\n \"outputPricePerMillion\": 0.99\n }\n }\n }\n ]\n },\n \"moonshotai/kimi-k2-instruct\": {\n \"modelName\": \"moonshotai/kimi-k2-instruct\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 1.0,\n \"outputPricePerMillion\": 3.0\n }\n }\n }\n ]\n },\n \"qwen/qwen3-32b\": {\n \"modelName\": \"qwen/qwen3-32b\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.29,\n \"outputPricePerMillion\": 0.59\n }\n }\n }\n ]\n },\n \"meta-llama/llama-4-maverick-17b-128e-instruct\": {\n \"modelName\": \"meta-llama/llama-4-maverick-17b-128e-instruct\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.2,\n \"outputPricePerMillion\": 0.6\n }\n }\n }\n ]\n },\n \"meta-llama/llama-4-scout-17b-16e-instruct\": {\n \"modelName\": \"meta-llama/llama-4-scout-17b-16e-instruct\",\n \"currency\": \"USD\",\n \"tokenRanges\": [\n {\n \"minTokens\": 0,\n \"maxTokens\": null,\n \"prices\": {\n \"base\": {\n \"inputPricePerMillion\": 0.11,\n \"outputPricePerMillion\": 0.34\n }\n }\n }\n ]\n }\n}\n","import { z } from \"zod\";\n\nimport { BaseChatModel, OpenAIChatRequestMessageType } from \"@adaline/openai\";\nimport { ChatModelSchemaType, InvalidMessagesError, ModelResponseError, ParamsType } from \"@adaline/provider\";\nimport { ChatModelPriceType, MessageType } from \"@adaline/types\";\n\nimport { Groq } from \"../../provider\";\nimport pricingData from \"../pricing.json\";\n\nconst BaseChatModelOptions = z.object({\n modelName: z.string().min(1),\n apiKey: z.string().min(1),\n});\ntype BaseChatModelOptionsType = z.infer<typeof BaseChatModelOptions>;\n\nclass BaseChatModelGroq extends BaseChatModel {\n readonly version = \"v1\" as const;\n modelSchema: ChatModelSchemaType;\n readonly modelName: string;\n\n private readonly groqApiKey: string;\n\n constructor(modelSchema: ChatModelSchemaType, options: BaseChatModelOptionsType) {\n const parsedOptions = BaseChatModelOptions.parse(options);\n const baseUrl = Groq.baseUrl;\n super(modelSchema, {\n modelName: parsedOptions.modelName,\n apiKey: parsedOptions.apiKey,\n baseUrl: baseUrl,\n completeChatUrl: `${baseUrl}/chat/completions`,\n streamChatUrl: `${baseUrl}/chat/completions`,\n });\n this.modelSchema = modelSchema;\n this.modelName = parsedOptions.modelName;\n this.groqApiKey = parsedOptions.apiKey;\n }\n\n transformMessages(messages: MessageType[]): ParamsType {\n const hasSystemRole = messages.some((msg) => msg.role === \"system\");\n const hasImageModality = messages.some((msg) => msg.content.some((content: any) => content.modality === \"image\"));\n\n if (hasSystemRole && hasImageModality) {\n throw new InvalidMessagesError({\n info: `Invalid message content for model : '${this.modelName}'`,\n cause: new Error(\"Prompting with images is incompatible with system messages`)\"),\n });\n }\n\n const transformedMessages = super.transformMessages(messages) as { messages: OpenAIChatRequestMessageType[] };\n\n // Groq expects the content to be a string for system and assistant messages\n // OpenAI transformer takes care of validating role and modality\n transformedMessages.messages.forEach((message) => {\n if (message.role === \"system\") {\n if (typeof message.content !== \"string\") {\n message.content = message.content.map((content) => content.text).join(\"\\n\");\n }\n } else if (message.role === \"assistant\") {\n if (message.content && typeof message.content !== \"string\") {\n message.content = message.content.map((content) => content.text).join(\"\\n\");\n }\n }\n });\n\n return transformedMessages;\n }\n getModelPricing(): ChatModelPriceType {\n // Check if the modelName exists in pricingData before accessing it\n if (!(this.modelName in pricingData)) {\n throw new ModelResponseError({\n info: `Invalid model pricing for model : '${this.modelName}'`,\n cause: new Error(`No pricing configuration found for model \"${this.modelName}\"`),\n });\n }\n\n const entry = pricingData[this.modelName as keyof typeof pricingData];\n return entry as ChatModelPriceType;\n }\n}\n\nexport { BaseChatModelGroq, BaseChatModelOptions, type BaseChatModelOptionsType };\n","import { CHAT_CONFIG, MultiStringConfigItem, RangeConfigItem, SelectStringConfigItem } from \"@adaline/provider\";\n\nconst temperature = RangeConfigItem({\n param: \"temperature\",\n title: CHAT_CONFIG.TEMPERATURE.title,\n description: CHAT_CONFIG.TEMPERATURE.description,\n min: 0,\n max: 2,\n step: 0.01,\n default: 1,\n});\n\nconst maxTokens = (maxOutputTokens: number) =>\n RangeConfigItem({\n param: \"max_tokens\",\n title: CHAT_CONFIG.MAX_TOKENS.title,\n description: CHAT_CONFIG.MAX_TOKENS.description,\n min: 0,\n max: maxOutputTokens,\n step: 1,\n default: 0,\n });\n\nconst stop = MultiStringConfigItem({\n param: \"stop\",\n title: CHAT_CONFIG.STOP(4).title,\n description: CHAT_CONFIG.STOP(4).description,\n max: 4,\n});\n\nconst topP = RangeConfigItem({\n param: \"top_p\",\n title: CHAT_CONFIG.TOP_P.title,\n description: CHAT_CONFIG.TOP_P.description,\n min: 0,\n max: 1,\n step: 0.01,\n default: 1,\n});\n\nconst frequencyPenalty = RangeConfigItem({\n param: \"frequency_penalty\",\n title: CHAT_CONFIG.FREQUENCY_PENALTY.title,\n description: CHAT_CONFIG.FREQUENCY_PENALTY.description,\n min: -2,\n max: 2,\n step: 0.01,\n default: 0,\n});\n\nconst presencePenalty = RangeConfigItem({\n param: \"presence_penalty\",\n title: CHAT_CONFIG.PRESENCE_PENALTY.title,\n description: CHAT_CONFIG.PRESENCE_PENALTY.description,\n min: -2,\n max: 2,\n step: 0.01,\n default: 0,\n});\n\nconst seed = RangeConfigItem({\n param: \"seed\",\n title: CHAT_CONFIG.SEED.title,\n description: CHAT_CONFIG.SEED.description,\n min: 0,\n max: 1000000,\n step: 1,\n default: 0,\n});\n\nconst responseFormat = SelectStringConfigItem({\n param: \"response_format\",\n title: CHAT_CONFIG.RESPONSE_FORMAT.title,\n description: CHAT_CONFIG.RESPONSE_FORMAT.description,\n default: \"text\",\n choices: [\"text\", \"json_object\"],\n});\n\nconst toolChoice = SelectStringConfigItem({\n param: \"tool_choice\",\n title: \"Tool choice\",\n description:\n \"Controls which (if any) tool is called by the model. \\\n 'none' means the model will not call a function. \\\n 'auto' means the model can pick between generating a message or calling a tool.\",\n default: \"auto\",\n choices: [\"auto\", \"required\", \"none\"],\n});\n\nexport { frequencyPenalty, maxTokens, presencePenalty, seed, stop, temperature, toolChoice, topP, responseFormat };\n","import { z } from \"zod\";\n\nimport {\n frequencyPenalty,\n maxTokens,\n presencePenalty,\n responseFormat,\n seed,\n stop,\n temperature,\n toolChoice,\n topP,\n} from \"./common.config.chat-model.groq\";\n\nconst ChatModelBaseConfigSchema = (maxOutputTokens: number) =>\n z.object({\n temperature: temperature.schema,\n maxTokens: maxTokens(maxOutputTokens).schema,\n stop: stop.schema,\n topP: topP.schema,\n frequencyPenalty: frequencyPenalty.schema,\n presencePenalty: presencePenalty.schema,\n seed: seed.schema.transform((value) => (value === 0 ? undefined : value)),\n responseFormat: responseFormat.schema,\n toolChoice: toolChoice.schema,\n });\n\nconst ChatModelBaseConfigDef = (maxOutputTokens: number) =>\n ({\n temperature: temperature.def,\n maxTokens: maxTokens(maxOutputTokens).def,\n stop: stop.def,\n topP: topP.def,\n frequencyPenalty: frequencyPenalty.def,\n presencePenalty: presencePenalty.def,\n seed: seed.def,\n responseFormat: responseFormat.def,\n toolChoice: toolChoice.def,\n }) as const;\n\nexport { ChatModelBaseConfigDef, ChatModelBaseConfigSchema };\n","import { ChatModelBaseConfigDef, ChatModelBaseConfigSchema } from \"./chat-model\";\n\nconst GroqChatModelConfigs = {\n base: (maxOutputTokens: number) => ({\n def: ChatModelBaseConfigDef(maxOutputTokens),\n schema: ChatModelBaseConfigSchema(maxOutputTokens),\n }),\n} as const;\n\nexport { GroqChatModelConfigs };\n","import { z } from \"zod\";\n\nimport {\n OpenAIChatModelRoles,\n OpenAIChatModelRolesMap,\n OpenAIChatModelTextToolModalities,\n OpenAIChatModelTextToolModalitiesEnum,\n} from \"@adaline/openai\";\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GroqChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModelGroq, BaseChatModelOptions } from \"./base-chat-model.groq\";\n\nconst Gemma2_9b_ITLiteral = \"gemma2-9b-it\" as const;\n// https://huggingface.co/google/gemma-2-9b-it\nconst Gemma2_9b_ITDescription =\n \"Gemma is a family of lightweight, state-of-the-art open models from Google, \\\n built from the same research and technology used to create the Gemini models.\";\n\nconst Gemma2_9b_ITSchema = ChatModelSchema(OpenAIChatModelRoles, OpenAIChatModelTextToolModalitiesEnum).parse({\n name: Gemma2_9b_ITLiteral,\n description: Gemma2_9b_ITDescription,\n maxInputTokens: 8192,\n maxOutputTokens: 4096,\n roles: OpenAIChatModelRolesMap,\n modalities: OpenAIChatModelTextToolModalities,\n config: {\n def: GroqChatModelConfigs.base(4096).def,\n schema: GroqChatModelConfigs.base(4096).schema,\n },\n price: pricingData[Gemma2_9b_ITLiteral],\n});\n\nconst Gemma2_9b_ITOptions = BaseChatModelOptions;\ntype Gemma2_9b_ITOptionsType = z.infer<typeof Gemma2_9b_ITOptions>;\n\nclass Gemma2_9b_IT extends BaseChatModelGroq {\n constructor(options: Gemma2_9b_ITOptionsType) {\n super(Gemma2_9b_ITSchema, options);\n }\n}\n\nexport { Gemma2_9b_IT, Gemma2_9b_ITLiteral, Gemma2_9b_ITOptions, Gemma2_9b_ITSchema, type Gemma2_9b_ITOptionsType };\n","import { z } from \"zod\";\n\nimport {\n OpenAIChatModelRoles,\n OpenAIChatModelRolesMap,\n OpenAIChatModelTextToolModalities,\n OpenAIChatModelTextToolModalitiesEnum,\n} from \"@adaline/openai\";\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GroqChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModelGroq, BaseChatModelOptions } from \"./base-chat-model.groq\";\n\nconst Llama_3_1_8bLiteral = \"llama-3.1-8b-instant\" as const;\n// https://github.com/meta-llama/llama-models/blob/main/models/llama3_1/MODEL_CARD.md\nconst Llama_3_1_8bDescription =\n \"The Llama 3.1 instruction tuned text only models (8B, 70B, 405B) are optimized for multilingual dialogue use cases and \\\n outperform many of the available open source and closed chat models on common industry benchmarks.\";\n\nconst Llama_3_1_8bSchema = ChatModelSchema(OpenAIChatModelRoles, OpenAIChatModelTextToolModalitiesEnum).parse({\n name: Llama_3_1_8bLiteral,\n description: Llama_3_1_8bDescription,\n maxInputTokens: 128000,\n maxOutputTokens: 8192,\n roles: OpenAIChatModelRolesMap,\n modalities: OpenAIChatModelTextToolModalities,\n config: {\n def: GroqChatModelConfigs.base(8192).def,\n schema: GroqChatModelConfigs.base(8192).schema,\n },\n price: pricingData[Llama_3_1_8bLiteral],\n});\n\nconst Llama_3_1_8b_Options = BaseChatModelOptions;\ntype Llama_3_1_8b_OptionsType = z.infer<typeof Llama_3_1_8b_Options>;\n\nclass Llama_3_1_8b extends BaseChatModelGroq {\n constructor(options: Llama_3_1_8b_OptionsType) {\n super(Llama_3_1_8bSchema, options);\n }\n}\n\nexport { Llama_3_1_8b, Llama_3_1_8b_Options, Llama_3_1_8bLiteral, Llama_3_1_8bSchema, type Llama_3_1_8b_OptionsType };\n","import { z } from \"zod\";\n\nimport {\n OpenAIChatModelRoles,\n OpenAIChatModelRolesMap,\n OpenAIChatModelTextToolModalities,\n OpenAIChatModelTextToolModalitiesEnum,\n} from \"@adaline/openai\";\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GroqChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModelGroq, BaseChatModelOptions } from \"./base-chat-model.groq\";\n\nconst Llama_3_3_70b_VersatileLiteral = \"llama-3.3-70b-versatile\" as const;\nconst Llama_3_3_70b_VersatileDescription =\n \"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.\";\n\nconst Llama_3_3_70b_VersatileSchema = ChatModelSchema(OpenAIChatModelRoles, OpenAIChatModelTextToolModalitiesEnum).parse({\n name: Llama_3_3_70b_VersatileLiteral,\n description: Llama_3_3_70b_VersatileDescription,\n maxInputTokens: 128000,\n maxOutputTokens: 32768,\n roles: OpenAIChatModelRolesMap,\n modalities: OpenAIChatModelTextToolModalities,\n config: {\n def: GroqChatModelConfigs.base(32768).def,\n schema: GroqChatModelConfigs.base(32768).schema,\n },\n price: pricingData[Llama_3_3_70b_VersatileLiteral],\n});\n\nconst Llama_3_3_70b_Versatile_Options = BaseChatModelOptions;\ntype Llama_3_3_70b_Versatile_OptionsType = z.infer<typeof Llama_3_3_70b_Versatile_Options>;\n\nclass Llama_3_3_70b_Versatile extends BaseChatModelGroq {\n constructor(options: Llama_3_3_70b_Versatile_OptionsType) {\n super(Llama_3_3_70b_VersatileSchema, options);\n }\n}\n\nexport { Llama_3_3_70b_Versatile, Llama_3_3_70b_Versatile_Options, Llama_3_3_70b_VersatileLiteral, Llama_3_3_70b_VersatileSchema, type Llama_3_3_70b_Versatile_OptionsType };\n","import { z } from \"zod\";\n\nimport {\n OpenAIChatModelRoles,\n OpenAIChatModelRolesMap,\n OpenAIChatModelTextModalities,\n OpenAIChatModelTextToolModalitiesEnum,\n} from \"@adaline/openai\";\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GroqChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModelGroq, BaseChatModelOptions } from \"./base-chat-model.groq\";\n\nconst Llama_Guard_4_12bLiteral = \"meta-llama/llama-guard-4-12b\" as const;\nconst Llama_Guard_4_12bDescription =\n \"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.\";\n\nconst Llama_Guard_4_12bSchema = ChatModelSchema(OpenAIChatModelRoles, OpenAIChatModelTextToolModalitiesEnum).parse({\n name: Llama_Guard_4_12bLiteral,\n description: Llama_Guard_4_12bDescription,\n maxInputTokens: 128000,\n maxOutputTokens: 1024,\n roles: OpenAIChatModelRolesMap,\n modalities: OpenAIChatModelTextModalities,\n config: {\n def: GroqChatModelConfigs.base(1024).def,\n schema: GroqChatModelConfigs.base(1024).schema,\n },\n price: pricingData[Llama_Guard_4_12bLiteral],\n});\n\nconst Llama_Guard_4_12b_Options = BaseChatModelOptions;\ntype Llama_Guard_4_12b_OptionsType = z.infer<typeof Llama_Guard_4_12b_Options>;\n\nclass Llama_Guard_4_12b extends BaseChatModelGroq {\n constructor(options: Llama_Guard_4_12b_OptionsType) {\n super(Llama_Guard_4_12bSchema, options);\n }\n}\n\nexport { Llama_Guard_4_12b, Llama_Guard_4_12b_Options, Llama_Guard_4_12bLiteral, Llama_Guard_4_12bSchema, type Llama_Guard_4_12b_OptionsType };\n","import { z } from \"zod\";\n\nimport {\n OpenAIChatModelRoles,\n OpenAIChatModelRolesMap,\n OpenAIChatModelTextToolModalities,\n OpenAIChatModelTextToolModalitiesEnum,\n} from \"@adaline/openai\";\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GroqChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModelGroq, BaseChatModelOptions } from \"./base-chat-model.groq\";\n\nconst Qwen3_32bLiteral = \"qwen/qwen3-32b\" as const;\nconst Qwen3_32bDescription =\n \"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. \";\n\nconst Qwen3_32bSchema = ChatModelSchema(OpenAIChatModelRoles, OpenAIChatModelTextToolModalitiesEnum).parse({\n name: Qwen3_32bLiteral,\n description: Qwen3_32bDescription,\n maxInputTokens: 128000,\n maxOutputTokens: 40960,\n roles: OpenAIChatModelRolesMap,\n modalities: OpenAIChatModelTextToolModalities,\n config: {\n def: GroqChatModelConfigs.base(40960).def,\n schema: GroqChatModelConfigs.base(40960).schema,\n },\n price: pricingData[Qwen3_32bLiteral],\n});\n\nconst Qwen3_32b_Options = BaseChatModelOptions;\ntype Qwen3_32b_OptionsType = z.infer<typeof Qwen3_32b_Options>;\n\nclass Qwen3_32b extends BaseChatModelGroq {\n constructor(options: Qwen3_32b_OptionsType) {\n super(Qwen3_32bSchema, options);\n }\n}\n\nexport { Qwen3_32b, Qwen3_32b_Options, Qwen3_32bLiteral, Qwen3_32bSchema, type Qwen3_32b_OptionsType };\n","import { z } from \"zod\";\n\nimport {\n OpenAIChatModelRoles,\n OpenAIChatModelRolesMap,\n OpenAIChatModelTextToolModalities,\n OpenAIChatModelTextToolModalitiesEnum,\n} from \"@adaline/openai\";\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GroqChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModelGroq, BaseChatModelOptions } from \"./base-chat-model.groq\";\n\nconst Deepseek_R1_Distill_Llama_70bLiteral = \"deepseek-r1-distill-llama-70b\" as const;\nconst Deepseek_R1_Distill_Llama_70bDescription =\n \"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.\";\n\nconst Deepseek_R1_Distill_Llama_70bSchema = ChatModelSchema(OpenAIChatModelRoles, OpenAIChatModelTextToolModalitiesEnum).parse({\n name: Deepseek_R1_Distill_Llama_70bLiteral,\n description: Deepseek_R1_Distill_Llama_70bDescription,\n maxInputTokens: 128000,\n maxOutputTokens: 128000,\n roles: OpenAIChatModelRolesMap,\n modalities: OpenAIChatModelTextToolModalities,\n config: {\n def: GroqChatModelConfigs.base(128000).def,\n schema: GroqChatModelConfigs.base(128000).schema,\n },\n price: pricingData[Deepseek_R1_Distill_Llama_70bLiteral],\n});\n\nconst Deepseek_R1_Distill_Llama_70b_Options = BaseChatModelOptions;\ntype Deepseek_R1_Distill_Llama_70b_OptionsType = z.infer<typeof Deepseek_R1_Distill_Llama_70b_Options>;\n\nclass Deepseek_R1_Distill_Llama_70b extends BaseChatModelGroq {\n constructor(options: Deepseek_R1_Distill_Llama_70b_OptionsType) {\n super(Deepseek_R1_Distill_Llama_70bSchema, options);\n }\n}\n\nexport { Deepseek_R1_Distill_Llama_70b, Deepseek_R1_Distill_Llama_70b_Options, Deepseek_R1_Distill_Llama_70bLiteral, Deepseek_R1_Distill_Llama_70bSchema, type Deepseek_R1_Distill_Llama_70b_OptionsType };\n","import { z } from \"zod\";\n\nimport {\n OpenAIChatModelRoles,\n OpenAIChatModelRolesMap,\n OpenAIChatModelTextToolModalities,\n OpenAIChatModelTextToolModalitiesEnum,\n} from \"@adaline/openai\";\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GroqChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModelGroq, BaseChatModelOptions } from \"./base-chat-model.groq\";\n\nconst Kimi_K2_InstructLiteral = \"moonshotai/kimi-k2-instruct\" as const;\nconst Kimi_K2_InstructDescription =\n \"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.\";\n\nconst Kimi_K2_InstructSchema = ChatModelSchema(OpenAIChatModelRoles, OpenAIChatModelTextToolModalitiesEnum).parse({\n name: Kimi_K2_InstructLiteral,\n description: Kimi_K2_InstructDescription,\n maxInputTokens: 128000,\n maxOutputTokens: 16384,\n roles: OpenAIChatModelRolesMap,\n modalities: OpenAIChatModelTextToolModalities,\n config: {\n def: GroqChatModelConfigs.base(16384).def,\n schema: GroqChatModelConfigs.base(16384).schema,\n },\n price: pricingData[Kimi_K2_InstructLiteral],\n});\n\nconst Kimi_K2_Instruct_Options = BaseChatModelOptions;\ntype Kimi_K2_Instruct_OptionsType = z.infer<typeof Kimi_K2_Instruct_Options>;\n\nclass Kimi_K2_Instruct extends BaseChatModelGroq {\n constructor(options: Kimi_K2_Instruct_OptionsType) {\n super(Kimi_K2_InstructSchema, options);\n }\n}\n\nexport { Kimi_K2_Instruct, Kimi_K2_Instruct_Options, Kimi_K2_InstructLiteral, Kimi_K2_InstructSchema, type Kimi_K2_Instruct_OptionsType };\n","import { z } from \"zod\";\n\nimport { OpenAIChatModelModalities, OpenAIChatModelModalitiesEnum, OpenAIChatModelRoles, OpenAIChatModelRolesMap } from \"@adaline/openai\";\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GroqChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModelGroq, BaseChatModelOptions } from \"./base-chat-model.groq\";\n\nconst Llama_4_Maverick_17b_128e_InstructLiteral = \"meta-llama/llama-4-maverick-17b-128e-instruct\" as const;\nconst Llama_4_Maverick_17b_128e_InstructDescription =\n \"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.\";\n\nconst Llama_4_Maverick_17b_128e_InstructSchema = ChatModelSchema(OpenAIChatModelRoles, OpenAIChatModelModalitiesEnum).parse({\n name: Llama_4_Maverick_17b_128e_InstructLiteral,\n description: Llama_4_Maverick_17b_128e_InstructDescription,\n maxInputTokens: 131072,\n maxOutputTokens: 8192,\n roles: OpenAIChatModelRolesMap,\n modalities: OpenAIChatModelModalities,\n config: {\n def: GroqChatModelConfigs.base(8192).def,\n schema: GroqChatModelConfigs.base(8192).schema,\n },\n price: pricingData[Llama_4_Maverick_17b_128e_InstructLiteral],\n});\n\nconst Llama_4_Maverick_17b_128e_Instruct_Options = BaseChatModelOptions;\ntype Llama_4_Maverick_17b_128e_Instruct_OptionsType = z.infer<typeof Llama_4_Maverick_17b_128e_Instruct_Options>;\n\nclass Llama_4_Maverick_17b_128e_Instruct extends BaseChatModelGroq {\n constructor(options: Llama_4_Maverick_17b_128e_Instruct_OptionsType) {\n super(Llama_4_Maverick_17b_128e_InstructSchema, options);\n }\n}\n\nexport {\n Llama_4_Maverick_17b_128e_Instruct,\n Llama_4_Maverick_17b_128e_Instruct_Options,\n Llama_4_Maverick_17b_128e_InstructLiteral,\n Llama_4_Maverick_17b_128e_InstructSchema,\n type Llama_4_Maverick_17b_128e_Instruct_OptionsType,\n};\n","import { z } from \"zod\";\n\nimport { OpenAIChatModelModalities, OpenAIChatModelModalitiesEnum, OpenAIChatModelRoles, OpenAIChatModelRolesMap } from \"@adaline/openai\";\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GroqChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModelGroq, BaseChatModelOptions } from \"./base-chat-model.groq\";\n\nconst Llama_4_Scout_17b_16e_InstructLiteral = \"meta-llama/llama-4-scout-17b-16e-instruct\" as const;\nconst Llama_4_Scout_17b_16e_InstructDescription =\n \"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.\";\n\nconst Llama_4_Scout_17b_16e_InstructSchema = ChatModelSchema(OpenAIChatModelRoles, OpenAIChatModelModalitiesEnum).parse({\n name: Llama_4_Scout_17b_16e_InstructLiteral,\n description: Llama_4_Scout_17b_16e_InstructDescription,\n maxInputTokens: 131072,\n maxOutputTokens: 8192,\n roles: OpenAIChatModelRolesMap,\n modalities: OpenAIChatModelModalities,\n config: {\n def: GroqChatModelConfigs.base(8192).def,\n schema: GroqChatModelConfigs.base(8192).schema,\n },\n price: pricingData[Llama_4_Scout_17b_16e_InstructLiteral],\n});\n\nconst Llama_4_Scout_17b_16e_Instruct_Options = BaseChatModelOptions;\ntype Llama_4_Scout_17b_16e_Instruct_OptionsType = z.infer<typeof Llama_4_Scout_17b_16e_Instruct_Options>;\n\nclass Llama_4_Scout_17b_16e_Instruct extends BaseChatModelGroq {\n constructor(options: Llama_4_Scout_17b_16e_Instruct_OptionsType) {\n super(Llama_4_Scout_17b_16e_InstructSchema, options);\n }\n}\n\nexport {\n Llama_4_Scout_17b_16e_Instruct,\n Llama_4_Scout_17b_16e_Instruct_Options,\n Llama_4_Scout_17b_16e_InstructLiteral,\n Llama_4_Scout_17b_16e_InstructSchema,\n type Llama_4_Scout_17b_16e_Instruct_OptionsType,\n};\n","import { z } from \"zod\";\n\nimport { ChatModelSchemaType, ChatModelV1, EmbeddingModelSchemaType, EmbeddingModelV1, ProviderError, ProviderV1 } from \"@adaline/provider\";\n\nimport * as Models from \"../models\";\n\nconst ProviderLiteral = \"groq\";\nclass Groq<C extends Models.BaseChatModelOptionsType, E extends Record<string, any> = Record<string, any>> implements ProviderV1<C, E> {\n readonly version = \"v1\" as const;\n readonly name = ProviderLiteral;\n static readonly baseUrl = \"https://api.groq.com/openai/v1\";\n\n private readonly chatModelFactories: Record<\n string,\n {\n model: { new (options: any): ChatModelV1 };\n modelOptions: z.ZodType<any>;\n modelSchema: ChatModelSchemaType;\n }\n > = {\n [Models.Gemma2_9b_ITLiteral]: {\n model: Models.Gemma2_9b_IT,\n modelOptions: Models.Gemma2_9b_ITOptions,\n modelSchema: Models.Gemma2_9b_ITSchema,\n },\n [Models.Llama_3_1_8bLiteral]: {\n model: Models.Llama_3_1_8b,\n modelOptions: Models.Llama_3_1_8b_Options,\n modelSchema: Models.Llama_3_1_8bSchema,\n },\n [Models.Llama_3_3_70b_VersatileLiteral]: {\n model: Models.Llama_3_3_70b_Versatile,\n modelOptions: Models.Llama_3_3_70b_Versatile_Options,\n modelSchema: Models.Llama_3_3_70b_VersatileSchema,\n },\n [Models.Llama_Guard_4_12bLiteral]: {\n model: Models.Llama_Guard_4_12b,\n modelOptions: Models.Llama_Guard_4_12b_Options,\n modelSchema: Models.Llama_Guard_4_12bSchema,\n },\n [Models.Qwen3_32bLiteral]: {\n model: Models.Qwen3_32b,\n modelOptions: Models.Qwen3_32b_Options,\n modelSchema: Models.Qwen3_32bSchema,\n },\n [Models.Deepseek_R1_Distill_Llama_70bLiteral]: {\n model: Models.Deepseek_R1_Distill_Llama_70b,\n modelOptions: Models.Deepseek_R1_Distill_Llama_70b_Options,\n modelSchema: Models.Deepseek_R1_Distill_Llama_70bSchema,\n },\n [Models.Kimi_K2_InstructLiteral]: {\n model: Models.Kimi_K2_Instruct,\n modelOptions: Models.Kimi_K2_Instruct_Options,\n modelSchema: Models.Kimi_K2_InstructSchema,\n },\n [Models.Llama_4_Maverick_17b_128e_InstructLiteral]: {\n model: Models.Llama_4_Maverick_17b_128e_Instruct,\n modelOptions: Models.Llama_4_Maverick_17b_128e_Instruct_Options,\n modelSchema: Models.Llama_4_Maverick_17b_128e_InstructSchema,\n },\n [Models.Llama_4_Scout_17b_16e_InstructLiteral]: {\n model: Models.Llama_4_Scout_17b_16e_Instruct,\n modelOptions: Models.Llama_4_Scout_17b_16e_Instruct_Options,\n modelSchema: Models.Llama_4_Scout_17b_16e_InstructSchema,\n },\n };\n\n private readonly embeddingModelFactories: Record<\n string,\n {\n model: { new (options: any): EmbeddingModelV1 };\n modelOptions: z.ZodType<any>;\n modelSchema: EmbeddingModelSchemaType;\n }\n > = {};\n\n chatModelLiterals(): string[] {\n return Object.keys(this.chatModelFactories);\n }\n\n chatModelSchemas(): Record<string, ChatModelSchemaType> {\n return Object.keys(this.chatModelFactories).reduce(\n (acc, key) => {\n acc[key] = this.chatModelFactories[key].modelSchema;\n return acc;\n },\n {} as Record<string, ChatModelSchemaType>\n );\n }\n\n chatModel(options: C): ChatModelV1 {\n const modelName = options.modelName;\n if (!(modelName in this.chatModelFactories)) {\n throw new ProviderError({\n info: `Groq chat model: ${modelName} not found`,\n cause: new Error(`Groq chat model: ${modelName} not found, available chat models: \n ${this.chatModelLiterals().join(\", \")}`),\n });\n }\n\n const model = this.chatModelFactories[modelName].model;\n const parsedOptions = this.chatModelFactories[modelName].modelOptions.parse(options);\n return new model(parsedOptions);\n }\n\n embeddingModelLiterals(): string[] {\n return Object.keys(this.embeddingModelFactories);\n }\n\n embeddingModelSchemas(): Record<string, EmbeddingModelSchemaType> {\n return Object.keys(this.embeddingModelFactories).reduce(\n (acc, key) => {\n acc[key] = this.embeddingModelFactories[key].modelSchema;\n return acc;\n },\n {} as Record<string, EmbeddingModelSchemaType>\n );\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n embeddingModel(options: E): EmbeddingModelV1 {\n throw new ProviderError({\n info: \"Groq does not support embedding models yet\",\n cause: new Error(\"Groq does not support embedding models yet\"),\n });\n }\n}\n\nexport { Groq };\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaline/groq",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"private": false,
|
|
@@ -47,12 +47,12 @@
|
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"zod": "^3.23.8",
|
|
49
49
|
"@adaline/provider": "1.2.3",
|
|
50
|
-
"@adaline/
|
|
51
|
-
"@adaline/
|
|
50
|
+
"@adaline/openai": "1.5.3",
|
|
51
|
+
"@adaline/types": "1.5.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"
|
|
55
|
-
"
|
|
54
|
+
"eslint-config-adaline": "0.8.0",
|
|
55
|
+
"@adaline/tsconfig": "0.11.0"
|
|
56
56
|
},
|
|
57
57
|
"scripts": {
|
|
58
58
|
"clean": "rimraf node_modules .turbo dist",
|