@blockrun/clawrouter 0.5.5 → 0.5.6
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 +10 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3275,6 +3275,16 @@ 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
|
+
const blockrunModelsToAllow = ["blockrun/auto", "blockrun/free", "blockrun/gpt-120b"];
|
|
3281
|
+
for (const model of blockrunModelsToAllow) {
|
|
3282
|
+
if (!allowlist[model]) {
|
|
3283
|
+
allowlist[model] = { alias: model.split("/")[1] };
|
|
3284
|
+
needsWrite = true;
|
|
3285
|
+
}
|
|
3286
|
+
}
|
|
3287
|
+
}
|
|
3278
3288
|
if (needsWrite) {
|
|
3279
3289
|
writeFileSync(configPath, JSON.stringify(config, null, 2));
|
|
3280
3290
|
logger.info("Set default model to blockrun/auto (smart routing enabled)");
|