@juspay/neurolink 12.9.6 → 12.11.0

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 (39) hide show
  1. package/CHANGELOG.md +3 -3
  2. package/dist/artifacts/artifactBanking.d.ts +6 -2
  3. package/dist/artifacts/artifactBanking.js +9 -14
  4. package/dist/artifacts/artifactReader.d.ts +69 -0
  5. package/dist/artifacts/artifactReader.js +157 -0
  6. package/dist/artifacts/artifactStore.d.ts +7 -3
  7. package/dist/artifacts/artifactStore.js +10 -21
  8. package/dist/artifacts/artifactStoreFactory.d.ts +39 -0
  9. package/dist/artifacts/artifactStoreFactory.js +101 -0
  10. package/dist/artifacts/redisArtifactStore.d.ts +84 -0
  11. package/dist/artifacts/redisArtifactStore.js +270 -0
  12. package/dist/browser/neurolink.min.js +381 -383
  13. package/dist/constants/enums.d.ts +77 -0
  14. package/dist/constants/enums.js +82 -0
  15. package/dist/core/modules/GenerationHandler.d.ts +15 -3
  16. package/dist/core/modules/GenerationHandler.js +172 -14
  17. package/dist/index.d.ts +3 -0
  18. package/dist/index.js +7 -0
  19. package/dist/memory/memoryRetrievalTools.js +104 -35
  20. package/dist/neurolink.d.ts +45 -1
  21. package/dist/neurolink.js +128 -18
  22. package/dist/providers/catalog/baseten.json +263 -0
  23. package/dist/providers/catalog/gmicloud.json +64 -0
  24. package/dist/providers/catalog/inception-labs.json +75 -0
  25. package/dist/providers/catalog/index.generated.d.ts +1 -1
  26. package/dist/providers/catalog/index.generated.js +15 -0
  27. package/dist/providers/catalog/io-intelligence.json +463 -0
  28. package/dist/providers/catalog/schema.d.ts +1 -1
  29. package/dist/providers/catalog/upstage.json +165 -0
  30. package/dist/providers/openaiChatCompletionsClient.js +18 -1
  31. package/dist/types/artifact.d.ts +124 -3
  32. package/dist/types/config.d.ts +7 -0
  33. package/dist/types/generate.d.ts +17 -0
  34. package/dist/types/openaiCompatible.d.ts +5 -1
  35. package/dist/types/providerCatalog.generated.d.ts +2 -2
  36. package/dist/types/providers.d.ts +20 -0
  37. package/dist/utils/redis.d.ts +15 -0
  38. package/dist/utils/redis.js +64 -6
  39. package/package.json +10 -6
