Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const TEMPLATE_LABEL_KEYS: Record<ThirdPartyTemplateId, string> = {
nvidia: 'thirdPartyTemplateNvidia',
minimax: 'thirdPartyTemplateMinimax',
grok: 'thirdPartyTemplateGrok',
atlascloud: 'thirdPartyTemplateAtlascloud',
'custom-openai': 'thirdPartyTemplateCustomOpenai',
'custom-anthropic': 'thirdPartyTemplateCustomAnthropic',
};
Expand Down
1 change: 1 addition & 0 deletions src/components/shared/ModelIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ const THIRD_PARTY_TEMPLATE_LOGO: Record<ThirdPartyTemplateId, string> = {
nvidia: nvidiaCherryUrl,
minimax: minimaxCherryUrl,
grok: grokCherryUrl,
atlascloud: customLogoUrl,
'custom-openai': customLogoUrl,
'custom-anthropic': customLogoUrl,
};
Expand Down
9 changes: 9 additions & 0 deletions src/i18n/translations/settings/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 兼容)',
Expand Down
1 change: 1 addition & 0 deletions src/types/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ export const THIRD_PARTY_TEMPLATE_IDS = [
'nvidia',
'minimax',
'grok',
'atlascloud',
'custom-openai',
'custom-anthropic',
] as const;
Expand Down
32 changes: 32 additions & 0 deletions src/utils/chatApiRoute.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
}),
});
});

});
10 changes: 10 additions & 0 deletions src/utils/thirdPartyApiProviders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export const THIRD_PARTY_TEMPLATE_LABELS: Record<ThirdPartyTemplateId, string> =
nvidia: 'Nvidia',
minimax: 'MiniMax',
grok: 'Grok',
atlascloud: 'Atlas Cloud',
'custom-openai': 'Custom (OpenAI compatible)',
'custom-anthropic': 'Custom (Anthropic)',
};
Expand Down Expand Up @@ -168,6 +169,15 @@ const TEMPLATE_DEFAULTS: Record<ThirdPartyTemplateId, ThirdPartyTemplateDefaults
apiKeyUrl: 'https://console.x.ai',
docUrl: 'https://docs.x.ai',
},
atlascloud: {
name: 'Atlas Cloud',
baseUrl: 'https://api.atlascloud.ai/v1',
modelId: 'deepseek-ai/deepseek-v4-pro',
models: [{ id: 'deepseek-ai/deepseek-v4-pro', name: 'DeepSeek V4 Pro', isPinned: true }],
protocol: 'openai-compatible',
apiKeyUrl: 'https://atlascloud.ai/console/api-keys',
docUrl: 'https://docs.atlascloud.ai',
},
'custom-openai': {
name: 'Custom',
baseUrl: null,
Expand Down