@blockrun/clawrouter 0.11.8 → 0.11.9
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 +28 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/scripts/reinstall.sh +35 -32
package/dist/index.js
CHANGED
|
@@ -6778,14 +6778,39 @@ function injectModelsConfig(logger) {
|
|
|
6778
6778
|
logger.info("Set default model to blockrun/auto (first install)");
|
|
6779
6779
|
needsWrite = true;
|
|
6780
6780
|
}
|
|
6781
|
+
const TOP_MODELS = [
|
|
6782
|
+
"auto",
|
|
6783
|
+
"free",
|
|
6784
|
+
"eco",
|
|
6785
|
+
"premium",
|
|
6786
|
+
"anthropic/claude-sonnet-4.6",
|
|
6787
|
+
"anthropic/claude-opus-4.6",
|
|
6788
|
+
"anthropic/claude-haiku-4.5",
|
|
6789
|
+
"openai/gpt-5.2",
|
|
6790
|
+
"openai/gpt-4o",
|
|
6791
|
+
"openai/o3",
|
|
6792
|
+
"google/gemini-2.5-pro",
|
|
6793
|
+
"google/gemini-2.5-flash",
|
|
6794
|
+
"deepseek/deepseek-chat",
|
|
6795
|
+
"moonshot/kimi-k2.5",
|
|
6796
|
+
"xai/grok-3",
|
|
6797
|
+
"minimax/minimax-m2.5"
|
|
6798
|
+
];
|
|
6781
6799
|
if (!defaults.models || typeof defaults.models !== "object" || Array.isArray(defaults.models)) {
|
|
6782
6800
|
defaults.models = {};
|
|
6783
6801
|
needsWrite = true;
|
|
6784
6802
|
}
|
|
6785
6803
|
const allowlist = defaults.models;
|
|
6804
|
+
const topSet = new Set(TOP_MODELS.map((id) => `blockrun/${id}`));
|
|
6805
|
+
for (const key of Object.keys(allowlist)) {
|
|
6806
|
+
if (key.startsWith("blockrun/") && !topSet.has(key)) {
|
|
6807
|
+
delete allowlist[key];
|
|
6808
|
+
needsWrite = true;
|
|
6809
|
+
}
|
|
6810
|
+
}
|
|
6786
6811
|
let addedCount = 0;
|
|
6787
|
-
for (const
|
|
6788
|
-
const key = `blockrun/${
|
|
6812
|
+
for (const id of TOP_MODELS) {
|
|
6813
|
+
const key = `blockrun/${id}`;
|
|
6789
6814
|
if (!allowlist[key]) {
|
|
6790
6815
|
allowlist[key] = {};
|
|
6791
6816
|
addedCount++;
|
|
@@ -6793,7 +6818,7 @@ function injectModelsConfig(logger) {
|
|
|
6793
6818
|
}
|
|
6794
6819
|
if (addedCount > 0) {
|
|
6795
6820
|
needsWrite = true;
|
|
6796
|
-
logger.info(`Added ${addedCount} models to allowlist (${
|
|
6821
|
+
logger.info(`Added ${addedCount} models to allowlist (${TOP_MODELS.length} total)`);
|
|
6797
6822
|
}
|
|
6798
6823
|
if (needsWrite) {
|
|
6799
6824
|
try {
|