@@ -0,0 +1,263 @@
1
+ {
2
+ "$schema": "./provider-catalog.schema.json",
3
+ "id": "baseten",
4
+ "displayName": "Baseten",
5
+ "aliases": [],
6
+ "tier": 2,
7
+ "wire": {
8
+ "baseURL": "https://inference.baseten.co/v1"
9
+ },
10
+ "models": {
11
+ "default": "zai-org/GLM-5.3-Flash",
12
+ "fallbacks": [
13
+ "zai-org/GLM-5.3-Flash",
14
+ "zai-org/GLM-5.3",
15
+ "zai-org/GLM-5.2"
16
+ ],
17
+ "defaultContextWindow": 1048576,
18
+ "defaultMaxOutputTokens": 131072,
19
+ "catalog": {
20
+ "openai/gpt-oss-120b": {
21
+ "contextWindow": 128072,
22
+ "maxOutputTokens": 128072,
23
+ "pricingPerMTok": {
24
+ "input": 0.1,
25
+ "output": 0.5,
26
+ "cachedInput": 0.1
27
+ },
28
+ "vision": false,
29
+ "status": "production",
30
+ "description": "OpenAI GPT-OSS 120B; general-purpose model with controllable reasoning"
31
+ },
32
+ "zai-org/GLM-4.7": {
33
+ "contextWindow": 200000,
34
+ "maxOutputTokens": 200000,
35
+ "pricingPerMTok": {
36
+ "input": 0.6,
37
+ "output": 2.2,
38
+ "cachedInput": 0.12
39
+ },
40
+ "vision": false,
41
+ "status": "production",
42
+ "description": "GLM 4.7; fast general-purpose model with 200K context and enhanced tool use"
43
+ },
44
+ "moonshotai/Kimi-K2.6": {
45
+ "contextWindow": 262000,
46
+ "maxOutputTokens": 262000,
47
+ "pricingPerMTok": {
48
+ "input": 0.95,
49
+ "output": 4,
50
+ "cachedInput": 0.16
51
+ },
52
+ "vision": false,
53
+ "status": "production",
54
+ "description": "Kimi K2.6; agentic and coding model for multi-step reasoning and tool use"
55
+ },
56
+ "deepseek-ai/DeepSeek-V4-Pro": {
57
+ "contextWindow": 1048576,
58
+ "maxOutputTokens": 262144,
59
+ "pricingPerMTok": {
60
+ "input": 1.74,
61
+ "output": 3.48,
62
+ "cachedInput": 0.145
63
+ },
64
+ "vision": false,
65
+ "status": "production",
66
+ "description": "DeepSeek V4 Pro; 1M-context mixture-of-experts model for agentic workflows and coding"
67
+ },
68
+ "nvidia/NVIDIA-Nemotron-3-Ultra-550B-A55B": {
69
+ "contextWindow": 202800,
70
+ "maxOutputTokens": 202800,
71
+ "pricingPerMTok": {
72
+ "input": 0.6,
73
+ "output": 2.4,
74
+ "cachedInput": 0.12
75
+ },
76
+ "vision": false,
77
+ "status": "production",
78
+ "description": "NVIDIA Nemotron 3 Ultra; flagship reasoning and non-reasoning model for code and agentic execution"
79
+ },
80
+ "zai-org/GLM-5.2": {
81
+ "contextWindow": 1048576,
82
+ "maxOutputTokens": 262144,
83
+ "pricingPerMTok": {
84
+ "input": 1.4,
85
+ "output": 4.4,
86
+ "cachedInput": 0.14
87
+ },
88
+ "vision": false,
89
+ "status": "production",
90
+ "description": "GLM 5.2; 1M-context reasoning model"
91
+ },
92
+ "moonshotai/Kimi-K2.7-Code": {
93
+ "contextWindow": 262000,
94
+ "maxOutputTokens": 262000,
95
+ "pricingPerMTok": {
96
+ "input": 0.95,
97
+ "output": 4,
98
+ "cachedInput": 0.16
99
+ },
100
+ "vision": false,
101
+ "status": "production",
102
+ "description": "Kimi K2.7 Code; model for complex coding, code reasoning and long-horizon development"
103
+ },
104
+ "deepseek-ai/DeepSeek-V4-Flash-0731": {
105
+ "contextWindow": 1048576,
106
+ "maxOutputTokens": 384000,
107
+ "pricingPerMTok": {
108
+ "input": 0.13,
109
+ "output": 0.26,
110
+ "cachedInput": 0.028
111
+ },
112
+ "vision": false,
113
+ "status": "production",
114
+ "description": "DeepSeek V4 Flash 0731; fast, low-cost 1M-context mixture-of-experts model"
115
+ },
116
+ "thinkingmachines/inkling": {
117
+ "contextWindow": 1048576,
118
+ "maxOutputTokens": 32768,
119
+ "pricingPerMTok": {
120
+ "input": 1,
121
+ "output": 4.05,
122
+ "cachedInput": 0.17
123
+ },
124
+ "vision": false,
125
+ "status": "production",
126
+ "description": "Thinking Machines Inkling; 1M-context reasoning model"
127
+ },
128
+ "zai-org/GLM-5.2-Fast": {
129
+ "contextWindow": 1048576,
130
+ "maxOutputTokens": 262144,
131
+ "pricingPerMTok": {
132
+ "input": 2.1,
133
+ "output": 6.6,
134
+ "cachedInput": 0.21
135
+ },
136
+ "vision": false,
137
+ "status": "production",
138
+ "description": "GLM 5.2 Fast; 1M-context model"
139
+ },
140
+ "moonshotai/Kimi-K3": {
141
+ "contextWindow": 1048576,
142
+ "maxOutputTokens": 262144,
143
+ "pricingPerMTok": {
144
+ "input": 3,
145
+ "output": 15,
146
+ "cachedInput": 0.3
147
+ },
148
+ "vision": false,
149
+ "status": "production",
150
+ "description": "Kimi K3; 1M-context model"
151
+ },
152
+ "thinkingmachines/inkling-small": {
153
+ "contextWindow": 1048576,
154
+ "maxOutputTokens": 32768,
155
+ "pricingPerMTok": {
156
+ "input": 0.5,
157
+ "output": 1.2,
158
+ "cachedInput": 0.1
159
+ },
160
+ "vision": false,
161
+ "status": "production",
162
+ "description": "Thinking Machines Inkling Small; 1M-context reasoning model"
163
+ },
164
+ "deepseek-ai/DeepSeek-V4-Pro-0813": {
165
+ "contextWindow": 1048576,
166
+ "maxOutputTokens": 262144,
167
+ "pricingPerMTok": {
168
+ "input": 1.32,
169
+ "output": 3.96,
170
+ "cachedInput": 0.132
171
+ },
172
+ "vision": false,
173
+ "status": "production",
174
+ "description": "DeepSeek V4 Pro 0813; dated 1M-context mixture-of-experts model for agentic workflows and coding"
175
+ },
176
+ "zai-org/GLM-5.3-Flash": {
177
+ "contextWindow": 1048576,
178
+ "maxOutputTokens": 131072,
179
+ "pricingPerMTok": {
180
+ "input": 0.15,
181
+ "output": 0.5,
182
+ "cachedInput": 0.03
183
+ },
184
+ "vision": true,
185
+ "status": "production",
186
+ "description": "Recommended - GLM 5.3 Flash; 1M-context reasoning model with live-verified image input"
187
+ },
188
+ "zai-org/GLM-5.3": {
189
+ "contextWindow": 1048576,
190
+ "maxOutputTokens": 262144,
191
+ "pricingPerMTok": {
192
+ "input": 1.4,
193
+ "output": 4.4,
194
+ "cachedInput": 0.14
195
+ },
196
+ "vision": false,
197
+ "status": "production",
198
+ "description": "GLM 5.3; 1M-context reasoning model"
199
+ },
200
+ "zai-org/GLM-5.3-Fast": {
201
+ "contextWindow": 1048576,
202
+ "maxOutputTokens": 262144,
203
+ "pricingPerMTok": {
204
+ "input": 2.1,
205
+ "output": 6.6,
206
+ "cachedInput": 0.21
207
+ },
208
+ "vision": true,
209
+ "status": "production",
210
+ "description": "GLM 5.3 Fast; 1M-context reasoning model with image input"
211
+ }
212
+ },
213
+ "visionModel": "zai-org/GLM-5.3-Flash",
214
+ "topModels": [
215
+ "zai-org/GLM-5.3-Flash",
216
+ "zai-org/GLM-5.3",
217
+ "zai-org/GLM-5.2",
218
+ "openai/gpt-oss-120b",
219
+ "deepseek-ai/DeepSeek-V4-Flash-0731"
220
+ ]
221
+ },
222
+ "capabilities": {
223
+ "text": true,
224
+ "streaming": true,
225
+ "tools": true,
226
+ "toolsWithStreaming": true,
227
+ "structuredOutput": true,
228
+ "structuredOutputWithTools": true,
229
+ "embeddings": false,
230
+ "thinking": false
231
+ },
232
+ "errorRules": [
233
+ {
234
+ "pattern": "please check the api-key you provided",
235
+ "class": "authentication",
236
+ "message": "Invalid Baseten API key. Check {apiKeyEnvVar}. Get one at https://app.baseten.co/"
237
+ }
238
+ ],
239
+ "setup": {
240
+ "url": "https://app.baseten.co/",
241
+ "apiKeyFormat": null,
242
+ "billingPolicy": "free-tier",
243
+ "instructions": [
244
+ "1. Visit: https://app.baseten.co/ and sign in or create a workspace",
245
+ "2. Review the current Baseten billing and credit terms in the console before making requests",
246
+ "3. Create a personal API key in the Baseten console",
247
+ "4. Set {apiKeyEnvVar} in your .env file"
248
+ ]
249
+ },
250
+ "evidence": {
251
+ "rosterVerified": {
252
+ "date": "2026-09-03",
253
+ "method": "authenticated GET /v1/models",
254
+ "status": 200
255
+ },
256
+ "authProbe": {
257
+ "date": "2026-09-03",
258
+ "status": 403
259
+ },
260
+ "liveMatrix": null,
261
+ "addedInPR": "pending"
262
+ }
263
+ }
@@ -0,0 +1,64 @@
1
+ {
2
+ "$schema": "./provider-catalog.schema.json",
3
+ "id": "gmicloud",
4
+ "displayName": "GMI Cloud",
5
+ "aliases": ["gmi-cloud"],
6
+ "tier": 2,
7
+ "wire": {
8
+ "baseURL": "https://api.gmi-serving.com/v1"
9
+ },
10
+ "models": {
11
+ "default": "MiniMaxAI/MiniMax-M3",
12
+ "fallbacks": ["MiniMaxAI/MiniMax-M3"],
13
+ "defaultContextWindow": 1048576,
14
+ "defaultMaxOutputTokens": 524288,
15
+ "catalog": {
16
+ "MiniMaxAI/MiniMax-M3": {
17
+ "contextWindow": 1048576,
18
+ "maxOutputTokens": 524288,
19
+ "vision": false,
20
+ "status": "production",
21
+ "description": "MiniMaxAI/MiniMax-M3 — live GMI Cloud-probed model"
22
+ }
23
+ },
24
+ "topModels": ["MiniMaxAI/MiniMax-M3"]
25
+ },
26
+ "capabilities": {
27
+ "text": true,
28
+ "streaming": true,
29
+ "tools": true,
30
+ "toolsWithStreaming": true,
31
+ "structuredOutput": true,
32
+ "structuredOutputWithTools": true,
33
+ "embeddings": false,
34
+ "thinking": false
35
+ },
36
+ "errorRules": [],
37
+ "setup": {
38
+ "url": "https://console.gmicloud.ai",
39
+ "apiKeyFormat": "^eyJ[A-Za-z0-9_-]+\\.[A-Za-z0-9_-]+\\.[A-Za-z0-9_-]+$",
40
+ "billingPolicy": "free-tier",
41
+ "instructions": [
42
+ "1. Visit: https://console.gmicloud.ai",
43
+ "2. Sign in and select the Inference service",
44
+ "3. Create an API key; check Console → Inference → Model Hub for current model pricing",
45
+ "4. Set {apiKeyEnvVar} in your .env file"
46
+ ]
47
+ },
48
+ "evidence": {
49
+ "rosterVerified": {
50
+ "date": "2026-09-03",
51
+ "method": "authenticated GET /v1/models",
52
+ "status": 200
53
+ },
54
+ "authProbe": {
55
+ "date": "2026-09-03",
56
+ "status": 401
57
+ },
58
+ "liveMatrix": {
59
+ "date": "2026-09-03",
60
+ "result": "MiniMax-M3 accepted max_completion_tokens=524288 and rejected 1048576 with an explicit 524288 limit. Structured output: the endpoint ignores response_format (json_schema and json_object both return prose with no prompt hint; raw fetch, 2026-09-03), so the SDK's structured-output fallback re-asks with the schema spelled out in the system prompt and coerces the reply — generate({ schema }) returned a schema-valid structuredData 3/3 in the prompt-fallback experiment and again in the final live proof through dist/index.js. structuredOutput and structuredOutputWithTools are declared true on that basis."
61
+ },
62
+ "addedInPR": "pending"
63
+ }
64
+ }
@@ -0,0 +1,75 @@
1
+ {
2
+ "$schema": "./provider-catalog.schema.json",
3
+ "id": "inception-labs",
4
+ "displayName": "Inception Labs",
5
+ "aliases": ["inception", "mercury"],
6
+ "tier": 2,
7
+ "wire": {
8
+ "baseURL": "https://api.inceptionlabs.ai/v1"
9
+ },
10
+ "models": {
11
+ "default": "mercury-2",
12
+ "fallbacks": ["mercury-2"],
13
+ "defaultContextWindow": 128000,
14
+ "defaultMaxOutputTokens": 50000,
15
+ "catalog": {
16
+ "mercury-2": {
17
+ "contextWindow": 128000,
18
+ "maxOutputTokens": 50000,
19
+ "pricingPerMTok": {
20
+ "input": 0.25,
21
+ "output": 0.75,
22
+ "cachedInput": 0.025
23
+ },
24
+ "vision": false,
25
+ "status": "production",
26
+ "description": "Recommended - Mercury 2, Inception's enterprise diffusion LLM (dLLM); reasoning, tool use, structured output; 128K context, 1000+ tok/s"
27
+ }
28
+ }
29
+ },
30
+ "capabilities": {
31
+ "text": true,
32
+ "streaming": true,
33
+ "tools": true,
34
+ "toolsWithStreaming": true,
35
+ "structuredOutput": true,
36
+ "structuredOutputWithTools": true,
37
+ "embeddings": false,
38
+ "thinking": false
39
+ },
40
+ "errorRules": [
41
+ {
42
+ "pattern": "Model must be one of the following",
43
+ "class": "invalid-model",
44
+ "message": "Inception Labs model '{model}' is not valid. Pick a current model \u2014 see https://docs.inceptionlabs.ai/get-started/models."
45
+ }
46
+ ],
47
+ "setup": {
48
+ "url": "https://platform.inceptionlabs.ai/dashboard/api-keys",
49
+ "apiKeyFormat": "^sk_[A-Za-z0-9_-]+$",
50
+ "billingPolicy": "free-tier",
51
+ "instructions": [
52
+ "1. Visit: https://platform.inceptionlabs.ai and sign in (Google OAuth works)",
53
+ "2. New accounts get 100M free tokens with no card required",
54
+ "3. Create an API key under Dashboard -> API Keys",
55
+ "4. Set {apiKeyEnvVar} in your .env file"
56
+ ]
57
+ },
58
+ "evidence": {
59
+ "rosterVerified": {
60
+ "date": "2026-09-03",
61
+ "method": "authenticated GET /v1/models",
62
+ "status": 200
63
+ },
64
+ "authProbe": {
65
+ "date": "2026-09-03",
66
+ "status": 401,
67
+ "code": "invalid_api_key"
68
+ },
69
+ "liveMatrix": {
70
+ "date": "2026-09-03",
71
+ "result": "Full capability sweep on mercury-2: chat, stream, system_role, content_text_parts, sampling_params, tools, tools_stream, tools_roundtrip_null, tool_choice_without_tools, json_object, json_schema and tools_plus_schema all 200. The smoke-test json_schema probe (max_tokens:60) came back truncated (finish_reason=length, null content) because this diffusion model spends part of the budget on reasoning tokens before content; re-probed live with max_tokens:300 and got a clean schema-conformant reply ({\"name\":\"Lila Whitaker\",\"age\":34}, finish_reason=stop), confirming structuredOutput:true is correct. vision is 400 (text-only; rejects image_url on mercury-2, matching the vendor docs' 'Supported Formats: Text'). bad_key is 401 'Incorrect API key provided'. bad_model is 400 with an array-shaped pydantic error.message; the shared OpenAI-compat wire-error builder coerces a non-string Error message via toString, so that array becomes the literal string \"[object Object]\" and no regex pattern can match the real text \u2014 errorRules is intentionally left empty rather than shipping a rule that can never fire (see notes)."
72
+ },
73
+ "addedInPR": "pending"
74
+ }
75
+ }
@@ -1,3 +1,3 @@
1
1
  import type { ProviderCatalogJson } from "../../types/index.js";
