diff --git a/backend/tests/test_supplier_config.py b/backend/tests/test_supplier_config.py index 0e2692cc7..6d9f67fc9 100644 --- a/backend/tests/test_supplier_config.py +++ b/backend/tests/test_supplier_config.py @@ -197,6 +197,49 @@ def test_icon_not_empty(self): self.assertGreater(size, 100, "Icon file should be reasonably sized") +class TestAtlasCloudSupplierConfig(unittest.TestCase): + """Test the Atlas Cloud supplier entry, icon and i18n entries.""" + + LOCALES = ["en", "zh-CN", "zh-TW", "ko-KR", "th-TH"] + + def setUp(self): + supplier_path = os.path.join( + PROJECT_ROOT, "frontend", "src", "entity", "supplier.ts" + ) + with open(supplier_path, encoding="utf-8") as f: + self.supplier_content = f.read() + section = self.supplier_content.split("id: 16,", 1)[1] + self.section = section.split("/* {", 1)[0] + + def test_entry(self): + self.assertEqual(self.supplier_content.count("id: 16"), 1) + self.assertIn("name: 'Atlas Cloud'", self.section) + self.assertIn("i18nKey: 'supplier.atlascloud'", self.section) + self.assertIn("icon: icon_atlascloud_colorful", self.section) + self.assertIn("api_domain: 'https://api.atlascloud.ai/v1'", self.section) + + def test_uses_openai_protocol(self): + self.assertNotIn("type: 'vllm'", self.section) + self.assertNotIn("type: 'azure'", self.section) + + def test_icon_file_is_png(self): + icon_path = os.path.join( + PROJECT_ROOT, "frontend", "src", "assets", "model", + "icon_atlascloud_colorful.png", + ) + with open(icon_path, "rb") as f: + self.assertEqual(f.read(8), b"\x89PNG\r\n\x1a\n") + + def test_i18n_in_all_locales(self): + for locale in self.LOCALES: + path = os.path.join( + PROJECT_ROOT, "frontend", "src", "i18n", f"{locale}.json" + ) + with open(path, encoding="utf-8") as f: + data = json.load(f) + self.assertEqual(data["supplier"]["atlascloud"], "Atlas Cloud", locale) + + class TestModelFactoryConfig(unittest.TestCase): """Test that backend model_factory.py can support MiniMax via OpenAI protocol.""" diff --git a/docs/README.en.md b/docs/README.en.md index 02aacf3c5..569499b89 100644 --- a/docs/README.en.md +++ b/docs/README.en.md @@ -45,6 +45,7 @@ SQLBot is an intelligent data query system based on large language models and RA | Tencent Cloud | OpenAI Compatible | | Volcano Engine | OpenAI Compatible | | MiniMax | OpenAI Compatible | +| Atlas Cloud | OpenAI Compatible | | Generic OpenAI Compatible | Custom | ## Quick Start diff --git a/frontend/src/assets/model/icon_atlascloud_colorful.png b/frontend/src/assets/model/icon_atlascloud_colorful.png new file mode 100644 index 000000000..3086d3afc Binary files /dev/null and b/frontend/src/assets/model/icon_atlascloud_colorful.png differ diff --git a/frontend/src/entity/supplier.ts b/frontend/src/entity/supplier.ts index b2a6d3ab6..ab3e9d793 100644 --- a/frontend/src/entity/supplier.ts +++ b/frontend/src/entity/supplier.ts @@ -11,6 +11,7 @@ import icon_hsyq_colorful from '@/assets/model/icon_hsyq_colorful.png' // import icon_vllm_colorful from '@/assets/model/icon_vllm_colorful.png' import icon_common_openai from '@/assets/model/icon_common_openai.png' import icon_minimax_colorful from '@/assets/model/icon_minimax_colorful.png' +import icon_atlascloud_colorful from '@/assets/model/icon_atlascloud_colorful.png' // import icon_azure_openAI_colorful from '@/assets/model/icon_Azure_OpenAI_colorful.png' type ModelArg = { key: string; val?: string | number; type: string; range?: string } @@ -337,6 +338,25 @@ export const supplierList: Array<{ }, }, }, */ + { + id: 16, + name: 'Atlas Cloud', + i18nKey: 'supplier.atlascloud', + icon: icon_atlascloud_colorful, + model_config: { + 0: { + api_domain: 'https://api.atlascloud.ai/v1', + common_args: [{ key: 'temperature', val: 0.7, type: 'number', range: '[0, 2]' }], + model_options: [ + { name: 'deepseek-ai/deepseek-v4-flash' }, + { name: 'moonshotai/kimi-k3' }, + { name: 'zai-org/glm-5.2' }, + { name: 'qwen/qwen3.6-plus' }, + { name: 'minimaxai/minimax-m3' }, + ], + }, + }, + }, { id: 15, name: '通用OpenAI', diff --git a/frontend/src/i18n/en.json b/frontend/src/i18n/en.json index c9ffcf5e3..46eacc0aa 100644 --- a/frontend/src/i18n/en.json +++ b/frontend/src/i18n/en.json @@ -1009,6 +1009,7 @@ "tencent_cloud": "Tencent Cloud", "volcano_engine": "Volcano Engine", "minimax": "MiniMax", + "atlascloud": "Atlas Cloud", "generic_openai": "Generic OpenAI" }, "modelType": { diff --git a/frontend/src/i18n/ko-KR.json b/frontend/src/i18n/ko-KR.json index e00ef3b87..73ec1066f 100644 --- a/frontend/src/i18n/ko-KR.json +++ b/frontend/src/i18n/ko-KR.json @@ -1009,6 +1009,7 @@ "tencent_cloud": "텐센트 클라우드", "volcano_engine": "볼케이노 엔진", "minimax": "MiniMax", + "atlascloud": "Atlas Cloud", "generic_openai": "범용 OpenAI" }, "modelType": { diff --git a/frontend/src/i18n/th-TH.json b/frontend/src/i18n/th-TH.json index 3743b4c28..d4b54d950 100644 --- a/frontend/src/i18n/th-TH.json +++ b/frontend/src/i18n/th-TH.json @@ -1009,6 +1009,7 @@ "tencent_cloud": "Tencent Cloud", "volcano_engine": "Volcano Engine", "minimax": "MiniMax", + "atlascloud": "Atlas Cloud", "generic_openai": "OpenAI แบบทั่วไป" }, "modelType": { diff --git a/frontend/src/i18n/zh-CN.json b/frontend/src/i18n/zh-CN.json index 8aff119d9..0ae7a792f 100644 --- a/frontend/src/i18n/zh-CN.json +++ b/frontend/src/i18n/zh-CN.json @@ -1009,6 +1009,7 @@ "tencent_cloud": "腾讯云", "volcano_engine": "火山引擎", "minimax": "MiniMax", + "atlascloud": "Atlas Cloud", "generic_openai": "通用OpenAI" }, "modelType": { diff --git a/frontend/src/i18n/zh-TW.json b/frontend/src/i18n/zh-TW.json index 41b93e23a..9ae79a536 100644 --- a/frontend/src/i18n/zh-TW.json +++ b/frontend/src/i18n/zh-TW.json @@ -1009,6 +1009,7 @@ "tencent_cloud": "騰訊雲", "volcano_engine": "火山引擎", "minimax": "MiniMax", + "atlascloud": "Atlas Cloud", "generic_openai": "通用OpenAI" }, "modelType": {