metrillm-mcp 0.2.3 → 0.2.4
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 +4 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1478,14 +1478,17 @@ async function listModels2() {
|
|
|
1478
1478
|
throw new Error(`LM Studio list models failed (${resp.status} ${resp.statusText})`);
|
|
1479
1479
|
}
|
|
1480
1480
|
const data = await resp.json();
|
|
1481
|
-
const
|
|
1481
|
+
const primaryIds = (data.data ?? []).map((m) => m.id?.trim()).filter((id) => Boolean(id));
|
|
1482
1482
|
const apiModels = await fetchApiModels();
|
|
1483
1483
|
const apiById = /* @__PURE__ */ new Map();
|
|
1484
|
+
const secondaryIds = [];
|
|
1484
1485
|
for (const model of apiModels ?? []) {
|
|
1485
1486
|
const id = asNonEmptyString(model.id);
|
|
1486
1487
|
if (!id) continue;
|
|
1487
1488
|
apiById.set(id, model);
|
|
1489
|
+
secondaryIds.push(id);
|
|
1488
1490
|
}
|
|
1491
|
+
const ids = Array.from(/* @__PURE__ */ new Set([...primaryIds, ...secondaryIds]));
|
|
1489
1492
|
const modelsRootDir = await resolveModelsRootDir();
|
|
1490
1493
|
const localMetadataEntries = await Promise.all(
|
|
1491
1494
|
ids.map(async (id) => {
|