@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/package.json
CHANGED
package/scripts/reinstall.sh
CHANGED
|
@@ -203,7 +203,7 @@ if [ ! -f "$DIST_PATH" ]; then
|
|
|
203
203
|
fi
|
|
204
204
|
echo " ✓ dist/index.js verified"
|
|
205
205
|
|
|
206
|
-
# 6.2. Populate model allowlist so
|
|
206
|
+
# 6.2. Populate model allowlist so top BlockRun models appear in /model picker
|
|
207
207
|
echo "→ Populating model allowlist..."
|
|
208
208
|
node -e "
|
|
209
209
|
const os = require('os');
|
|
@@ -232,10 +232,16 @@ try {
|
|
|
232
232
|
changed = true;
|
|
233
233
|
}
|
|
234
234
|
|
|
235
|
-
//
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
235
|
+
// Top 16 models for the /model picker
|
|
236
|
+
const TOP_MODELS = [
|
|
237
|
+
'auto', 'free', 'eco', 'premium',
|
|
238
|
+
'anthropic/claude-sonnet-4.6', 'anthropic/claude-opus-4.6', 'anthropic/claude-haiku-4.5',
|
|
239
|
+
'openai/gpt-5.2', 'openai/gpt-4o', 'openai/o3',
|
|
240
|
+
'google/gemini-2.5-pro', 'google/gemini-2.5-flash',
|
|
241
|
+
'deepseek/deepseek-chat', 'moonshot/kimi-k2.5',
|
|
242
|
+
'xai/grok-3', 'minimax/minimax-m2.5'
|
|
243
|
+
];
|
|
244
|
+
|
|
239
245
|
if (!config.agents) config.agents = {};
|
|
240
246
|
if (!config.agents.defaults) config.agents.defaults = {};
|
|
241
247
|
if (!config.agents.defaults.models || typeof config.agents.defaults.models !== 'object') {
|
|
@@ -243,34 +249,31 @@ try {
|
|
|
243
249
|
changed = true;
|
|
244
250
|
}
|
|
245
251
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
fs.writeFileSync(configPath, JSON.stringify(config, null, 2));
|
|
267
|
-
}
|
|
268
|
-
}).catch(err => {
|
|
269
|
-
console.log(' Could not load models from package:', err.message);
|
|
270
|
-
console.log(' Allowlist will be populated on gateway start');
|
|
271
|
-
});
|
|
252
|
+
const allowlist = config.agents.defaults.models;
|
|
253
|
+
// Clean out old blockrun entries not in TOP_MODELS
|
|
254
|
+
const topSet = new Set(TOP_MODELS.map(id => 'blockrun/' + id));
|
|
255
|
+
for (const key of Object.keys(allowlist)) {
|
|
256
|
+
if (key.startsWith('blockrun/') && !topSet.has(key)) {
|
|
257
|
+
delete allowlist[key];
|
|
258
|
+
changed = true;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
let added = 0;
|
|
262
|
+
for (const id of TOP_MODELS) {
|
|
263
|
+
const key = 'blockrun/' + id;
|
|
264
|
+
if (!allowlist[key]) {
|
|
265
|
+
allowlist[key] = {};
|
|
266
|
+
added++;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
if (added > 0) {
|
|
270
|
+
changed = true;
|
|
271
|
+
console.log(' Added ' + added + ' models to allowlist (' + TOP_MODELS.length + ' total)');
|
|
272
272
|
} else {
|
|
273
|
-
console.log('
|
|
273
|
+
console.log(' Allowlist already up to date');
|
|
274
|
+
}
|
|
275
|
+
if (changed) {
|
|
276
|
+
fs.writeFileSync(configPath, JSON.stringify(config, null, 2));
|
|
274
277
|
}
|
|
275
278
|
} catch (err) {
|
|
276
279
|
console.log(' Could not update config:', err.message);
|