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.
- package/aixxai-1.2.2.tgz +0 -0
- package/package.json +1 -1
- package/src/commands/balance.js +6 -3
- package/src/commands/install.js +4 -4
package/aixxai-1.2.2.tgz
ADDED
|
Binary file
|
package/package.json
CHANGED
package/src/commands/balance.js
CHANGED
|
@@ -137,10 +137,13 @@ export async function balance(subArgs) {
|
|
|
137
137
|
|
|
138
138
|
console.log('────────────────────────────────────');
|
|
139
139
|
if (isUnlimited) {
|
|
140
|
-
//
|
|
141
|
-
|
|
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);
|
package/src/commands/install.js
CHANGED
|
@@ -119,10 +119,10 @@ async function autoRegister(baseUrl, refCode) {
|
|
|
119
119
|
},
|
|
120
120
|
body: JSON.stringify({
|
|
121
121
|
name: 'default',
|
|
122
|
-
remain_quota: -1,
|
|
123
|
-
unlimited_quota:
|
|
124
|
-
|
|
125
|
-
|
|
122
|
+
remain_quota: -1, // -1=跟随用户额度(New-API的"不限量"标记,token用user.quota)
|
|
123
|
+
unlimited_quota: true // true=不限量token。注意:这会让billing接口返回hard_limit_usd=1亿
|
|
124
|
+
// (New-API把unlimited token的额度显示成1亿),balance命令里已特殊处理
|
|
125
|
+
// 这个1亿标记,会换算成真实的user.quota来显示,不会误导用户。
|
|
126
126
|
}),
|
|
127
127
|
signal: AbortSignal.timeout(FETCH_TIMEOUT),
|
|
128
128
|
});
|