offgrid-ai 0.15.4 → 0.15.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/backends.mjs +6 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "offgrid-ai",
3
- "version": "0.15.4",
3
+ "version": "0.15.5",
4
4
  "description": "Privacy-first CLI for running local LLMs — discover, configure, run, benchmark",
5
5
  "author": "Eeshan Srivastava (https://eeshans.com)",
6
6
  "type": "module",
package/src/backends.mjs CHANGED
@@ -102,16 +102,18 @@ async function scanOmlxModels() {
102
102
  // The oMLX API can return the same model multiple times with different
103
103
  // ID formats (e.g. "Qwen3.6-35B-A3B-OptiQ-4bit" and
104
104
  // "mlx-community--Qwen3.6-35B-A3B-OptiQ-4bit"). Deduplicate by the
105
- // normalized full name (publisher/model), keeping the first entry
106
- // (which has the most complete metadata from the loaded model).
105
+ // normalized full name (publisher/model with / separator), keeping
106
+ // the first entry (which has the most complete metadata).
107
107
  const seen = new Set();
108
108
  const deduped = [];
109
109
  for (const model of body.data.filter(isChatOmlxModel)) {
110
110
  const info = lookupOmlxModelInfo(model.id, infoMap);
111
111
  const hasPublisher = model.id.includes("/") || model.id.includes("--");
112
112
  const fullName = (!hasPublisher && info?.publisher) ? `${info.publisher}/${model.id}` : model.id;
113
- if (seen.has(fullName)) continue;
114
- seen.add(fullName);
113
+ // Normalize: convert -- separator to / for dedup comparison
114
+ const normalized = fullName.replace(/--/g, "/");
115
+ if (seen.has(normalized)) continue;
116
+ seen.add(normalized);
115
117
  deduped.push(model);
116
118
  }
117
119