@juspay/neurolink 7.50.0 → 7.51.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 (242) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/README.md +12 -9
  3. package/dist/adapters/providerImageAdapter.js +82 -10
  4. package/dist/agent/directTools.d.ts +10 -10
  5. package/dist/agent/directTools.js +5 -3
  6. package/dist/cli/commands/config.js +1 -0
  7. package/dist/cli/commands/mcp.js +1 -0
  8. package/dist/cli/commands/models.js +1 -0
  9. package/dist/cli/commands/ollama.js +1 -0
  10. package/dist/cli/commands/setup-anthropic.js +1 -0
  11. package/dist/cli/commands/setup-azure.js +1 -0
  12. package/dist/cli/commands/setup-bedrock.js +1 -0
  13. package/dist/cli/commands/setup-gcp.js +1 -0
  14. package/dist/cli/commands/setup-google-ai.js +1 -0
  15. package/dist/cli/commands/setup-huggingface.js +1 -0
  16. package/dist/cli/commands/setup-mistral.js +1 -0
  17. package/dist/cli/commands/setup-openai.js +1 -0
  18. package/dist/cli/commands/setup.js +1 -0
  19. package/dist/cli/errorHandler.js +1 -0
  20. package/dist/cli/factories/commandFactory.d.ts +1 -0
  21. package/dist/cli/factories/commandFactory.js +23 -6
  22. package/dist/cli/factories/ollamaCommandFactory.js +1 -0
  23. package/dist/cli/factories/sagemakerCommandFactory.js +1 -0
  24. package/dist/cli/factories/setupCommandFactory.js +1 -0
  25. package/dist/cli/index.js +1 -0
  26. package/dist/cli/loop/conversationSelector.js +1 -0
  27. package/dist/cli/loop/optionsSchema.js +1 -0
  28. package/dist/cli/loop/session.js +1 -0
  29. package/dist/cli/parser.js +1 -0
  30. package/dist/cli/utils/completeSetup.js +1 -0
  31. package/dist/cli/utils/envManager.js +1 -0
  32. package/dist/cli/utils/interactiveSetup.js +1 -0
  33. package/dist/cli/utils/ollamaUtils.js +1 -0
  34. package/dist/constants/index.js +1 -1
  35. package/dist/core/baseProvider.d.ts +5 -0
  36. package/dist/core/baseProvider.js +70 -20
  37. package/dist/index.d.ts +3 -3
  38. package/dist/lib/adapters/providerImageAdapter.js +83 -10
  39. package/dist/lib/agent/directTools.d.ts +10 -10
  40. package/dist/lib/agent/directTools.js +6 -3
  41. package/dist/lib/config/configManager.js +1 -0
  42. package/dist/lib/config/conversationMemory.js +1 -0
  43. package/dist/lib/config/taskClassificationConfig.js +1 -0
  44. package/dist/lib/constants/index.js +2 -1
  45. package/dist/lib/constants/performance.js +1 -0
  46. package/dist/lib/constants/retry.js +1 -0
  47. package/dist/lib/constants/timeouts.js +1 -0
  48. package/dist/lib/constants/tokens.js +1 -0
  49. package/dist/lib/core/analytics.js +1 -0
  50. package/dist/lib/core/baseProvider.d.ts +5 -0
  51. package/dist/lib/core/baseProvider.js +71 -20
  52. package/dist/lib/core/constants.js +1 -0
  53. package/dist/lib/core/conversationMemoryFactory.js +1 -0
  54. package/dist/lib/core/conversationMemoryInitializer.js +1 -0
  55. package/dist/lib/core/conversationMemoryManager.js +1 -0
  56. package/dist/lib/core/dynamicModels.js +1 -0
  57. package/dist/lib/core/evaluation.js +1 -0
  58. package/dist/lib/core/evaluationProviders.js +1 -0
  59. package/dist/lib/core/factory.js +1 -0
  60. package/dist/lib/core/modelConfiguration.js +1 -0
  61. package/dist/lib/core/redisConversationMemoryManager.js +1 -0
  62. package/dist/lib/core/serviceRegistry.js +1 -0
  63. package/dist/lib/core/streamAnalytics.js +1 -0
  64. package/dist/lib/evaluation/contextBuilder.js +1 -0
  65. package/dist/lib/evaluation/index.js +1 -0
  66. package/dist/lib/evaluation/prompts.js +1 -0
  67. package/dist/lib/evaluation/ragasEvaluator.js +1 -0
  68. package/dist/lib/evaluation/retryManager.js +1 -0
  69. package/dist/lib/evaluation/scoring.js +1 -0
  70. package/dist/lib/factories/providerFactory.js +1 -0
  71. package/dist/lib/factories/providerRegistry.js +1 -0
  72. package/dist/lib/hitl/hitlErrors.js +1 -0
  73. package/dist/lib/hitl/hitlManager.js +1 -0
  74. package/dist/lib/hitl/index.js +1 -0
  75. package/dist/lib/hitl/types.js +1 -0
  76. package/dist/lib/index.d.ts +3 -3
  77. package/dist/lib/index.js +1 -0
  78. package/dist/lib/mcp/externalServerManager.js +1 -0
  79. package/dist/lib/mcp/factory.js +1 -0
  80. package/dist/lib/mcp/flexibleToolValidator.js +1 -0
  81. package/dist/lib/mcp/index.js +1 -0
  82. package/dist/lib/mcp/mcpCircuitBreaker.js +1 -0
  83. package/dist/lib/mcp/mcpClientFactory.js +2 -1
  84. package/dist/lib/mcp/registry.js +1 -0
  85. package/dist/lib/mcp/servers/agent/directToolsServer.js +2 -0
  86. package/dist/lib/mcp/servers/aiProviders/aiAnalysisTools.js +1 -0
  87. package/dist/lib/mcp/servers/aiProviders/aiCoreServer.js +1 -0
  88. package/dist/lib/mcp/servers/aiProviders/aiWorkflowTools.js +1 -0
  89. package/dist/lib/mcp/servers/utilities/utilityServer.js +1 -0
  90. package/dist/lib/mcp/toolDiscoveryService.js +1 -0
  91. package/dist/lib/mcp/toolRegistry.js +1 -0
  92. package/dist/lib/memory/mem0Initializer.js +1 -0
  93. package/dist/lib/middleware/builtin/analytics.js +1 -0
  94. package/dist/lib/middleware/builtin/autoEvaluation.js +1 -0
  95. package/dist/lib/middleware/builtin/guardrails.js +1 -0
  96. package/dist/lib/middleware/factory.js +1 -0
  97. package/dist/lib/middleware/index.js +1 -0
  98. package/dist/lib/middleware/registry.js +1 -0
  99. package/dist/lib/middleware/utils/guardrailsUtils.js +1 -0
  100. package/dist/lib/models/modelRegistry.js +1 -0
  101. package/dist/lib/models/modelResolver.js +2 -0
  102. package/dist/lib/neurolink.d.ts +6 -0
  103. package/dist/lib/neurolink.js +135 -5
  104. package/dist/lib/providers/amazonBedrock.d.ts +1 -0
  105. package/dist/lib/providers/amazonBedrock.js +166 -14
  106. package/dist/lib/providers/amazonSagemaker.js +1 -0
  107. package/dist/lib/providers/anthropic.js +7 -21
  108. package/dist/lib/providers/anthropicBaseProvider.js +1 -0
  109. package/dist/lib/providers/azureOpenai.js +5 -21
  110. package/dist/lib/providers/googleAiStudio.js +5 -21
  111. package/dist/lib/providers/googleVertex.js +8 -1
  112. package/dist/lib/providers/huggingFace.js +34 -3
  113. package/dist/lib/providers/index.js +1 -0
  114. package/dist/lib/providers/litellm.js +34 -3
  115. package/dist/lib/providers/mistral.js +32 -2
  116. package/dist/lib/providers/ollama.d.ts +37 -1
  117. package/dist/lib/providers/ollama.js +544 -58
  118. package/dist/lib/providers/openAI.js +5 -21
  119. package/dist/lib/providers/openaiCompatible.js +41 -4
  120. package/dist/lib/providers/sagemaker/adaptive-semaphore.js +1 -0
  121. package/dist/lib/providers/sagemaker/client.js +1 -0
  122. package/dist/lib/providers/sagemaker/config.js +1 -0
  123. package/dist/lib/providers/sagemaker/detection.js +1 -0
  124. package/dist/lib/providers/sagemaker/diagnostics.js +1 -0
  125. package/dist/lib/providers/sagemaker/error-constants.js +1 -0
  126. package/dist/lib/providers/sagemaker/errors.js +1 -0
  127. package/dist/lib/providers/sagemaker/index.js +1 -0
  128. package/dist/lib/providers/sagemaker/language-model.js +1 -0
  129. package/dist/lib/providers/sagemaker/parsers.js +1 -0
  130. package/dist/lib/providers/sagemaker/streaming.js +1 -0
  131. package/dist/lib/providers/sagemaker/structured-parser.js +1 -0
  132. package/dist/lib/proxy/awsProxyIntegration.js +1 -0
  133. package/dist/lib/proxy/proxyFetch.js +1 -0
  134. package/dist/lib/proxy/utils/noProxyUtils.js +1 -0
  135. package/dist/lib/sdk/toolRegistration.js +2 -0
  136. package/dist/lib/services/server/ai/observability/instrumentation.js +1 -0
  137. package/dist/lib/session/globalSessionState.js +1 -0
  138. package/dist/lib/telemetry/index.js +1 -0
  139. package/dist/lib/telemetry/telemetryService.js +1 -0
  140. package/dist/lib/types/analytics.js +1 -0
  141. package/dist/lib/types/cli.js +1 -0
  142. package/dist/lib/types/common.js +1 -0
  143. package/dist/lib/types/configTypes.js +1 -0
  144. package/dist/lib/types/content.d.ts +14 -1
  145. package/dist/lib/types/content.js +1 -0
  146. package/dist/lib/types/contextTypes.js +1 -0
  147. package/dist/lib/types/conversation.js +1 -0
  148. package/dist/lib/types/domainTypes.js +1 -0
  149. package/dist/lib/types/errors.js +1 -0
  150. package/dist/lib/types/evaluation.js +1 -0
  151. package/dist/lib/types/evaluationProviders.js +1 -0
  152. package/dist/lib/types/evaluationTypes.js +1 -0
  153. package/dist/lib/types/externalMcp.js +1 -0
  154. package/dist/lib/types/fileTypes.d.ts +44 -0
  155. package/dist/lib/types/fileTypes.js +1 -0
  156. package/dist/lib/types/generateTypes.d.ts +1 -0
  157. package/dist/lib/types/generateTypes.js +1 -0
  158. package/dist/lib/types/guardrails.js +1 -0
  159. package/dist/lib/types/index.js +1 -0
  160. package/dist/lib/types/mcpTypes.js +1 -0
  161. package/dist/lib/types/middlewareTypes.js +1 -0
  162. package/dist/lib/types/modelTypes.js +1 -0
  163. package/dist/lib/types/observability.js +1 -0
  164. package/dist/lib/types/providers.d.ts +44 -0
  165. package/dist/lib/types/providers.js +1 -0
  166. package/dist/lib/types/sdkTypes.js +1 -0
  167. package/dist/lib/types/serviceTypes.js +1 -0
  168. package/dist/lib/types/streamTypes.d.ts +1 -0
  169. package/dist/lib/types/streamTypes.js +1 -0
  170. package/dist/lib/types/taskClassificationTypes.js +1 -0
  171. package/dist/lib/types/tools.js +2 -0
  172. package/dist/lib/types/typeAliases.js +1 -0
  173. package/dist/lib/types/universalProviderOptions.js +1 -0
  174. package/dist/lib/utils/analyticsUtils.js +1 -0
  175. package/dist/lib/utils/conversationMemory.js +1 -0
  176. package/dist/lib/utils/conversationMemoryUtils.js +1 -0
  177. package/dist/lib/utils/csvProcessor.js +1 -0
  178. package/dist/lib/utils/errorHandling.js +1 -0
  179. package/dist/lib/utils/evaluationUtils.js +1 -0
  180. package/dist/lib/utils/factoryProcessing.js +1 -0
  181. package/dist/lib/utils/fileDetector.js +7 -3
  182. package/dist/lib/utils/imageProcessor.js +1 -0
  183. package/dist/lib/utils/logger.js +1 -0
  184. package/dist/lib/utils/loopUtils.js +1 -0
  185. package/dist/lib/utils/mcpDefaults.js +1 -0
  186. package/dist/lib/utils/messageBuilder.js +96 -9
  187. package/dist/lib/utils/modelRouter.js +1 -0
  188. package/dist/lib/utils/multimodalOptionsBuilder.d.ts +67 -0
  189. package/dist/lib/utils/multimodalOptionsBuilder.js +65 -0
  190. package/dist/lib/utils/optionsConversion.js +1 -0
  191. package/dist/lib/utils/optionsUtils.js +1 -0
  192. package/dist/lib/utils/parameterValidation.js +1 -0
  193. package/dist/lib/utils/pdfProcessor.d.ts +10 -0
  194. package/dist/lib/utils/pdfProcessor.js +199 -0
  195. package/dist/lib/utils/performance.js +1 -0
  196. package/dist/lib/utils/promptRedaction.js +1 -0
  197. package/dist/lib/utils/providerConfig.js +1 -0
  198. package/dist/lib/utils/providerHealth.js +1 -0
  199. package/dist/lib/utils/providerSetupMessages.js +1 -0
  200. package/dist/lib/utils/providerUtils.js +1 -0
  201. package/dist/lib/utils/redis.js +1 -0
  202. package/dist/lib/utils/retryHandler.js +1 -0
  203. package/dist/lib/utils/schemaConversion.js +1 -0
  204. package/dist/lib/utils/taskClassificationUtils.js +1 -0
  205. package/dist/lib/utils/taskClassifier.js +1 -0
  206. package/dist/lib/utils/timeout.js +1 -0
  207. package/dist/lib/utils/tokenLimits.js +1 -0
  208. package/dist/lib/utils/toolUtils.js +1 -0
  209. package/dist/lib/utils/transformationUtils.js +1 -0
  210. package/dist/lib/utils/typeUtils.js +1 -0
  211. package/dist/mcp/mcpClientFactory.js +1 -1
  212. package/dist/mcp/servers/agent/directToolsServer.js +1 -0
  213. package/dist/models/modelResolver.js +1 -0
  214. package/dist/neurolink.d.ts +6 -0
  215. package/dist/neurolink.js +134 -5
  216. package/dist/providers/amazonBedrock.d.ts +1 -0
  217. package/dist/providers/amazonBedrock.js +165 -14
  218. package/dist/providers/anthropic.js +6 -21
  219. package/dist/providers/azureOpenai.js +4 -21
  220. package/dist/providers/googleAiStudio.js +4 -21
  221. package/dist/providers/googleVertex.js +7 -1
  222. package/dist/providers/huggingFace.js +33 -3
  223. package/dist/providers/litellm.js +33 -3
  224. package/dist/providers/mistral.js +31 -2
  225. package/dist/providers/ollama.d.ts +37 -1
  226. package/dist/providers/ollama.js +543 -58
  227. package/dist/providers/openAI.js +4 -21
  228. package/dist/providers/openaiCompatible.js +40 -4
  229. package/dist/sdk/toolRegistration.js +1 -0
  230. package/dist/types/content.d.ts +14 -1
  231. package/dist/types/fileTypes.d.ts +44 -0
  232. package/dist/types/generateTypes.d.ts +1 -0
  233. package/dist/types/providers.d.ts +44 -0
  234. package/dist/types/streamTypes.d.ts +1 -0
  235. package/dist/types/tools.js +1 -0
  236. package/dist/utils/fileDetector.js +6 -3
  237. package/dist/utils/messageBuilder.js +95 -9
  238. package/dist/utils/multimodalOptionsBuilder.d.ts +67 -0
  239. package/dist/utils/multimodalOptionsBuilder.js +64 -0
  240. package/dist/utils/pdfProcessor.d.ts +10 -0
  241. package/dist/utils/pdfProcessor.js +198 -0
  242. package/package.json +11 -20
