fix(ai): DeepSeek 余额按官方 balance_infos 解析

/user/balance 返回的是 {is_available, balance_infos[]},没有顶层 data,
旧实现永远解析出 None,连接测试会显示「余额 None CNY」。同时补全
TotHost 预设平台,新环境初始化后即可直接配 whmcs-panel。
This commit is contained in:
gouki
2026-10-26 08:43:54 +00:00
parent abd2fa8206
commit 9aa1ca431e
4 changed files with 48 additions and 6 deletions
+4
View File
@@ -35,6 +35,10 @@ PRESET_PROVIDERS = [
{"slug": "linode", "name": "Linode", "name_en": "Akamai Linode", "category": "vps",
"services": "vps,domain,dns",
"website": "https://linode.com", "console_url": "https://cloud.linode.com", "sdk_type": "linode-api"},
# WHMCS 面板类平台没有开放 API,通过账号关联的登录凭据进入客户区只读核对。
{"slug": "tothost", "name": "TotHost", "name_en": "TotHost", "category": "vps",
"services": "vps",
"website": "https://www.tothost.vn", "console_url": "https://billing.tothost.vn/clientarea.php", "sdk_type": "whmcs-panel"},
# 以下平台暂无适配器:sdk_type 必须留空。
# 填了不存在的 sdk_type 会让平台卡片显示「API 对接: xxx」,用户建账号点同步才撞
# 「暂不支持的 SDK 类型」——声明支持却不支持,比明说不支持更糟。