@juspay/neurolink 7.41.0 → 7.41.2

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 (45) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/cli/loop/optionsSchema.d.ts +1 -1
  3. package/dist/cli/loop/optionsSchema.js +1 -1
  4. package/dist/index.d.ts +1 -1
  5. package/dist/lib/index.d.ts +1 -1
  6. package/dist/lib/models/modelRegistry.d.ts +1 -1
  7. package/dist/lib/models/modelRegistry.js +1 -1
  8. package/dist/lib/providers/amazonBedrock.js +1 -0
  9. package/dist/lib/providers/azureOpenai.d.ts +1 -1
  10. package/dist/lib/providers/azureOpenai.js +1 -1
  11. package/dist/lib/providers/googleAiStudio.js +1 -0
  12. package/dist/lib/providers/index.d.ts +0 -25
  13. package/dist/lib/providers/index.js +0 -21
  14. package/dist/lib/providers/openaiCompatible.js +1 -0
  15. package/dist/lib/types/cli.d.ts +53 -40
  16. package/dist/lib/types/providers.d.ts +183 -1
  17. package/dist/lib/types/providers.js +42 -0
  18. package/dist/lib/types/streamTypes.d.ts +1 -1
  19. package/dist/lib/utils/conversationMemory.d.ts +1 -1
  20. package/dist/lib/utils/providerHealth.d.ts +1 -1
  21. package/dist/lib/utils/providerHealth.js +1 -1
  22. package/dist/lib/utils/providerSetupMessages.js +1 -1
  23. package/dist/models/modelRegistry.d.ts +1 -1
  24. package/dist/models/modelRegistry.js +1 -1
  25. package/dist/providers/amazonBedrock.js +1 -0
  26. package/dist/providers/azureOpenai.d.ts +1 -1
  27. package/dist/providers/azureOpenai.js +1 -1
  28. package/dist/providers/googleAiStudio.js +1 -0
  29. package/dist/providers/index.d.ts +0 -25
  30. package/dist/providers/index.js +0 -21
  31. package/dist/providers/openaiCompatible.js +1 -0
  32. package/dist/types/cli.d.ts +53 -40
  33. package/dist/types/modelTypes.d.ts +20 -20
  34. package/dist/types/providers.d.ts +183 -1
  35. package/dist/types/providers.js +42 -0
  36. package/dist/types/streamTypes.d.ts +1 -1
  37. package/dist/utils/conversationMemory.d.ts +1 -1
  38. package/dist/utils/providerHealth.d.ts +1 -1
  39. package/dist/utils/providerHealth.js +1 -1
  40. package/dist/utils/providerSetupMessages.js +1 -1
  41. package/package.json +1 -1
  42. package/dist/core/types.d.ts +0 -271
  43. package/dist/core/types.js +0 -153
  44. package/dist/lib/core/types.d.ts +0 -271
  45. package/dist/lib/core/types.js +0 -153
@@ -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,173 @@ export type AISDKGenerateResult = GenerateResult & {
403
418
  }>;
404
419
  [key: string]: unknown;
405
420
  };
