Skip to content
This repository was archived by the owner on Jul 29, 2025. It is now read-only.

add groq Kimi K2 model support #323

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions internal/llm/models/groq.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const (
Llama4Maverick ModelID = "meta-llama/llama-4-maverick-17b-128e-instruct"
Llama3_3_70BVersatile ModelID = "llama-3.3-70b-versatile"
DeepseekR1DistillLlama70b ModelID = "deepseek-r1-distill-llama-70b"
Kimi_K2 ModelID = "moonshotai/kimi-k2-instruct"
)

var GroqModels = map[ModelID]Model{
Expand Down Expand Up @@ -84,4 +85,16 @@ var GroqModels = map[ModelID]Model{
CanReason: true,
SupportsAttachments: false,
},
Kimi_K2: {
ID: Kimi_K2,
Name: "Kimi K2",
Provider: ProviderGROQ,
APIModel: "moonshotai/kimi-k2-instruct",
CostPer1MIn: 1,
CostPer1MInCached: 0,
CostPer1MOutCached: 0,
CostPer1MOut: 3,
ContextWindow: 131_072,
SupportsAttachments: true,
},
}
6 changes: 4 additions & 2 deletions opencode-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@
"copilot.o3-mini",
"copilot.o4-mini",
"copilot.gemini-2.0-flash",
"copilot.gemini-2.5-pro"
"copilot.gemini-2.5-pro",
"moonshotai/kimi-k2-instruct"
],
"type": "string"
},
Expand Down Expand Up @@ -198,7 +199,8 @@
"copilot.o3-mini",
"copilot.o4-mini",
"copilot.gemini-2.0-flash",
"copilot.gemini-2.5-pro"
"copilot.gemini-2.5-pro",
"moonshotai/kimi-k2-instruct"
],
"type": "string"
},
Expand Down