@tiens.nguyen/gonext-local-worker 1.0.46 → 1.0.47

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.
@@ -885,14 +885,16 @@ async function checkOpenAiModels(base, apiKey, source) {
885
885
  const modelSuffix = `${hostSuffix}${portSuffix}`;
886
886
  const portLabel = sourcePort ? `:${sourcePort}` : "";
887
887
  const displaySuffix = hostSourceLabel ? ` (${hostSourceLabel}${portLabel})` : portLabel ? ` (${portLabel})` : "";
888
- const models = (j.data ?? [])
889
- .map((d) => d.id)
890
- .filter(Boolean)
891
- .map((id) => ({
892
- id: hostSourceId ? `${id}@@${hostSourceId}` : id,
893
- name: `${id}${displaySuffix}`,
894
- value: `mlx:${id}${modelSuffix}`,
895
- }));
888
+ let rawIds = (j.data ?? []).map((d) => d.id).filter(Boolean);
889
+ // mlx_lm.server registers both the local path and the HF model ID.
890
+ // Prefer local absolute paths so each server shows exactly one model entry.
891
+ const localPaths = rawIds.filter((id) => id.startsWith("/") || id.startsWith("~"));
892
+ if (localPaths.length > 0) rawIds = localPaths;
893
+ const models = rawIds.map((id) => ({
894
+ id: hostSourceId ? `${id}@@${hostSourceId}` : id,
895
+ name: `${id}${displaySuffix}`,
896
+ value: `mlx:${id}${modelSuffix}`,
897
+ }));
896
898
  return { online: true, endpoint, models };
897
899
  } catch {
898
900
  return { online: false, endpoint, models: [] };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tiens.nguyen/gonext-local-worker",
3
- "version": "1.0.46",
3
+ "version": "1.0.47",
4
4
  "description": "Polls GoNext cloud API for async local LLM jobs and runs them against Ollama/OpenAI-compatible servers on this Mac",
5
5
  "type": "module",
6
6
  "license": "MIT",