2
2
  export declare const CATALOG_JSON_ENTRIES: ProviderCatalogJson[];
3
- export declare const CATALOG_PROVIDER_IDS: readonly ["cerebras", "cloudflare", "fireworks", "groq", "mistral", "perplexity", "sambanova", "together-ai", "xai"];
3
+ export declare const CATALOG_PROVIDER_IDS: readonly ["baseten", "cerebras", "cloudflare", "fireworks", "gmicloud", "groq", "inception-labs", "io-intelligence", "mistral", "perplexity", "sambanova", "together-ai", "upstage", "xai"];
@@ -1,33 +1,48 @@
1
1
  // GENERATED FILE — do not edit. Regenerate with `pnpm run codegen:catalog`.
2
2
  // Source of truth: the per-provider JSON files in this directory.
3
+ import basetenJson from "./baseten.json" with { type: "json" };
3
4
  import cerebrasJson from "./cerebras.json" with { type: "json" };
4
5
  import cloudflareJson from "./cloudflare.json" with { type: "json" };
5
6
  import fireworksJson from "./fireworks.json" with { type: "json" };
7
+ import gmicloudJson from "./gmicloud.json" with { type: "json" };
6
8
  import groqJson from "./groq.json" with { type: "json" };
9
+ import inceptionLabsJson from "./inception-labs.json" with { type: "json" };
10
+ import ioIntelligenceJson from "./io-intelligence.json" with { type: "json" };
7
11
  import mistralJson from "./mistral.json" with { type: "json" };
