diff --git a/src/components/settings/sections/api-config/ThirdPartyAddConnectionDialog.tsx b/src/components/settings/sections/api-config/ThirdPartyAddConnectionDialog.tsx index 6e3e6db5..5f522482 100644 --- a/src/components/settings/sections/api-config/ThirdPartyAddConnectionDialog.tsx +++ b/src/components/settings/sections/api-config/ThirdPartyAddConnectionDialog.tsx @@ -15,6 +15,7 @@ const TEMPLATE_LABEL_KEYS: Record = { nvidia: 'thirdPartyTemplateNvidia', minimax: 'thirdPartyTemplateMinimax', grok: 'thirdPartyTemplateGrok', + atlascloud: 'thirdPartyTemplateAtlascloud', 'custom-openai': 'thirdPartyTemplateCustomOpenai', 'custom-anthropic': 'thirdPartyTemplateCustomAnthropic', }; diff --git a/src/components/shared/ModelIcon.tsx b/src/components/shared/ModelIcon.tsx index 3b8cfa04..6aefd0c1 100644 --- a/src/components/shared/ModelIcon.tsx +++ b/src/components/shared/ModelIcon.tsx @@ -163,6 +163,7 @@ const THIRD_PARTY_TEMPLATE_LOGO: Record = { nvidia: nvidiaCherryUrl, minimax: minimaxCherryUrl, grok: grokCherryUrl, + atlascloud: customLogoUrl, 'custom-openai': customLogoUrl, 'custom-anthropic': customLogoUrl, }; diff --git a/src/i18n/translations/settings/api.ts b/src/i18n/translations/settings/api.ts index e108a6bb..c0afcd30 100644 --- a/src/i18n/translations/settings/api.ts +++ b/src/i18n/translations/settings/api.ts @@ -799,6 +799,15 @@ const apiSettings = { de: 'MiniMax', }, thirdPartyTemplateGrok: { en: 'Grok', zh: 'Grok', ja: 'Grok', ko: 'Grok', es: 'Grok', fr: 'Grok', de: 'Grok' }, + thirdPartyTemplateAtlascloud: { + en: 'Atlas Cloud', + zh: 'Atlas Cloud', + ja: 'Atlas Cloud', + ko: 'Atlas Cloud', + es: 'Atlas Cloud', + fr: 'Atlas Cloud', + de: 'Atlas Cloud', + }, thirdPartyTemplateCustomOpenai: { en: 'Custom (OpenAI compatible)', zh: '自定义(OpenAI 兼容)', diff --git a/src/types/settings.ts b/src/types/settings.ts index 5a6cf51e..769617e4 100644 --- a/src/types/settings.ts +++ b/src/types/settings.ts @@ -100,6 +100,7 @@ export const THIRD_PARTY_TEMPLATE_IDS = [ 'nvidia', 'minimax', 'grok', + 'atlascloud', 'custom-openai', 'custom-anthropic', ] as const; diff --git a/src/utils/chatApiRoute.test.ts b/src/utils/chatApiRoute.test.ts index 66f3a8f3..5aaf5e1d 100644 --- a/src/utils/chatApiRoute.test.ts +++ b/src/utils/chatApiRoute.test.ts @@ -197,4 +197,36 @@ describe('resolveChatApiRoute', () => { { apiMode: 'third-party', providerId: 'kimi', provider: expect.objectContaining({ apiKey: 'kimi-key' }) }, ); }); + + it('routes the built-in Atlas Cloud template through the OpenAI-compatible path', () => { + const atlasApp = createAppSettings({ + thirdPartyApi: { + connections: [ + createThirdPartyConnection({ + id: 'atlascloud', + templateId: 'atlascloud', + apiKey: 'atlascloud-key', + enabled: true, + }), + ], + }, + }); + + expect( + resolveChatApiRoute( + atlasApp, + createChatSettings({ modelId: 'deepseek-ai/deepseek-v4-pro', providerId: 'atlascloud' }), + ), + ).toMatchObject({ + apiMode: 'third-party', + modelId: 'deepseek-ai/deepseek-v4-pro', + providerId: 'atlascloud', + provider: expect.objectContaining({ + apiKey: 'atlascloud-key', + baseUrl: 'https://api.atlascloud.ai/v1', + protocol: 'openai-compatible', + }), + }); + }); + }); diff --git a/src/utils/thirdPartyApiProviders.ts b/src/utils/thirdPartyApiProviders.ts index c0da7a6a..621ad978 100644 --- a/src/utils/thirdPartyApiProviders.ts +++ b/src/utils/thirdPartyApiProviders.ts @@ -35,6 +35,7 @@ export const THIRD_PARTY_TEMPLATE_LABELS: Record = nvidia: 'Nvidia', minimax: 'MiniMax', grok: 'Grok', + atlascloud: 'Atlas Cloud', 'custom-openai': 'Custom (OpenAI compatible)', 'custom-anthropic': 'Custom (Anthropic)', }; @@ -168,6 +169,15 @@ const TEMPLATE_DEFAULTS: Record