@juspay/neurolink 12.4.4 → 12.5.1

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 (51) hide show
  1. package/CHANGELOG.md +1 -5
  2. package/dist/adapters/providerImageAdapter.js +43 -19
  3. package/dist/browser/neurolink.min.js +414 -414
  4. package/dist/cli/commands/setup.d.ts +12 -7
  5. package/dist/cli/commands/setup.js +17 -16
  6. package/dist/constants/contextWindows.js +23 -95
  7. package/dist/constants/enums.d.ts +111 -216
  8. package/dist/constants/enums.js +124 -240
  9. package/dist/factories/providerDescriptors.d.ts +2 -4
  10. package/dist/factories/providerDescriptors.js +83 -127
  11. package/dist/hitl/hitlManager.d.ts +14 -0
  12. package/dist/hitl/hitlManager.js +16 -0
  13. package/dist/models/manifestRegistry.js +53 -4
  14. package/dist/neurolink.d.ts +37 -0
  15. package/dist/neurolink.js +39 -0
  16. package/dist/providers/catalog/cerebras.json +75 -0
  17. package/dist/providers/catalog/cloudflare.json +121 -0
  18. package/dist/providers/catalog/fireworks.json +124 -0
  19. package/dist/providers/catalog/groq.json +127 -0
  20. package/dist/providers/catalog/index.generated.d.ts +3 -0
  21. package/dist/providers/catalog/index.generated.js +33 -0
  22. package/dist/providers/catalog/loader.d.ts +6 -0
  23. package/dist/providers/catalog/loader.js +115 -0
  24. package/dist/providers/catalog/mistral.json +244 -0
  25. package/dist/providers/catalog/perplexity.json +103 -0
  26. package/dist/providers/catalog/provider-catalog.schema.json +351 -0
  27. package/dist/providers/catalog/sambanova.json +129 -0
  28. package/dist/providers/catalog/schema.d.ts +123 -0
  29. package/dist/providers/catalog/schema.js +310 -0
  30. package/dist/providers/catalog/together-ai.json +172 -0
  31. package/dist/providers/catalog/xai.json +108 -0
  32. package/dist/providers/openaiCompatCatalog.d.ts +13 -13
  33. package/dist/providers/openaiCompatCatalog.js +15 -326
  34. package/dist/types/hitl.d.ts +2 -0
  35. package/dist/types/index.d.ts +2 -0
  36. package/dist/types/index.js +2 -0
  37. package/dist/types/providerCatalog.d.ts +149 -0
  38. package/dist/types/providerCatalog.generated.d.ts +2 -0
  39. package/dist/types/providerCatalog.generated.js +1 -0
  40. package/dist/types/providerCatalog.js +7 -0
  41. package/dist/types/providers.d.ts +14 -14
  42. package/dist/utils/modelChoices.d.ts +11 -3
  43. package/dist/utils/modelChoices.js +84 -190
  44. package/dist/utils/pricing.js +92 -127
  45. package/dist/utils/providerConfig.d.ts +1 -1
  46. package/dist/utils/providerConfig.js +24 -108
  47. package/package.json +2 -1
  48. package/dist/models/manifests/cerebras.d.ts +0 -9
  49. package/dist/models/manifests/cerebras.js +0 -19
  50. package/dist/models/manifests/sambanova.d.ts +0 -11
  51. package/dist/models/manifests/sambanova.js +0 -42
