dsh-model-health 0.2.11 → 0.2.13

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
@@ -309,7 +309,7 @@ async function probeModel(row, apiKey) {
309
309
  clearTimeout(timer);
310
310
  }
311
311
  }
312
- function createTestRouteHandler(resolveApiKey) {
312
+ function createTestRouteHandler(resolveApiKey, profile) {
313
313
  return async function handler(req, res) {
314
314
  if (!isLocalOrigin(req)) {
315
315
  sendJson(res, 403, {
@@ -331,7 +331,7 @@ function createTestRouteHandler(resolveApiKey) {
331
331
  }
332
332
  let row;
333
333
  try {
334
- const found = collectModels(readSettingsCached()).find((r) => r.key === key);
334
+ const found = collectModels(readSettingsCached(profile)).find((r) => r.key === key);
335
335
  if (!found) {
336
336
  sendJson(res, 404, {
337
337
  ok: false,
@@ -431,7 +431,7 @@ function apply(ctx) {
431
431
  } catch {
432
432
  return;
433
433
  }
434
- })
434
+ }, profile)
435
435
  });
436
436
  console.log(`[dsh-model-health] ready — tool "list_models" + routes GET /api/model-health/json, POST /api/model-health/test`);
437
437
  }
package/icon.svg ADDED
@@ -0,0 +1,9 @@
1
+ <svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <defs>
3
+ <linearGradient id="pulse" x1="18" y1="3" x2="18" y2="33" gradientUnits="userSpaceOnUse">
4
+ <stop offset="0" stop-color="#45E7A4"/>
5
+ <stop offset="1" stop-color="#324DE2"/>
6
+ </linearGradient>
7
+ </defs>
8
+ <polyline points="33 18 27 18 22.5 31.5 13.5 4.5 9 18 3 18" stroke="url(#pulse)" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
9
+ </svg>
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "dsh-model-health",
3
- "version": "0.2.11",
3
+ "version": "0.2.13",
4
4
  "description": "DSH plugin that lists all configured models with availability/latency testing, by reading $DSH_HOME/settings.yaml.",
5
+ "icon": "./icon.svg",
5
6
  "license": "MIT",
6
7
  "repository": {
7
8
  "type": "git",
@@ -16,7 +17,8 @@
16
17
  },
17
18
  "files": [
18
19
  "dist",
19
- "cordis.patch.yml"
20
+ "cordis.patch.yml",
21
+ "icon.svg"
20
22
  ],
21
23
  "dsh": {
22
24
  "bundle": {