fix: stop converting Kimi balance and switch Qwen endpoint to business.aliyuncs.com
This commit is contained in:
parent
1cf8bd7014
commit
4cfd0ef090
@ -93,12 +93,10 @@ def fetch_kimi_balance() -> Dict[str, Any]:
|
|||||||
cash = float(data.get("cash_balance", 0))
|
cash = float(data.get("cash_balance", 0))
|
||||||
return {
|
return {
|
||||||
"success": True,
|
"success": True,
|
||||||
"currency": "USD",
|
"currency": payload.get("currency") or "CNY",
|
||||||
"available": available,
|
"available": available,
|
||||||
"available_cny": round(available * USD_CNY_RATE, 2),
|
|
||||||
"voucher": voucher,
|
"voucher": voucher,
|
||||||
"cash": cash,
|
"cash": cash,
|
||||||
"rate": USD_CNY_RATE,
|
|
||||||
"raw": payload,
|
"raw": payload,
|
||||||
}
|
}
|
||||||
except Exception as exc: # pragma: no cover
|
except Exception as exc: # pragma: no cover
|
||||||
@ -170,7 +168,7 @@ def fetch_qwen_balance() -> Dict[str, Any]:
|
|||||||
|
|
||||||
# 按阿里云规范组装最终查询字符串(不可用 urlencode 的 quote_plus)
|
# 按阿里云规范组装最终查询字符串(不可用 urlencode 的 quote_plus)
|
||||||
query = "&".join(f"{_percent_encode(k)}={_percent_encode(v)}" for k, v in params.items())
|
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)
|
payload, err = _http_get(url)
|
||||||
if err:
|
if err:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user