package/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## [7.51.1](https://github.com/juspay/neurolink/compare/v7.51.0...v7.51.1) (2025-10-13)
2
+
3
+ ## [7.51.0](https://github.com/juspay/neurolink/compare/v7.50.0...v7.51.0) (2025-10-12)
4
+
5
+ ### Features
6
+
7
+ - **(multimodal):** add comprehensive PDF file support with native document processing ([52abf1a](https://github.com/juspay/neurolink/commit/52abf1a85d3a1d9de819919eec1d0ffea3007702))
8
+ - **(multimodal):** add comprehensive PDF file support with native document processing ([020e15a](https://github.com/juspay/neurolink/commit/020e15af0bb46a2b827bb4853baafba5da03cad2))
9
+
1
10
  ## [7.50.0](https://github.com/juspay/neurolink/compare/v7.49.0...v7.50.0) (2025-10-08)
2
11
 
3
12
  ### Features
package/README.md CHANGED
@@ -26,6 +26,7 @@ Extracted from production systems at Juspay and battle-tested at enterprise scal
26
26
  ## What's New (Q4 2025)
27
27
 
28
28
  - **CSV File Support** – Attach CSV files to prompts for AI-powered data analysis with auto-detection. → [CSV Guide](docs/features/multimodal-chat.md#csv-file-support)
29
+ - **PDF File Support** – Process PDF documents with native visual analysis for Vertex AI, Anthropic, Bedrock, AI Studio. → [PDF Guide](docs/features/pdf-support.md)
29
30
  - **LiteLLM Integration** – Access 100+ AI models from all major providers through unified interface. → [Setup Guide](docs/LITELLM-INTEGRATION.md)
30
31
  - **SageMaker Integration** – Deploy and use custom trained models on AWS infrastructure. → [Setup Guide](docs/SAGEMAKER-INTEGRATION.md)
31
32
  - **Human-in-the-loop workflows** – Pause generation for user approval/input before tool execution. → [HITL Guide](docs/features/hitl.md)
@@ -266,9 +267,11 @@ const result = await neurolink.generate({
266
267
  text: "Create a comprehensive analysis",
267
268
  files: [
268
269
  "./sales_data.csv", // Auto-detected as CSV
270
+ "examples/data/invoice.pdf", // Auto-detected as PDF
269
271
  "./diagrams/architecture.png", // Auto-detected as image
270
272
  ],
271
273
  },
274
+ provider: "vertex", // PDF-capable provider (see docs/features/pdf-support.md)
272
275
  enableEvaluation: true,
273
276
  region: "us-east-1",
274
277
  });
@@ -281,15 +284,15 @@ Full command and API breakdown lives in [`docs/cli/commands.md`](docs/cli/comman
281
284
 
282
285
  ## Platform Capabilities at a Glance
283
286
 
284
- | Capability | Highlights |
285
- | ------------------------ | -------------------------------------------------------------------------------------------------------- |
286
- | **Provider unification** | 12+ providers with automatic fallback, cost-aware routing, provider orchestration (Q3). |
287
- | **Multimodal pipeline** | Stream images + CSV data across providers with local/remote assets. Auto-detection for mixed file types. |
288
- | **Quality & governance** | Auto-evaluation engine (Q3), guardrails middleware (Q4), HITL workflows (Q4), audit logging. |
289
- | **Memory & context** | Conversation memory, Mem0 integration, Redis history export (Q4), context summarization (Q4). |
290
- | **CLI tooling** | Loop sessions (Q3), setup wizard, config validation, Redis auto-detect, JSON output. |
291
- | **Enterprise ops** | Proxy support, regional routing (Q3), telemetry hooks, configuration management. |
292
- | **Tool ecosystem** | MCP auto discovery, LiteLLM hub access, SageMaker custom deployment, web search. |
287
+ | Capability | Highlights |
288
+ | ------------------------ | ------------------------------------------------------------------------------------------------------------------------ |
289
+ | **Provider unification** | 12+ providers with automatic fallback, cost-aware routing, provider orchestration (Q3). |
290
+ | **Multimodal pipeline** | Stream images + CSV data + PDF documents across providers with local/remote assets. Auto-detection for mixed file types. |
291
+ | **Quality & governance** | Auto-evaluation engine (Q3), guardrails middleware (Q4), HITL workflows (Q4), audit logging. |
292
+ | **Memory & context** | Conversation memory, Mem0 integration, Redis history export (Q4), context summarization (Q4). |
293
+ | **CLI tooling** | Loop sessions (Q3), setup wizard, config validation, Redis auto-detect, JSON output. |
294
+ | **Enterprise ops** | Proxy support, regional routing (Q3), telemetry hooks, configuration management. |
295
+ | **Tool ecosystem** | MCP auto discovery, LiteLLM hub access, SageMaker custom deployment, web search. |
293
296
 
294
297
  ## Documentation Map
295
298
 
@@ -20,7 +20,29 @@ export class MultimodalLogger {
20
20
  * Vision capability definitions for each provider
21
21
  */
22
22
  const VISION_CAPABILITIES = {
23
- openai: ["gpt-4o", "gpt-4o-mini", "gpt-4-turbo", "gpt-4-vision-preview"],
23
+ openai: [
24
+ // GPT-5 family (released Aug 2025)
25
+ "gpt-5",
26
+ "gpt-5-2025-08-07",
27
+ "gpt-5-pro",
28
+ "gpt-5-mini",
29
+ "gpt-5-nano",
30
+ // GPT-4.1 family (released Apr 2025)
31
+ "gpt-4.1",
32
+ "gpt-4.1-mini",
33
+ "gpt-4.1-nano",
34
+ // o-series reasoning models (released Apr 2025)
35
+ "o3",
36
+ "o3-mini",
37
+ "o4",
38
+ "o4-mini",
39
+ "o4-mini-deep-research",
40
+ // Existing GPT-4 models
41
+ "gpt-4o",
42
+ "gpt-4o-mini",
43
+ "gpt-4-turbo",
44
+ "gpt-4-vision-preview",
45
+ ],
24
46
  "google-ai": [
25
47
  "gemini-2.5-pro",
26
48
  "gemini-2.5-flash",
@@ -29,44 +51,91 @@ const VISION_CAPABILITIES = {
29
51
  "gemini-pro-vision",
30
52
  ],
31
53
  anthropic: [
54
+ "claude-3-7-sonnet",
32
55
  "claude-3-5-sonnet",
33
56
  "claude-3-opus",
34
57
  "claude-3-sonnet",
35
58
  "claude-3-haiku",
36
59
  ],
37
60
  azure: [
61
+ // GPT-5 family
62
+ "gpt-5",
63
+ "gpt-5-pro",
64
+ "gpt-5-mini",
65
+ // GPT-4.1 family
66
+ "gpt-4.1",
67
+ "gpt-4.1-mini",
68
+ "gpt-4.1-nano",
69
+ // Existing GPT-4
38
70
  "gpt-4o",
39
71
  "gpt-4o-mini",
40
72
  "gpt-4-turbo",
41
73
  "gpt-4-vision-preview",
42
- "gpt-4.1",
43
74
  "gpt-4",
44
75
  ],
45
76
  vertex: [
46
77
  // Gemini models on Vertex AI
47
78
  "gemini-2.5-pro",
48
79
  "gemini-2.5-flash",
80
+ "gemini-2.0-flash",
49
81
  "gemini-1.5-pro",
50
82
  "gemini-1.5-flash",
51
- // Claude models on Vertex AI (with actual Vertex naming patterns)
83
+ // Claude 4.x models (versioned format)
84
+ "claude-sonnet-4-5@",
85
+ "claude-sonnet-4@",
86
+ "claude-opus-4-1@",
87
+ "claude-opus-4@",
88
+ // Claude 3.x models (versioned format)
89
+ "claude-3-7-sonnet@",
90
+ "claude-3-5-sonnet@",
91
+ "claude-opus-3@",
92
+ "claude-haiku-3@",
93
+ // Claude models (non-versioned format)
94
+ "claude-3-7-sonnet",
52
95
  "claude-3-5-sonnet",
53
96
  "claude-3-opus",
54
97
  "claude-3-sonnet",
55
98
  "claude-3-haiku",
56
- "claude-sonnet-3",
57
99
  "claude-sonnet-4",
100
+ "claude-sonnet-3",
58
101
  "claude-opus-3",
59
102
  "claude-haiku-3",
60
- // Additional Vertex AI Claude model patterns
103
+ // Additional patterns for compatibility
61
104
  "claude-3.5-sonnet",
62
105
  "claude-3.5-haiku",
63
106
  "claude-3.0-sonnet",
64
107
  "claude-3.0-opus",
65
- // Versioned model names (e.g., claude-sonnet-4@20250514)
66
- "claude-sonnet-4@",
67
- "claude-opus-3@",
68
- "claude-haiku-3@",
69
- "claude-3-5-sonnet@",
108
+ ],
109
+ litellm: [
110
+ // LiteLLM proxies to underlying providers
111
+ // List models that support vision when going through the proxy
112
+ "gemini-2.5-pro",
113
+ "gemini-2.5-flash",
114
+ "claude-sonnet-4",
115
+ "claude-sonnet-4-5",
116
+ "claude-opus-4-1",
117
+ "gpt-4o",
118
+ "gpt-4.1",
119
+ "gpt-5",
120
+ ],
121
+ ollama: [
122
+ // Llama 4 family (May 2025 - Best vision + tool calling)
123
+ "llama4:scout",
124
+ "llama4:maverick",
125
+ // Llama 3.2 vision
126
+ "llama3.2-vision",
127
+ // Gemma 3 family (SigLIP vision encoder - supports tool calling + vision)
128
+ "gemma3:4b",
129
+ "gemma3:12b",
130
+ "gemma3:27b",
131
+ "gemma3:latest",
132
+ // Mistral Small family (vision + tool calling)
133
+ "mistral-small3.1",
134
+ "mistral-small3.1:large",
135
+ "mistral-small3.1:medium",
136
+ "mistral-small3.1:small",
137
+ // LLaVA (vision-focused)
138
+ "llava",
70
139
  ],
71
140
  };
72
141
  /**
@@ -100,6 +169,9 @@ export class ProviderImageAdapter {
100
169
  case "vertex":
101
170
  adaptedPayload = this.formatForVertex(text, images, model);
102
171
  break;
172
+ case "ollama":
173
+ adaptedPayload = this.formatForOpenAI(text, images);
174
+ break;
103
175
  default:
104
176
  throw new Error(`Vision not supported for provider: ${provider}`);
105
177
  }
@@ -349,13 +349,13 @@ export declare const directAgentTools: {
349
349
  analyzeCSV: import("ai").Tool<z.ZodObject<{
350
350
  filePath: z.ZodEffects<z.ZodString, string, string>;
351
351
  operation: z.ZodEnum<["count_by_column", "sum_by_column", "average_by_column", "min_max_by_column", "describe"]>;
352
- column: z.ZodOptional<z.ZodString>;
353
- maxRows: z.ZodOptional<z.ZodNumber>;
352
+ column: z.ZodDefault<z.ZodOptional<z.ZodString>>;
353
+ maxRows: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
354
354
  }, "strip", z.ZodTypeAny, {
355
355
  operation: "count_by_column" | "sum_by_column" | "average_by_column" | "min_max_by_column" | "describe";
356
+ maxRows: number;
356
357
  filePath: string;
357
- maxRows?: number | undefined;
358
- column?: string | undefined;
358
+ column: string;
359
359
  }, {
360
360
  operation: "count_by_column" | "sum_by_column" | "average_by_column" | "min_max_by_column" | "describe";
361
361
  filePath: string;
@@ -364,7 +364,7 @@ export declare const directAgentTools: {
364
364
  }>, {
365
365
  success: boolean;
366
366
  operation: "count_by_column" | "sum_by_column" | "average_by_column" | "min_max_by_column" | "describe";
367
- column: string | undefined;
367
+ column: string;
368
368
  result: string;
369
369
  rowCount: number;
370
370
  } | {
@@ -376,17 +376,17 @@ export declare const directAgentTools: {
376
376
  success: boolean;
377
377
  error: string;
378
378
  operation: "count_by_column" | "sum_by_column" | "average_by_column" | "min_max_by_column" | "describe";
379
- column: string | undefined;
379
+ column: string;
380
380
  }> & {
381
381
  execute: (args: {
382
382
  operation: "count_by_column" | "sum_by_column" | "average_by_column" | "min_max_by_column" | "describe";
383
+ maxRows: number;
383
384
  filePath: string;
384
- maxRows?: number | undefined;
385
- column?: string | undefined;
385
+ column: string;
386
386
  }, options: import("ai").ToolExecutionOptions) => PromiseLike<{
387
387
  success: boolean;
388
388
  operation: "count_by_column" | "sum_by_column" | "average_by_column" | "min_max_by_column" | "describe";
389
- column: string | undefined;
389
+ column: string;
390
390
  result: string;
391
391
  rowCount: number;
392
392
  } | {
@@ -398,7 +398,7 @@ export declare const directAgentTools: {
398
398
  success: boolean;
399
399
  error: string;
400
400
  operation: "count_by_column" | "sum_by_column" | "average_by_column" | "min_max_by_column" | "describe";
401
- column: string | undefined;
401
+ column: string;
402
402
  }>;
403
403
  };
404
404
  websearchGrounding: import("ai").Tool<z.ZodObject<{
@@ -31,7 +31,7 @@ export const directAgentTools = {
31
31
  timezone: z
32
32
  .string()
33
33
  .optional()
34
- .describe('Timezone (e.g., "America/New_York", "Asia/Kolkata"). Defaults to local time.'),
34
+ .describe('Timezone (e.g., "America/New_York", "Asia/Kolkata"). Defaults to system local time.'),
35
35
  }),
36
36
  execute: async ({ timezone }) => {
37
37
  try {
@@ -103,8 +103,8 @@ export const directAgentTools = {
103
103
  includeHidden: z
104
104
  .boolean()
105
105
  .optional()
106
- .describe("Include hidden files (starting with .)")
107
- .default(false),
106
+ .default(false)
107
+ .describe("Include hidden files (starting with .)"),
108
108
  }),
109
109
  execute: async ({ path: dirPath, includeHidden }) => {
110
110
  try {
@@ -377,10 +377,12 @@ export const directAgentTools = {
377
377
  column: z
378
378
  .string()
379
379
  .optional()
380
+ .default("")
380
381
  .describe("Column name for the operation (required for most operations)"),
381
382
  maxRows: z
382
383
  .number()
383
384
  .optional()
385
+ .default(1000)
384
386
  .describe("Maximum rows to process (default: 1000)"),
385
387
  }),
386
388
  execute: async ({ filePath, operation, column, maxRows = 1000 }) => {
@@ -811,3 +811,4 @@ export class ConfigManager {
811
811
  }
812
812
  // Export for use in other CLI commands
813
813
  export const configManager = new ConfigManager();
814
+ //# sourceMappingURL=config.js.map
@@ -928,3 +928,4 @@ export class MCPCommandFactory {
928
928
  return servers;
929
929
  }
930
930
  }
931
+ //# sourceMappingURL=mcp.js.map
@@ -655,3 +655,4 @@ export class ModelsCommandFactory {
655
655
  }
656
656
  }
657
657
  }
658
+ //# sourceMappingURL=models.js.map
@@ -286,3 +286,4 @@ async function setupHandler() {
286
286
  logger.always(chalk.gray("\nFor more information, see: https://docs.neurolink.ai/providers/ollama"));
287
287
  }
288
288
  export default addOllamaCommands;
289
+ //# sourceMappingURL=ollama.js.map
@@ -412,3 +412,4 @@ function showUsageExample() {
412
412
  logger.always(chalk.cyan(" pnpm cli generate 'Explain quantum computing' --provider anthropic"));
413
413
  logger.always(chalk.cyan(" pnpm cli generate 'Analyze this data' --provider anthropic --enable-analytics"));
414
414
  }
415
+ //# sourceMappingURL=setup-anthropic.js.map
@@ -413,3 +413,4 @@ function showUsageExample() {
413
413
  logger.always(chalk.cyan(" pnpm cli generate 'Explain quantum computing' --provider azure"));
414
414
  logger.always(chalk.cyan(" pnpm cli generate 'Analyze this data' --provider azure --enable-analytics"));
415
415
  }
416
+ //# sourceMappingURL=setup-azure.js.map
@@ -485,3 +485,4 @@ function maskCredential(credential) {
485
485
  const middle = "*".repeat(Math.max(4, credential.length - 8));
486
486
  return `${start}${middle}${end}`;
487
487
  }
488
+ //# sourceMappingURL=setup-bedrock.js.map
@@ -567,3 +567,4 @@ async function updateEnvFile(method, config) {
567
567
  throw error;
568
568
  }
569
569
  }
570
+ //# sourceMappingURL=setup-gcp.js.map
@@ -367,3 +367,4 @@ function showUsageExample() {
367
367
  logger.always(chalk.cyan(" pnpm cli generate 'Explain quantum computing' --provider google-ai"));
368
368
  logger.always(chalk.cyan(" pnpm cli generate 'Analyze this data' --provider google-ai --enable-analytics"));
369
369
  }
370
+ //# sourceMappingURL=setup-google-ai.js.map
@@ -198,3 +198,4 @@ export const setupHuggingFaceBuilder = {
198
198
  default: false,
199
199
  },
200
200
  };
201
+ //# sourceMappingURL=setup-huggingface.js.map
@@ -231,3 +231,4 @@ export const setupMistralBuilder = {
231
231
  default: false,
232
232
  },
233
233
  };
234
+ //# sourceMappingURL=setup-mistral.js.map
@@ -400,3 +400,4 @@ function showUsageExample() {
400
400
  logger.always(chalk.cyan(" pnpm cli generate 'Hello from OpenAI!' --provider openai"));
401
401
  logger.always(chalk.cyan(" pnpm cli generate 'Explain quantum computing' --provider openai"));
402
402
  }
403
+ //# sourceMappingURL=setup-openai.js.map
@@ -537,3 +537,4 @@ async function showProviderStatus() {
537
537
  logger.error(chalk.red("Error checking provider status:"), error);
538
538
  }
539
539
  }
540
+ //# sourceMappingURL=setup.js.map
@@ -26,3 +26,4 @@ export function handleError(_error, context) {
26
26
  process.exit(1);
27
27
  }
28
28
  }
29
+ //# sourceMappingURL=errorHandler.js.map
@@ -7,6 +7,7 @@ export declare class CLICommandFactory {
7
7
  private static buildOptions;
8
8
  private static processCliImages;
9
9
  private static processCliCSVFiles;
10
+ private static processCliPDFFiles;
10
11
  private static processCliFiles;
11
12
  private static processOptions;
12
13
  private static handleOutput;
@@ -54,6 +54,10 @@ export class CLICommandFactory {
54
54
  description: "Add CSV file for data analysis (can be used multiple times)",
55
55
  alias: "c",
56
56
  },
57
+ pdf: {
58
+ type: "string",
59
+ description: "Add PDF file for analysis (can be used multiple times)",
60
+ },
57
61
  file: {
58
62
  type: "string",
59
63
  description: "Add file with auto-detection (CSV, image, etc. - can be used multiple times)",
@@ -215,6 +219,13 @@ export class CLICommandFactory {
215
219
  }
216
220
  return Array.isArray(csvFiles) ? csvFiles : [csvFiles];
217
221
  }
222
+ // Helper method to process CLI PDF files
223
+ static processCliPDFFiles(pdfFiles) {
224
+ if (!pdfFiles) {
225
+ return undefined;
226
+ }
227
+ return Array.isArray(pdfFiles) ? pdfFiles : [pdfFiles];
228
+ }
218
229
  // Helper method to process CLI files with auto-detection
219
230
  static processCliFiles(files) {
220
231
  if (!files) {
@@ -1064,14 +1075,17 @@ export class CLICommandFactory {
1064
1075
  // Process CLI multimodal inputs
1065
1076
  const imageBuffers = CLICommandFactory.processCliImages(argv.image);
1066
1077
  const csvFiles = CLICommandFactory.processCliCSVFiles(argv.csv);
1078
+ const pdfFiles = CLICommandFactory.processCliPDFFiles(argv.pdf);
1067
1079
  const files = CLICommandFactory.processCliFiles(argv.file);
1080
+ const generateInput = {
1081
+ text: inputText,
1082
+ ...(imageBuffers && { images: imageBuffers }),
1083
+ ...(csvFiles && { csvFiles }),
1084
+ ...(pdfFiles && { pdfFiles }),
1085
+ ...(files && { files }),
1086
+ };
1068
1087
  const result = await sdk.generate({
1069
- input: {
1070
- text: inputText,
1071
- ...(imageBuffers && { images: imageBuffers }),
1072
- ...(csvFiles && { csvFiles }),
1073
- ...(files && { files }),
1074
- },
1088
+ input: generateInput,
1075
1089
  csvOptions: {
1076
1090
  maxRows: argv.csvMaxRows,
1077
1091
  formatStyle: argv.csvFormat,
@@ -1248,12 +1262,14 @@ export class CLICommandFactory {
1248
1262
  // Process CLI multimodal inputs
1249
1263
  const imageBuffers = CLICommandFactory.processCliImages(argv.image);
1250
1264
  const csvFiles = CLICommandFactory.processCliCSVFiles(argv.csv);
1265
+ const pdfFiles = CLICommandFactory.processCliPDFFiles(argv.pdf);
1251
1266
  const files = CLICommandFactory.processCliFiles(argv.file);
1252
1267
  const stream = await sdk.stream({
1253
1268
  input: {
1254
1269
  text: inputText,
1255
1270
  ...(imageBuffers && { images: imageBuffers }),
1256
1271
  ...(csvFiles && { csvFiles }),
1272
+ ...(pdfFiles && { pdfFiles }),
1257
1273
  ...(files && { files }),
1258
1274
  },
1259
1275
  csvOptions: {
@@ -2025,3 +2041,4 @@ export class CLICommandFactory {
2025
2041
  }
2026
2042
  }
2027
2043
  }
2044
+ //# sourceMappingURL=commandFactory.js.map
@@ -374,3 +374,4 @@ export class OllamaCommandFactory {
374
374
  logger.always(chalk.gray("\nFor more information, see: https://docs.neurolink.ai/providers/ollama"));
375
375
  }
376
376
  }
377
+ //# sourceMappingURL=ollamaCommandFactory.js.map
@@ -782,3 +782,4 @@ export class SageMakerCommandFactory {
782
782
  }
783
783
  }
784
784
  }
785
+ //# sourceMappingURL=sagemakerCommandFactory.js.map
@@ -135,3 +135,4 @@ export class SetupCommandFactory {
135
135
  });
136
136
  }
137
137
  }
138
+ //# sourceMappingURL=setupCommandFactory.js.map
package/dist/cli/index.js CHANGED
@@ -57,3 +57,4 @@ async function cleanup() {
57
57
  const { flushOpenTelemetry } = await import("../lib/services/server/ai/observability/instrumentation.js");
58
58
  await flushOpenTelemetry();
59
59
  }
60
+ //# sourceMappingURL=index.js.map
@@ -220,3 +220,4 @@ export class ConversationSelector {
220
220
  };
221
221
  }
222
222
  }
223
+ //# sourceMappingURL=conversationSelector.js.map
@@ -57,3 +57,4 @@ export const textGenerationOptionsSchema = {
57
57
  description: "Context about tools/MCPs used in the interaction.",
58
58
  },
59
59
  };
60
+ //# sourceMappingURL=optionsSchema.js.map
@@ -507,3 +507,4 @@ export class LoopSession {
507
507
  }
508
508
  }
509
509
  }
510
+ //# sourceMappingURL=session.js.map
@@ -159,3 +159,4 @@ export function initializeCliParser() {
159
159
  // Setup Commands - Using SetupCommandFactory
160
160
  .command(SetupCommandFactory.createSetupCommands())); // Close the main return statement
161
161
  }
162
+ //# sourceMappingURL=parser.js.map
@@ -80,3 +80,4 @@ export async function configInit(quiet = false) {
80
80
  }
81
81
  await runCompleteSetup(quiet);
82
82
  }
83
+ //# sourceMappingURL=completeSetup.js.map
@@ -239,3 +239,4 @@ export function validateEnvFile(envPath = ".env", requiredVars = []) {
239
239
  }
240
240
  return result;
241
241
  }
242
+ //# sourceMappingURL=envManager.js.map
@@ -372,3 +372,4 @@ export function displaySetupSummary(result, quiet = false) {
372
372
  }
373
373
  logger.always(chalk.blue("\nšŸ“š Documentation: https://github.com/juspay/neurolink#setup"));
374
374
  }
375
+ //# sourceMappingURL=interactiveSetup.js.map
@@ -181,3 +181,4 @@ export class OllamaUtils {
181
181
  }
182
182
  }
183
183
  }
184
+ //# sourceMappingURL=ollamaUtils.js.map
@@ -42,7 +42,7 @@ export const OPERATION_TIMEOUTS = {
42
42
  };
43
43
  // Import the constants from the individual files for use in composite configurations
44
44
  import { PROVIDER_TIMEOUTS, MCP_TIMEOUTS, TimeoutUtils, TOOL_TIMEOUTS, } from "./timeouts.js";
45
- import { RETRY_ATTEMPTS, RETRY_DELAYS, PROVIDER_RETRY, RetryUtils, } from "./retry.js";
45
+ import { RETRY_ATTEMPTS, RETRY_DELAYS, PROVIDER_RETRY, BACKOFF_CONFIG, RetryUtils, } from "./retry.js";
46
46
  import { CONCURRENCY_LIMITS, MEMORY_THRESHOLDS, BUFFER_SIZES, } from "./performance.js";
47
47
  import { TokenUtils } from "./tokens.js";
48
48
  /**
@@ -133,6 +133,11 @@ export declare abstract class BaseProvider implements AIProvider {
133
133
  * Process custom tools from setupToolExecutor
134
134
  */
135
135
  private processCustomTools;
136
+ /**
137
+ * Recursively fix JSON Schema for OpenAI strict mode compatibility
138
+ * OpenAI requires additionalProperties: false at ALL levels and preserves required array
139
+ */
140
+ private fixSchemaForOpenAIStrictMode;
136
141
  /**
137
142
  * Create an external MCP tool
138
143
  */