feat(backend): 内置 Atlas Cloud 模型供应商 - #453
Open
binyangzhu000-sudo wants to merge 1 commit into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
Atlas Cloud 是 OpenAI 兼容的推理平台(DeepSeek、GLM、Kimi、Qwen、MiniMax)。本仓的
GPTFactory走的是通用的
OpenAICompatibleProvider,所以不需要新增任何代码——在backend/app/db/builtin_providers.json里加一条内置项,seed_default_providers()启动时写入数据库,用户就不用自己手填
base_url了。改动只有 +9 行、1 个文件,且只落在
backend一个工作区(遵循 CONTRIBUTING 里「单 PR 不要跨多个工作区」的要求)。
两点值得说明
1.
logo用"custom"而不是"AtlasCloud"@lobehub/icons里没有 Atlas Cloud 的图标。看了components/Form/modelForm/Icons/index.tsx的实现:未匹配的名字会回退到自定义占位图,而且只有
name !== 'custom'时才console.warn。所以直接写"custom"走的就是这条已支持的路径,不会在用户控制台刷警告。
2.
models里的 5 个 ID 是按本仓的连通性测试形状实测过的不是从文档抄的清单——用
OpenAICompatibleProvider.test_connection的同款请求(
chat.completions.create+max_tokens=1+temperature=0)逐个验证,全部返回成功:deepseek-ai/deepseek-v4-prodeepseek-ai/DeepSeek-V3.1zai-org/glm-5moonshotai/kimi-k2.6qwen/qwen3.5-397b-a17b也就是说用户在设置里点「测试连接」时走的是同一条路径,不会出现列表里有、实际连不通的情况。
JSON 缩进沿用了原文件的风格(包括
groq那处已有的缩进),没有做无关的格式化。🤝 合作 & 联系
这个 PR 来自 Atlas Cloud 团队。除了上面的集成,我们很乐意和 BiliNote 探讨更深入的合作 —— 比如联合营销(co-marketing),或互相做 featured integration 推荐。
如果有兴趣,欢迎随时联系:
当然,也很乐意按你们项目的规范调整这个 PR —— 留个 comment 就行。🙌