8
12
  import perplexityJson from "./perplexity.json" with { type: "json" };
9
13
  import sambanovaJson from "./sambanova.json" with { type: "json" };
10
14
  import togetherAiJson from "./together-ai.json" with { type: "json" };
15
+ import upstageJson from "./upstage.json" with { type: "json" };
11
16
  import xaiJson from "./xai.json" with { type: "json" };
12
17
  export const CATALOG_JSON_ENTRIES = [
18
+ basetenJson,
13
19
  cerebrasJson,
14
20
  cloudflareJson,
15
21
  fireworksJson,
22
+ gmicloudJson,
16
23
  groqJson,
24
+ inceptionLabsJson,
25
+ ioIntelligenceJson,
17
26
  mistralJson,
18
27
  perplexityJson,
19
28
  sambanovaJson,
20
29
  togetherAiJson,
30
+ upstageJson,
21
31
  xaiJson,
22
32
  ];
23
33
  export const CATALOG_PROVIDER_IDS = [
34
+ "baseten",
24
35
  "cerebras",
25
36
  "cloudflare",
26
37
  "fireworks",
38
+ "gmicloud",
27
39
  "groq",
40
+ "inception-labs",
41
+ "io-intelligence",
28
42
  "mistral",
29
43
  "perplexity",
30
44
  "sambanova",
31
45
  "together-ai",
46
+ "upstage",
32
47
  "xai",
33
48
  ];