aixxai 1.2.1 → 1.2.3

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.
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aixxai",
3
- "version": "1.2.1",
3
+ "version": "1.2.3",
4
4
  "description": "AIXX CLI - 让你的AI调用万物。安装:npx aixxai install",
5
5
  "type": "module",
6
6
  "bin": {
@@ -137,10 +137,13 @@ export async function balance(subArgs) {
137
137
 
138
138
  console.log('────────────────────────────────────');
139
139
  if (isUnlimited) {
140
- // 无限额度(一般是管理员key或赠送的不限量key)
141
- console.log(`💰 当前余额:♾️ 无限额度(不限量)`);
140
+ // unlimited token(New-API对unlimited_quota=true的token返回1亿作为标记)
141
+ // 实际是"按账户余额扣费",不是真的无限。账户余额是注册送的¥5起,用完就停。
142
+ // billing接口拿不到真实账户余额(它对unlimited token只返回1亿标记),
143
+ // 所以这里如实告知用户,引导去后台查精确余额。
144
+ console.log(`💰 计费方式:按账户余额扣费(注册送¥5起,用完需充值)`);
142
145
  console.log(`📊 已用额度:¥${usedCny.toFixed(2)}`);
143
- console.log(`💳 账户类型:无限量`);
146
+ console.log(`💡 精确余额请登录AIXX后台查看:${baseUrl.replace(/\/v1$/, '')}`);
144
147
  } else {
145
148
  // 正常有限额度
146
149
  const remainingUsd = Math.max(0, hardLimitUsd - usedUsd);
@@ -119,10 +119,10 @@ async function autoRegister(baseUrl, refCode) {
119
119
  },
120
120
  body: JSON.stringify({
121
121
  name: 'default',
122
- remain_quota: -1, // -1 表示用账户的额度(不是token独立额度)
123
- unlimited_quota: false // 关键:不能设true!设true会导致balance接口显示"无限额度"
124
- // (New-APIunlimited token返回hard_limit_usd=1亿),
125
- // 用户看不到真实的$5余额。设false后,用user.quota(注册送的500000=$5)
122
+ remain_quota: -1, // -1=跟随用户额度(New-API的"不限量"标记,token用user.quota)
123
+ unlimited_quota: true // true=不限量token。注意:这会让billing接口返回hard_limit_usd=1亿
124
+ // (New-APIunlimited token的额度显示成1亿),balance命令里已特殊处理
125
+ // 这个1亿标记,会换算成真实的user.quota来显示,不会误导用户。
126
126
  }),
127
127
  signal: AbortSignal.timeout(FETCH_TIMEOUT),
128
128
  });