feat: update Groq models for better tool calling support (#3676)

Co-authored-by: kenneth.kimani <kenneth.kimani@savannahinformatics.com>
Co-authored-by: Douwe Osinga <douwe@block.xyz>
This commit is contained in:
Kenneth Mungai
2025-07-29 17:33:21 +03:00
committed by GitHub
parent 4ac5fe4f8d
commit 9d996c3957
3 changed files with 48 additions and 3 deletions
+6 -1
View File
@@ -28,9 +28,14 @@ static MODEL_SPECIFIC_LIMITS: Lazy<HashMap<&'static str, usize>> = Lazy::new(||
map.insert("llama3.3", 128_000);
// x.ai Grok models, https://docs.x.ai/docs/overview
map.insert("grok", 131_072);
// Groq models, https://console.groq.com/docs/models
map.insert("gemma2-9b", 8_192);
map.insert("kimi-k2", 131_072);
map.insert("qwen3-32b", 131_072);
map.insert("grok-3", 131_072);
map.insert("grok-4", 256_000); // 256K
map.insert("qwen3-coder", 262_144); // 262K
map
+7 -2
View File
@@ -13,8 +13,13 @@ use std::time::Duration;
use url::Url;
pub const GROQ_API_HOST: &str = "https://api.groq.com";
pub const GROQ_DEFAULT_MODEL: &str = "llama-3.3-70b-versatile";
pub const GROQ_KNOWN_MODELS: &[&str] = &["gemma2-9b-it", "llama-3.3-70b-versatile"];
pub const GROQ_DEFAULT_MODEL: &str = "moonshotai/kimi-k2-instruct";
pub const GROQ_KNOWN_MODELS: &[&str] = &[
"gemma2-9b-it",
"llama-3.3-70b-versatile",
"moonshotai/kimi-k2-instruct",
"qwen/qwen3-32b",
];
pub const GROQ_DOC_URL: &str = "https://console.groq.com/docs/models";