@juspay/neurolink 7.40.1 → 7.41.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 CHANGED
@@ -1,3 +1,11 @@
1
+ ## [7.41.1](https://github.com/juspay/neurolink/compare/v7.41.0...v7.41.1) (2025-09-20)
2
+
3
+ ## [7.41.0](https://github.com/juspay/neurolink/compare/v7.40.1...v7.41.0) (2025-09-20)
4
+
5
+ ### Features
6
+
7
+ - **(test):** Added tests for hitl ([5ab1885](https://github.com/juspay/neurolink/commit/5ab1885eb8788dd499cda94c67d1791e7dd9b90f))
8
+
1
9
  ## [7.40.1](https://github.com/juspay/neurolink/compare/v7.40.0...v7.40.1) (2025-09-17)
2
10
 
3
11
  ### Bug Fixes
@@ -1,4 +1,4 @@
1
- import { type TextGenerationOptions } from "../../lib/core/types.js";
1
+ import type { TextGenerationOptions } from "../../lib/types/generateTypes.js";
2
2
  /**
3
3
  * Defines the schema for a session variable or a generation option.
4
4
  */
@@ -1,4 +1,4 @@
1
- import { AIProviderName, } from "../../lib/core/types.js";
1
+ import { AIProviderName } from "../../lib/types/providers.js";
2
2
  /**
3
3
  * Master schema for all text generation options.
4
4
  * This object provides metadata for validation and help text in the CLI loop.
@@ -9,6 +9,9 @@ import { EventEmitter } from "events";
9
9
  import { randomUUID } from "crypto";
10
10
  import { HITLTimeoutError, HITLConfigurationError } from "./hitlErrors.js";
11
11
  import { logger } from "../utils/logger.js";
12
+ // Default configuration constants
13
+ const DEFAULT_TIMEOUT = 30000; // 30 seconds
14
+ const DEFAULT_ALLOW_MODIFICATION = false;
12
15
  /**
13
16
  * HITLManager - Central orchestrator for Human-in-the-Loop safety mechanisms
14
17
  *
@@ -44,9 +47,9 @@ export class HITLManager extends EventEmitter {
44
47
  const configWithDefaults = {
45
48
  enabled: config.enabled,
46
49
  dangerousActions: config.dangerousActions,
47
- timeout: config.timeout ?? 30000, // Default: 30 seconds
50
+ timeout: config.timeout ?? DEFAULT_TIMEOUT, // Default: 30 seconds
48
51
  confirmationMethod: config.confirmationMethod ?? "event", // Default: "event"
49
- allowArgumentModification: config.allowArgumentModification ?? true, // Default: true
52
+ allowArgumentModification: config.allowArgumentModification ?? DEFAULT_ALLOW_MODIFICATION, // Default: true
50
53
  autoApproveOnTimeout: config.autoApproveOnTimeout ?? false, // Default: false (safe)
51
54
  auditLogging: config.auditLogging ?? false, // Default: false
52
55
  customRules: config.customRules ?? [], // Default: empty array
@@ -145,8 +148,8 @@ export class HITLManager extends EventEmitter {
145
148
  userId: context?.userId,
146
149
  dangerousKeywords: this.getTriggeredKeywords(toolName, arguments_),
147
150
  },
148
- timeoutMs: this.config.timeout,
149
- allowModification: this.config.allowArgumentModification,
151
+ timeoutMs: this.config.timeout ?? DEFAULT_TIMEOUT,
152
+ allowModification: this.config.allowArgumentModification ?? DEFAULT_ALLOW_MODIFICATION,
150
153
  },
151
154
  };
152
155
  // Emit confirmation request event
@@ -236,7 +239,7 @@ export class HITLManager extends EventEmitter {
236
239
  this.logAuditEvent("confirmation-timeout", {
237
240
  confirmationId,
238
241
  toolName: request.toolName,
239
- timeout: this.config.timeout,
242
+ timeout: this.config.timeout ?? DEFAULT_TIMEOUT,
240
243
  arguments: request.arguments,
241
244
  autoApproved: shouldAutoApprove,
242
245
  });
@@ -247,7 +250,7 @@ export class HITLManager extends EventEmitter {
247
250
  payload: {
248
251
  confirmationId,
249
252
  toolName: request.toolName,
250
- timeout: this.config.timeout,
253
+ timeout: this.config.timeout ?? DEFAULT_TIMEOUT,
251
254
  },
252
255
  };
253
256
  // Emit timeout event
@@ -281,7 +284,7 @@ export class HITLManager extends EventEmitter {
281
284
  }
282
285
  else {
283
286
  // Reject with timeout error (original behavior)
284
- request.reject(new HITLTimeoutError(`Confirmation timeout for tool: ${request.toolName}`, confirmationId, this.config.timeout));
287
+ request.reject(new HITLTimeoutError(`Confirmation timeout for tool: ${request.toolName}`, confirmationId, this.config.timeout ?? DEFAULT_TIMEOUT));
285
288
  }
286
289
  }
287
290
  /**
package/dist/index.d.ts CHANGED
@@ -103,4 +103,4 @@ export type { TextGenerationOptions, TextGenerationResult, AnalyticsData, Evalua
103
103
  * console.log(result.content);
104
104
  * ```
105
105
  */
106
- export declare function generateText(options: import("./core/types.js").TextGenerationOptions): Promise<import("./core/types.js").TextGenerationResult>;
106
+ export declare function generateText(options: import("./types/index.js").TextGenerationOptions): Promise<import("./types/index.js").TextGenerationResult>;
@@ -9,6 +9,9 @@ import { EventEmitter } from "events";
9
9
  import { randomUUID } from "crypto";
10
10
  import { HITLTimeoutError, HITLConfigurationError } from "./hitlErrors.js";
11
11
  import { logger } from "../utils/logger.js";
12
+ // Default configuration constants
13
+ const DEFAULT_TIMEOUT = 30000; // 30 seconds
14
+ const DEFAULT_ALLOW_MODIFICATION = false;
12
15
  /**
13
16
  * HITLManager - Central orchestrator for Human-in-the-Loop safety mechanisms
14
17
  *
@@ -44,9 +47,9 @@ export class HITLManager extends EventEmitter {
44
47
  const configWithDefaults = {
45
48
  enabled: config.enabled,
46
49
  dangerousActions: config.dangerousActions,
47
- timeout: config.timeout ?? 30000, // Default: 30 seconds
50
+ timeout: config.timeout ?? DEFAULT_TIMEOUT, // Default: 30 seconds
48
51
  confirmationMethod: config.confirmationMethod ?? "event", // Default: "event"
49
- allowArgumentModification: config.allowArgumentModification ?? true, // Default: true
52
+ allowArgumentModification: config.allowArgumentModification ?? DEFAULT_ALLOW_MODIFICATION, // Default: true
50
53
  autoApproveOnTimeout: config.autoApproveOnTimeout ?? false, // Default: false (safe)
51
54
  auditLogging: config.auditLogging ?? false, // Default: false
52
55
  customRules: config.customRules ?? [], // Default: empty array
@@ -145,8 +148,8 @@ export class HITLManager extends EventEmitter {
145
148
  userId: context?.userId,
146
149
  dangerousKeywords: this.getTriggeredKeywords(toolName, arguments_),
147
150
  },
148
- timeoutMs: this.config.timeout,
149
- allowModification: this.config.allowArgumentModification,
151
+ timeoutMs: this.config.timeout ?? DEFAULT_TIMEOUT,
152
+ allowModification: this.config.allowArgumentModification ?? DEFAULT_ALLOW_MODIFICATION,
150
153
  },
151
154
  };
152
155
  // Emit confirmation request event
@@ -236,7 +239,7 @@ export class HITLManager extends EventEmitter {
236
239
  this.logAuditEvent("confirmation-timeout", {
237
240
  confirmationId,
238
241
  toolName: request.toolName,
239
- timeout: this.config.timeout,
242
+ timeout: this.config.timeout ?? DEFAULT_TIMEOUT,
240
243
  arguments: request.arguments,
241
244
  autoApproved: shouldAutoApprove,
242
245
  });
@@ -247,7 +250,7 @@ export class HITLManager extends EventEmitter {
247
250
  payload: {
248
251
  confirmationId,
249
252
  toolName: request.toolName,
250
- timeout: this.config.timeout,
253
+ timeout: this.config.timeout ?? DEFAULT_TIMEOUT,
251
254
  },
252
255
  };
253
256
  // Emit timeout event
@@ -281,7 +284,7 @@ export class HITLManager extends EventEmitter {
281
284
  }
282
285
  else {
283
286
  // Reject with timeout error (original behavior)
284
- request.reject(new HITLTimeoutError(`Confirmation timeout for tool: ${request.toolName}`, confirmationId, this.config.timeout));
287
+ request.reject(new HITLTimeoutError(`Confirmation timeout for tool: ${request.toolName}`, confirmationId, this.config.timeout ?? DEFAULT_TIMEOUT));
285
288
  }
286
289
  }
287
290
  /**
@@ -103,4 +103,4 @@ export type { TextGenerationOptions, TextGenerationResult, AnalyticsData, Evalua
103
103
  * console.log(result.content);
104
104
  * ```
105
105
  */
106
- export declare function generateText(options: import("./core/types.js").TextGenerationOptions): Promise<import("./core/types.js").TextGenerationResult>;
106
+ export declare function generateText(options: import("./types/index.js").TextGenerationOptions): Promise<import("./types/index.js").TextGenerationResult>;
@@ -3,7 +3,7 @@
3
3
  * Provides centralized model data for models command system
4
4
  * Part of Phase 4.1 - Models Command System
5
5
  */
6
- import { AIProviderName } from "../core/types.js";
6
+ import { AIProviderName } from "../types/providers.js";
7
7
  import type { JsonValue } from "../types/common.js";
8
8
  /**
9
9
  * Model capabilities interface
@@ -3,7 +3,7 @@
3
3
  * Provides centralized model data for models command system
4
4
  * Part of Phase 4.1 - Models Command System
5
5
  */
6
- import { AIProviderName, OpenAIModels, GoogleAIModels, AnthropicModels, DEFAULT_MODEL_ALIASES, } from "../core/types.js";
6
+ import { AIProviderName, OpenAIModels, GoogleAIModels, AnthropicModels, DEFAULT_MODEL_ALIASES, } from "../types/providers.js";
7
7
  /**
8
8
  * Comprehensive model registry
9
9
  */
@@ -1,6 +1,6 @@
1
1
  import { type LanguageModelV1 } from "ai";
2
2
  import { BaseProvider } from "../core/baseProvider.js";
3
- import type { AIProviderName } from "../core/types.js";
3
+ import type { AIProviderName } from "../types/providers.js";
4
4
  import type { StreamOptions, StreamResult } from "../types/streamTypes.js";
5
5
  export declare class AzureOpenAIProvider extends BaseProvider {
6
6
  private apiKey;
@@ -1,7 +1,7 @@
1
1
  import { createAzure } from "@ai-sdk/azure";
2
2
  import { streamText } from "ai";
3
3
  import { BaseProvider } from "../core/baseProvider.js";
4
- import { APIVersions } from "../core/types.js";
4
+ import { APIVersions } from "../types/providers.js";
5
5
  import { validateApiKey, createAzureAPIKeyConfig, createAzureEndpointConfig, } from "../utils/providerConfig.js";
6
6
  import { logger } from "../utils/logger.js";
7
7
  import { buildMessagesArray } from "../utils/messageBuilder.js";
@@ -48,7 +48,9 @@ export declare enum OpenAIModels {
48
48
  GPT_4_TURBO = "gpt-4-turbo",
49
49
  GPT_4O = "gpt-4o",
50
50
  GPT_4O_MINI = "gpt-4o-mini",
51
- GPT_3_5_TURBO = "gpt-3.5-turbo"
51
+ GPT_3_5_TURBO = "gpt-3.5-turbo",
52
+ O1_PREVIEW = "o1-preview",
53
+ O1_MINI = "o1-mini"
52
54
  }
53
55
  /**
54
56
  * Supported Models for Google Vertex AI
@@ -90,6 +92,19 @@ export declare enum AnthropicModels {
90
92
  CLAUDE_3_OPUS = "claude-3-opus-20240229",
91
93
  CLAUDE_3_HAIKU = "claude-3-haiku-20240307"
92
94
  }
95
+ /**
96
+ * API Versions for various providers
97
+ */
98
+ export declare enum APIVersions {
99
+ AZURE_LATEST = "2025-04-01-preview",
100
+ AZURE_STABLE = "2024-10-21",
101
+ AZURE_LEGACY = "2023-12-01-preview",
102
+ OPENAI_CURRENT = "v1",
103
+ OPENAI_BETA = "v1-beta",
104
+ GOOGLE_AI_CURRENT = "v1",
105
+ GOOGLE_AI_BETA = "v1beta",
106
+ ANTHROPIC_CURRENT = "2023-06-01"
107
+ }
93
108
  /**
94
109
  * Union type of all supported model names
95
110
  */
@@ -403,6 +418,36 @@ export type AISDKGenerateResult = GenerateResult & {
403
418
  }>;
404
419
  [key: string]: unknown;
405
420
  };
421
+ /**
422
+ * Default model aliases for easy reference
423
+ */
424
+ export declare const DEFAULT_MODEL_ALIASES: {
425
+ readonly LATEST_OPENAI: OpenAIModels.GPT_4O;
426
+ readonly FASTEST_OPENAI: OpenAIModels.GPT_4O_MINI;
427
+ readonly LATEST_ANTHROPIC: AnthropicModels.CLAUDE_3_5_SONNET;
428
+ readonly FASTEST_ANTHROPIC: AnthropicModels.CLAUDE_3_5_HAIKU;
429
+ readonly LATEST_GOOGLE: GoogleAIModels.GEMINI_2_5_PRO;
430
+ readonly FASTEST_GOOGLE: GoogleAIModels.GEMINI_2_5_FLASH;
431
+ readonly BEST_CODING: AnthropicModels.CLAUDE_3_5_SONNET;
432
+ readonly BEST_ANALYSIS: GoogleAIModels.GEMINI_2_5_PRO;
433
+ readonly BEST_CREATIVE: AnthropicModels.CLAUDE_3_5_SONNET;
434
+ readonly BEST_VALUE: GoogleAIModels.GEMINI_2_5_FLASH;
435
+ };
436
+ /**
437
+ * @deprecated Use DEFAULT_MODEL_ALIASES instead. Will be removed in future version.
438
+ */
439
+ export declare const ModelAliases: {
440
+ readonly LATEST_OPENAI: OpenAIModels.GPT_4O;
441
+ readonly FASTEST_OPENAI: OpenAIModels.GPT_4O_MINI;
442
+ readonly LATEST_ANTHROPIC: AnthropicModels.CLAUDE_3_5_SONNET;
443
+ readonly FASTEST_ANTHROPIC: AnthropicModels.CLAUDE_3_5_HAIKU;
444
+ readonly LATEST_GOOGLE: GoogleAIModels.GEMINI_2_5_PRO;
445
+ readonly FASTEST_GOOGLE: GoogleAIModels.GEMINI_2_5_FLASH;
446
+ readonly BEST_CODING: AnthropicModels.CLAUDE_3_5_SONNET;
447
+ readonly BEST_ANALYSIS: GoogleAIModels.GEMINI_2_5_PRO;
448
+ readonly BEST_CREATIVE: AnthropicModels.CLAUDE_3_5_SONNET;
449
+ readonly BEST_VALUE: GoogleAIModels.GEMINI_2_5_FLASH;
450
+ };
406
451
  /**
407
452
  * Default provider configurations
408
453
  */
@@ -40,6 +40,8 @@ export var OpenAIModels;
40
40
  OpenAIModels["GPT_4O"] = "gpt-4o";
41
41
  OpenAIModels["GPT_4O_MINI"] = "gpt-4o-mini";
42
42
  OpenAIModels["GPT_3_5_TURBO"] = "gpt-3.5-turbo";
43
+ OpenAIModels["O1_PREVIEW"] = "o1-preview";
44
+ OpenAIModels["O1_MINI"] = "o1-mini";
43
45
  })(OpenAIModels || (OpenAIModels = {}));
