@jvittechs/jai1-cli 0.1.75 → 0.1.76
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/dist/cli.js +4 -4
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -33,7 +33,7 @@ var NetworkError = class extends Jai1Error {
|
|
|
33
33
|
// package.json
|
|
34
34
|
var package_default = {
|
|
35
35
|
name: "@jvittechs/jai1-cli",
|
|
36
|
-
version: "0.1.
|
|
36
|
+
version: "0.1.76",
|
|
37
37
|
description: "A unified CLI tool for JV-IT TECHS developers to manage Jai1 Framework. Please contact TeamAI for usage instructions.",
|
|
38
38
|
type: "module",
|
|
39
39
|
bin: {
|
|
@@ -3758,7 +3758,7 @@ var LlmProxyService = class {
|
|
|
3758
3758
|
throw new Error(`Failed to fetch limits: ${response.statusText}`);
|
|
3759
3759
|
}
|
|
3760
3760
|
const result = await response.json();
|
|
3761
|
-
return result?.data ?? {
|
|
3761
|
+
return result?.data ?? { effectiveAllowedModels: [], effectiveRateLimits: {} };
|
|
3762
3762
|
}
|
|
3763
3763
|
/**
|
|
3764
3764
|
* Fetch usage statistics
|
|
@@ -3788,8 +3788,8 @@ var LlmProxyService = class {
|
|
|
3788
3788
|
const today = (/* @__PURE__ */ new Date()).toLocaleDateString("en-CA", { timeZone: "Asia/Ho_Chi_Minh" });
|
|
3789
3789
|
const modelsData = modelsRes.data ?? [];
|
|
3790
3790
|
return modelsData.map((model) => {
|
|
3791
|
-
const allowed = limits.
|
|
3792
|
-
const dailyLimit = limits.
|
|
3791
|
+
const allowed = limits.effectiveAllowedModels?.includes(model.id) ?? false;
|
|
3792
|
+
const dailyLimit = limits.effectiveRateLimits?.[model.id] ?? limits.effectiveRateLimits?.[model.id.toLowerCase()];
|
|
3793
3793
|
const usageData = usage.data ?? [];
|
|
3794
3794
|
const usageRecord = usageData.find(
|
|
3795
3795
|
(u) => u.model === model.id && u.date === today
|