421
+ /**
422
+ * Bedrock tool usage structure
423
+ */
424
+ export type BedrockToolUse = {
425
+ toolUseId: string;
426
+ name: string;
427
+ input: Record<string, unknown>;
428
+ };
429
+ /**
430
+ * Bedrock tool result structure
431
+ */
432
+ export type BedrockToolResult = {
433
+ toolUseId: string;
434
+ content: Array<{
435
+ text: string;
436
+ }>;
437
+ status: string;
438
+ };
439
+ /**
440
+ * Bedrock content block structure
441
+ */
442
+ export type BedrockContentBlock = {
443
+ text?: string;
444
+ toolUse?: BedrockToolUse;
445
+ toolResult?: BedrockToolResult;
446
+ };
447
+ /**
448
+ * Bedrock message structure
449
+ */
450
+ export type BedrockMessage = {
451
+ role: "user" | "assistant";
452
+ content: BedrockContentBlock[];
453
+ };
454
+ /**
455
+ * Google AI Live media configuration
456
+ */
457
+ export type GenAILiveMedia = {
458
+ data: string;
459
+ mimeType: string;
460
+ };
461
+ /**
462
+ * Live server message inline data
463
+ */
464
+ export type LiveServerMessagePartInlineData = {
465
+ data?: string;
466
+ };
467
+ /**
468
+ * Live server message model turn
469
+ */
470
+ export type LiveServerMessageModelTurn = {
471
+ parts?: Array<{
472
+ inlineData?: LiveServerMessagePartInlineData;
473
+ }>;
474
+ };
475
+ /**
476
+ * Live server content structure
477
+ */
478
+ export type LiveServerContent = {
479
+ modelTurn?: LiveServerMessageModelTurn;
480
+ interrupted?: boolean;
481
+ };
482
+ /**
483
+ * Live server message structure
484
+ */
485
+ export type LiveServerMessage = {
486
+ serverContent?: LiveServerContent;
487
+ };
488
+ /**
489
+ * Live connection callbacks
490
+ */
491
+ export type LiveConnectCallbacks = {
492
+ onopen?: () => void;
493
+ onmessage?: (message: LiveServerMessage) => void;
494
+ onerror?: (e: {
495
+ message?: string;
496
+ }) => void;
497
+ onclose?: (e: {
498
+ code?: number;
499
+ reason?: string;
500
+ }) => void;
501
+ };
502
+ /**
503
+ * Live connection configuration
504
+ */
505
+ export type LiveConnectConfig = {
506
+ model: string;
507
+ callbacks: LiveConnectCallbacks;
508
+ config: {
509
+ responseModalities: string[];
510
+ speechConfig: {
511
+ voiceConfig: {
512
+ prebuiltVoiceConfig: {
513
+ voiceName: string;
514
+ };
515
+ };
516
+ };
517
+ };
518
+ };
519
+ /**
520
+ * Google AI Live session interface
521
+ */
522
+ export type GenAILiveSession = {
523
+ sendRealtimeInput?: (payload: {
524
+ media?: GenAILiveMedia;
525
+ event?: string;
526
+ }) => Promise<void> | void;
527
+ sendInput?: (payload: {
528
+ event?: string;
529
+ media?: GenAILiveMedia;
530
+ }) => Promise<void> | void;
531
+ close?: (code?: number, reason?: string) => Promise<void> | void;
532
+ };
533
+ /**
534
+ * Google AI client interface
535
+ */
536
+ export type GenAIClient = {
537
+ live: {
538
+ connect: (config: LiveConnectConfig) => Promise<GenAILiveSession>;
539
+ };
540
+ };
541
+ /**
542
+ * Google GenAI constructor type
543
+ */
544
+ export type GoogleGenAIClass = new (cfg: {
545
+ apiKey: string;
546
+ }) => GenAIClient;
547
+ /**
548
+ * OpenAI-compatible models endpoint response structure
549
+ */
550
+ export type ModelsResponse = {
551
+ data: Array<{
552
+ id: string;
553
+ object: string;
554
+ created?: number;
555
+ owned_by?: string;
556
+ }>;
557
+ };
558
+ /**
559
+ * Default model aliases for easy reference
560
+ */
561
+ export declare const DEFAULT_MODEL_ALIASES: {
562
+ readonly LATEST_OPENAI: OpenAIModels.GPT_4O;
563
+ readonly FASTEST_OPENAI: OpenAIModels.GPT_4O_MINI;
564
+ readonly LATEST_ANTHROPIC: AnthropicModels.CLAUDE_3_5_SONNET;
565
+ readonly FASTEST_ANTHROPIC: AnthropicModels.CLAUDE_3_5_HAIKU;
566
+ readonly LATEST_GOOGLE: GoogleAIModels.GEMINI_2_5_PRO;
567
+ readonly FASTEST_GOOGLE: GoogleAIModels.GEMINI_2_5_FLASH;
568
+ readonly BEST_CODING: AnthropicModels.CLAUDE_3_5_SONNET;
569
+ readonly BEST_ANALYSIS: GoogleAIModels.GEMINI_2_5_PRO;
570
+ readonly BEST_CREATIVE: AnthropicModels.CLAUDE_3_5_SONNET;
571
+ readonly BEST_VALUE: GoogleAIModels.GEMINI_2_5_FLASH;
572
+ };
573
+ /**
574
+ * @deprecated Use DEFAULT_MODEL_ALIASES instead. Will be removed in future version.
575
+ */
576
+ export declare const ModelAliases: {
577
+ readonly LATEST_OPENAI: OpenAIModels.GPT_4O;
578
+ readonly FASTEST_OPENAI: OpenAIModels.GPT_4O_MINI;
579
+ readonly LATEST_ANTHROPIC: AnthropicModels.CLAUDE_3_5_SONNET;
580
+ readonly FASTEST_ANTHROPIC: AnthropicModels.CLAUDE_3_5_HAIKU;
581
+ readonly LATEST_GOOGLE: GoogleAIModels.GEMINI_2_5_PRO;
582
+ readonly FASTEST_GOOGLE: GoogleAIModels.GEMINI_2_5_FLASH;
583
+ readonly BEST_CODING: AnthropicModels.CLAUDE_3_5_SONNET;
584
+ readonly BEST_ANALYSIS: GoogleAIModels.GEMINI_2_5_PRO;
585
+ readonly BEST_CREATIVE: AnthropicModels.CLAUDE_3_5_SONNET;
586
+ readonly BEST_VALUE: GoogleAIModels.GEMINI_2_5_FLASH;
587
+ };
406
588
  /**
407
589
  * Default provider configurations
408
590
  */