44
46
  /**
45
47
  * Supported Models for Google Vertex AI
@@ -95,6 +97,46 @@ export var AnthropicModels;
95
97
  AnthropicModels["CLAUDE_3_OPUS"] = "claude-3-opus-20240229";
96
98
  AnthropicModels["CLAUDE_3_HAIKU"] = "claude-3-haiku-20240307";
97
99
  })(AnthropicModels || (AnthropicModels = {}));
100
+ /**
101
+ * API Versions for various providers
102
+ */
103
+ export var APIVersions;
104
+ (function (APIVersions) {
105
+ // Azure OpenAI API versions
106
+ APIVersions["AZURE_LATEST"] = "2025-04-01-preview";
107
+ APIVersions["AZURE_STABLE"] = "2024-10-21";
108
+ APIVersions["AZURE_LEGACY"] = "2023-12-01-preview";
109
+ // OpenAI API versions
110
+ APIVersions["OPENAI_CURRENT"] = "v1";
111
+ APIVersions["OPENAI_BETA"] = "v1-beta";
112
+ // Google AI API versions
113
+ APIVersions["GOOGLE_AI_CURRENT"] = "v1";
114
+ APIVersions["GOOGLE_AI_BETA"] = "v1beta";
115
+ // Anthropic API versions
116
+ APIVersions["ANTHROPIC_CURRENT"] = "2023-06-01";
117
+ // Other provider versions can be added here
118
+ })(APIVersions || (APIVersions = {}));
119
+ /**
120
+ * Default model aliases for easy reference
121
+ */
122
+ export const DEFAULT_MODEL_ALIASES = {
123
+ // Latest recommended models per provider
124
+ LATEST_OPENAI: OpenAIModels.GPT_4O,
125
+ FASTEST_OPENAI: OpenAIModels.GPT_4O_MINI,
126
+ LATEST_ANTHROPIC: AnthropicModels.CLAUDE_3_5_SONNET,
127
+ FASTEST_ANTHROPIC: AnthropicModels.CLAUDE_3_5_HAIKU,
128
+ LATEST_GOOGLE: GoogleAIModels.GEMINI_2_5_PRO,
129
+ FASTEST_GOOGLE: GoogleAIModels.GEMINI_2_5_FLASH,
130
+ // Best models by use case
131
+ BEST_CODING: AnthropicModels.CLAUDE_3_5_SONNET,
132
+ BEST_ANALYSIS: GoogleAIModels.GEMINI_2_5_PRO,
133
+ BEST_CREATIVE: AnthropicModels.CLAUDE_3_5_SONNET,
134
+ BEST_VALUE: GoogleAIModels.GEMINI_2_5_FLASH,
135
+ };
136
+ /**
137
+ * @deprecated Use DEFAULT_MODEL_ALIASES instead. Will be removed in future version.
138
+ */
139
+ export const ModelAliases = DEFAULT_MODEL_ALIASES;
98
140
  /**
99
141
  * Default provider configurations
100
142
  */
