fix: stop converting Kimi balance and switch Qwen endpoint to business.aliyuncs.com

This commit is contained in:
JOJO 2026-01-05 14:22:06 +08:00
parent 1cf8bd7014
commit 4cfd0ef090

View File

@ -93,12 +93,10 @@ def fetch_kimi_balance() -> Dict[str, Any]:
cash = float(data.get("cash_balance", 0))
return {
"success": True,
"currency": "USD",
"currency": payload.get("currency") or "CNY",
"available": available,
"available_cny": round(available * USD_CNY_RATE, 2),
"voucher": voucher,
"cash": cash,
"rate": USD_CNY_RATE,
"raw": payload,
}
except Exception as exc: # pragma: no cover
@ -170,7 +168,7 @@ def fetch_qwen_balance() -> Dict[str, Any]:
# 按阿里云规范组装最终查询字符串(不可用 urlencode 的 quote_plus
query = "&".join(f"{_percent_encode(k)}={_percent_encode(v)}" for k, v in params.items())
url = "https://bss.aliyuncs.com/?" + query
url = "https://business.aliyuncs.com/?" + query
payload, err = _http_get(url)
if err: