Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions openless-all/app/src-tauri/src/commands/credentials.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 头。
Expand Down
16 changes: 16 additions & 0 deletions openless-all/app/src-tauri/src/commands/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
1 change: 1 addition & 0 deletions openless-all/app/src/i18n/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
1 change: 1 addition & 0 deletions openless-all/app/src/i18n/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
1 change: 1 addition & 0 deletions openless-all/app/src/i18n/ko.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
1 change: 1 addition & 0 deletions openless-all/app/src/i18n/zh-CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -771,6 +771,7 @@ export const zhCN = {
ark: 'ARK(火山方舟)',
deepseek: 'DeepSeek',
siliconflow: '硅基流动',
atlascloud: 'Atlas Cloud',
openai: 'OpenAI',
gemini: 'Google Gemini',
codexOAuth: 'Codex OAuth',
Expand Down
1 change: 1 addition & 0 deletions openless-all/app/src/i18n/zh-TW.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
1 change: 1 addition & 0 deletions openless-all/app/src/pages/Overview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const LLM_NAME_KEY_BY_ID: Record<string, string> = {
ark: 'ark',
deepseek: 'deepseek',
siliconflow: 'siliconflow',
atlascloud: 'atlascloud',
openai: 'openai',
codex_oauth: 'codexOAuth',
mimo: 'mimo',
Expand Down
15 changes: 15 additions & 0 deletions openless-all/app/src/pages/settings/ProvidersSection.test.ts
Original file line number Diff line number Diff line change
@@ -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}`);
}
8 changes: 7 additions & 1 deletion openless-all/app/src/pages/settings/ProvidersSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function LlmThinkingToggle({ enabled, onToggle }: { enabled: boolean; onToggle:
);
}

const LLM_PRESETS = [
export const LLM_PRESETS = [
{
id: 'ark',
nameKey: 'ark',
Expand All @@ -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',
Expand Down