@@ -2,7 +2,7 @@ import type { Tool } from "ai";
2
2
  import type { ValidationSchema, StandardRecord } from "./typeAliases.js";
3
3
  import type { ProviderConfig } from "./providers.js";
4
4
  import type { TextContent, ImageContent } from "./content.js";
5
- import type { AIProviderName, AnalyticsData } from "../core/types.js";
5
+ import type { AIProviderName, AnalyticsData } from "../types/index.js";
6
6
  import type { TokenUsage } from "./analytics.js";
7
7
  import type { EvaluationData } from "../index.js";
8
8
  import type { UnknownRecord, JsonValue, ToolExecutionEvent, ToolExecutionSummary } from "./common.js";
@@ -5,7 +5,7 @@
5
5
  import type { ConversationMemoryConfig, ChatMessage } from "../types/conversation.js";
6
6
  import type { ConversationMemoryManager } from "../core/conversationMemoryManager.js";
7
7
  import type { RedisConversationMemoryManager } from "../core/redisConversationMemoryManager.js";
8
- import type { TextGenerationOptions, TextGenerationResult } from "../core/types.js";
8
+ import type { TextGenerationOptions, TextGenerationResult } from "../types/generateTypes.js";
9
9
  /**
10
10
  * Apply conversation memory defaults to user configuration
11
11
  * Merges user config with environment variables and default values
@@ -2,7 +2,7 @@
2
2
  * Provider Health Checking System
3
3
  * Prevents 500 errors by validating provider availability and configuration
4
4
  */
