@ckcloudai.com/clawrouter 0.0.3 → 0.0.5
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 +9 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -89,7 +89,7 @@ function mapCkcloudModel(raw) {
|
|
|
89
89
|
const outputPrice = Number(raw.outputPrice ?? 0);
|
|
90
90
|
return {
|
|
91
91
|
id,
|
|
92
|
-
name:
|
|
92
|
+
name: id,
|
|
93
93
|
inputPrice: Number.isFinite(inputPrice) ? inputPrice : 0,
|
|
94
94
|
outputPrice: Number.isFinite(outputPrice) ? outputPrice : 0,
|
|
95
95
|
contextWindow: normalizedContext,
|
|
@@ -6469,12 +6469,7 @@ function injectModelsConfig(logger2) {
|
|
|
6469
6469
|
const TOP_MODELS = [
|
|
6470
6470
|
"free",
|
|
6471
6471
|
"eco",
|
|
6472
|
-
"premium"
|
|
6473
|
-
"anthropic/claude-sonnet-4.5",
|
|
6474
|
-
"openai/gpt-5.2",
|
|
6475
|
-
"deepseek/deepseek-chat",
|
|
6476
|
-
"moonshot/kimi-k2.5",
|
|
6477
|
-
"minimax/minimax-m2.5"
|
|
6472
|
+
"premium"
|
|
6478
6473
|
];
|
|
6479
6474
|
if (!defaults.models || typeof defaults.models !== "object" || Array.isArray(defaults.models)) {
|
|
6480
6475
|
defaults.models = {};
|
|
@@ -6493,6 +6488,13 @@ function injectModelsConfig(logger2) {
|
|
|
6493
6488
|
needsWrite = true;
|
|
6494
6489
|
logger2.info(`Added ${addedCount} models to allowlist (${TOP_MODELS.length} total)`);
|
|
6495
6490
|
}
|
|
6491
|
+
for (const m of OPENCLAW_MODELS) {
|
|
6492
|
+
if (!allowlist[m.name]) {
|
|
6493
|
+
const key = `ckcloud/${m.name}`;
|
|
6494
|
+
allowlist[key] = {};
|
|
6495
|
+
addedCount++;
|
|
6496
|
+
}
|
|
6497
|
+
}
|
|
6496
6498
|
if (needsWrite) {
|
|
6497
6499
|
try {
|
|
6498
6500
|
const tmpPath = `${configPath}.tmp.${process.pid}`;
|