From d1ec8dfd5a14bf0e555a78de4d790ca3712e2a44 Mon Sep 17 00:00:00 2001 From: semmelrinde <124386289+semmelrinde@users.noreply.github.com> Date: Sun, 25 Oct 2026 01:25:19 +0000 Subject: [PATCH] Agent chat: a Mammouth AI preset for OpenAI-compatible endpoints (#5815) (#6082) * Agent chat: a Mammouth AI preset for OpenAI-compatible endpoints (#5815) Co-Authored-By: Claude Opus 5.5 * Agent chat: the key test names the Mammouth AI URL too (#5815) Co-Authored-By: Claude Opus 5.5 --------- Co-authored-by: Claude Opus 5.5 --- crates/ui-egui/src/agent_chat/agents.rs | 3 +++ docs/agent-chat.md | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/src/agent_chat/agents.rs b/crates/ui-egui/src/agent_chat/agents.rs index 6bdaab81b..793176077 100644 --- a/crates/ui-egui/src/agent_chat/agents.rs +++ b/crates/ui-egui/src/agent_chat/agents.rs @@ -257,6 +257,7 @@ pub const OPENAI_PRESETS: &[ApiPreset] = &[ ApiPreset { name: "Ollama", base_url: "http://localhost:11434/v1" }, ApiPreset { name: "LM Studio", base_url: "http://localhost:1234/v1" }, ApiPreset { name: "OpenAI", base_url: "https://api.openai.com/v1" }, + ApiPreset { name: "Mammouth AI", base_url: "https://api.mammouth.ai/v1" }, ]; /// Anthropic-compatible endpoints people use. The base URL is the one their documentation calls @@ -305,6 +306,7 @@ mod tests { #[test] fn keys_go_only_over_https_or_to_this_computer() { assert!(key_safe_for("https://api.openai.com/v1")); + assert!(key_safe_for("https://api.mammouth.ai/v1")); assert!(key_safe_for("http://localhost:11434/v1")); assert!(key_safe_for("http://127.0.0.1:1234/v1")); assert!(key_safe_for("http://[::1]:8080/v1")); @@ -346,6 +348,7 @@ mod tests { assert_eq!(Kind::Api.id(), "api"); assert_eq!(Kind::Anthropic.id(), "anthropic"); assert!(presets(Protocol::OpenAi).iter().all(|p| !p.name.is_empty() && p.base_url.starts_with("http"))); + assert!(presets(Protocol::OpenAi).iter().any(|p| p.name == "Mammouth AI" && key_safe_for(p.base_url))); assert!(presets(Protocol::Anthropic).iter().any(|p| p.base_url == "https://api.anthropic.com/v1")); } diff --git a/docs/agent-chat.md b/docs/agent-chat.md index ae68dac4c..ec1608934 100644 --- a/docs/agent-chat.md +++ b/docs/agent-chat.md @@ -199,7 +199,7 @@ Grok Build also supports `XAI_API_KEY` for users who choose API authentication. - **Custom command:** any other program that speaks ACP on stdin and stdout, such as `my-agent --acp`. SolidCraft starts it directly, not through a shell. - **OpenAI-compatible API:** a preset (Ollama `http://localhost:11434/v1`, LM Studio - `http://localhost:1234/v1`, OpenAI) or a custom URL, the model name, and an optional key. + `http://localhost:1234/v1`, OpenAI, Mammouth AI `https://api.mammouth.ai/v1`) or a custom URL, the model name, and an optional key. - **Anthropic-compatible API:** a preset (Anthropic) or a custom URL, for an endpoint that speaks the Anthropic Messages API (`{base}/v1/messages`). This covers Anthropic itself and providers that offer an Anthropic-compatible endpoint, such as DeepSeek and Qwen.