5
- import { AIProviderName } from "../core/types.js";
5
+ import { AIProviderName } from "../types/providers.js";
6
6
  export interface ProviderHealthStatus {
7
7
  provider: AIProviderName;
8
8
  isHealthy: boolean;
@@ -3,7 +3,7 @@
3
3
  * Prevents 500 errors by validating provider availability and configuration
4
4
  */
5
5
  import { logger } from "./logger.js";
6
- import { AIProviderName, OpenAIModels, GoogleAIModels, AnthropicModels, BedrockModels, } from "../core/types.js";
6
+ import { AIProviderName, OpenAIModels, GoogleAIModels, AnthropicModels, BedrockModels, } from "../types/providers.js";
7
7
  import { API_KEY_LENGTHS, PROJECT_ID_FORMAT } from "./providerConfig.js";
8
8
  import { basename } from "path";
9
9
  import { createProxyFetch } from "../proxy/proxyFetch.js";
@@ -2,7 +2,7 @@
2
2
  * Enhanced Provider Setup Messages
3
3
  * Provides detailed setup instructions for AI providers
4
4
  */
5
- import { OpenAIModels, GoogleAIModels, AnthropicModels, APIVersions, } from "../core/types.js";
5
+ import { OpenAIModels, GoogleAIModels, AnthropicModels, APIVersions, } from "../types/providers.js";
6
6
  /**
7
7
  * Generate enhanced error message with setup instructions
8
8
  */
@@ -3,7 +3,7 @@
3
3
  * Provides centralized model data for models command system
4
4
  * Part of Phase 4.1 - Models Command System
5
5
  */
6
- import { AIProviderName } from "../core/types.js";
6
+ import { AIProviderName } from "../types/providers.js";
7
7
  import type { JsonValue } from "../types/common.js";
8
8
  /**
9
9
  * Model capabilities interface
@@ -3,7 +3,7 @@
3
3
  * Provides centralized model data for models command system
4
4
  * Part of Phase 4.1 - Models Command System
5
5
  */
6
- import { AIProviderName, OpenAIModels, GoogleAIModels, AnthropicModels, DEFAULT_MODEL_ALIASES, } from "../core/types.js";
6
+ import { AIProviderName, OpenAIModels, GoogleAIModels, AnthropicModels, DEFAULT_MODEL_ALIASES, } from "../types/providers.js";
7
7
  /**
8
8
  * Comprehensive model registry
9
9
  */
@@ -1,6 +1,6 @@
1
1
  import { type LanguageModelV1 } from "ai";
2
2
  import { BaseProvider } from "../core/baseProvider.js";
3
- import type { AIProviderName } from "../core/types.js";
3
+ import type { AIProviderName } from "../types/providers.js";
4
4
  import type { StreamOptions, StreamResult } from "../types/streamTypes.js";
5
5
  export declare class AzureOpenAIProvider extends BaseProvider {
6
6
  private apiKey;
@@ -1,7 +1,7 @@
1
1
  import { createAzure } from "@ai-sdk/azure";
2
2
  import { streamText } from "ai";
3
3
  import { BaseProvider } from "../core/baseProvider.js";
4
- import { APIVersions } from "../core/types.js";
4
+ import { APIVersions } from "../types/providers.js";
5
5
  import { validateApiKey, createAzureAPIKeyConfig, createAzureEndpointConfig, } from "../utils/providerConfig.js";
6
6
  import { logger } from "../utils/logger.js";
7
7
  import { buildMessagesArray } from "../utils/messageBuilder.js";
@@ -48,7 +48,9 @@ export declare enum OpenAIModels {
48
48
  GPT_4_TURBO = "gpt-4-turbo",
49
49
  GPT_4O = "gpt-4o",
50
50
  GPT_4O_MINI = "gpt-4o-mini",
51
- GPT_3_5_TURBO = "gpt-3.5-turbo"
51
+ GPT_3_5_TURBO = "gpt-3.5-turbo",
52
+ O1_PREVIEW = "o1-preview",
53
+ O1_MINI = "o1-mini"
52
54
  }
53
55
  /**
54
56
  * Supported Models for Google Vertex AI
@@ -90,6 +92,19 @@ export declare enum AnthropicModels {
90
92
  CLAUDE_3_OPUS = "claude-3-opus-20240229",
91
93
  CLAUDE_3_HAIKU = "claude-3-haiku-20240307"
92
94
  }
95
+ /**
96
+ * API Versions for various providers
97
+ */
98
+ export declare enum APIVersions {
99
+ AZURE_LATEST = "2025-04-01-preview",
100
+ AZURE_STABLE = "2024-10-21",
101
+ AZURE_LEGACY = "2023-12-01-preview",
102
+ OPENAI_CURRENT = "v1",
103
+ OPENAI_BETA = "v1-beta",
104
+ GOOGLE_AI_CURRENT = "v1",
105
+ GOOGLE_AI_BETA = "v1beta",
106
+ ANTHROPIC_CURRENT = "2023-06-01"
107
+ }
93
108
  /**
94
109
  * Union type of all supported model names
95
110
  */
@@ -403,6 +418,36 @@ export type AISDKGenerateResult = GenerateResult & {
403
418
  }>;
404
419
  [key: string]: unknown;
405
420
  };
421
+ /**
422
+ * Default model aliases for easy reference
423
+ */
424
+ export declare const DEFAULT_MODEL_ALIASES: {
425
+ readonly LATEST_OPENAI: OpenAIModels.GPT_4O;
426
+ readonly FASTEST_OPENAI: OpenAIModels.GPT_4O_MINI;
427
+ readonly LATEST_ANTHROPIC: AnthropicModels.CLAUDE_3_5_SONNET;
428
+ readonly FASTEST_ANTHROPIC: AnthropicModels.CLAUDE_3_5_HAIKU;
429
+ readonly LATEST_GOOGLE: GoogleAIModels.GEMINI_2_5_PRO;
430
+ readonly FASTEST_GOOGLE: GoogleAIModels.GEMINI_2_5_FLASH;
431
+ readonly BEST_CODING: AnthropicModels.CLAUDE_3_5_SONNET;
432
+ readonly BEST_ANALYSIS: GoogleAIModels.GEMINI_2_5_PRO;
433
+ readonly BEST_CREATIVE: AnthropicModels.CLAUDE_3_5_SONNET;
434
+ readonly BEST_VALUE: GoogleAIModels.GEMINI_2_5_FLASH;
435
+ };
436
+ /**
437
+ * @deprecated Use DEFAULT_MODEL_ALIASES instead. Will be removed in future version.
438
+ */
439
+ export declare const ModelAliases: {
440
+ readonly LATEST_OPENAI: OpenAIModels.GPT_4O;
441
+ readonly FASTEST_OPENAI: OpenAIModels.GPT_4O_MINI;
442
+ readonly LATEST_ANTHROPIC: AnthropicModels.CLAUDE_3_5_SONNET;
443
+ readonly FASTEST_ANTHROPIC: AnthropicModels.CLAUDE_3_5_HAIKU;
444
+ readonly LATEST_GOOGLE: GoogleAIModels.GEMINI_2_5_PRO;
445
+ readonly FASTEST_GOOGLE: GoogleAIModels.GEMINI_2_5_FLASH;
446
+ readonly BEST_CODING: AnthropicModels.CLAUDE_3_5_SONNET;
447
+ readonly BEST_ANALYSIS: GoogleAIModels.GEMINI_2_5_PRO;
448
+ readonly BEST_CREATIVE: AnthropicModels.CLAUDE_3_5_SONNET;
449
+ readonly BEST_VALUE: GoogleAIModels.GEMINI_2_5_FLASH;
450
+ };
406
451
  /**
407
452
  * Default provider configurations
408
453
  */
@@ -40,6 +40,8 @@ export var OpenAIModels;
40
40
  OpenAIModels["GPT_4O"] = "gpt-4o";
41
41
  OpenAIModels["GPT_4O_MINI"] = "gpt-4o-mini";
42
42
  OpenAIModels["GPT_3_5_TURBO"] = "gpt-3.5-turbo";
43
+ OpenAIModels["O1_PREVIEW"] = "o1-preview";
44
+ OpenAIModels["O1_MINI"] = "o1-mini";
43
45
  })(OpenAIModels || (OpenAIModels = {}));