@@ -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.41.0",
3
+ "version": "7.41.2",
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",
@@ -1,271 +0,0 @@
1
- import type { Tool, Schema } from "ai";
2
- import type { ZodUnknownSchema, ValidationSchema } from "../types/typeAliases.js";
3
- import type { GenerateResult } from "../types/generateTypes.js";
4
- import type { StreamOptions, StreamResult } from "../types/streamTypes.js";
5
- import type { JsonValue } from "../types/common.js";
6
- import type { ChatMessage, ConversationMemoryConfig } from "../types/conversation.js";
7
- import type { TokenUsage, AnalyticsData } from "../types/analytics.js";
8
- import type { EvaluationData } from "../index.js";
9
- export type { EvaluationData };
10
- import type { MiddlewareFactoryOptions } from "../types/middlewareTypes.js";
11
- export interface TextGenerationResult {
12
- content: string;
13
- provider?: string;
14
- model?: string;
15
- usage?: TokenUsage;
16
- responseTime?: number;
17
- toolsUsed?: string[];
18
- toolExecutions?: Array<{
19
- toolName: string;
20
- executionTime: number;
21
- success: boolean;
22
- serverId?: string;
23
- }>;
24
- enhancedWithTools?: boolean;
25
- availableTools?: Array<{
26
- name: string;
27
- description: string;
28
- server: string;
29
- category?: string;
30
- }>;
31
- analytics?: AnalyticsData;
32
- evaluation?: EvaluationData;
33
- }
34
- /**
35
- * Supported AI Provider Names
36
- */
37
- export declare enum AIProviderName {
38
- BEDROCK = "bedrock",
39
- OPENAI = "openai",
40
- OPENAI_COMPATIBLE = "openai-compatible",
41
- VERTEX = "vertex",
42
- ANTHROPIC = "anthropic",
43
- AZURE = "azure",
44
- GOOGLE_AI = "google-ai",
45
- HUGGINGFACE = "huggingface",
46
- OLLAMA = "ollama",
47
- MISTRAL = "mistral",
48
- LITELLM = "litellm",
49
- SAGEMAKER = "sagemaker",
50
- AUTO = "auto"
51
- }
52
- /**
53
- * Supported Models for Amazon Bedrock
54
- */
55
- export declare enum BedrockModels {
56
- CLAUDE_3_SONNET = "anthropic.claude-3-sonnet-20240229-v1:0",
57
- CLAUDE_3_HAIKU = "anthropic.claude-3-haiku-20240307-v1:0",
58
- CLAUDE_3_5_SONNET = "anthropic.claude-3-5-sonnet-20240620-v1:0",
59
- CLAUDE_3_7_SONNET = "arn:aws:bedrock:us-east-2:225681119357:inference-profile/us.anthropic.claude-3-7-sonnet-20250219-v1:0"
60
- }
61
- /**
62
- * Supported Models for OpenAI
63
- */
64
- export declare enum OpenAIModels {
65
- GPT_4 = "gpt-4",
66
- GPT_4_TURBO = "gpt-4-turbo",
67
- GPT_4O = "gpt-4o",
68
- GPT_4O_MINI = "gpt-4o-mini",
69
- GPT_3_5_TURBO = "gpt-3.5-turbo",
70
- O1_PREVIEW = "o1-preview",
71
- O1_MINI = "o1-mini"
72
- }
73
- /**
74
- * Supported Models for Google Vertex AI
75
- */
76
- export declare enum VertexModels {
77
- CLAUDE_4_0_SONNET = "claude-sonnet-4@20250514",
78
- CLAUDE_4_0_OPUS = "claude-opus-4@20250514",
79
- CLAUDE_3_5_SONNET = "claude-3-5-sonnet-20241022",
80
- CLAUDE_3_5_HAIKU = "claude-3-5-haiku-20241022",
81
- CLAUDE_3_SONNET = "claude-3-sonnet-20240229",
82
- CLAUDE_3_OPUS = "claude-3-opus-20240229",
83
- CLAUDE_3_HAIKU = "claude-3-haiku-20240307",
84
- GEMINI_2_5_PRO = "gemini-2.5-pro",
85
- GEMINI_2_5_FLASH = "gemini-2.5-flash",
86
- GEMINI_2_5_FLASH_LITE = "gemini-2.5-flash-lite",
87
- GEMINI_2_0_FLASH_001 = "gemini-2.0-flash-001",
88
- GEMINI_1_5_PRO = "gemini-1.5-pro",
89
- GEMINI_1_5_FLASH = "gemini-1.5-flash"
90
- }
91
- /**
92
- * Supported Models for Google AI Studio
93
- */
94
- export declare enum GoogleAIModels {
95
- GEMINI_2_5_PRO = "gemini-2.5-pro",
96
- GEMINI_2_5_FLASH = "gemini-2.5-flash",
97
- GEMINI_2_5_FLASH_LITE = "gemini-2.5-flash-lite",
98
- GEMINI_2_0_FLASH_001 = "gemini-2.0-flash-001",
99
- GEMINI_1_5_PRO = "gemini-1.5-pro",
100
- GEMINI_1_5_FLASH = "gemini-1.5-flash",
101
- GEMINI_1_5_FLASH_LITE = "gemini-1.5-flash-lite"
102
- }
103
- /**
104
- * Supported Models for Anthropic (Direct API)
105
- */
106
- export declare enum AnthropicModels {
107
- CLAUDE_3_5_SONNET = "claude-3-5-sonnet-20241022",
108
- CLAUDE_3_5_HAIKU = "claude-3-5-haiku-20241022",
109
- CLAUDE_3_SONNET = "claude-3-sonnet-20240229",
110
- CLAUDE_3_OPUS = "claude-3-opus-20240229",
111
- CLAUDE_3_HAIKU = "claude-3-haiku-20240307"
112
- }
113
- /**
114
- * API Versions for various providers
115
- */
116
- export declare enum APIVersions {
117
- AZURE_LATEST = "2025-04-01-preview",
118
- AZURE_STABLE = "2024-10-21",
119
- AZURE_LEGACY = "2023-12-01-preview",
120
- OPENAI_CURRENT = "v1",
121
- OPENAI_BETA = "v1-beta",
122
- GOOGLE_AI_CURRENT = "v1",
123
- GOOGLE_AI_BETA = "v1beta",
124
- ANTHROPIC_CURRENT = "2023-06-01"
125
- }
126
- /**
127
- * Default model aliases for easy reference
128
- */
129
- export declare const DEFAULT_MODEL_ALIASES: {
130
- readonly LATEST_OPENAI: OpenAIModels.GPT_4O;
131
- readonly FASTEST_OPENAI: OpenAIModels.GPT_4O_MINI;
132
- readonly LATEST_ANTHROPIC: AnthropicModels.CLAUDE_3_5_SONNET;
133
- readonly FASTEST_ANTHROPIC: AnthropicModels.CLAUDE_3_5_HAIKU;
134
- readonly LATEST_GOOGLE: GoogleAIModels.GEMINI_2_5_PRO;
135
- readonly FASTEST_GOOGLE: GoogleAIModels.GEMINI_2_5_FLASH;
136
- readonly BEST_CODING: AnthropicModels.CLAUDE_3_5_SONNET;
137
- readonly BEST_ANALYSIS: GoogleAIModels.GEMINI_2_5_PRO;
138
- readonly BEST_CREATIVE: AnthropicModels.CLAUDE_3_5_SONNET;
139
- readonly BEST_VALUE: GoogleAIModels.GEMINI_2_5_FLASH;
140
- };
141
- /**
142
- * @deprecated Use DEFAULT_MODEL_ALIASES instead. Will be removed in future version.
143
- */
144
- export declare const ModelAliases: {
145
- readonly LATEST_OPENAI: OpenAIModels.GPT_4O;
146
- readonly FASTEST_OPENAI: OpenAIModels.GPT_4O_MINI;
147
- readonly LATEST_ANTHROPIC: AnthropicModels.CLAUDE_3_5_SONNET;
148
- readonly FASTEST_ANTHROPIC: AnthropicModels.CLAUDE_3_5_HAIKU;
149
- readonly LATEST_GOOGLE: GoogleAIModels.GEMINI_2_5_PRO;
150
- readonly FASTEST_GOOGLE: GoogleAIModels.GEMINI_2_5_FLASH;
151
- readonly BEST_CODING: AnthropicModels.CLAUDE_3_5_SONNET;
152
- readonly BEST_ANALYSIS: GoogleAIModels.GEMINI_2_5_PRO;
153
- readonly BEST_CREATIVE: AnthropicModels.CLAUDE_3_5_SONNET;
154
- readonly BEST_VALUE: GoogleAIModels.GEMINI_2_5_FLASH;
155
- };
156
- /**
157
- * Union type of all supported model names
158
- */
159
- export type SupportedModelName = BedrockModels | OpenAIModels | VertexModels | GoogleAIModels | AnthropicModels;
160
- /**
161
- * Provider configuration specifying provider and its available models
162
- */
163
- export interface ProviderConfig {
164
- provider: AIProviderName;
165
- models: SupportedModelName[];
166
- }
167
- /**
168
- * Options for AI requests with unified provider configuration
169
- */
170
- export interface StreamingOptions {
171
- providers: ProviderConfig[];
172
- temperature?: number;
173
- maxTokens?: number;
174
- systemPrompt?: string;
175
- }
176
- /**
177
- * Text generation options interface
178
- * Extended to support multimodal content with zero breaking changes
179
- */
180
- export interface TextGenerationOptions {
181
- prompt?: string;
182
- input?: {
183
- text: string;
184
- images?: Array<Buffer | string>;
185
- content?: Array<import("../types/content.js").TextContent | import("../types/content.js").ImageContent>;
186
- };
187
- provider?: AIProviderName;
188
- model?: string;
189
- temperature?: number;
190
- maxTokens?: number;
191
- systemPrompt?: string;
192
- schema?: ZodUnknownSchema | Schema<unknown>;
193
- tools?: Record<string, Tool>;
194
- timeout?: number | string;
195
- disableTools?: boolean;
196
- maxSteps?: number;
197
- enableEvaluation?: boolean;
198
- enableAnalytics?: boolean;
199
- context?: Record<string, JsonValue>;
200
- evaluationDomain?: string;
201
- toolUsageContext?: string;
202
- conversationHistory?: Array<{
203
- role: string;
204
- content: string;
205
- }>;
206
- conversationMessages?: ChatMessage[];
207
- conversationMemoryConfig?: Partial<ConversationMemoryConfig>;
208
- originalPrompt?: string;
209
- middleware?: MiddlewareFactoryOptions;
210
- expectedOutcome?: string;
211
- evaluationCriteria?: string[];
212
- }
213
- export type { AnalyticsData } from "../types/analytics.js";
214
- /**
215
- * Enhanced result interfaces with optional analytics/evaluation
216
- */
217
- export interface EnhancedGenerateResult extends GenerateResult {
218
- analytics?: AnalyticsData;
219
- evaluation?: EvaluationData;
220
- }
221
- /**
222
- * Phase 2: Enhanced Streaming Infrastructure
223
- * Progress tracking and metadata for streaming operations
224
- */
225
- export interface StreamingProgressData {
226
- chunkCount: number;
227
- totalBytes: number;
228
- chunkSize: number;
229
- elapsedTime: number;
230
- estimatedRemaining?: number;
231
- streamId?: string;
232
- phase: "initializing" | "streaming" | "processing" | "complete" | "error";
233
- }
234
- export interface StreamingMetadata {
235
- startTime: number;
236
- endTime?: number;
237
- totalDuration?: number;
238
- averageChunkSize: number;
239
- maxChunkSize: number;
240
- minChunkSize: number;
241
- throughputBytesPerSecond?: number;
242
- streamingProvider: string;
243
- modelUsed: string;
244
- }
245
- export type ProgressCallback = (progress: StreamingProgressData) => void;
246
- /**
247
- * AI Provider interface with flexible parameter support
248
- */
249
- export interface AIProvider {
250
- stream(optionsOrPrompt: StreamOptions | string, analysisSchema?: ValidationSchema): Promise<StreamResult>;
251
- generate(optionsOrPrompt: TextGenerationOptions | string, analysisSchema?: ValidationSchema): Promise<EnhancedGenerateResult | null>;
252
- gen(optionsOrPrompt: TextGenerationOptions | string, analysisSchema?: ValidationSchema): Promise<EnhancedGenerateResult | null>;
253
- setupToolExecutor(sdk: {
254
- customTools: Map<string, unknown>;
255
- executeTool: (toolName: string, params: unknown) => Promise<unknown>;
256
- }, functionTag: string): void;
257
- }
258
- /**
259
- * Provider attempt result for iteration tracking
260
- */
261
- export interface ProviderAttempt {
262
- provider: AIProviderName;
263
- model: SupportedModelName;
264
- success: boolean;
265
- error?: string;
266
- stack?: string;
267
- }
268
- /**
269
- * Default provider configurations
270
- */
271
- export declare const DEFAULT_PROVIDER_CONFIGS: ProviderConfig[];