diff --git a/openless-all/app/src-tauri/src/commands/credentials.rs b/openless-all/app/src-tauri/src/commands/credentials.rs index 305b0c91..c3764c9f 100644 --- a/openless-all/app/src-tauri/src/commands/credentials.rs +++ b/openless-all/app/src-tauri/src/commands/credentials.rs @@ -83,6 +83,7 @@ fn llm_provider_default_endpoint(provider: &str) -> Option<&'static str> { "ark" => Some("https://ark.cn-beijing.volces.com/api/v3"), "deepseek" => Some("https://api.deepseek.com/v1"), "siliconflow" => Some("https://api.siliconflow.cn/v1"), + "atlascloud" => Some("https://api.atlascloud.ai/v1"), "openai" => Some("https://api.openai.com/v1"), // 谷歌 Gemini 原生 API(v1beta)。后端 llm_gemini.rs 会拼成 // `{baseUrl}/models/{model}:generateContent`,认证用 x-goog-api-key 头。 diff --git a/openless-all/app/src-tauri/src/commands/mod.rs b/openless-all/app/src-tauri/src/commands/mod.rs index 0c4ea100..6c2cdadf 100644 --- a/openless-all/app/src-tauri/src/commands/mod.rs +++ b/openless-all/app/src-tauri/src/commands/mod.rs @@ -566,6 +566,22 @@ mod tests { )); } + #[test] + fn credentials_status_requires_api_key_for_atlascloud() { + let keyless = CredentialsSnapshot { + ark_endpoint: Some("https://api.atlascloud.ai/v1".into()), + ark_model_id: Some("qwen/qwen3.5-flash".into()), + ..snapshot() + }; + assert!(!llm_configured_for_provider("atlascloud", &keyless)); + + let ready = CredentialsSnapshot { + ark_api_key: Some("key".into()), + ..keyless + }; + assert!(llm_configured_for_provider("atlascloud", &ready)); + } + impl SettingsWriter for FakeSettingsWriter { fn read_settings(&self) -> UserPreferences { self.saved.lock().unwrap().clone().unwrap_or_default() diff --git a/openless-all/app/src/i18n/en.ts b/openless-all/app/src/i18n/en.ts index 6a2a5085..fa991d87 100644 --- a/openless-all/app/src/i18n/en.ts +++ b/openless-all/app/src/i18n/en.ts @@ -773,6 +773,7 @@ export const en: typeof zhCN = { ark: 'ARK (Volcengine Ark)', deepseek: 'DeepSeek', siliconflow: 'SiliconFlow', + atlascloud: 'Atlas Cloud', openai: 'OpenAI', gemini: 'Google Gemini', codexOAuth: 'Codex OAuth', diff --git a/openless-all/app/src/i18n/ja.ts b/openless-all/app/src/i18n/ja.ts index 0347a7c5..5ffe9144 100644 --- a/openless-all/app/src/i18n/ja.ts +++ b/openless-all/app/src/i18n/ja.ts @@ -775,6 +775,7 @@ export const ja: typeof zhCN = { ark: 'ARK(Volcengine Ark)', deepseek: 'DeepSeek', siliconflow: 'SiliconFlow', + atlascloud: 'Atlas Cloud', openai: 'OpenAI', gemini: 'Google Gemini', codexOAuth: 'Codex OAuth', diff --git a/openless-all/app/src/i18n/ko.ts b/openless-all/app/src/i18n/ko.ts index 23aaf5f1..711bf372 100644 --- a/openless-all/app/src/i18n/ko.ts +++ b/openless-all/app/src/i18n/ko.ts @@ -775,6 +775,7 @@ export const ko: typeof zhCN = { ark: 'ARK (Volcengine Ark)', deepseek: 'DeepSeek', siliconflow: 'SiliconFlow', + atlascloud: 'Atlas Cloud', openai: 'OpenAI', gemini: 'Google Gemini', codexOAuth: 'Codex OAuth', diff --git a/openless-all/app/src/i18n/zh-CN.ts b/openless-all/app/src/i18n/zh-CN.ts index 55087fe1..9031a922 100644 --- a/openless-all/app/src/i18n/zh-CN.ts +++ b/openless-all/app/src/i18n/zh-CN.ts @@ -771,6 +771,7 @@ export const zhCN = { ark: 'ARK(火山方舟)', deepseek: 'DeepSeek', siliconflow: '硅基流动', + atlascloud: 'Atlas Cloud', openai: 'OpenAI', gemini: 'Google Gemini', codexOAuth: 'Codex OAuth', diff --git a/openless-all/app/src/i18n/zh-TW.ts b/openless-all/app/src/i18n/zh-TW.ts index 882c4844..13a8e610 100644 --- a/openless-all/app/src/i18n/zh-TW.ts +++ b/openless-all/app/src/i18n/zh-TW.ts @@ -773,6 +773,7 @@ export const zhTW: typeof zhCN = { ark: 'ARK(火山方舟)', deepseek: 'DeepSeek', siliconflow: '硅基流動', + atlascloud: 'Atlas Cloud', openai: 'OpenAI', gemini: 'Google Gemini', codexOAuth: 'Codex OAuth', diff --git a/openless-all/app/src/pages/Overview.tsx b/openless-all/app/src/pages/Overview.tsx index 7aa2784d..4d9b845f 100644 --- a/openless-all/app/src/pages/Overview.tsx +++ b/openless-all/app/src/pages/Overview.tsx @@ -36,6 +36,7 @@ const LLM_NAME_KEY_BY_ID: Record = { ark: 'ark', deepseek: 'deepseek', siliconflow: 'siliconflow', + atlascloud: 'atlascloud', openai: 'openai', codex_oauth: 'codexOAuth', mimo: 'mimo', diff --git a/openless-all/app/src/pages/settings/ProvidersSection.test.ts b/openless-all/app/src/pages/settings/ProvidersSection.test.ts new file mode 100644 index 00000000..b828b1f0 --- /dev/null +++ b/openless-all/app/src/pages/settings/ProvidersSection.test.ts @@ -0,0 +1,15 @@ +import { LLM_PRESETS } from './ProvidersSection'; + +const atlascloudPreset = LLM_PRESETS.find(p => p.id === 'atlascloud'); + +if (!atlascloudPreset) { + throw new Error('Atlas Cloud LLM preset is missing'); +} + +if (atlascloudPreset.baseUrl !== 'https://api.atlascloud.ai/v1') { + throw new Error(`unexpected Atlas Cloud base URL: ${atlascloudPreset.baseUrl}`); +} + +if (atlascloudPreset.modelPlaceholder !== 'qwen/qwen3.5-flash') { + throw new Error(`unexpected Atlas Cloud default model: ${atlascloudPreset.modelPlaceholder}`); +} diff --git a/openless-all/app/src/pages/settings/ProvidersSection.tsx b/openless-all/app/src/pages/settings/ProvidersSection.tsx index db2cc303..59280b2c 100644 --- a/openless-all/app/src/pages/settings/ProvidersSection.tsx +++ b/openless-all/app/src/pages/settings/ProvidersSection.tsx @@ -47,7 +47,7 @@ function LlmThinkingToggle({ enabled, onToggle }: { enabled: boolean; onToggle: ); } -const LLM_PRESETS = [ +export const LLM_PRESETS = [ { id: 'ark', nameKey: 'ark', @@ -66,6 +66,12 @@ const LLM_PRESETS = [ baseUrl: 'https://api.siliconflow.cn/v1', modelPlaceholder: 'Qwen/Qwen2.5-7B-Instruct', }, + { + id: 'atlascloud', + nameKey: 'atlascloud', + baseUrl: 'https://api.atlascloud.ai/v1', + modelPlaceholder: 'qwen/qwen3.5-flash', + }, { id: 'openai', nameKey: 'openai',