@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.
- package/CHANGELOG.md +9 -0
- package/README.md +12 -9
- package/dist/adapters/providerImageAdapter.js +82 -10
- package/dist/agent/directTools.d.ts +10 -10
- package/dist/agent/directTools.js +5 -3
- package/dist/cli/commands/config.js +1 -0
- package/dist/cli/commands/mcp.js +1 -0
- package/dist/cli/commands/models.js +1 -0
- package/dist/cli/commands/ollama.js +1 -0
- package/dist/cli/commands/setup-anthropic.js +1 -0
- package/dist/cli/commands/setup-azure.js +1 -0
- package/dist/cli/commands/setup-bedrock.js +1 -0
- package/dist/cli/commands/setup-gcp.js +1 -0
- package/dist/cli/commands/setup-google-ai.js +1 -0
- package/dist/cli/commands/setup-huggingface.js +1 -0
- package/dist/cli/commands/setup-mistral.js +1 -0
- package/dist/cli/commands/setup-openai.js +1 -0
- package/dist/cli/commands/setup.js +1 -0
- package/dist/cli/errorHandler.js +1 -0
- package/dist/cli/factories/commandFactory.d.ts +1 -0
- package/dist/cli/factories/commandFactory.js +23 -6
- package/dist/cli/factories/ollamaCommandFactory.js +1 -0
- package/dist/cli/factories/sagemakerCommandFactory.js +1 -0
- package/dist/cli/factories/setupCommandFactory.js +1 -0
- package/dist/cli/index.js +1 -0
- package/dist/cli/loop/conversationSelector.js +1 -0
- package/dist/cli/loop/optionsSchema.js +1 -0
- package/dist/cli/loop/session.js +1 -0
- package/dist/cli/parser.js +1 -0
- package/dist/cli/utils/completeSetup.js +1 -0
- package/dist/cli/utils/envManager.js +1 -0
- package/dist/cli/utils/interactiveSetup.js +1 -0
- package/dist/cli/utils/ollamaUtils.js +1 -0
- package/dist/constants/index.js +1 -1
- package/dist/core/baseProvider.d.ts +5 -0
- package/dist/core/baseProvider.js +70 -20
- package/dist/index.d.ts +3 -3
- package/dist/lib/adapters/providerImageAdapter.js +83 -10
- package/dist/lib/agent/directTools.d.ts +10 -10
- package/dist/lib/agent/directTools.js +6 -3
- package/dist/lib/config/configManager.js +1 -0
- package/dist/lib/config/conversationMemory.js +1 -0
- package/dist/lib/config/taskClassificationConfig.js +1 -0
- package/dist/lib/constants/index.js +2 -1
- package/dist/lib/constants/performance.js +1 -0
- package/dist/lib/constants/retry.js +1 -0
- package/dist/lib/constants/timeouts.js +1 -0
- package/dist/lib/constants/tokens.js +1 -0
- package/dist/lib/core/analytics.js +1 -0
- package/dist/lib/core/baseProvider.d.ts +5 -0
- package/dist/lib/core/baseProvider.js +71 -20
- package/dist/lib/core/constants.js +1 -0
- package/dist/lib/core/conversationMemoryFactory.js +1 -0
- package/dist/lib/core/conversationMemoryInitializer.js +1 -0
- package/dist/lib/core/conversationMemoryManager.js +1 -0
- package/dist/lib/core/dynamicModels.js +1 -0
- package/dist/lib/core/evaluation.js +1 -0
- package/dist/lib/core/evaluationProviders.js +1 -0
- package/dist/lib/core/factory.js +1 -0
- package/dist/lib/core/modelConfiguration.js +1 -0
- package/dist/lib/core/redisConversationMemoryManager.js +1 -0
- package/dist/lib/core/serviceRegistry.js +1 -0
- package/dist/lib/core/streamAnalytics.js +1 -0
- package/dist/lib/evaluation/contextBuilder.js +1 -0
- package/dist/lib/evaluation/index.js +1 -0
- package/dist/lib/evaluation/prompts.js +1 -0
- package/dist/lib/evaluation/ragasEvaluator.js +1 -0
- package/dist/lib/evaluation/retryManager.js +1 -0
- package/dist/lib/evaluation/scoring.js +1 -0
- package/dist/lib/factories/providerFactory.js +1 -0
- package/dist/lib/factories/providerRegistry.js +1 -0
- package/dist/lib/hitl/hitlErrors.js +1 -0
- package/dist/lib/hitl/hitlManager.js +1 -0
- package/dist/lib/hitl/index.js +1 -0
- package/dist/lib/hitl/types.js +1 -0
- package/dist/lib/index.d.ts +3 -3
- package/dist/lib/index.js +1 -0
- package/dist/lib/mcp/externalServerManager.js +1 -0
- package/dist/lib/mcp/factory.js +1 -0
- package/dist/lib/mcp/flexibleToolValidator.js +1 -0
- package/dist/lib/mcp/index.js +1 -0
- package/dist/lib/mcp/mcpCircuitBreaker.js +1 -0
- package/dist/lib/mcp/mcpClientFactory.js +2 -1
- package/dist/lib/mcp/registry.js +1 -0
- package/dist/lib/mcp/servers/agent/directToolsServer.js +2 -0
- package/dist/lib/mcp/servers/aiProviders/aiAnalysisTools.js +1 -0
- package/dist/lib/mcp/servers/aiProviders/aiCoreServer.js +1 -0
- package/dist/lib/mcp/servers/aiProviders/aiWorkflowTools.js +1 -0
- package/dist/lib/mcp/servers/utilities/utilityServer.js +1 -0
- package/dist/lib/mcp/toolDiscoveryService.js +1 -0
- package/dist/lib/mcp/toolRegistry.js +1 -0
- package/dist/lib/memory/mem0Initializer.js +1 -0
- package/dist/lib/middleware/builtin/analytics.js +1 -0
- package/dist/lib/middleware/builtin/autoEvaluation.js +1 -0
- package/dist/lib/middleware/builtin/guardrails.js +1 -0
- package/dist/lib/middleware/factory.js +1 -0
- package/dist/lib/middleware/index.js +1 -0
- package/dist/lib/middleware/registry.js +1 -0
- package/dist/lib/middleware/utils/guardrailsUtils.js +1 -0
- package/dist/lib/models/modelRegistry.js +1 -0
- package/dist/lib/models/modelResolver.js +2 -0
- package/dist/lib/neurolink.d.ts +6 -0
- package/dist/lib/neurolink.js +135 -5
- package/dist/lib/providers/amazonBedrock.d.ts +1 -0
- package/dist/lib/providers/amazonBedrock.js +166 -14
- package/dist/lib/providers/amazonSagemaker.js +1 -0
- package/dist/lib/providers/anthropic.js +7 -21
- package/dist/lib/providers/anthropicBaseProvider.js +1 -0
- package/dist/lib/providers/azureOpenai.js +5 -21
- package/dist/lib/providers/googleAiStudio.js +5 -21
- package/dist/lib/providers/googleVertex.js +8 -1
- package/dist/lib/providers/huggingFace.js +34 -3
- package/dist/lib/providers/index.js +1 -0
- package/dist/lib/providers/litellm.js +34 -3
- package/dist/lib/providers/mistral.js +32 -2
- package/dist/lib/providers/ollama.d.ts +37 -1
- package/dist/lib/providers/ollama.js +544 -58
- package/dist/lib/providers/openAI.js +5 -21
- package/dist/lib/providers/openaiCompatible.js +41 -4
- package/dist/lib/providers/sagemaker/adaptive-semaphore.js +1 -0
- package/dist/lib/providers/sagemaker/client.js +1 -0
- package/dist/lib/providers/sagemaker/config.js +1 -0
- package/dist/lib/providers/sagemaker/detection.js +1 -0
- package/dist/lib/providers/sagemaker/diagnostics.js +1 -0
- package/dist/lib/providers/sagemaker/error-constants.js +1 -0
- package/dist/lib/providers/sagemaker/errors.js +1 -0
- package/dist/lib/providers/sagemaker/index.js +1 -0
- package/dist/lib/providers/sagemaker/language-model.js +1 -0
- package/dist/lib/providers/sagemaker/parsers.js +1 -0
- package/dist/lib/providers/sagemaker/streaming.js +1 -0
- package/dist/lib/providers/sagemaker/structured-parser.js +1 -0
- package/dist/lib/proxy/awsProxyIntegration.js +1 -0
- package/dist/lib/proxy/proxyFetch.js +1 -0
- package/dist/lib/proxy/utils/noProxyUtils.js +1 -0
- package/dist/lib/sdk/toolRegistration.js +2 -0
- package/dist/lib/services/server/ai/observability/instrumentation.js +1 -0
- package/dist/lib/session/globalSessionState.js +1 -0
- package/dist/lib/telemetry/index.js +1 -0
- package/dist/lib/telemetry/telemetryService.js +1 -0
- package/dist/lib/types/analytics.js +1 -0
- package/dist/lib/types/cli.js +1 -0
- package/dist/lib/types/common.js +1 -0
- package/dist/lib/types/configTypes.js +1 -0
- package/dist/lib/types/content.d.ts +14 -1
- package/dist/lib/types/content.js +1 -0
- package/dist/lib/types/contextTypes.js +1 -0
- package/dist/lib/types/conversation.js +1 -0
- package/dist/lib/types/domainTypes.js +1 -0
- package/dist/lib/types/errors.js +1 -0
- package/dist/lib/types/evaluation.js +1 -0
- package/dist/lib/types/evaluationProviders.js +1 -0
- package/dist/lib/types/evaluationTypes.js +1 -0
- package/dist/lib/types/externalMcp.js +1 -0
- package/dist/lib/types/fileTypes.d.ts +44 -0
- package/dist/lib/types/fileTypes.js +1 -0
- package/dist/lib/types/generateTypes.d.ts +1 -0
- package/dist/lib/types/generateTypes.js +1 -0
- package/dist/lib/types/guardrails.js +1 -0
- package/dist/lib/types/index.js +1 -0
- package/dist/lib/types/mcpTypes.js +1 -0
- package/dist/lib/types/middlewareTypes.js +1 -0
- package/dist/lib/types/modelTypes.js +1 -0
- package/dist/lib/types/observability.js +1 -0
- package/dist/lib/types/providers.d.ts +44 -0
- package/dist/lib/types/providers.js +1 -0
- package/dist/lib/types/sdkTypes.js +1 -0
- package/dist/lib/types/serviceTypes.js +1 -0
- package/dist/lib/types/streamTypes.d.ts +1 -0
- package/dist/lib/types/streamTypes.js +1 -0
- package/dist/lib/types/taskClassificationTypes.js +1 -0
- package/dist/lib/types/tools.js +2 -0
- package/dist/lib/types/typeAliases.js +1 -0
- package/dist/lib/types/universalProviderOptions.js +1 -0
- package/dist/lib/utils/analyticsUtils.js +1 -0
- package/dist/lib/utils/conversationMemory.js +1 -0
- package/dist/lib/utils/conversationMemoryUtils.js +1 -0
- package/dist/lib/utils/csvProcessor.js +1 -0
- package/dist/lib/utils/errorHandling.js +1 -0
- package/dist/lib/utils/evaluationUtils.js +1 -0
- package/dist/lib/utils/factoryProcessing.js +1 -0
- package/dist/lib/utils/fileDetector.js +7 -3
- package/dist/lib/utils/imageProcessor.js +1 -0
- package/dist/lib/utils/logger.js +1 -0
- package/dist/lib/utils/loopUtils.js +1 -0
- package/dist/lib/utils/mcpDefaults.js +1 -0
- package/dist/lib/utils/messageBuilder.js +96 -9
- package/dist/lib/utils/modelRouter.js +1 -0
- package/dist/lib/utils/multimodalOptionsBuilder.d.ts +67 -0
- package/dist/lib/utils/multimodalOptionsBuilder.js +65 -0
- package/dist/lib/utils/optionsConversion.js +1 -0
- package/dist/lib/utils/optionsUtils.js +1 -0
- package/dist/lib/utils/parameterValidation.js +1 -0
- package/dist/lib/utils/pdfProcessor.d.ts +10 -0
- package/dist/lib/utils/pdfProcessor.js +199 -0
- package/dist/lib/utils/performance.js +1 -0
- package/dist/lib/utils/promptRedaction.js +1 -0
- package/dist/lib/utils/providerConfig.js +1 -0
- package/dist/lib/utils/providerHealth.js +1 -0
- package/dist/lib/utils/providerSetupMessages.js +1 -0
- package/dist/lib/utils/providerUtils.js +1 -0
- package/dist/lib/utils/redis.js +1 -0
- package/dist/lib/utils/retryHandler.js +1 -0
- package/dist/lib/utils/schemaConversion.js +1 -0
- package/dist/lib/utils/taskClassificationUtils.js +1 -0
- package/dist/lib/utils/taskClassifier.js +1 -0
- package/dist/lib/utils/timeout.js +1 -0
- package/dist/lib/utils/tokenLimits.js +1 -0
- package/dist/lib/utils/toolUtils.js +1 -0
- package/dist/lib/utils/transformationUtils.js +1 -0
- package/dist/lib/utils/typeUtils.js +1 -0
- package/dist/mcp/mcpClientFactory.js +1 -1
- package/dist/mcp/servers/agent/directToolsServer.js +1 -0
- package/dist/models/modelResolver.js +1 -0
- package/dist/neurolink.d.ts +6 -0
- package/dist/neurolink.js +134 -5
- package/dist/providers/amazonBedrock.d.ts +1 -0
- package/dist/providers/amazonBedrock.js +165 -14
- package/dist/providers/anthropic.js +6 -21
- package/dist/providers/azureOpenai.js +4 -21
- package/dist/providers/googleAiStudio.js +4 -21
- package/dist/providers/googleVertex.js +7 -1
- package/dist/providers/huggingFace.js +33 -3
- package/dist/providers/litellm.js +33 -3
- package/dist/providers/mistral.js +31 -2
- package/dist/providers/ollama.d.ts +37 -1
- package/dist/providers/ollama.js +543 -58
- package/dist/providers/openAI.js +4 -21
- package/dist/providers/openaiCompatible.js +40 -4
- package/dist/sdk/toolRegistration.js +1 -0
- package/dist/types/content.d.ts +14 -1
- package/dist/types/fileTypes.d.ts +44 -0
- package/dist/types/generateTypes.d.ts +1 -0
- package/dist/types/providers.d.ts +44 -0
- package/dist/types/streamTypes.d.ts +1 -0
- package/dist/types/tools.js +1 -0
- package/dist/utils/fileDetector.js +6 -3
- package/dist/utils/messageBuilder.js +95 -9
- package/dist/utils/multimodalOptionsBuilder.d.ts +67 -0
- package/dist/utils/multimodalOptionsBuilder.js +64 -0
- package/dist/utils/pdfProcessor.d.ts +10 -0
- package/dist/utils/pdfProcessor.js +198 -0
- 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: [
|
|
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
|
|
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
|
|
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
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
"
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
-
.
|
|
107
|
-
.
|
|
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 }) => {
|
package/dist/cli/commands/mcp.js
CHANGED
|
@@ -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
|
|
@@ -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
|
|
@@ -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
|
package/dist/cli/errorHandler.js
CHANGED
|
@@ -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
|
package/dist/cli/index.js
CHANGED
package/dist/cli/loop/session.js
CHANGED
package/dist/cli/parser.js
CHANGED
package/dist/constants/index.js
CHANGED
|
@@ -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
|
*/
|