@use-aistack/cli 0.20.1 → 0.20.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/dist/cursor-worker.js +16 -3
- package/dist/cursor-worker.js.map +1 -1
- package/dist/index.js +17 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -18542,8 +18542,13 @@ var PROVIDER_VENDOR = {
|
|
|
18542
18542
|
xai: "xai"
|
|
18543
18543
|
};
|
|
18544
18544
|
var PRICING_ALIASES = {
|
|
18545
|
-
"grok-4.6-build": "grok-4.6"
|
|
18545
|
+
"grok-4.6-build": "grok-4.6",
|
|
18546
|
+
"grok-4.7-build": "grok-4.7"
|
|
18546
18547
|
};
|
|
18548
|
+
var MODEL_SETTINGS_SUFFIX = /(?:-thinking)?(?:-(?:low|medium|high|xhigh|max))?(?:-fast)?$/;
|
|
18549
|
+
function withoutModelSettings(slug) {
|
|
18550
|
+
return slug.replace(MODEL_SETTINGS_SUFFIX, "");
|
|
18551
|
+
}
|
|
18547
18552
|
var LOCAL_PROVIDERS = /* @__PURE__ */ new Set([
|
|
18548
18553
|
"ollama",
|
|
18549
18554
|
"lmstudio",
|
|
@@ -18640,8 +18645,16 @@ var Pricer = class {
|
|
|
18640
18645
|
}
|
|
18641
18646
|
lookupSlug(slug, provider) {
|
|
18642
18647
|
if (this.firstLayerWith(slug, provider)) return slug;
|
|
18643
|
-
const
|
|
18644
|
-
|
|
18648
|
+
const base = withoutModelSettings(slug);
|
|
18649
|
+
for (const candidate of [
|
|
18650
|
+
PRICING_ALIASES[slug],
|
|
18651
|
+
base,
|
|
18652
|
+
PRICING_ALIASES[base]
|
|
18653
|
+
]) {
|
|
18654
|
+
if (candidate && this.firstLayerWith(candidate, provider))
|
|
18655
|
+
return candidate;
|
|
18656
|
+
}
|
|
18657
|
+
return null;
|
|
18645
18658
|
}
|
|
18646
18659
|
/**
|
|
18647
18660
|
* Every period that applies to a pricing key, or an empty list when none
|
|
@@ -18906,7 +18919,7 @@ function apiEquivalentCost(modelKey, t, atMs) {
|
|
|
18906
18919
|
}
|
|
18907
18920
|
|
|
18908
18921
|
// src/version.ts
|
|
18909
|
-
var CLI_VERSION = true ? "0.20.
|
|
18922
|
+
var CLI_VERSION = true ? "0.20.2" : "0.0.0-dev";
|
|
18910
18923
|
|
|
18911
18924
|
// src/api.ts
|
|
18912
18925
|
var BASE_URL = process.env.AISTACK_URL || "https://aistack.to";
|