From 8ca45c79dc3406dabe4ee8c26d902455ffa838a5 Mon Sep 17 00:00:00 2001 From: binyangzhu000-sudo <224954946+binyangzhu000-sudo@users.noreply.github.com> Date: Sun, 6 Sep 2026 02:32:52 +0800 Subject: [PATCH] =?UTF-8?q?feat(backend):=20=E5=86=85=E7=BD=AE=20Atlas=20C?= =?UTF-8?q?loud=20=E6=A8=A1=E5=9E=8B=E4=BE=9B=E5=BA=94=E5=95=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Atlas Cloud 是 OpenAI 兼容的推理平台(DeepSeek、GLM、Kimi、Qwen、MiniMax), 在 builtin_providers.json 里加一条内置项即可,seed_default_providers() 启动时 写入数据库,用户不用手填 base_url。 GPTFactory 走的是通用的 OpenAICompatibleProvider,所以没有新增代码。 两点说明: - logo 用 "custom":@lobehub/icons 里没有 Atlas Cloud 的图标,而 components/Form/modelForm/Icons/index.tsx 对未匹配的名字会回退到自定义占位图, 且只有 name !== 'custom' 时才打 console.warn。直接写 "custom" 走的就是这条 已支持的路径,不会在控制台刷警告。 - models 里 5 个 ID 都按 OpenAICompatibleProvider.test_connection 的形状实测过 (chat.completions.create + max_tokens=1 + temperature=0),全部返回成功: deepseek-v4-pro、DeepSeek-V3.1、glm-5、kimi-k2.6、qwen3.5-397b-a17b。 改动只落在 backend 一个工作区,JSON 缩进沿用原文件风格,未做无关格式化。 Signed-off-by: binyangzhu000-sudo <224954946+binyangzhu000-sudo@users.noreply.github.com> --- backend/app/db/builtin_providers.json | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/backend/app/db/builtin_providers.json b/backend/app/db/builtin_providers.json index c111d2ef3..0941360fd 100644 --- a/backend/app/db/builtin_providers.json +++ b/backend/app/db/builtin_providers.json @@ -40,6 +40,15 @@ "logo": "Gemini", "api_key": "", "base_url": "https://generativelanguage.googleapis.com/v1beta/openai/" + }, + { + "id": "atlascloud", + "name": "Atlas Cloud", + "type": "built-in", + "logo": "custom", + "api_key": "", + "base_url": "https://api.atlascloud.ai/v1", + "models": ["deepseek-ai/deepseek-v4-pro", "deepseek-ai/DeepSeek-V3.1", "zai-org/glm-5", "moonshotai/kimi-k2.6", "qwen/qwen3.5-397b-a17b"] }, { "id": "groq",