@blockrun/clawrouter 0.5.2 → 0.5.3
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.d.ts +1 -1
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -570,7 +570,7 @@ type BlockRunModel = {
|
|
|
570
570
|
};
|
|
571
571
|
declare const BLOCKRUN_MODELS: BlockRunModel[];
|
|
572
572
|
/**
|
|
573
|
-
* All BlockRun models in OpenClaw format.
|
|
573
|
+
* All BlockRun models in OpenClaw format (including aliases).
|
|
574
574
|
*/
|
|
575
575
|
declare const OPENCLAW_MODELS: ModelDefinitionConfig[];
|
|
576
576
|
/**
|
package/dist/index.js
CHANGED
|
@@ -393,7 +393,15 @@ function toOpenClawModel(m) {
|
|
|
393
393
|
maxTokens: m.maxOutput
|
|
394
394
|
};
|
|
395
395
|
}
|
|
396
|
-
var
|
|
396
|
+
var ALIAS_MODELS = Object.entries(MODEL_ALIASES).map(([alias, targetId]) => {
|
|
397
|
+
const target = BLOCKRUN_MODELS.find((m) => m.id === targetId);
|
|
398
|
+
if (!target) return null;
|
|
399
|
+
return toOpenClawModel({ ...target, id: alias, name: `${alias} \u2192 ${target.name}` });
|
|
400
|
+
}).filter((m) => m !== null);
|
|
401
|
+
var OPENCLAW_MODELS = [
|
|
402
|
+
...BLOCKRUN_MODELS.map(toOpenClawModel),
|
|
403
|
+
...ALIAS_MODELS
|
|
404
|
+
];
|
|
397
405
|
function buildProviderModels(baseUrl) {
|
|
398
406
|
return {
|
|
399
407
|
baseUrl: `${baseUrl}/v1`,
|