package/CHANGELOG.md CHANGED
@@ -1,8 +1,4 @@
1
- ## [12.4.4](https://github.com/juspay/neurolink/compare/v12.4.3...v12.4.4) (2026-08-29)
2
-
3
- ### Performance Improvements
4
-
5
- - **(ci):** re-measure the extended-suite weights from real CI runs ([67b15c3](https://github.com/juspay/neurolink/commit/67b15c35336c8ea9ebbec66c256278bf6a7eb516)), closes [#1550](https://github.com/juspay/neurolink/issues/1550) [#1546](https://github.com/juspay/neurolink/issues/1546)
1
+ ## [12.5.1](https://github.com/juspay/neurolink/compare/v12.5.0...v12.5.1) (2026-08-29)
6
2
 
7
3
  ## [11.2.3](https://github.com/juspay/neurolink/compare/v11.2.2...v11.2.3) (2026-08-19)
8
4
 
@@ -5,6 +5,7 @@
5
5
  import { ImageProcessor } from "../utils/imageProcessor.js";
6
6
  import { logger } from "../utils/logger.js";
7
7
  import { resolveManifestEntryStrict } from "../models/manifestRegistry.js";
8
+ import { getCatalogJsonEntries } from "../providers/catalog/loader.js";
8
9
  /**
9
10
  * Simplified logger for essential error reporting only
10
11
  */
@@ -94,13 +95,48 @@ function normalizeVisionProvider(provider) {
94
95
  return lower;
95
96
  }
96
97
  }
98
+ /**
99
+ * Vision-capable models for 8 of the 9 JSON-catalog providers, derived from
100
+ * models.catalog[*].vision. Only a provider with ≥1 vision model gets a key
101
+ * here — an absent key and a present-but-empty array are handled identically
102
+ * by supportsVision()/getSupportedModels()/getVisionProviders() below (all
103
+ * three treat "no entry" and "empty array" the same way), so omitting the
104
+ * all-empty providers (cerebras, together-ai, fireworks, perplexity — none
105
+ * has a vision model in the current catalog) changes nothing at runtime.
106
+ * Fireworks previously had 3 hand-written vision entries
107
+ * ("phi-3-vision-128k-instruct", "llama-v3p2-90b/11b-vision-instruct");
108
+ * none of those model ids exist in the catalog's current (fully refreshed)
109
+ * roster, so they are gone along with the rest of that roster, not silently
110
+ * dropped by this derivation.
111
+ *
112
+ * Mistral is the 9th catalog provider but is excluded here and stays fully
113
+ * hand-written in VISION_CAPABILITIES.mistral below: its JSON vision list
114
+ * (14 exact model ids) diverges from the hand list in both directions — the
115
+ * hand list carries bare-name fallback entries ("mistral-small",
116
+ * "mistral-medium", "magistral-small", "magistral-medium") that widen
117
+ * supportsVision()'s substring match to any future dated variant, which the
118
+ * JSON's exact-id list doesn't reproduce, and some hand ids
119
+ * ("mistral-small-3.2", "mistral-medium-3.1") don't correspond to any
120
+ * catalog entry at all. Deriving it would silently narrow vision matching
121
+ * for a currently-shipping provider, so it is left alone — the same
122
+ * treatment Mistral already got in providerDescriptors.ts and pricing.ts
123
+ * for analogous real-value-mismatch reasons.
124
+ */
125
+ const CATALOG_VISION_MODELS = Object.fromEntries(getCatalogJsonEntries()
126
+ .filter((entry) => entry.id !== "mistral")
127
+ .flatMap((entry) => {
128
+ const visionModels = Object.entries(entry.models.catalog)
129
+ .filter(([, spec]) => spec.vision)
130
+ .map(([modelId]) => modelId);
131
+ return visionModels.length > 0
132
+ ? [[entry.id, visionModels]]
133
+ : [];
134
+ }));
97
135
  /**
98
136
  * Vision capability definitions for each provider
99
137
  */
100
138
  const VISION_CAPABILITIES = {
101
- // SambaNova: vendor model-spec page (2026-08-27) lists gemma-4-31B-it as
102
- // text+image+video; the dashboard also marks MiniMax-M3 as Vision.
103
- sambanova: ["gemma-4-31B-it", "MiniMax-M3"],
139
+ ...CATALOG_VISION_MODELS,
104
140
  openai: [
105
141
  // GPT-5.4 family (released Mar 2026) - Latest flagship models
106
142
  "gpt-5.4",
@@ -504,24 +540,12 @@ const VISION_CAPABILITIES = {
504
540
  "qwen2-vl",
505
541
  "phi-3-vision",
506
542
  ],
507
- // xAI: only grok-2-vision is multimodal today
508
- xai: ["grok-2-vision-latest"],
509
- // Groq: vision models are explicit "*-vision-preview" variants
510
- groq: ["llama-3.2-90b-vision-preview", "llama-3.2-11b-vision-preview"],
543
+ // xai, groq, sambanova, cloudflare derived from the JSON catalog, see
544
+ // CATALOG_VISION_MODELS above. cerebras, together-ai, fireworks,
545
+ // perplexity are also catalog providers but have no vision-capable model
546
+ // in the current catalog, so they contribute no key (see comment above).
511
547
  // Cohere: command-r* are text-only (no vision); empty list
512
548
  cohere: [],
513
- // Together AI: text-only by default; add vision variants if/when used.
514
- "together-ai": [],
515
- // Fireworks: vision via Phi-3-Vision and Llama 3.2 vision variants.
516
- fireworks: [
517
- "accounts/fireworks/models/phi-3-vision-128k-instruct",
518
- "accounts/fireworks/models/llama-v3p2-90b-vision-instruct",
519
- "accounts/fireworks/models/llama-v3p2-11b-vision-instruct",
520
- ],
521
- // Perplexity Sonar — text-only with web grounding.
522
- perplexity: [],
523
- // Cloudflare: explicit vision variants only.
524
- cloudflare: ["@cf/meta/llama-3.2-11b-vision-instruct"],
525
549
  // Replicate: vision capability depends on the specific model id.
526
550
  replicate: ["llava", "llama-3.2-vision", "moondream", "qwen2-vl"],
527
551
  // Voyage / Jina — embedding-only, not multimodal in this sense.