@opennodes/registry 0.1.32 → 0.1.34

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 +2 -2
  2. package/src/importers.js +5 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opennodes/registry",
3
- "version": "0.1.32",
3
+ "version": "0.1.34",
4
4
  "description": "OpenNodes (ONP) reference registry: node registration with proof-of-resource qualification (Stage A/B/C), transparent ranking, enforceable estimates, catalog importers (OpenRouter, Hugging Face, models.dev, Ollama), MCP surface, and the web app (catalog, chat, advisor, Node Builder)",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -43,7 +43,7 @@
43
43
  "access": "public"
44
44
  },
45
45
  "dependencies": {
46
- "@opennodes/core": "0.1.7",
46
+ "@opennodes/core": "0.1.11",
47
47
  "pg": "^8.13.1"
48
48
  }
49
49
  }
package/src/importers.js CHANGED
@@ -205,10 +205,13 @@ export async function importHuggingFace(store, router, hub = []) {
205
205
  ? { expected_tps: { p50: Math.round(p.throughput), basis: 'claimed' } } : {}),
206
206
  },
207
207
  binding: { profile: 'onp.openai.chat/v1', model_id: `${model.id}:${p.provider}` },
208
+ // ~a third of HF provider entries carry no pricing: unknown, not free (as for models.dev)
208
209
  pricing: {
209
210
  currency: 'USD',
210
- input_per_mtok: perMtok(p.pricing?.input),
211
- output_per_mtok: perMtok(p.pricing?.output),
211
+ ...(p.pricing && (p.pricing.input != null || p.pricing.output != null) ? {
212
+ input_per_mtok: perMtok(p.pricing.input),
213
+ output_per_mtok: perMtok(p.pricing.output),
214
+ } : {}),
212
215
  schemes: p.is_free ? ['free'] : ['prepaid'],
213
216
  },
214
217
  };