@x12i/ai-gateway 9.0.8 → 9.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +897 -998
- package/dist/activity-manager.js +46 -6
- package/dist/config/activity-tracking-config.d.ts +2 -1
- package/dist/config/activity-tracking-config.js +3 -2
- package/dist/gateway-memory.d.ts +1 -2
- package/dist/gateway-memory.js +1 -15
- package/dist/gateway-meta.js +3 -0
- package/dist/gateway-utils.d.ts +15 -1
- package/dist/gateway-utils.js +125 -17
- package/dist/gateway-validation.d.ts +3 -3
- package/dist/gateway-validation.js +10 -1
- package/dist/gateway.d.ts +2 -2
- package/dist/gateway.js +73 -22
- package/dist/index.d.ts +2 -2
- package/dist/instruction-optimizer.js +3 -0
- package/dist/runtime-objects.d.ts +2 -13
- package/dist/troubleshooting-helper.d.ts +0 -3
- package/dist/troubleshooting-helper.js +99 -20
- package/dist/types.d.ts +39 -89
- package/dist-cjs/activity-manager.cjs +45 -5
- package/dist-cjs/config/activity-tracking-config.cjs +3 -2
- package/dist-cjs/config/activity-tracking-config.d.ts +2 -1
- package/dist-cjs/gateway-memory.cjs +1 -15
- package/dist-cjs/gateway-memory.d.ts +1 -2
- package/dist-cjs/gateway-meta.cjs +3 -0
- package/dist-cjs/gateway-utils.cjs +128 -17
- package/dist-cjs/gateway-utils.d.ts +15 -1
- package/dist-cjs/gateway-validation.cjs +10 -1
- package/dist-cjs/gateway-validation.d.ts +3 -3
- package/dist-cjs/gateway.cjs +72 -21
- package/dist-cjs/gateway.d.ts +2 -2
- package/dist-cjs/index.d.ts +2 -2
- package/dist-cjs/instruction-optimizer.cjs +3 -0
- package/dist-cjs/runtime-objects.d.ts +2 -13
- package/dist-cjs/troubleshooting-helper.cjs +99 -20
- package/dist-cjs/troubleshooting-helper.d.ts +0 -3
- package/dist-cjs/types.d.ts +39 -89
- package/package.json +2 -2
|
@@ -187,18 +187,27 @@ function validateSingleObjectType(objType, context, index) {
|
|
|
187
187
|
/**
|
|
188
188
|
* Validates AIRequest structure
|
|
189
189
|
*/
|
|
190
|
+
const GATEWAY_ACTION_TYPES_DIAG = ['skill', 'preSkill', 'postSkill'];
|
|
190
191
|
function validateAIRequest(request) {
|
|
191
192
|
const errors = [];
|
|
192
193
|
const warnings = [];
|
|
193
|
-
|
|
194
|
-
if (!request.jobId) {
|
|
195
|
-
errors.push('jobId is required');
|
|
194
|
+
const identityJobId = request.identity && typeof request.identity === 'object' ? request.identity.jobId : undefined;
|
|
195
|
+
if (!identityJobId && !request.jobId) {
|
|
196
|
+
errors.push('identity.jobId is required (legacy top-level jobId is deprecated)');
|
|
196
197
|
}
|
|
197
198
|
if (!request.agentId) {
|
|
198
199
|
errors.push('agentId is required');
|
|
199
200
|
}
|
|
201
|
+
if (!request.actionType ||
|
|
202
|
+
!GATEWAY_ACTION_TYPES_DIAG.includes(request.actionType)) {
|
|
203
|
+
errors.push('actionType is required and must be skill, preSkill, or postSkill');
|
|
204
|
+
}
|
|
205
|
+
const actionRefTrim = typeof request.actionRef === 'string' ? request.actionRef.trim() : '';
|
|
206
|
+
if (!actionRefTrim) {
|
|
207
|
+
errors.push('actionRef is required (non-empty string, e.g. skill id)');
|
|
208
|
+
}
|
|
200
209
|
if (!request.instructions) {
|
|
201
|
-
|
|
210
|
+
errors.push('instructions is required');
|
|
202
211
|
}
|
|
203
212
|
if (!request.prompt) {
|
|
204
213
|
errors.push('Prompt is required (input field has been removed - use workingMemory.input instead)');
|
|
@@ -449,11 +458,23 @@ function supportsJSONMode(provider, model) {
|
|
|
449
458
|
* Creates a test AIRequest with minimal valid structure
|
|
450
459
|
*/
|
|
451
460
|
function createTestAIRequest(overrides) {
|
|
452
|
-
|
|
453
|
-
|
|
461
|
+
const aiRequestId = 'test-ai-req-' + Date.now();
|
|
462
|
+
const base = {
|
|
463
|
+
aiRequestId,
|
|
454
464
|
agentId: 'test-agent',
|
|
465
|
+
actionType: 'skill',
|
|
466
|
+
actionRef: 'tests/createTestAIRequest',
|
|
455
467
|
instructions: 'Test instructions',
|
|
456
|
-
|
|
468
|
+
prompt: '{{input}}',
|
|
469
|
+
workingMemory: { input: 'Test input' },
|
|
470
|
+
identity: {
|
|
471
|
+
sessionId: `session-${aiRequestId}`,
|
|
472
|
+
instance: { instanceId: 'test-agent', type: 'test' },
|
|
473
|
+
aiRequestId,
|
|
474
|
+
jobId: `job-${aiRequestId}`,
|
|
475
|
+
agentId: 'test-agent',
|
|
476
|
+
taskId: `task-${aiRequestId}`
|
|
477
|
+
},
|
|
457
478
|
config: {
|
|
458
479
|
model: 'gpt-4o',
|
|
459
480
|
provider: 'openai'
|
|
@@ -470,20 +491,33 @@ function createTestAIRequest(overrides) {
|
|
|
470
491
|
},
|
|
471
492
|
...overrides
|
|
472
493
|
};
|
|
494
|
+
return base;
|
|
473
495
|
}
|
|
474
496
|
/**
|
|
475
497
|
* Creates test cases for validation
|
|
476
498
|
*/
|
|
477
499
|
function createValidationTestCases() {
|
|
500
|
+
const sampleIdentity = (jobId, agentId) => ({
|
|
501
|
+
sessionId: `session-${jobId}`,
|
|
502
|
+
instance: { instanceId: agentId, type: 'test' },
|
|
503
|
+
aiRequestId: `ai-${jobId}`,
|
|
504
|
+
jobId,
|
|
505
|
+
agentId,
|
|
506
|
+
taskId: `task-${jobId}`
|
|
507
|
+
});
|
|
478
508
|
return [
|
|
479
509
|
{
|
|
480
510
|
name: 'Valid minimal request',
|
|
481
511
|
request: {
|
|
482
|
-
|
|
512
|
+
aiRequestId: 'ai-valid-min',
|
|
483
513
|
agentId: 'agent-1',
|
|
514
|
+
actionType: 'skill',
|
|
515
|
+
actionRef: 'validation/minimal',
|
|
516
|
+
identity: sampleIdentity('test', 'agent-1'),
|
|
484
517
|
instructions: 'Test',
|
|
485
518
|
prompt: 'test.prompt',
|
|
486
|
-
workingMemory: { input: 'Test' }
|
|
519
|
+
workingMemory: { input: 'Test' },
|
|
520
|
+
config: { model: 'gpt-4o', provider: 'openai' }
|
|
487
521
|
},
|
|
488
522
|
shouldFail: false,
|
|
489
523
|
expectedErrors: []
|
|
@@ -491,8 +525,11 @@ function createValidationTestCases() {
|
|
|
491
525
|
{
|
|
492
526
|
name: 'Valid request with config',
|
|
493
527
|
request: {
|
|
494
|
-
|
|
528
|
+
aiRequestId: 'ai-valid-cfg',
|
|
495
529
|
agentId: 'agent-1',
|
|
530
|
+
actionType: 'skill',
|
|
531
|
+
actionRef: 'validation/config',
|
|
532
|
+
identity: sampleIdentity('test', 'agent-1'),
|
|
496
533
|
instructions: 'Test',
|
|
497
534
|
prompt: 'test.prompt',
|
|
498
535
|
workingMemory: { input: 'Test' },
|
|
@@ -505,23 +542,40 @@ function createValidationTestCases() {
|
|
|
505
542
|
expectedErrors: []
|
|
506
543
|
},
|
|
507
544
|
{
|
|
508
|
-
name: 'Missing jobId',
|
|
545
|
+
name: 'Missing identity.jobId',
|
|
509
546
|
request: {
|
|
547
|
+
aiRequestId: 'ai-no-job',
|
|
510
548
|
agentId: 'agent-1',
|
|
549
|
+
actionType: 'skill',
|
|
550
|
+
actionRef: 'validation/x',
|
|
551
|
+
identity: {
|
|
552
|
+
sessionId: 's',
|
|
553
|
+
instance: { instanceId: 'agent-1', type: 'test' },
|
|
554
|
+
aiRequestId: 'ai-no-job',
|
|
555
|
+
jobId: '',
|
|
556
|
+
agentId: 'agent-1',
|
|
557
|
+
taskId: 't'
|
|
558
|
+
},
|
|
511
559
|
instructions: 'Test',
|
|
512
560
|
prompt: 'test.prompt',
|
|
513
|
-
workingMemory: { input: 'Test' }
|
|
561
|
+
workingMemory: { input: 'Test' },
|
|
562
|
+
config: { model: 'gpt-4o', provider: 'openai' }
|
|
514
563
|
},
|
|
515
564
|
shouldFail: true,
|
|
516
|
-
expectedErrors: ['jobId is required']
|
|
565
|
+
expectedErrors: ['identity.jobId is required (legacy top-level jobId is deprecated)']
|
|
517
566
|
},
|
|
518
567
|
{
|
|
519
568
|
name: 'Missing agentId',
|
|
520
569
|
request: {
|
|
521
|
-
|
|
570
|
+
aiRequestId: 'ai-no-agent',
|
|
571
|
+
actionType: 'skill',
|
|
572
|
+
actionRef: 'validation/x',
|
|
573
|
+
identity: sampleIdentity('test', 'agent-1'),
|
|
522
574
|
instructions: 'Test',
|
|
523
575
|
prompt: 'test.prompt',
|
|
524
|
-
workingMemory: { input: 'Test' }
|
|
576
|
+
workingMemory: { input: 'Test' },
|
|
577
|
+
config: { model: 'gpt-4o', provider: 'openai' }
|
|
578
|
+
// intentional: no top-level agentId
|
|
525
579
|
},
|
|
526
580
|
shouldFail: true,
|
|
527
581
|
expectedErrors: ['agentId is required']
|
|
@@ -529,10 +583,14 @@ function createValidationTestCases() {
|
|
|
529
583
|
{
|
|
530
584
|
name: 'Missing instructions',
|
|
531
585
|
request: {
|
|
532
|
-
|
|
586
|
+
aiRequestId: 'ai-no-inst',
|
|
533
587
|
agentId: 'agent-1',
|
|
588
|
+
actionType: 'skill',
|
|
589
|
+
actionRef: 'validation/x',
|
|
590
|
+
identity: sampleIdentity('test', 'agent-1'),
|
|
534
591
|
prompt: 'test.prompt',
|
|
535
|
-
workingMemory: { input: 'Test' }
|
|
592
|
+
workingMemory: { input: 'Test' },
|
|
593
|
+
config: { model: 'gpt-4o', provider: 'openai' }
|
|
536
594
|
},
|
|
537
595
|
shouldFail: true,
|
|
538
596
|
expectedErrors: ['instructions is required']
|
|
@@ -540,12 +598,33 @@ function createValidationTestCases() {
|
|
|
540
598
|
{
|
|
541
599
|
name: 'Missing prompt',
|
|
542
600
|
request: {
|
|
543
|
-
|
|
601
|
+
aiRequestId: 'ai-no-prompt',
|
|
544
602
|
agentId: 'agent-1',
|
|
545
|
-
|
|
603
|
+
actionType: 'skill',
|
|
604
|
+
actionRef: 'validation/x',
|
|
605
|
+
identity: sampleIdentity('test', 'agent-1'),
|
|
606
|
+
instructions: 'Test',
|
|
607
|
+
workingMemory: { input: 'Test' },
|
|
608
|
+
config: { model: 'gpt-4o', provider: 'openai' }
|
|
609
|
+
},
|
|
610
|
+
shouldFail: true,
|
|
611
|
+
expectedErrors: ['Prompt is required (input field has been removed - use workingMemory.input instead)']
|
|
612
|
+
},
|
|
613
|
+
{
|
|
614
|
+
name: 'Missing actionRef',
|
|
615
|
+
request: {
|
|
616
|
+
aiRequestId: 'ai-no-ref',
|
|
617
|
+
agentId: 'agent-1',
|
|
618
|
+
actionType: 'skill',
|
|
619
|
+
actionRef: ' ',
|
|
620
|
+
identity: sampleIdentity('test', 'agent-1'),
|
|
621
|
+
instructions: 'Test',
|
|
622
|
+
prompt: 'p',
|
|
623
|
+
workingMemory: { input: 'Test' },
|
|
624
|
+
config: { model: 'gpt-4o', provider: 'openai' }
|
|
546
625
|
},
|
|
547
626
|
shouldFail: true,
|
|
548
|
-
expectedErrors: ['
|
|
627
|
+
expectedErrors: ['actionRef is required (non-empty string, e.g. skill id)']
|
|
549
628
|
}
|
|
550
629
|
];
|
|
551
630
|
}
|
package/dist-cjs/types.d.ts
CHANGED
|
@@ -22,7 +22,22 @@ export interface DiagnosticsOptions {
|
|
|
22
22
|
* Implementations must size-cap any raw payload included.
|
|
23
23
|
*/
|
|
24
24
|
includeRawProviderPayload?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* When false, Activix activity completion omits `response.content.fullResponse` (large provider blob).
|
|
27
|
+
* When true or omitted, the full payload is stored (subject to `activityFullResponseMaxChars`).
|
|
28
|
+
*/
|
|
29
|
+
includeFullProviderResponseInActivity?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Max serialized length for `fullResponse` on activity records when included (JSON string length).
|
|
32
|
+
* Default applied in gateway when omitted.
|
|
33
|
+
*/
|
|
34
|
+
activityFullResponseMaxChars?: number;
|
|
25
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* Classifies the gateway invocation for tracing and Activix (`runContext`).
|
|
38
|
+
* Mandatory on {@link AIInvokeRequest} (`AIGateway.invoke`).
|
|
39
|
+
*/
|
|
40
|
+
export type GatewayActionType = 'skill' | 'preSkill' | 'postSkill';
|
|
26
41
|
export type GatewayTraceRequestIds = {
|
|
27
42
|
/** Stable alias of gateway aiRequestId (always set when trace enabled). */
|
|
28
43
|
gatewayAiRequestId: string;
|
|
@@ -111,6 +126,14 @@ export type ActivityIdentity = {
|
|
|
111
126
|
coreSkillId?: string;
|
|
112
127
|
masterSkillId?: string;
|
|
113
128
|
masterSkillActivityId?: string;
|
|
129
|
+
/**
|
|
130
|
+
* From {@link AIInvokeRequest.actionType} when present (gateway.invoke); copied into runContext for Activix.
|
|
131
|
+
*/
|
|
132
|
+
actionType?: GatewayActionType;
|
|
133
|
+
/**
|
|
134
|
+
* From {@link AIInvokeRequest.actionRef} when present; copied into runContext for Activix.
|
|
135
|
+
*/
|
|
136
|
+
actionRef?: string;
|
|
114
137
|
};
|
|
115
138
|
/** Re-export parser template options for gateway consumers (MUST/optional protocol, subPathSearch, etc.). */
|
|
116
139
|
export type { TemplateRenderOptions } from '@x12i/rendrix';
|
|
@@ -566,14 +589,6 @@ interface BaseLLMRequest extends Omit<LLMRequest, 'messages' | 'input' | 'reques
|
|
|
566
589
|
* Added as system message between instructions and prompt
|
|
567
590
|
*/
|
|
568
591
|
context?: string;
|
|
569
|
-
/**
|
|
570
|
-
* Task configuration (optional) - Control template behavior and conditional rendering
|
|
571
|
-
* @deprecated taskConfig is no longer used by Rendrix 3.0.0+
|
|
572
|
-
* Kept for backward compatibility only - will be ignored
|
|
573
|
-
*/
|
|
574
|
-
taskConfig?: {
|
|
575
|
-
includeThoughts?: boolean;
|
|
576
|
-
};
|
|
577
592
|
/**
|
|
578
593
|
* Working memory (optional) - Affects all template parsing
|
|
579
594
|
* Passed to Rendrix (v4+) for template variable substitution.
|
|
@@ -587,16 +602,6 @@ interface BaseLLMRequest extends Omit<LLMRequest, 'messages' | 'input' | 'reques
|
|
|
587
602
|
* the full list or only set `enabled` and inherit `roots` from the gateway default merge.
|
|
588
603
|
*/
|
|
589
604
|
templateRenderOptions?: TemplateRenderOptions;
|
|
590
|
-
/**
|
|
591
|
-
* Template tokens (optional) - Tier 1 (highest priority) token values
|
|
592
|
-
* These tokens are passed directly as arguments and override all other memory sources
|
|
593
|
-
* Common tokens: taskDescription, input (from workingMemory.input), role
|
|
594
|
-
* Example: { taskDescription: "Extract emails", input: "user@example.com", role: "user" }
|
|
595
|
-
* Note: The `input` field has been removed. Use workingMemory.input instead.
|
|
596
|
-
*/
|
|
597
|
-
templateTokens?: {
|
|
598
|
-
[key: string]: string | number | boolean | object | object[];
|
|
599
|
-
};
|
|
600
605
|
/**
|
|
601
606
|
* Messages array - Optional, can be used instead of instructions/prompt
|
|
602
607
|
* If provided, will be appended as-is after built messages; instructions template text is still parsed for the system message when present
|
|
@@ -643,28 +648,6 @@ interface BaseLLMRequest extends Omit<LLMRequest, 'messages' | 'input' | 'reques
|
|
|
643
648
|
* Can be a single type (string) or multiple types (array)
|
|
644
649
|
*/
|
|
645
650
|
inferenceType?: string | string[];
|
|
646
|
-
/**
|
|
647
|
-
* Enable output schema validation (optional)
|
|
648
|
-
* When true, validates parsed output against schema from instruction metadata or outputs library
|
|
649
|
-
* @default false
|
|
650
|
-
*/
|
|
651
|
-
validateOutputSchema?: boolean;
|
|
652
|
-
/**
|
|
653
|
-
* Enable strict validation mode (optional)
|
|
654
|
-
* When true, validation errors will throw exceptions instead of warnings
|
|
655
|
-
* @default false
|
|
656
|
-
*/
|
|
657
|
-
strictValidation?: boolean;
|
|
658
|
-
/**
|
|
659
|
-
* Response transformation hooks (optional)
|
|
660
|
-
* Allows transforming responses at different stages of processing
|
|
661
|
-
*/
|
|
662
|
-
transformations?: ResponseTransformationConfig;
|
|
663
|
-
/**
|
|
664
|
-
* Parse options for outputs library (optional)
|
|
665
|
-
* Used when inferenceType is provided for parsing inference outputs
|
|
666
|
-
*/
|
|
667
|
-
parseOptions?: Record<string, unknown>;
|
|
668
651
|
/**
|
|
669
652
|
* Optional diagnostics controls. When omitted or mode != 'trace', the gateway must not
|
|
670
653
|
* attach heavy diagnostic objects or raw provider payloads.
|
|
@@ -682,7 +665,7 @@ interface BaseLLMRequest extends Omit<LLMRequest, 'messages' | 'input' | 'reques
|
|
|
682
665
|
* Minimum: instructions + prompt (prompt is required for user message)
|
|
683
666
|
*
|
|
684
667
|
* Note: objectTypes is NOT supported in ChatRequest.
|
|
685
|
-
* Use
|
|
668
|
+
* Use {@link AIInvokeRequest} with invoke() for structured output requests.
|
|
686
669
|
*/
|
|
687
670
|
export interface ChatRequest extends BaseLLMRequest {
|
|
688
671
|
/**
|
|
@@ -714,18 +697,19 @@ export interface StructuredTextSpec {
|
|
|
714
697
|
formatHint?: string;
|
|
715
698
|
}
|
|
716
699
|
/**
|
|
717
|
-
*
|
|
718
|
-
* Used exclusively with invoke() method for requests requiring structured output
|
|
700
|
+
* Payload for {@link AIGateway.invoke}: structured / skill flows with mandatory action classification.
|
|
719
701
|
*
|
|
720
|
-
*
|
|
721
|
-
* - aiRequestId: Required for activity tracking
|
|
722
|
-
* - agentId: Required to identify the agent
|
|
723
|
-
* - instructions: Required (template text)
|
|
724
|
-
* - primaryObjectType OR flexMdFormat: Required for structured output
|
|
725
|
-
* * primaryObjectType: Standard/custom object type (requires outputs library)
|
|
726
|
-
* * flexMdFormat: Direct flex-md format specification (no outputs library needed)
|
|
702
|
+
* Recorded on {@link ActivityIdentity} (`runContext`) and activity roots for Activix.
|
|
727
703
|
*/
|
|
728
|
-
export interface
|
|
704
|
+
export interface AIInvokeRequest extends BaseLLMRequest {
|
|
705
|
+
/**
|
|
706
|
+
* Invocation kind: main skill vs pre/post hooks around skill execution.
|
|
707
|
+
*/
|
|
708
|
+
actionType: GatewayActionType;
|
|
709
|
+
/**
|
|
710
|
+
* Stable reference for the action (e.g. `skills/my-skill`).
|
|
711
|
+
*/
|
|
712
|
+
actionRef: string;
|
|
729
713
|
/**
|
|
730
714
|
* Encrypted reasoning items for conversation continuity
|
|
731
715
|
* Only include reasoning.encrypted items from previous responses
|
|
@@ -739,10 +723,6 @@ export interface AIRequest extends BaseLLMRequest {
|
|
|
739
723
|
data?: string;
|
|
740
724
|
summary?: any[];
|
|
741
725
|
}>;
|
|
742
|
-
/**
|
|
743
|
-
* Skill execution tracking fields
|
|
744
|
-
* Used when executing skills (instruction keys starting with 'skills/')
|
|
745
|
-
*/
|
|
746
726
|
/**
|
|
747
727
|
* Master skill activity ID - The parent skill activity's ID (when a skill calls another skill)
|
|
748
728
|
* When a skill executes and calls another skill, the parent skill's activityId becomes
|
|
@@ -761,6 +741,10 @@ export interface AIRequest extends BaseLLMRequest {
|
|
|
761
741
|
*/
|
|
762
742
|
masterSkillId?: string;
|
|
763
743
|
}
|
|
744
|
+
/**
|
|
745
|
+
* @deprecated Prefer {@link AIInvokeRequest}; alias kept for existing imports.
|
|
746
|
+
*/
|
|
747
|
+
export type AIRequest = AIInvokeRequest;
|
|
764
748
|
/**
|
|
765
749
|
* Enhanced response with comprehensive metadata and generic type support
|
|
766
750
|
*
|
|
@@ -1241,38 +1225,4 @@ export interface ValidationRule {
|
|
|
1241
1225
|
*/
|
|
1242
1226
|
message?: string;
|
|
1243
1227
|
}
|
|
1244
|
-
/**
|
|
1245
|
-
* Response transformation hooks configuration
|
|
1246
|
-
* Allows transforming responses at different stages of processing
|
|
1247
|
-
*/
|
|
1248
|
-
export interface ResponseTransformationConfig {
|
|
1249
|
-
/**
|
|
1250
|
-
* Transform raw text before parsing
|
|
1251
|
-
* @param rawText - Raw text from LLM response
|
|
1252
|
-
* @param metadata - Request metadata (jobId, agentId, etc.)
|
|
1253
|
-
* @returns Transformed raw text
|
|
1254
|
-
*/
|
|
1255
|
-
preParse?: (rawText: string, metadata: any) => string;
|
|
1256
|
-
/**
|
|
1257
|
-
* Transform parsed content after parsing
|
|
1258
|
-
* @param parsed - Parsed content (object/array)
|
|
1259
|
-
* @param metadata - Request metadata
|
|
1260
|
-
* @returns Transformed parsed content
|
|
1261
|
-
*/
|
|
1262
|
-
postParse?: (parsed: any, metadata: any) => any;
|
|
1263
|
-
/**
|
|
1264
|
-
* Transform parsed content before validation
|
|
1265
|
-
* @param parsed - Parsed content
|
|
1266
|
-
* @param schema - JSON schema (if available)
|
|
1267
|
-
* @returns Transformed parsed content
|
|
1268
|
-
*/
|
|
1269
|
-
preValidate?: (parsed: any, schema: any) => any;
|
|
1270
|
-
/**
|
|
1271
|
-
* Transform validated content after validation
|
|
1272
|
-
* @param validated - Validated content
|
|
1273
|
-
* @param metadata - Request metadata
|
|
1274
|
-
* @returns Transformed validated content
|
|
1275
|
-
*/
|
|
1276
|
-
postValidate?: (validated: any, metadata: any) => any;
|
|
1277
|
-
}
|
|
1278
1228
|
export type { LLMRequest, LLMResponse };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@x12i/ai-gateway",
|
|
3
|
-
"version": "9.0
|
|
3
|
+
"version": "9.1.0",
|
|
4
4
|
"description": "AI Gateway - Unified interface for LLM provider routing and management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"@aws-sdk/s3-request-presigner": "^3.953.0",
|
|
66
66
|
"@x12i/env": "^4.0.1",
|
|
67
67
|
"@x12i/logxer": "^4.3.5",
|
|
68
|
-
"@x12i/activix": "^
|
|
68
|
+
"@x12i/activix": "^7.1.0",
|
|
69
69
|
"@x12i/flex-md": "^4.8.0"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|