aixxai 1.7.1 → 1.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aixxai",
3
- "version": "1.7.1",
3
+ "version": "1.7.2",
4
4
  "description": "AIXX CLI - 让你的AI调用万物。One command, every AI model. By AIXX (Wanan Exchange), the verification-first compute exchange. 安装:npx aixxai",
5
5
  "type": "module",
6
6
  "bin": {
@@ -49,28 +49,10 @@ export async function balance(subArgs) {
49
49
  console.log(`使用Key: ${maskKey(apiKey)}`);
50
50
  console.log(`后端地址: ${baseUrl}\n`);
51
51
 
52
- // 0. 优先调 /v1/account(2026-08-28新增,能拿到真实账户余额,包括unlimited token)
53
- try {
54
- const acctResp = await fetch(`${baseUrl}/account`, {
55
- headers: { Authorization: `Bearer ${apiKey}` },
56
- signal: AbortSignal.timeout(FETCH_TIMEOUT),
57
- });
58
- if (acctResp.ok) {
59
- const acct = await acctResp.json();
60
- console.log('────────────────────────────────────');
61
- console.log(`👤 账户:${acct.username || '未知'}`);
62
- console.log(`💰 账户余额:¥${(acct.balance_cny ?? 0).toFixed(2)}($${(acct.balance_usd ?? 0).toFixed(2)})`);
63
- console.log(`📊 已用额度:¥${(acct.used_cny ?? 0).toFixed(2)}`);
64
- if (acct.unlimited_token) console.log(`♾️ Token模式:不限量(按账户余额扣费)`);
65
- console.log('────────────────────────────────────');
66
- console.log(`\n💡 充值入口:${acct.topup_url || baseUrl.replace(/\/v1$/, '') + '/console/topup'}\n`);
67
- return;
68
- }
69
- } catch {
70
- // /v1/account 不可用 → 降级到旧的 billing 接口
71
- }
52
+ // 0. /v1/account 端点已退役(1121千问终检:console/v1/account=404死路,白耗一次请求)
53
+ // 直接走 /dashboard/billing/subscription(1121实测200活)
72
54
 
73
- // 1. 降级:查总额度(subscription)
55
+ // 1. 查总额度(subscription)
74
56
  let hardLimitUsd = 0;
75
57
  try {
76
58
  const resp = await fetch(`${baseUrl}/dashboard/billing/subscription`, {