Skip to content

Commit de3aebd

Browse files
Update groq.ts
1 parent adf2f74 commit de3aebd

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

src/llm/services/groq.ts

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,32 +20,27 @@ export function groqLLMRegistry(): Record<string, () => LLM> {
2020
// https://groq.com/pricing/
2121
// https://console.groq.com/docs/models
2222

23-
// Qwen3 32B 131khttps://console.groq.com/docs/model/qwen3-32b
24-
// 16,384 max output tokens
23+
// https://console.groq.com/docs/model/qwen/qwen3-32b
2524
export function groqQwen3_32b(): LLM {
26-
return new GroqLLM('Qwen3 32b (Groq)', 'qwen/qwen3-32b', 131_072, costPerMilTokens(0.29, 0.59));
25+
return new GroqLLM('Qwen3 32b (Groq)', 'qwen/qwen3-32b', 131_072, 40_960, costPerMilTokens(0.29, 0.59));
2726
}
2827

28+
// https://console.groq.com/docs/model/meta-llama/llama-4-scout-17b-16e-instruct
2929
export function groqLlama4_Scout(): LLM {
30-
return new GroqLLM('Llama4 Scout (Groq)', 'meta-llama/llama-4-scout-17b-16e-instruct', 131_072, costPerMilTokens(0.11, 0.34));
30+
return new GroqLLM('Llama4 Scout (Groq)', 'meta-llama/llama-4-scout-17b-16e-instruct', 131_072, 8_192, costPerMilTokens(0.11, 0.34));
3131
}
3232

33+
// https://console.groq.com/docs/model/moonshotai/kimi-k2-instruct-0905
3334
export function groqKimiK2(): LLM {
34-
return new GroqLLM(
35-
'Kimi K2 (Groq)',
36-
'moonshotai/kimi-k2-instruct',
37-
// 16,384 max output tokens (from official Groq documentation)
38-
16384,
39-
costPerMilTokens(1.0, 3.0),
40-
);
35+
return new GroqLLM('Kimi K2 (Groq)', 'moonshotai/kimi-k2-instruct', 262_144, 16_384, costPerMilTokens(1.0, 3.0));
4136
}
4237

4338
/**
4439
* https://wow.groq.com/
4540
*/
4641
export class GroqLLM extends AiLLM<GroqProvider> {
47-
constructor(displayName: string, model: string, maxOutputTokens: number, calculateCosts: LlmCostFunction) {
48-
super({ displayName, service: GROQ_SERVICE, modelId: model, maxInputTokens: maxOutputTokens, calculateCosts });
42+
constructor(displayName: string, model: string, maxInputTokens: number, maxOutputTokens: number, calculateCosts: LlmCostFunction) {
43+
super({ displayName, service: GROQ_SERVICE, modelId: model, maxInputTokens, maxOutputTokens, calculateCosts });
4944
}
5045

5146
override aiModel(): LanguageModelV2 {

0 commit comments

Comments
 (0)