44
46
  /**
45
47
  * Supported Models for Google Vertex AI
@@ -95,6 +97,46 @@ export var AnthropicModels;
95
97
  AnthropicModels["CLAUDE_3_OPUS"] = "claude-3-opus-20240229";
96
98
  AnthropicModels["CLAUDE_3_HAIKU"] = "claude-3-haiku-20240307";
97
99
  })(AnthropicModels || (AnthropicModels = {}));
100
+ /**
101
+ * API Versions for various providers
102
+ */
103
+ export var APIVersions;
104
+ (function (APIVersions) {
105
+ // Azure OpenAI API versions
106
+ APIVersions["AZURE_LATEST"] = "2025-04-01-preview";
107
+ APIVersions["AZURE_STABLE"] = "2024-10-21";
108
+ APIVersions["AZURE_LEGACY"] = "2023-12-01-preview";
109
+ // OpenAI API versions
110
+ APIVersions["OPENAI_CURRENT"] = "v1";
111
+ APIVersions["OPENAI_BETA"] = "v1-beta";
112
+ // Google AI API versions
113
+ APIVersions["GOOGLE_AI_CURRENT"] = "v1";
114
+ APIVersions["GOOGLE_AI_BETA"] = "v1beta";
115
+ // Anthropic API versions
116
+ APIVersions["ANTHROPIC_CURRENT"] = "2023-06-01";
117
+ // Other provider versions can be added here
118
+ })(APIVersions || (APIVersions = {}));
119
+ /**
120
+ * Default model aliases for easy reference
121
+ */
122
+ export const DEFAULT_MODEL_ALIASES = {
123
+ // Latest recommended models per provider
124
+ LATEST_OPENAI: OpenAIModels.GPT_4O,
125
+ FASTEST_OPENAI: OpenAIModels.GPT_4O_MINI,
126
+ LATEST_ANTHROPIC: AnthropicModels.CLAUDE_3_5_SONNET,
127
+ FASTEST_ANTHROPIC: AnthropicModels.CLAUDE_3_5_HAIKU,
128
+ LATEST_GOOGLE: GoogleAIModels.GEMINI_2_5_PRO,
129
+ FASTEST_GOOGLE: GoogleAIModels.GEMINI_2_5_FLASH,
130
+ // Best models by use case
131
+ BEST_CODING: AnthropicModels.CLAUDE_3_5_SONNET,
132
+ BEST_ANALYSIS: GoogleAIModels.GEMINI_2_5_PRO,
133
+ BEST_CREATIVE: AnthropicModels.CLAUDE_3_5_SONNET,
134
+ BEST_VALUE: GoogleAIModels.GEMINI_2_5_FLASH,
135
+ };
136
+ /**
137
+ * @deprecated Use DEFAULT_MODEL_ALIASES instead. Will be removed in future version.
138
+ */
139
+ export const ModelAliases = DEFAULT_MODEL_ALIASES;
98
140
  /**
99
141
  * Default provider configurations
100
142
  */
