From 76147a60d345422980b730daf1d5358def1a0319 Mon Sep 17 00:00:00 2001 From: hikae Date: Sun, 5 Oct 2025 06:18:31 +0900 Subject: [PATCH] feat: add grok-code-fast-1 support for xAI provider (#4472) Signed-off-by: HikaruEgashira --- crates/goose/src/model.rs | 6 ++++-- crates/goose/src/providers/xai.rs | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/crates/goose/src/model.rs b/crates/goose/src/model.rs index e37d63e9..cdae3dfd 100644 --- a/crates/goose/src/model.rs +++ b/crates/goose/src/model.rs @@ -58,10 +58,12 @@ static MODEL_SPECIFIC_LIMITS: Lazy> = Lazy::new(|| { ("qwen2-70b", 262_144), ("qwen2", 128_000), ("qwen3-32b", 131_072), + // xai + ("grok-4", 256_000), + ("grok-code-fast-1", 256_000), + ("grok", 131_072), // other ("kimi-k2", 131_072), - ("grok-4", 256_000), - ("grok", 131_072), ] }); diff --git a/crates/goose/src/providers/xai.rs b/crates/goose/src/providers/xai.rs index 65ecccbd..202188d1 100644 --- a/crates/goose/src/providers/xai.rs +++ b/crates/goose/src/providers/xai.rs @@ -13,8 +13,9 @@ use rmcp::model::Tool; use serde_json::Value; pub const XAI_API_HOST: &str = "https://api.x.ai/v1"; -pub const XAI_DEFAULT_MODEL: &str = "grok-3"; +pub const XAI_DEFAULT_MODEL: &str = "grok-code-fast-1"; pub const XAI_KNOWN_MODELS: &[&str] = &[ + "grok-code-fast-1", "grok-4-0709", "grok-3", "grok-3-fast",