From 623ec8e0dfac81df63b06d59551542d9aeabf8e8 Mon Sep 17 00:00:00 2001 From: binyangzhu000-sudo <224954946+binyangzhu000-sudo@users.noreply.github.com> Date: Mon, 2 Nov 2026 11:06:58 +0800 Subject: [PATCH] feat(llm): add Atlas Cloud as an OpenAI-compatible LLM provider Atlas Cloud is an OpenAI-compatible multi-model gateway (https://api.atlascloud.ai/v1). Add it as a named LLM entry, wired the same way as other type: openai entries such as VolcesAiGatewayLLM: - xiaozhi-server/config.yaml: new LLM.AtlasCloudLLM template - manager-api: Liquibase changelog inserting the LLM_AtlasCloudLLM ai_model_config row so it appears in the console model list - README: list Atlas Cloud under supported OpenAI-style LLM platforms Co-Authored-By: Claude Sonnet 5.5 Signed-off-by: binyangzhu000-sudo <224954946+binyangzhu000-sudo@users.noreply.github.com> --- README.md | 2 +- .../src/main/resources/db/changelog/202611021000.sql | 8 ++++++++ .../main/resources/db/changelog/db.changelog-master.yaml | 7 +++++++ main/xiaozhi-server/config.yaml | 9 +++++++++ 4 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 main/manager-api/src/main/resources/db/changelog/202611021000.sql diff --git a/README.md b/README.md index e459f92ab..a4ec6469c 100644 --- a/README.md +++ b/README.md @@ -256,7 +256,7 @@ Websocket接口地址: wss://2662r3426b.vicp.fun/xiaozhi/v1/ | 使用方式 | 支持平台 | 免费平台 | |:---:|:---:|:---:| -| OpenAI 接口调用 | 阿里百炼、火山引擎、DeepSeek、智谱、Gemini、科大讯飞、LM Studio | 智谱、Gemini | +| OpenAI 接口调用 | 阿里百炼、火山引擎、DeepSeek、智谱、Gemini、科大讯飞、LM Studio、Atlas Cloud | 智谱、Gemini | | ollama 接口调用 | Ollama | - | | dify 接口调用 | Dify | - | | fastgpt 接口调用 | Fastgpt | - | diff --git a/main/manager-api/src/main/resources/db/changelog/202611021000.sql b/main/manager-api/src/main/resources/db/changelog/202611021000.sql new file mode 100644 index 000000000..9f4ec4316 --- /dev/null +++ b/main/manager-api/src/main/resources/db/changelog/202611021000.sql @@ -0,0 +1,8 @@ +-- 新增 Atlas Cloud(OpenAI 兼容网关)LLM 配置 +delete from `ai_model_config` where id = 'LLM_AtlasCloudLLM'; +INSERT INTO `ai_model_config` VALUES ('LLM_AtlasCloudLLM', 'LLM', 'AtlasCloudLLM', 'Atlas Cloud', 0, 1, '{"type": "openai", "base_url": "https://api.atlascloud.ai/v1", "model_name": "deepseek-ai/deepseek-v4-flash", "api_key": "你的api_key"}', 'https://www.atlascloud.ai/docs', 'Atlas Cloud 配置说明: +1. Atlas Cloud 是 OpenAI 兼容的多模型 API 网关 +2. 在 https://console.atlascloud.ai/api-keys 获取 API Key +3. 可用模型列表见 https://api.atlascloud.ai/v1/models ,model_name 形如 deepseek-ai/deepseek-v4-flash +4. 填入 api_key 后保存即可使用 +', 15, NULL, NULL, NULL, NULL); diff --git a/main/manager-api/src/main/resources/db/changelog/db.changelog-master.yaml b/main/manager-api/src/main/resources/db/changelog/db.changelog-master.yaml index 1b2eb615a..9bdb01582 100644 --- a/main/manager-api/src/main/resources/db/changelog/db.changelog-master.yaml +++ b/main/manager-api/src/main/resources/db/changelog/db.changelog-master.yaml @@ -760,3 +760,10 @@ databaseChangeLog: - sqlFile: encoding: utf8 path: classpath:db/changelog/202610302051.sql + - changeSet: + id: 202611021000 + author: binyangzhu000-sudo + changes: + - sqlFile: + encoding: utf8 + path: classpath:db/changelog/202611021000.sql diff --git a/main/xiaozhi-server/config.yaml b/main/xiaozhi-server/config.yaml index 2ba213e14..08815d1b1 100644 --- a/main/xiaozhi-server/config.yaml +++ b/main/xiaozhi-server/config.yaml @@ -707,6 +707,15 @@ LLM: base_url: https://ai-gateway.vei.volces.com/v1 model_name: doubao-pro-32k-functioncall api_key: 你的网关访问密钥 + AtlasCloudLLM: + # Atlas Cloud - OpenAI 兼容的多模型 API 网关 + # 定义LLM API类型 + type: openai + # 可在这里找到你的api key https://console.atlascloud.ai/api-keys + # 可用模型列表:https://api.atlascloud.ai/v1/models ,文档:https://www.atlascloud.ai/docs + base_url: https://api.atlascloud.ai/v1 + model_name: deepseek-ai/deepseek-v4-flash + api_key: 你的atlascloud api key LMStudioLLM: # 定义LLM API类型 type: openai