@@ -2,7 +2,7 @@ import type { Tool } from "ai";
2
2
  import type { ValidationSchema, StandardRecord } from "./typeAliases.js";
3
3
  import type { ProviderConfig } from "./providers.js";
4
4
  import type { TextContent, ImageContent } from "./content.js";
5
- import type { AIProviderName, AnalyticsData } from "../core/types.js";
5
+ import type { AIProviderName, AnalyticsData } from "../types/index.js";
6
6
  import type { TokenUsage } from "./analytics.js";
7
7
  import type { EvaluationData } from "../index.js";
8
8
  import type { UnknownRecord, JsonValue, ToolExecutionEvent, ToolExecutionSummary } from "./common.js";
@@ -5,7 +5,7 @@
5
5
  import type { ConversationMemoryConfig, ChatMessage } from "../types/conversation.js";
6
6
  import type { ConversationMemoryManager } from "../core/conversationMemoryManager.js";
7
7
  import type { RedisConversationMemoryManager } from "../core/redisConversationMemoryManager.js";
8
- import type { TextGenerationOptions, TextGenerationResult } from "../core/types.js";
8
+ import type { TextGenerationOptions, TextGenerationResult } from "../types/generateTypes.js";
9
9
  /**
10
10
  * Apply conversation memory defaults to user configuration
11
11
  * Merges user config with environment variables and default values
@@ -2,7 +2,7 @@
2
2
  * Provider Health Checking System
3
3
  * Prevents 500 errors by validating provider availability and configuration
4
4
  */
