@blockrun/clawrouter 0.11.6 → 0.11.8
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/index.js +17 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/scripts/reinstall.sh +47 -40
package/dist/index.js
CHANGED
|
@@ -6778,6 +6778,23 @@ function injectModelsConfig(logger) {
|
|
|
6778
6778
|
logger.info("Set default model to blockrun/auto (first install)");
|
|
6779
6779
|
needsWrite = true;
|
|
6780
6780
|
}
|
|
6781
|
+
if (!defaults.models || typeof defaults.models !== "object" || Array.isArray(defaults.models)) {
|
|
6782
|
+
defaults.models = {};
|
|
6783
|
+
needsWrite = true;
|
|
6784
|
+
}
|
|
6785
|
+
const allowlist = defaults.models;
|
|
6786
|
+
let addedCount = 0;
|
|
6787
|
+
for (const m of OPENCLAW_MODELS) {
|
|
6788
|
+
const key = `blockrun/${m.id}`;
|
|
6789
|
+
if (!allowlist[key]) {
|
|
6790
|
+
allowlist[key] = {};
|
|
6791
|
+
addedCount++;
|
|
6792
|
+
}
|
|
6793
|
+
}
|
|
6794
|
+
if (addedCount > 0) {
|
|
6795
|
+
needsWrite = true;
|
|
6796
|
+
logger.info(`Added ${addedCount} models to allowlist (${OPENCLAW_MODELS.length} total)`);
|
|
6797
|
+
}
|
|
6781
6798
|
if (needsWrite) {
|
|
6782
6799
|
try {
|
|
6783
6800
|
const tmpPath = `${configPath}.tmp.${process.pid}`;
|