@memberjunction/core-entities 2.61.0 → 2.62.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.
@@ -942,6 +942,11 @@ export declare const AIPromptSchema: z.ZodObject<{
942
942
  StopSequences: z.ZodNullable<z.ZodString>;
943
943
  IncludeLogProbs: z.ZodNullable<z.ZodBoolean>;
944
944
  TopLogProbs: z.ZodNullable<z.ZodNumber>;
945
+ FailoverMaxAttempts: z.ZodNullable<z.ZodNumber>;
946
+ FailoverDelaySeconds: z.ZodNullable<z.ZodNumber>;
947
+ FailoverStrategy: z.ZodString;
948
+ FailoverModelStrategy: z.ZodString;
949
+ FailoverErrorScope: z.ZodString;
945
950
  Template: z.ZodString;
946
951
  Category: z.ZodNullable<z.ZodString>;
947
952
  Type: z.ZodString;
@@ -996,6 +1001,11 @@ export declare const AIPromptSchema: z.ZodObject<{
996
1001
  StopSequences?: string;
997
1002
  IncludeLogProbs?: boolean;
998
1003
  TopLogProbs?: number;
1004
+ FailoverMaxAttempts?: number;
1005
+ FailoverDelaySeconds?: number;
1006
+ FailoverStrategy?: string;
1007
+ FailoverModelStrategy?: string;
1008
+ FailoverErrorScope?: string;
999
1009
  Template?: string;
1000
1010
  ResultSelectorPrompt?: string;
1001
1011
  }, {
@@ -1047,6 +1057,11 @@ export declare const AIPromptSchema: z.ZodObject<{
1047
1057
  StopSequences?: string;
1048
1058
  IncludeLogProbs?: boolean;
1049
1059
  TopLogProbs?: number;
1060
+ FailoverMaxAttempts?: number;
1061
+ FailoverDelaySeconds?: number;
1062
+ FailoverStrategy?: string;
1063
+ FailoverModelStrategy?: string;
1064
+ FailoverErrorScope?: string;
1050
1065
  Template?: string;
1051
1066
  ResultSelectorPrompt?: string;
1052
1067
  }>;
@@ -5200,11 +5215,18 @@ export declare const AIPromptRunSchema: z.ZodObject<{
5200
5215
  TotalRetryDurationMS: z.ZodNullable<z.ZodNumber>;
5201
5216
  ValidationAttempts: z.ZodNullable<z.ZodString>;
5202
5217
  ValidationSummary: z.ZodNullable<z.ZodString>;
5218
+ FailoverAttempts: z.ZodNullable<z.ZodNumber>;
5219
+ FailoverErrors: z.ZodNullable<z.ZodString>;
5220
+ FailoverDurations: z.ZodNullable<z.ZodString>;
5221
+ OriginalRequestStartTime: z.ZodNullable<z.ZodDate>;
5222
+ TotalFailoverDuration: z.ZodNullable<z.ZodNumber>;
5223
+ OriginalModelID: z.ZodNullable<z.ZodString>;
5203
5224
  Prompt: z.ZodString;
5204
5225
  Model: z.ZodString;
5205
5226
  Vendor: z.ZodString;
5206
5227
  Agent: z.ZodNullable<z.ZodString>;
5207
5228
  Configuration: z.ZodNullable<z.ZodString>;
5229
+ OriginalModel: z.ZodNullable<z.ZodString>;
5208
5230
  }, "strip", z.ZodTypeAny, {
5209
5231
  ID?: string;
5210
5232
  __mj_CreatedAt?: Date;
@@ -5265,6 +5287,13 @@ export declare const AIPromptRunSchema: z.ZodObject<{
5265
5287
  TotalRetryDurationMS?: number;
5266
5288
  ValidationAttempts?: string;
5267
5289
  ValidationSummary?: string;
5290
+ FailoverAttempts?: number;
5291
+ FailoverErrors?: string;
5292
+ FailoverDurations?: string;
5293
+ OriginalRequestStartTime?: Date;
5294
+ TotalFailoverDuration?: number;
5295
+ OriginalModelID?: string;
5296
+ OriginalModel?: string;
5268
5297
  }, {
5269
5298
  ID?: string;
5270
5299
  __mj_CreatedAt?: Date;
@@ -5325,6 +5354,13 @@ export declare const AIPromptRunSchema: z.ZodObject<{
5325
5354
  TotalRetryDurationMS?: number;
5326
5355
  ValidationAttempts?: string;
5327
5356
  ValidationSummary?: string;
5357
+ FailoverAttempts?: number;
5358
+ FailoverErrors?: string;
5359
+ FailoverDurations?: string;
5360
+ OriginalRequestStartTime?: Date;
5361
+ TotalFailoverDuration?: number;
5362
+ OriginalModelID?: string;
5363
+ OriginalModel?: string;
5328
5364
  }>;
5329
5365
  export type AIPromptRunEntityType = z.infer<typeof AIPromptRunSchema>;
5330
5366
  /**
@@ -10467,6 +10503,9 @@ export declare class AIPromptEntity extends BaseEntity<AIPromptEntityType> {
10467
10503
  * * Table-Level: This rule ensures that if the parallelization mode is set to 'StaticCount', then the number of parallel tasks (ParallelCount) must be provided.
10468
10504
  * * Table-Level: This rule ensures that if the Parallelization Mode is set to 'ConfigParam', then the Parallel Config Param field must be filled in. For any other mode, the Parallel Config Param can be left empty.
10469
10505
  * * Table-Level: This rule ensures that if the OutputType is set to 'object', an OutputExample must be provided. If the OutputType is anything other than 'object', providing an OutputExample is not required.
10506
+ * * FailoverErrorScope: This rule ensures that the FailoverErrorScope field can only be set to 'ServiceErrorOnly', 'RateLimitOnly', 'NetworkOnly', 'All', or left empty.
10507
+ * * FailoverStrategy: This rule ensures that the FailoverStrategy field, if specified, must be either 'None', 'PowerRank', 'NextBestModel', 'SameModelDifferentVendor', or left blank (unset).
10508
+ * * FailoverModelStrategy: This rule ensures that the value for FailoverModelStrategy is either 'RequireSameModel', 'PreferDifferentModel', 'PreferSameModel', or left blank (not set). Any other value is not allowed.
10470
10509
  * @public
10471
10510
  * @method
10472
10511
  * @override
@@ -10522,6 +10561,27 @@ export declare class AIPromptEntity extends BaseEntity<AIPromptEntityType> {
10522
10561
  */
10523
10562
  ValidateOutputExampleWhenOutputTypeObject(result: ValidationResult): void;
10524
10563
  /**
10564
+ * This rule ensures that the FailoverErrorScope field can only be set to 'ServiceErrorOnly', 'RateLimitOnly', 'NetworkOnly', 'All', or left empty.
10565
+ * @param result - the ValidationResult object to add any errors or warnings to
10566
+ * @public
10567
+ * @method
10568
+ */
10569
+ ValidateFailoverErrorScopeAgainstAllowedValues(result: ValidationResult): void;
10570
+ /**
10571
+ * This rule ensures that the FailoverStrategy field, if specified, must be either 'None', 'PowerRank', 'NextBestModel', 'SameModelDifferentVendor', or left blank (unset).
10572
+ * @param result - the ValidationResult object to add any errors or warnings to
10573
+ * @public
10574
+ * @method
10575
+ */
10576
+ ValidateFailoverStrategyAllowedValues(result: ValidationResult): void;
10577
+ /**
10578
+ * This rule ensures that the value for FailoverModelStrategy is either 'RequireSameModel', 'PreferDifferentModel', 'PreferSameModel', or left blank (not set). Any other value is not allowed.
10579
+ * @param result - the ValidationResult object to add any errors or warnings to
10580
+ * @public
10581
+ * @method
10582
+ */
10583
+ ValidateFailoverModelStrategyAgainstAllowedValues(result: ValidationResult): void;
10584
+ /**
10525
10585
  * * Field Name: ID
10526
10586
  * * Display Name: ID
10527
10587
  * * SQL Data Type: uniqueidentifier
@@ -10961,6 +11021,51 @@ export declare class AIPromptEntity extends BaseEntity<AIPromptEntityType> {
10961
11021
  get TopLogProbs(): number | null;
10962
11022
  set TopLogProbs(value: number | null);
10963
11023
  /**
11024
+ * * Field Name: FailoverMaxAttempts
11025
+ * * Display Name: Failover Max Attempts
11026
+ * * SQL Data Type: int
11027
+ * * Default Value: 3
11028
+ * * Description: Maximum number of failover attempts before giving up
11029
+ */
11030
+ get FailoverMaxAttempts(): number | null;
11031
+ set FailoverMaxAttempts(value: number | null);
11032
+ /**
11033
+ * * Field Name: FailoverDelaySeconds
11034
+ * * Display Name: Failover Delay Seconds
11035
+ * * SQL Data Type: int
11036
+ * * Default Value: 5
11037
+ * * Description: Initial delay in seconds between failover attempts
11038
+ */
11039
+ get FailoverDelaySeconds(): number | null;
11040
+ set FailoverDelaySeconds(value: number | null);
11041
+ /**
11042
+ * * Field Name: FailoverStrategy
11043
+ * * Display Name: Failover Strategy
11044
+ * * SQL Data Type: nvarchar(50)
11045
+ * * Default Value: SameModelDifferentVendor
11046
+ * * Description: Failover strategy to use when the primary model fails. Options: SameModelDifferentVendor, NextBestModel, PowerRank, None
11047
+ */
11048
+ get FailoverStrategy(): string;
11049
+ set FailoverStrategy(value: string);
11050
+ /**
11051
+ * * Field Name: FailoverModelStrategy
11052
+ * * Display Name: Failover Model Strategy
11053
+ * * SQL Data Type: nvarchar(50)
11054
+ * * Default Value: PreferSameModel
11055
+ * * Description: Strategy for selecting failover models. Options: PreferSameModel, PreferDifferentModel, RequireSameModel
11056
+ */
11057
+ get FailoverModelStrategy(): string;
11058
+ set FailoverModelStrategy(value: string);
11059
+ /**
11060
+ * * Field Name: FailoverErrorScope
11061
+ * * Display Name: Failover Error Scope
11062
+ * * SQL Data Type: nvarchar(50)
11063
+ * * Default Value: All
11064
+ * * Description: Types of errors that should trigger failover. Options: All, NetworkOnly, RateLimitOnly, ServiceErrorOnly
11065
+ */
11066
+ get FailoverErrorScope(): string;
11067
+ set FailoverErrorScope(value: string);
11068
+ /**
10964
11069
  * * Field Name: Template
10965
11070
  * * Display Name: Template
10966
11071
  * * SQL Data Type: nvarchar(255)
@@ -22611,6 +22716,56 @@ export declare class AIPromptRunEntity extends BaseEntity<AIPromptRunEntityType>
22611
22716
  get ValidationSummary(): string | null;
22612
22717
  set ValidationSummary(value: string | null);
22613
22718
  /**
22719
+ * * Field Name: FailoverAttempts
22720
+ * * Display Name: Failover Attempts
22721
+ * * SQL Data Type: int
22722
+ * * Default Value: 0
22723
+ * * Description: Number of failover attempts made during this prompt run
22724
+ */
22725
+ get FailoverAttempts(): number | null;
22726
+ set FailoverAttempts(value: number | null);
22727
+ /**
22728
+ * * Field Name: FailoverErrors
22729
+ * * Display Name: Failover Errors
22730
+ * * SQL Data Type: nvarchar(MAX)
22731
+ * * Description: JSON array of error details from each failover attempt
22732
+ */
22733
+ get FailoverErrors(): string | null;
22734
+ set FailoverErrors(value: string | null);
22735
+ /**
22736
+ * * Field Name: FailoverDurations
22737
+ * * Display Name: Failover Durations
22738
+ * * SQL Data Type: nvarchar(MAX)
22739
+ * * Description: JSON array of duration in milliseconds for each failover attempt
22740
+ */
22741
+ get FailoverDurations(): string | null;
22742
+ set FailoverDurations(value: string | null);
22743
+ /**
22744
+ * * Field Name: OriginalRequestStartTime
22745
+ * * Display Name: Original Request Start Time
22746
+ * * SQL Data Type: datetime
22747
+ * * Description: Timestamp when the original request started, before any failovers
22748
+ */
22749
+ get OriginalRequestStartTime(): Date | null;
22750
+ set OriginalRequestStartTime(value: Date | null);
22751
+ /**
22752
+ * * Field Name: TotalFailoverDuration
22753
+ * * Display Name: Total Failover Duration
22754
+ * * SQL Data Type: int
22755
+ * * Description: Total time spent in failover attempts in milliseconds
22756
+ */
22757
+ get TotalFailoverDuration(): number | null;
22758
+ set TotalFailoverDuration(value: number | null);
22759
+ /**
22760
+ * * Field Name: OriginalModelID
22761
+ * * Display Name: Original Model ID
22762
+ * * SQL Data Type: uniqueidentifier
22763
+ * * Related Entity/Foreign Key: AI Models (vwAIModels.ID)
22764
+ * * Description: The AI Model ID that was originally attempted before any failovers
22765
+ */
22766
+ get OriginalModelID(): string | null;
22767
+ set OriginalModelID(value: string | null);
22768
+ /**
22614
22769
  * * Field Name: Prompt
22615
22770
  * * Display Name: Prompt
22616
22771
  * * SQL Data Type: nvarchar(255)
@@ -22640,6 +22795,12 @@ export declare class AIPromptRunEntity extends BaseEntity<AIPromptRunEntityType>
22640
22795
  * * SQL Data Type: nvarchar(100)
22641
22796
  */
22642
22797
  get Configuration(): string | null;
22798
+ /**
22799
+ * * Field Name: OriginalModel
22800
+ * * Display Name: Original Model
22801
+ * * SQL Data Type: nvarchar(50)
22802
+ */
22803
+ get OriginalModel(): string | null;
22643
22804
  }
22644
22805
  /**
22645
22806
  * MJ: AI Vendor Type Definitions - strongly typed entity sub-class