5
- import { AIProviderName } from "../core/types.js";
5
+ import { AIProviderName } from "../types/providers.js";
6
6
  export interface ProviderHealthStatus {
7
7
  provider: AIProviderName;
8
8
  isHealthy: boolean;
@@ -3,7 +3,7 @@
3
3
  * Prevents 500 errors by validating provider availability and configuration
4
4
  */
5
5
  import { logger } from "./logger.js";
6
- import { AIProviderName, OpenAIModels, GoogleAIModels, AnthropicModels, BedrockModels, } from "../core/types.js";
6
+ import { AIProviderName, OpenAIModels, GoogleAIModels, AnthropicModels, BedrockModels, } from "../types/providers.js";
7
7
  import { API_KEY_LENGTHS, PROJECT_ID_FORMAT } from "./providerConfig.js";
8
8
  import { basename } from "path";
9
9
  import { createProxyFetch } from "../proxy/proxyFetch.js";
@@ -2,7 +2,7 @@
2
2
  * Enhanced Provider Setup Messages
3
3
  * Provides detailed setup instructions for AI providers
4
4
  */
5
- import { OpenAIModels, GoogleAIModels, AnthropicModels, APIVersions, } from "../core/types.js";
5
+ import { OpenAIModels, GoogleAIModels, AnthropicModels, APIVersions, } from "../types/providers.js";
6
6
  /**
7
7
  * Generate enhanced error message with setup instructions
8
8
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juspay/neurolink",
3
- "version": "7.40.1",
3
+ "version": "7.41.1",
4
4
  "description": "Universal AI Development Platform with working MCP integration, multi-provider support, and professional CLI. Built-in tools operational, 58+ external MCP servers discoverable. Connect to filesystem, GitHub, database operations, and more. Build, test, and deploy AI applications with 9 major providers: OpenAI, Anthropic, Google AI, AWS Bedrock, Azure, Hugging Face, Ollama, and Mistral AI.",
5
5
  "author": {
6
6
  "name": "Juspay Technologies",