@ariacompute/engine-rn 1.21.0 → 1.22.0
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/README.md +1 -1
- package/package.json +1 -1
- package/src/index.js +2 -2
- package/src/setup.js +2 -2
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ on disk is loaded directly; otherwise the SDK downloads it from the regional
|
|
|
18
18
|
public hub (same as `aria-engine download`: `.com` → Hugging Face, `.cn` →
|
|
19
19
|
ModelScope; `site` defaults to `https://ariacompute.com`) into
|
|
20
20
|
`~/.ariacompute/models/{model}` and then loads it. Dashboard is not used. A
|
|
21
|
-
Dashboard `sk-` / `
|
|
21
|
+
Dashboard `sk-` / `sk-bf-` token is ignored for hub auth. Token is optional for
|
|
22
22
|
public models. Gated files: pass `hfToken` / `modelscopeApiToken` (same as
|
|
23
23
|
`aria-engine setup`); if omitted, reads `~/.ariacompute/engine.yml`. Instance
|
|
24
24
|
`setup` is in-memory only (does not write that file). A valid cached bundle is
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -76,7 +76,7 @@ function hubBearer(token) {
|
|
|
76
76
|
const t = (token || '').trim();
|
|
77
77
|
if (!t) return undefined;
|
|
78
78
|
const low = t.toLowerCase();
|
|
79
|
-
if (low.startsWith('sk-')
|
|
79
|
+
if (low.startsWith('sk-')) return undefined;
|
|
80
80
|
return t;
|
|
81
81
|
}
|
|
82
82
|
|
|
@@ -216,7 +216,7 @@ async function fetchHubFile(source, model, file, dest, token, required) {
|
|
|
216
216
|
if (e && (e.status === 401 || e.status === 403)) {
|
|
217
217
|
const field = source === 'modelscope' ? 'modelscope_api_token' : 'hf_token';
|
|
218
218
|
throw new Error(
|
|
219
|
-
`auth failed HTTP ${e.status}; set ${field} via aria-engine setup (do not pass a Dashboard sk-/
|
|
219
|
+
`auth failed HTTP ${e.status}; set ${field} via aria-engine setup (do not pass a Dashboard sk-/sk-bf- key as the hub token)`,
|
|
220
220
|
);
|
|
221
221
|
}
|
|
222
222
|
}
|
package/src/setup.js
CHANGED
|
@@ -41,8 +41,8 @@ function fillSetupUrls(cfg) {
|
|
|
41
41
|
function validateRouterApiKey(key) {
|
|
42
42
|
const t = (key || '').trim();
|
|
43
43
|
if (!t) return;
|
|
44
|
-
if (t.startsWith('sk-aria_') || t.startsWith('
|
|
45
|
-
throw new Error('router_api_key must start with sk-aria_ or
|
|
44
|
+
if (t.startsWith('sk-aria_') || t.startsWith('sk-bf-')) return;
|
|
45
|
+
throw new Error('router_api_key must start with sk-aria_ or sk-bf-');
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
function applySetup(existing, updates) {
|