@blockrun/clawrouter 0.5.5 → 0.5.7

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 CHANGED
@@ -3275,6 +3275,17 @@ function injectModelsConfig(logger) {
3275
3275
  config.agents.defaults.model.primary = "blockrun/auto";
3276
3276
  needsWrite = true;
3277
3277
  }
3278
+ if (config.agents.defaults.models && typeof config.agents.defaults.models === "object") {
3279
+ const allowlist = config.agents.defaults.models;
3280
+ for (const model of OPENCLAW_MODELS) {
3281
+ const fullId = `blockrun/${model.id}`;
3282
+ if (!allowlist[fullId]) {
3283
+ const alias = model.id.includes("/") ? model.id.split("/").pop() : model.id;
3284
+ allowlist[fullId] = { alias };
3285
+ needsWrite = true;
3286
+ }
3287
+ }
3288
+ }
3278
3289
  if (needsWrite) {
3279
3290
  writeFileSync(configPath, JSON.stringify(config, null, 2));
3280
3291
  logger.info("Set default model to blockrun/auto (smart routing enabled)");