Skip to content
Open
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
43 changes: 43 additions & 0 deletions backend/tests/test_supplier_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""

Expand Down
1 change: 1 addition & 0 deletions docs/README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions frontend/src/entity/supplier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down Expand Up @@ -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',
Expand Down
1 change: 1 addition & 0 deletions frontend/src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1009,6 +1009,7 @@
"tencent_cloud": "Tencent Cloud",
"volcano_engine": "Volcano Engine",
"minimax": "MiniMax",
"atlascloud": "Atlas Cloud",
"generic_openai": "Generic OpenAI"
},
"modelType": {
Expand Down
1 change: 1 addition & 0 deletions frontend/src/i18n/ko-KR.json
Original file line number Diff line number Diff line change
Expand Up @@ -1009,6 +1009,7 @@
"tencent_cloud": "텐센트 클라우드",
"volcano_engine": "볼케이노 엔진",
"minimax": "MiniMax",
"atlascloud": "Atlas Cloud",
"generic_openai": "범용 OpenAI"
},
"modelType": {
Expand Down
1 change: 1 addition & 0 deletions frontend/src/i18n/th-TH.json
Original file line number Diff line number Diff line change
Expand Up @@ -1009,6 +1009,7 @@
"tencent_cloud": "Tencent Cloud",
"volcano_engine": "Volcano Engine",
"minimax": "MiniMax",
"atlascloud": "Atlas Cloud",
"generic_openai": "OpenAI แบบทั่วไป"
},
"modelType": {
Expand Down
1 change: 1 addition & 0 deletions frontend/src/i18n/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -1009,6 +1009,7 @@
"tencent_cloud": "腾讯云",
"volcano_engine": "火山引擎",
"minimax": "MiniMax",
"atlascloud": "Atlas Cloud",
"generic_openai": "通用OpenAI"
},
"modelType": {
Expand Down
1 change: 1 addition & 0 deletions frontend/src/i18n/zh-TW.json
Original file line number Diff line number Diff line change
Expand Up @@ -1009,6 +1009,7 @@
"tencent_cloud": "騰訊雲",
"volcano_engine": "火山引擎",
"minimax": "MiniMax",
"atlascloud": "Atlas Cloud",
"generic_openai": "通用OpenAI"
},
"modelType": {
Expand Down