From 4b2d92c033ee114325733cf1fafd68b30005c904 Mon Sep 17 00:00:00 2001 From: nb213 Date: Wed, 22 Jul 2026 01:10:58 +0800 Subject: [PATCH] fix(api): classify Atlas Cloud as inference provider (#4885) Co-authored-by: binyangzhu000-sudo <224954946+binyangzhu000-sudo@users.noreply.github.com> Co-authored-by: Steven Enamakel --- src/api/config.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/api/config.rs b/src/api/config.rs index 29b96b4a0..6d1748351 100644 --- a/src/api/config.rs +++ b/src/api/config.rs @@ -311,6 +311,7 @@ pub fn looks_like_local_ai_endpoint(url: &str) -> bool { const INFERENCE_PROVIDER_DOMAINS: &[&str] = &[ "openrouter.ai", "openmodel.ai", + "atlascloud.ai", "openai.com", "anthropic.com", "groq.com", @@ -1189,6 +1190,7 @@ mod tests { let falls_back: &[&str] = &[ "https://openrouter.ai/api/v1", + "https://api.atlascloud.ai/v1", "https://api.openai.com/v1", "https://api.groq.com/openai/v1", "https://generativelanguage.googleapis.com/v1beta/openai", @@ -1258,6 +1260,9 @@ mod tests { assert!(looks_like_inference_provider_endpoint( "https://api.openmodel.ai/v1" )); + assert!(looks_like_inference_provider_endpoint( + "https://api.atlascloud.ai/v1" + )); // Other managed providers, apex and subdomain. assert!(looks_like_inference_provider_endpoint( "https://api.openai.com/v1" @@ -1317,6 +1322,10 @@ mod tests { effective_backend_api_url(&Some("https://api.openmodel.ai/v1".to_string())), expected ); + assert_eq!( + effective_backend_api_url(&Some("https://api.atlascloud.ai/v1".to_string())), + expected + ); } #[test]