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
3 changes: 2 additions & 1 deletion src/renderer/src/components/brand/ProviderIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import routinUrl from '../../../../../resources/images/routin-ai.webp'

import ai302 from '@lobehub/icons-static-svg/icons/ai302.svg?raw'
import aihubmix from '@lobehub/icons-static-svg/icons/aihubmix.svg?raw'
import atlascloud from '@lobehub/icons-static-svg/icons/atlascloud.svg?raw'
import anthropic from '@lobehub/icons-static-svg/icons/anthropic.svg?raw'
import azure from '@lobehub/icons-static-svg/icons/azure.svg?raw'
import baichuan from '@lobehub/icons-static-svg/icons/baichuan.svg?raw'
Expand Down Expand Up @@ -99,7 +100,7 @@ const RASTER: Record<RasterBrand, string> = { routin: routinUrl }
* 而不是运行时的一个空图标。
*/
const MARK: Record<Exclude<Brand, RasterBrand>, string> = {
ai302, aihubmix, anthropic, azure, baichuan, baiducloud, bailian, bedrock,
ai302, aihubmix, anthropic, atlascloud, azure, baichuan, baiducloud, bailian, bedrock,
claude, cohere, deepinfra, deepseek, doubao, fireworks, gemini, groq,
hunyuan, kimi, lmstudio, menlo, meta, minimax, mistral, moonshot, ollama,
openai, opencode, openrouter, perplexity, qwen, sensenova, siliconcloud,
Expand Down
2 changes: 2 additions & 0 deletions src/renderer/src/components/brand/__tests__/brands.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ const SAMPLES: readonly (readonly [string, Brand])[] = [
['Azure', 'azure'],
['302.AI', 'ai302'],
['AiHubMix', 'aihubmix'],
['Atlas Cloud', 'atlascloud'],
['atlascloud', 'atlascloud'],
['百度千帆', 'baiducloud'],
['阿里百炼', 'bailian'],
['command-r-plus', 'cohere'],
Expand Down
2 changes: 2 additions & 0 deletions src/renderer/src/components/brand/brands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export const BRANDS = [
'ai302',
'aihubmix',
'anthropic',
'atlascloud',
'azure',
'baichuan',
'baiducloud',
Expand Down Expand Up @@ -163,6 +164,7 @@ const RULES: readonly (readonly [RegExp, Brand | null])[] = [
// 因为它就是一家聚合商。
[/\broutin[\s_-]*ai\b|^routin(-plan)?$/i, 'routin'],
[/aihubmix/i, 'aihubmix'],
[/atlas[\s_-]*cloud/i, 'atlascloud'],
[/\b302\.?ai\b/i, 'ai302'],
[/groq/i, 'groq'],
[/together/i, 'together'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ const EXPECTED: Readonly<Record<string, Brand | null>> = {
requesty: null,
opper: null,
'api-route': null,
atlascloud: 'atlascloud',
siliconflow: 'siliconcloud',
'siliconflow-intl': 'siliconcloud',
together: 'together',
Expand Down
5 changes: 3 additions & 2 deletions src/shared/domain/__tests__/presets.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ describe('预设表 × joinUpstreamUrl:拼出来的 URL 没有畸形', () => {
['fireworks', 'anthropic', 'https://api.fireworks.ai/inference/v1/messages'],
['openrouter', 'anthropic', 'https://openrouter.ai/api/v1/messages'],
['requesty', 'anthropic', 'https://router.requesty.ai/v1/messages'],
['atlascloud', 'anthropic', 'https://api.atlascloud.ai/v1/messages'],
['opper', 'openai-chat', 'https://api.opper.ai/v3/compat/chat/completions'],
['opper', 'anthropic', 'https://api.opper.ai/v3/compat/v1/messages'],
['kimi-coding', 'anthropic', 'https://api.kimi.com/coding/v1/messages'],
Expand Down Expand Up @@ -347,12 +348,12 @@ describe('预设表 · 模型列表', () => {
})
})

it('实测免鉴权的那五家标了 modelListPublic', () => {
it('实测免鉴权的那六家标了 modelListPublic', () => {
const publics = PROVIDER_PRESETS.filter((p) =>
p.endpoints.some((e) => e.modelListPublic === true)
).map((p) => p.id)
expect(new Set(publics)).toEqual(
new Set(['openrouter', 'requesty', 'deepinfra', 'opencode-go', 'ollama-cloud'])
new Set(['openrouter', 'requesty', 'atlascloud', 'deepinfra', 'opencode-go', 'ollama-cloud'])
)
})
})
Expand Down
2 changes: 1 addition & 1 deletion src/shared/domain/baseurl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export function joinUpstreamUrl(baseUrl: string, path: string): string {
*
* | 形状 | 厂商 |
* |---|---|
* | `/v1` | OpenAI、Moonshot、MiniMax、混元、StepFun、百川、Mistral、xAI、Together、硅基流动、Requesty |
* | `/v1` | OpenAI、Moonshot、MiniMax、混元、StepFun、百川、Mistral、xAI、Together、硅基流动、Requesty、Atlas Cloud |
* | 别的前缀 | Groq `/openai/v1`、Fireworks `/inference/v1`、**DeepInfra `/v1/openai`**、OpenRouter `/api/v1`、**智谱 `/api/paas/v4`**、**火山 `/api/v3`**、百炼 `/compatible-mode/v1`、**千帆 `/v2`**、Cohere `/compatibility/v1`、Opper `/v3/compat` |
* | 尾斜杠 | **Gemini `/v1beta/openai/`** |
*
Expand Down
18 changes: 18 additions & 0 deletions src/shared/domain/presets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -930,6 +930,24 @@ export const PROVIDER_PRESETS: readonly ProviderPreset[] = [
'使用模型列表返回的完整 ID(如 gpt-6.1-sol),无需添加厂商前缀。',
verification: 'probed'
},
{
id: 'atlascloud',
name: 'Atlas Cloud',
category: 'aggregator',
endpoints: [
oa('https://api.atlascloud.ai/v1', true, true),
resp('https://api.atlascloud.ai/v1', true),
anth('https://api.atlascloud.ai')
],
docsUrl: 'https://www.atlascloud.ai/docs',
apiKeyUrl: 'https://console.atlascloud.ai/api-keys',
suggestedModels: ['deepseek-ai/deepseek-v4-flash', 'moonshotai/kimi-k3', 'zai-org/glm-5.2'],
notes:
'模型 ID 带厂商前缀(如 deepseek-ai/deepseek-v4-flash),请使用模型列表返回的完整 ID。' +
'模型列表免鉴权就能拉,没填 key 也能先看有哪些模型(因此列表能拉到不代表 key 有效)。' +
'同一个 key 也可走 OpenAI Responses 与 Anthropic 协议。',
verification: 'documented'
},
{
id: 'siliconflow',
name: '硅基流动(国内)',
Expand Down
Loading