@ax-llm/ax 10.0.50 → 11.0.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/index.d.ts CHANGED
@@ -61,7 +61,11 @@ declare class AxAIServiceAuthenticationError extends AxAIServiceError {
61
61
  constructor(url: string, requestBody?: unknown, context?: Record<string, unknown>);
62
62
  }
63
63
 
64
- type AxAIModelMap = Record<string, string>;
64
+ type AxAIModelList<T = unknown> = {
65
+ key: string;
66
+ model: T;
67
+ description: string;
68
+ }[];
65
69
  type AxModelInfo = {
66
70
  name: string;
67
71
  currency?: string;
@@ -136,7 +140,7 @@ type AxEmbedResponse = {
136
140
  type AxModelInfoWithProvider = AxModelInfo & {
137
141
  provider: string;
138
142
  };
139
- type AxChatRequest = {
143
+ type AxChatRequest<TModel = string> = {
140
144
  chatPrompt: Readonly<{
141
145
  role: 'system';
142
146
  content: string;
@@ -192,7 +196,7 @@ type AxChatRequest = {
192
196
  };
193
197
  };
194
198
  modelConfig?: Readonly<AxModelConfig>;
195
- model?: string;
199
+ model?: TModel;
196
200
  };
197
201
  interface AxAIServiceMetrics {
198
202
  latency: {
@@ -222,12 +226,12 @@ interface AxAIServiceMetrics {
222
226
  };
223
227
  };
224
228
  }
225
- type AxInternalChatRequest = Omit<AxChatRequest, 'model'> & Required<Pick<AxChatRequest, 'model'>>;
226
- type AxEmbedRequest = {
229
+ type AxInternalChatRequest<TModel> = Omit<AxChatRequest, 'model'> & Required<Pick<AxChatRequest<TModel>, 'model'>>;
230
+ type AxEmbedRequest<TEmbedModel = string> = {
227
231
  texts?: readonly string[];
228
- embedModel?: string;
232
+ embedModel?: TEmbedModel;
229
233
  };
230
- type AxInternalEmbedRequest = Omit<AxEmbedRequest, 'embedModel'> & Required<Pick<AxEmbedRequest, 'embedModel'>>;
234
+ type AxInternalEmbedRequest<TEmbedModel> = Omit<AxEmbedRequest, 'embedModel'> & Required<Pick<AxEmbedRequest<TEmbedModel>, 'embedModel'>>;
231
235
  type AxRateLimiterFunction = <T = unknown>(reqFunc: () => Promise<T | ReadableStream$1<T>>, info: Readonly<{
232
236
  modelUsage?: AxTokenUsage;
233
237
  embedModelUsage?: AxTokenUsage;
@@ -241,88 +245,89 @@ type AxAIServiceOptions = {
241
245
  fetch?: typeof fetch;
242
246
  tracer?: Tracer;
243
247
  };
244
- type AxAIServiceActionOptions = {
245
- ai?: Readonly<AxAIService>;
248
+ type AxAIServiceActionOptions<TModel = unknown, TEmbedModel = unknown> = {
249
+ ai?: Readonly<AxAIService<TModel, TEmbedModel>>;
246
250
  sessionId?: string;
247
251
  traceId?: string;
248
252
  rateLimiter?: AxRateLimiterFunction;
249
253
  };
250
- interface AxAIService {
254
+ interface AxAIService<TModel = unknown, TEmbedModel = unknown> {
255
+ getId(): string;
251
256
  getName(): string;
252
257
  getModelInfo(): Readonly<AxModelInfoWithProvider>;
253
258
  getEmbedModelInfo(): Readonly<AxModelInfoWithProvider> | undefined;
254
- getFeatures(model?: string): {
255
- functions: boolean;
256
- streaming: boolean;
257
- };
258
- getModelMap(): AxAIModelMap | undefined;
259
+ getFeatures(model?: TModel): AxAIFeatures;
260
+ getModelList(): AxAIModelList<TModel> | undefined;
259
261
  getMetrics(): AxAIServiceMetrics;
260
- chat(req: Readonly<AxChatRequest>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions>): Promise<AxChatResponse | ReadableStream$1<AxChatResponse>>;
261
- embed(req: Readonly<AxEmbedRequest>, options?: Readonly<AxAIServiceActionOptions & AxAIServiceActionOptions>): Promise<AxEmbedResponse>;
262
+ chat(req: Readonly<AxChatRequest<TModel>>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions<TModel, TEmbedModel>>): Promise<AxChatResponse | ReadableStream$1<AxChatResponse>>;
263
+ embed(req: Readonly<AxEmbedRequest<TEmbedModel>>, options?: Readonly<AxAIServiceActionOptions<TModel, TEmbedModel>>): Promise<AxEmbedResponse>;
262
264
  setOptions(options: Readonly<AxAIServiceOptions>): void;
263
265
  getOptions(): Readonly<AxAIServiceOptions>;
264
266
  }
265
- interface AxAIServiceImpl<TChatRequest, TEmbedRequest, TChatResponse, TChatResponseDelta, TEmbedResponse> {
266
- createChatReq(req: Readonly<AxInternalChatRequest>, config: Readonly<AxAIPromptConfig>): [AxAPI, TChatRequest];
267
+ interface AxAIServiceImpl<TModel, TEmbedModel, TChatRequest, TEmbedRequest, TChatResponse, TChatResponseDelta, TEmbedResponse> {
268
+ createChatReq(req: Readonly<AxInternalChatRequest<TModel>>, config: Readonly<AxAIPromptConfig>): [AxAPI, TChatRequest];
267
269
  createChatResp(resp: Readonly<TChatResponse>): AxChatResponse;
268
270
  createChatStreamResp?(resp: Readonly<TChatResponseDelta>, state: object): AxChatResponse;
269
- createEmbedReq?(req: Readonly<AxInternalEmbedRequest>): [AxAPI, TEmbedRequest];
271
+ createEmbedReq?(req: Readonly<AxInternalEmbedRequest<TEmbedModel>>): [AxAPI, TEmbedRequest];
270
272
  createEmbedResp?(resp: Readonly<TEmbedResponse>): AxEmbedResponse;
271
273
  getModelConfig(): AxModelConfig;
272
274
  }
273
275
 
274
- interface AxBaseAIFeatures {
276
+ interface AxAIFeatures {
275
277
  functions: boolean;
276
278
  streaming: boolean;
279
+ functionCot?: boolean;
277
280
  }
278
- interface AxBaseAIArgs {
281
+ interface AxBaseAIArgs<TModel, TEmbedModel> {
279
282
  name: string;
280
283
  apiURL: string;
281
284
  headers: () => Promise<Record<string, string>>;
282
285
  modelInfo: Readonly<AxModelInfo[]>;
283
- models: Readonly<{
284
- model: string;
285
- embedModel?: string;
286
+ defaults: Readonly<{
287
+ model: TModel;
288
+ embedModel?: TEmbedModel;
286
289
  }>;
287
290
  options?: Readonly<AxAIServiceOptions>;
288
- supportFor: AxBaseAIFeatures | ((model: string) => AxBaseAIFeatures);
289
- modelMap?: AxAIModelMap;
291
+ supportFor: AxAIFeatures | ((model: TModel) => AxAIFeatures);
292
+ models?: AxAIModelList<TModel>;
290
293
  }
291
- declare class AxBaseAI<TChatRequest, TEmbedRequest, TChatResponse, TChatResponseDelta, TEmbedResponse> implements AxAIService {
294
+ declare class AxBaseAI<TModel, TEmbedModel, TChatRequest, TEmbedRequest, TChatResponse, TChatResponseDelta, TEmbedResponse> implements AxAIService<TModel, TEmbedModel> {
292
295
  private readonly aiImpl;
293
296
  private debug;
294
297
  private rt?;
295
298
  private fetch?;
296
299
  private tracer?;
297
- private modelMap?;
300
+ private models?;
298
301
  private modelInfo;
299
302
  private modelUsage?;
300
303
  private embedModelUsage?;
301
- private models;
304
+ private defaults;
302
305
  protected apiURL: string;
303
306
  protected name: string;
307
+ protected id: string;
304
308
  protected headers: () => Promise<Record<string, string>>;
305
- protected supportFor: AxBaseAIFeatures | ((model: string) => AxBaseAIFeatures);
309
+ protected supportFor: AxAIFeatures | ((model: TModel) => AxAIFeatures);
306
310
  private metrics;
307
- constructor(aiImpl: Readonly<AxAIServiceImpl<TChatRequest, TEmbedRequest, TChatResponse, TChatResponseDelta, TEmbedResponse>>, { name, apiURL, headers, modelInfo, models, options, supportFor, modelMap, }: Readonly<AxBaseAIArgs>);
311
+ constructor(aiImpl: Readonly<AxAIServiceImpl<TModel, TEmbedModel, TChatRequest, TEmbedRequest, TChatResponse, TChatResponseDelta, TEmbedResponse>>, { name, apiURL, headers, modelInfo, defaults, options, supportFor, models, }: Readonly<AxBaseAIArgs<TModel, TEmbedModel>>);
308
312
  setName(name: string): void;
313
+ getId(): string;
309
314
  setAPIURL(apiURL: string): void;
310
315
  setHeaders(headers: () => Promise<Record<string, string>>): void;
311
316
  setOptions(options: Readonly<AxAIServiceOptions>): void;
312
317
  getOptions(): Readonly<AxAIServiceOptions>;
313
318
  getModelInfo(): Readonly<AxModelInfoWithProvider>;
314
319
  getEmbedModelInfo(): AxModelInfoWithProvider | undefined;
315
- getModelMap(): AxAIModelMap | undefined;
320
+ getModelList(): AxAIModelList<TModel> | undefined;
316
321
  getName(): string;
317
- getFeatures(model?: string): AxBaseAIFeatures;
322
+ getFeatures(model?: TModel): AxAIFeatures;
318
323
  private calculatePercentile;
319
324
  private updateLatencyMetrics;
320
325
  private updateErrorMetrics;
321
326
  getMetrics(): AxAIServiceMetrics;
322
- chat(req: Readonly<AxChatRequest>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions>): Promise<AxChatResponse | ReadableStream$1<AxChatResponse>>;
327
+ chat(req: Readonly<AxChatRequest<TModel>>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions<TModel, TEmbedModel>>): Promise<AxChatResponse | ReadableStream$1<AxChatResponse>>;
323
328
  private _chat1;
324
329
  private _chat2;
325
- embed(req: Readonly<AxEmbedRequest>, options?: Readonly<AxAIServiceActionOptions>): Promise<AxEmbedResponse>;
330
+ embed(req: Readonly<AxEmbedRequest<TEmbedModel>>, options?: Readonly<AxAIServiceActionOptions<TModel, TEmbedModel>>): Promise<AxEmbedResponse>;
326
331
  private _embed1;
327
332
  private _embed2;
328
333
  private buildHeaders;
@@ -524,10 +529,10 @@ interface AxAIAnthropicArgs {
524
529
  region?: string;
525
530
  config?: Readonly<Partial<AxAIAnthropicConfig>>;
526
531
  options?: Readonly<AxAIServiceOptions>;
527
- modelMap?: Record<string, AxAIAnthropicModel | string>;
532
+ models?: AxAIModelList<AxAIAnthropicModel>;
528
533
  }
529
- declare class AxAIAnthropic extends AxBaseAI<AxAIAnthropicChatRequest, unknown, AxAIAnthropicChatResponse, AxAIAnthropicChatResponseDelta, unknown> {
530
- constructor({ apiKey, projectId, region, config, options, modelMap, }: Readonly<Omit<AxAIAnthropicArgs, 'name'>>);
534
+ declare class AxAIAnthropic extends AxBaseAI<AxAIAnthropicModel | AxAIAnthropicVertexModel, unknown, AxAIAnthropicChatRequest, unknown, AxAIAnthropicChatResponse, AxAIAnthropicChatResponseDelta, unknown> {
535
+ constructor({ apiKey, projectId, region, config, options, models, }: Readonly<Omit<AxAIAnthropicArgs, 'name'>>);
531
536
  }
532
537
 
533
538
  declare enum AxAIOpenAIModel {
@@ -550,9 +555,9 @@ declare enum AxAIOpenAIEmbedModel {
550
555
  TextEmbedding3Small = "text-embedding-3-small",
551
556
  TextEmbedding3Large = "text-embedding-3-large"
552
557
  }
553
- type AxAIOpenAIConfig = Omit<AxModelConfig, 'topK'> & {
554
- model: AxAIOpenAIModel | string;
555
- embedModel?: AxAIOpenAIEmbedModel | string;
558
+ type AxAIOpenAIConfig<TModel, TEmbedModel> = Omit<AxModelConfig, 'topK'> & {
559
+ model: TModel;
560
+ embedModel?: TEmbedModel;
556
561
  user?: string;
557
562
  responseFormat?: 'json_object';
558
563
  bestOf?: number;
@@ -589,8 +594,8 @@ interface AxAIOpenAIResponseDelta<T> {
589
594
  usage?: AxAIOpenAIUsage;
590
595
  system_fingerprint: string;
591
596
  }
592
- type AxAIOpenAIChatRequest = {
593
- model: string;
597
+ type AxAIOpenAIChatRequest<TModel> = {
598
+ model: TModel;
594
599
  reasoning_effort?: 'low' | 'medium' | 'high';
595
600
  store?: boolean;
596
601
  messages: ({
@@ -697,9 +702,9 @@ type AxAIOpenAIChatResponseDelta = AxAIOpenAIResponseDelta<{
697
702
  index: number;
698
703
  })[];
699
704
  }>;
700
- type AxAIOpenAIEmbedRequest = {
705
+ type AxAIOpenAIEmbedRequest<TEmbedModel> = {
701
706
  input: readonly string[];
702
- model: string;
707
+ model: TEmbedModel;
703
708
  dimensions?: number;
704
709
  user?: string;
705
710
  };
@@ -712,33 +717,35 @@ type AxAIOpenAIEmbedResponse = {
712
717
  usage: AxAIOpenAIUsage;
713
718
  };
714
719
 
715
- interface AxAIOpenAIArgs {
716
- name: 'openai';
720
+ interface AxAIOpenAIArgs<TName = 'openai', TModel = AxAIOpenAIModel, TEmbedModel = AxAIOpenAIEmbedModel> extends Omit<AxAIOpenAIBaseArgs<TModel, TEmbedModel>, 'config' | 'modelInfo'> {
721
+ name: TName;
722
+ config?: Partial<AxAIOpenAIBaseArgs<TModel, TEmbedModel>['config']>;
723
+ }
724
+ interface AxAIOpenAIBaseArgs<TModel, TEmbedModel> {
717
725
  apiKey: string;
718
726
  apiURL?: string;
719
- config?: Readonly<Partial<AxAIOpenAIConfig>>;
727
+ config: Readonly<AxAIOpenAIConfig<TModel, TEmbedModel>>;
720
728
  options?: Readonly<AxAIServiceOptions & {
721
729
  streamingUsage?: boolean;
722
730
  }>;
723
- modelInfo?: Readonly<AxModelInfo[]>;
724
- modelMap?: Record<string, AxAIOpenAIModel | AxAIOpenAIEmbedModel | string>;
731
+ modelInfo: Readonly<AxModelInfo[]>;
732
+ models?: AxAIModelList<TModel>;
733
+ }
734
+ declare class AxAIOpenAIBase<TModel, TEmbedModel> extends AxBaseAI<TModel, TEmbedModel, AxAIOpenAIChatRequest<TModel>, AxAIOpenAIEmbedRequest<TEmbedModel>, AxAIOpenAIChatResponse, AxAIOpenAIChatResponseDelta, AxAIOpenAIEmbedResponse> {
735
+ constructor({ apiKey, config, options, apiURL, modelInfo, models, }: Readonly<Omit<AxAIOpenAIBaseArgs<TModel, TEmbedModel>, 'name'>>);
725
736
  }
726
- declare class AxAIOpenAI extends AxBaseAI<AxAIOpenAIChatRequest, AxAIOpenAIEmbedRequest, AxAIOpenAIChatResponse, AxAIOpenAIChatResponseDelta, AxAIOpenAIEmbedResponse> {
727
- constructor({ apiKey, config, options, apiURL, modelInfo, modelMap, }: Readonly<Omit<AxAIOpenAIArgs, 'name'>>);
737
+ declare class AxAIOpenAI extends AxAIOpenAIBase<AxAIOpenAIModel, AxAIOpenAIEmbedModel> {
738
+ constructor({ apiKey, config, options, models, }: Readonly<Omit<AxAIOpenAIArgs, 'name' | 'modelInfo'>>);
728
739
  }
729
740
 
730
- interface AxAIAzureOpenAIArgs {
731
- name: 'azure-openai';
732
- apiKey: string;
741
+ type AxAIAzureOpenAIConfig = AxAIOpenAIConfig<AxAIOpenAIModel, AxAIOpenAIEmbedModel>;
742
+ type AxAIAzureOpenAIArgs = AxAIOpenAIArgs<'azure-openai', AxAIOpenAIModel, AxAIOpenAIEmbedModel> & {
733
743
  resourceName: string;
734
744
  deploymentName: string;
735
745
  version?: string;
736
- config?: Readonly<Partial<AxAIOpenAIConfig>>;
737
- options?: Readonly<AxAIServiceOptions>;
738
- modelMap?: Record<string, AxAIOpenAIModel | AxAIOpenAIEmbedModel>;
739
- }
740
- declare class AxAIAzureOpenAI extends AxAIOpenAI {
741
- constructor({ apiKey, resourceName, deploymentName, version, config, options, modelMap, }: Readonly<Omit<AxAIAzureOpenAIArgs, 'name'>>);
746
+ };
747
+ declare class AxAIAzureOpenAI extends AxAIOpenAIBase<AxAIOpenAIModel, AxAIOpenAIEmbedModel> {
748
+ constructor({ apiKey, resourceName, deploymentName, version, config, options, models, }: Readonly<Omit<AxAIAzureOpenAIArgs, 'name' | 'modelInfo'>>);
742
749
  }
743
750
 
744
751
  /**
@@ -792,7 +799,7 @@ type AxAICohereChatRequest = {
792
799
  message?: string;
793
800
  tool_results: AxAICohereChatRequestToolResults;
794
801
  })[];
795
- model: AxAICohereModel | string;
802
+ model: AxAICohereModel;
796
803
  max_tokens?: number;
797
804
  temperature?: number;
798
805
  k?: number;
@@ -830,13 +837,13 @@ type AxAICohereChatResponseDelta = AxAICohereChatResponse & {
830
837
  };
831
838
  type AxAICohereEmbedRequest = {
832
839
  texts: readonly string[];
833
- model: AxAICohereModel | string;
840
+ model: AxAICohereEmbedModel;
834
841
  truncate: string;
835
842
  };
836
843
  type AxAICohereEmbedResponse = {
837
844
  id: string;
838
845
  texts: string[];
839
- model: string;
846
+ model: AxAICohereEmbedModel;
840
847
  embeddings: number[][];
841
848
  };
842
849
 
@@ -845,10 +852,10 @@ interface AxAICohereArgs {
845
852
  apiKey: string;
846
853
  config?: Readonly<Partial<AxAICohereConfig>>;
847
854
  options?: Readonly<AxAIServiceOptions>;
848
- modelMap?: Record<string, AxAICohereModel | AxAICohereEmbedModel | string>;
855
+ models?: AxAIModelList<AxAICohereModel>;
849
856
  }
850
- declare class AxAICohere extends AxBaseAI<AxAICohereChatRequest, AxAICohereEmbedRequest, AxAICohereChatResponse, AxAICohereChatResponseDelta, AxAICohereEmbedResponse> {
851
- constructor({ apiKey, config, options, modelMap, }: Readonly<Omit<AxAICohereArgs, 'name'>>);
857
+ declare class AxAICohere extends AxBaseAI<AxAICohereModel, AxAICohereEmbedModel, AxAICohereChatRequest, AxAICohereEmbedRequest, AxAICohereChatResponse, AxAICohereChatResponseDelta, AxAICohereEmbedResponse> {
858
+ constructor({ apiKey, config, options, models, }: Readonly<Omit<AxAICohereArgs, 'name'>>);
852
859
  }
853
860
 
854
861
  /**
@@ -859,19 +866,16 @@ declare enum AxAIDeepSeekModel {
859
866
  DeepSeekCoder = "deepseek-coder"
860
867
  }
861
868
 
862
- type DeepSeekConfig = AxAIOpenAIConfig;
863
- interface AxAIDeepSeekArgs {
864
- name: 'deepseek';
865
- apiKey: string;
866
- config?: Readonly<Partial<DeepSeekConfig>>;
867
- options?: Readonly<AxAIServiceOptions>;
868
- modelMap?: Record<string, AxAIDeepSeekModel | string>;
869
- }
870
- declare class AxAIDeepSeek extends AxAIOpenAI {
871
- constructor({ apiKey, config, options, modelMap, }: Readonly<Omit<AxAIDeepSeekArgs, 'name'>>);
869
+ type AxAIDeepSeekArgs = AxAIOpenAIArgs<'deepseek', AxAIDeepSeekModel, undefined>;
870
+ declare class AxAIDeepSeek extends AxAIOpenAIBase<AxAIDeepSeekModel, undefined> {
871
+ constructor({ apiKey, config, options, models, }: Readonly<Omit<AxAIDeepSeekArgs, 'name'>>);
872
872
  }
873
873
 
874
874
  declare enum AxAIGoogleGeminiModel {
875
+ Gemini20Pro = "gemini-2.0-pro-exp-02-05",
876
+ Gemini20Flash = "gemini-2.0-flash",
877
+ Gemini20FlashLite = "gemini-2.0-flash-lite-preview-02-05",
878
+ Gemini20FlashThinking = "gemini-2.0-flash-thinking-exp-01-21",
875
879
  Gemini1Pro = "gemini-1.0-pro",
876
880
  Gemini15Flash = "gemini-1.5-flash",
877
881
  Gemini15Flash8B = "gemini-1.5-flash-8b",
@@ -1002,7 +1006,7 @@ type AxAIGoogleGeminiChatResponseDelta = AxAIGoogleGeminiChatResponse;
1002
1006
  * AxAIGoogleGeminiConfig: Configuration options for Google Gemini API
1003
1007
  */
1004
1008
  type AxAIGoogleGeminiConfig = AxModelConfig & {
1005
- model: AxAIGoogleGeminiModel | string;
1009
+ model: AxAIGoogleGeminiModel;
1006
1010
  embedModel?: AxAIGoogleGeminiEmbedModel;
1007
1011
  safetySettings?: AxAIGoogleGeminiSafetySettings;
1008
1012
  };
@@ -1060,13 +1064,13 @@ interface AxAIGoogleGeminiArgs {
1060
1064
  region?: string;
1061
1065
  config?: Readonly<Partial<AxAIGoogleGeminiConfig>>;
1062
1066
  options?: Readonly<AxAIServiceOptions & AxAIGoogleGeminiOptionsTools>;
1063
- modelMap?: Record<string, AxAIGoogleGeminiModel | AxAIGoogleGeminiEmbedModel | string>;
1067
+ models?: AxAIModelList<AxAIGoogleGeminiModel>;
1064
1068
  }
1065
1069
  /**
1066
1070
  * AxAIGoogleGemini: AI Service
1067
1071
  */
1068
- declare class AxAIGoogleGemini extends AxBaseAI<AxAIGoogleGeminiChatRequest, AxAIGoogleGeminiBatchEmbedRequest | AxAIGoogleVertexBatchEmbedRequest, AxAIGoogleGeminiChatResponse, AxAIGoogleGeminiChatResponseDelta, AxAIGoogleGeminiBatchEmbedResponse | AxAIGoogleVertexBatchEmbedResponse> {
1069
- constructor({ apiKey, projectId, region, config, options, modelMap, }: Readonly<Omit<AxAIGoogleGeminiArgs, 'name'>>);
1072
+ declare class AxAIGoogleGemini extends AxBaseAI<AxAIGoogleGeminiModel, AxAIGoogleGeminiEmbedModel, AxAIGoogleGeminiChatRequest, AxAIGoogleGeminiBatchEmbedRequest | AxAIGoogleVertexBatchEmbedRequest, AxAIGoogleGeminiChatResponse, AxAIGoogleGeminiChatResponseDelta, AxAIGoogleGeminiBatchEmbedResponse | AxAIGoogleVertexBatchEmbedResponse> {
1073
+ constructor({ apiKey, projectId, region, config, options, models, }: Readonly<Omit<AxAIGoogleGeminiArgs, 'name'>>);
1070
1074
  }
1071
1075
 
1072
1076
  declare enum AxAIGroqModel {
@@ -1076,18 +1080,13 @@ declare enum AxAIGroqModel {
1076
1080
  Gemma2_9B = "gemma2-9b-it"
1077
1081
  }
1078
1082
 
1079
- type AxAIGroqAIConfig = AxAIOpenAIConfig;
1080
- interface AxAIGroqArgs {
1081
- name: 'groq';
1082
- apiKey: string;
1083
- config?: Readonly<Partial<AxAIGroqAIConfig>>;
1083
+ type AxAIGroqArgs = AxAIOpenAIArgs<'groq', AxAIGroqModel, undefined> & {
1084
1084
  options?: Readonly<AxAIServiceOptions> & {
1085
1085
  tokensPerMinute?: number;
1086
1086
  };
1087
- modelMap?: Record<string, AxAIGroqModel>;
1088
- }
1089
- declare class AxAIGroq extends AxAIOpenAI {
1090
- constructor({ apiKey, config, options, modelMap, }: Readonly<Omit<AxAIGroqArgs, 'groq'>>);
1087
+ };
1088
+ declare class AxAIGroq extends AxAIOpenAIBase<AxAIGroqModel, undefined> {
1089
+ constructor({ apiKey, config, options, models, }: Readonly<Omit<AxAIGroqArgs, 'name'>>);
1091
1090
  setOptions: (options: Readonly<AxAIServiceOptions>) => void;
1092
1091
  private newRateLimiter;
1093
1092
  }
@@ -1104,7 +1103,7 @@ type AxAIHuggingFaceConfig = AxModelConfig & {
1104
1103
  waitForModel?: boolean;
1105
1104
  };
1106
1105
  type AxAIHuggingFaceRequest = {
1107
- model: AxAIHuggingFaceModel | string;
1106
+ model: AxAIHuggingFaceModel;
1108
1107
  inputs: string;
1109
1108
  parameters: {
1110
1109
  max_new_tokens?: number;
@@ -1131,10 +1130,10 @@ interface AxAIHuggingFaceArgs {
1131
1130
  apiKey: string;
1132
1131
  config?: Readonly<Partial<AxAIHuggingFaceConfig>>;
1133
1132
  options?: Readonly<AxAIServiceOptions>;
1134
- modelMap?: Record<string, AxAIHuggingFaceModel>;
1133
+ models?: AxAIModelList<AxAIHuggingFaceModel>;
1135
1134
  }
1136
- declare class AxAIHuggingFace extends AxBaseAI<AxAIHuggingFaceRequest, unknown, AxAIHuggingFaceResponse, unknown, unknown> {
1137
- constructor({ apiKey, config, options, modelMap, }: Readonly<Omit<AxAIHuggingFaceArgs, 'name'>>);
1135
+ declare class AxAIHuggingFace extends AxBaseAI<AxAIHuggingFaceModel, unknown, AxAIHuggingFaceRequest, unknown, AxAIHuggingFaceResponse, unknown, unknown> {
1136
+ constructor({ apiKey, config, options, models, }: Readonly<Omit<AxAIHuggingFaceArgs, 'name'>>);
1138
1137
  }
1139
1138
 
1140
1139
  declare enum AxAIMistralModel {
@@ -1151,34 +1150,26 @@ declare enum AxAIMistralEmbedModels {
1151
1150
  MistralEmbed = "mistral-embed"
1152
1151
  }
1153
1152
 
1154
- type MistralConfig = AxAIOpenAIConfig;
1155
- interface AxAIMistralArgs {
1156
- name: 'mistral';
1157
- apiKey: string;
1158
- config?: Readonly<Partial<MistralConfig>>;
1159
- options?: Readonly<AxAIServiceOptions>;
1160
- modelMap?: Record<string, AxAIMistralModel | AxAIMistralEmbedModels | string>;
1161
- }
1162
- declare class AxAIMistral extends AxAIOpenAI {
1163
- constructor({ apiKey, config, options, modelMap, }: Readonly<Omit<AxAIMistralArgs, 'name'>>);
1153
+ type AxAIMistralArgs = AxAIOpenAIArgs<'mistral', AxAIMistralModel, AxAIMistralEmbedModels> & {
1154
+ options?: Readonly<AxAIServiceOptions> & {
1155
+ tokensPerMinute?: number;
1156
+ };
1157
+ };
1158
+ declare class AxAIMistral extends AxAIOpenAIBase<AxAIMistralModel, AxAIMistralEmbedModels> {
1159
+ constructor({ apiKey, config, options, models, }: Readonly<Omit<AxAIMistralArgs, 'name'>>);
1164
1160
  }
1165
1161
 
1166
- type AxAIOllamaAIConfig = AxAIOpenAIConfig;
1167
- type AxAIOllamaArgs = {
1168
- name: 'ollama';
1162
+ type AxAIOllamaAIConfig = AxAIOpenAIConfig<string, string>;
1163
+ type AxAIOllamaArgs = AxAIOpenAIArgs<'ollama', string, string> & {
1169
1164
  model?: string;
1170
1165
  embedModel?: string;
1171
1166
  url?: string;
1172
- apiKey?: string;
1173
- config?: Readonly<Partial<AxAIOllamaAIConfig>>;
1174
- options?: Readonly<AxAIServiceOptions>;
1175
- modelMap?: Record<string, string>;
1176
1167
  };
1177
1168
  /**
1178
1169
  * OllamaAI: AI Service
1179
1170
  */
1180
- declare class AxAIOllama extends AxAIOpenAI {
1181
- constructor({ apiKey, url, config, options, modelMap, }: Readonly<Omit<AxAIOllamaArgs, 'name'>>);
1171
+ declare class AxAIOllama extends AxAIOpenAIBase<string, string> {
1172
+ constructor({ apiKey, url, config, options, models, }: Readonly<Omit<AxAIOllamaArgs, 'name'>>);
1182
1173
  }
1183
1174
 
1184
1175
  declare enum AxAIRekaModel {
@@ -1187,7 +1178,7 @@ declare enum AxAIRekaModel {
1187
1178
  RekaEdge = "reka-edge"
1188
1179
  }
1189
1180
  type AxAIRekaConfig = Omit<AxModelConfig, 'topK'> & {
1190
- model: AxAIRekaModel | string;
1181
+ model: AxAIRekaModel;
1191
1182
  stop?: readonly string[];
1192
1183
  useSearchEngine?: boolean;
1193
1184
  };
@@ -1257,38 +1248,32 @@ interface AxAIRekaArgs {
1257
1248
  streamingUsage?: boolean;
1258
1249
  }>;
1259
1250
  modelInfo?: Readonly<AxModelInfo[]>;
1260
- modelMap?: Record<string, AxAIRekaModel | string>;
1251
+ models?: AxAIModelList<AxAIRekaModel>;
1261
1252
  }
1262
- declare class AxAIReka extends AxBaseAI<AxAIRekaChatRequest, unknown, AxAIRekaChatResponse, AxAIRekaChatResponseDelta, unknown> {
1263
- constructor({ apiKey, config, options, apiURL, modelInfo, modelMap, }: Readonly<Omit<AxAIRekaArgs, 'name'>>);
1253
+ declare class AxAIReka extends AxBaseAI<AxAIRekaModel, undefined, AxAIRekaChatRequest, unknown, AxAIRekaChatResponse, AxAIRekaChatResponseDelta, unknown> {
1254
+ constructor({ apiKey, config, options, apiURL, modelInfo, models, }: Readonly<Omit<AxAIRekaArgs, 'name'>>);
1264
1255
  }
1265
1256
 
1266
- type TogetherAIConfig = AxAIOpenAIConfig;
1267
- interface AxAITogetherArgs {
1268
- name: 'together';
1269
- apiKey: string;
1270
- config?: Readonly<Partial<TogetherAIConfig>>;
1271
- options?: Readonly<AxAIServiceOptions>;
1272
- modelMap?: Record<string, string>;
1273
- }
1274
- declare class AxAITogether extends AxAIOpenAI {
1275
- constructor({ apiKey, config, options, modelMap, }: Readonly<Omit<AxAITogetherArgs, 'name'>>);
1257
+ type AxAITogetherArgs = AxAIOpenAIArgs<'together', string, unknown>;
1258
+ declare class AxAITogether extends AxAIOpenAIBase<string, unknown> {
1259
+ constructor({ apiKey, config, options, models, }: Readonly<Omit<AxAITogetherArgs, 'name'>>);
1276
1260
  }
1277
1261
 
1278
1262
  type AxAIArgs = AxAIOpenAIArgs | AxAIAzureOpenAIArgs | AxAITogetherArgs | AxAIAnthropicArgs | AxAIGroqArgs | AxAIGoogleGeminiArgs | AxAICohereArgs | AxAIHuggingFaceArgs | AxAIMistralArgs | AxAIDeepSeekArgs | AxAIOllamaArgs | AxAIRekaArgs;
1279
- type AxAIModels = AxAIOpenAIModel | AxAIAnthropicModel | AxAIGroqModel | AxAIGoogleGeminiModel | AxAICohereModel | AxAIHuggingFaceModel | AxAIMistralModel | AxAIDeepSeekModel | string;
1280
- type AxAIEmbedModels = AxAIOpenAIEmbedModel | AxAIGoogleGeminiEmbedModel | AxAICohereEmbedModel | string;
1263
+ type AxAIModels = AxAIOpenAIModel | AxAIAnthropicModel | AxAIGroqModel | AxAIGoogleGeminiModel | AxAICohereModel | AxAIHuggingFaceModel | AxAIMistralModel | AxAIDeepSeekModel;
1264
+ type AxAIEmbedModels = AxAIOpenAIEmbedModel | AxAIGoogleGeminiEmbedModel | AxAICohereEmbedModel;
1281
1265
  declare class AxAI implements AxAIService {
1282
1266
  private ai;
1283
1267
  constructor(options: Readonly<AxAIArgs>);
1284
1268
  getName(): string;
1269
+ getId(): string;
1285
1270
  getModelInfo(): Readonly<AxModelInfoWithProvider>;
1286
1271
  getEmbedModelInfo(): Readonly<AxModelInfoWithProvider> | undefined;
1287
1272
  getFeatures(model?: string): {
1288
1273
  functions: boolean;
1289
1274
  streaming: boolean;
1290
1275
  };
1291
- getModelMap(): AxAIModelMap | undefined;
1276
+ getModelList(): AxAIModelList | undefined;
1292
1277
  getMetrics(): AxAIServiceMetrics;
1293
1278
  chat(req: Readonly<AxChatRequest>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions>): Promise<AxChatResponse | ReadableStream$1<AxChatResponse>>;
1294
1279
  embed(req: Readonly<AxEmbedRequest>, options?: Readonly<AxAIServiceActionOptions & AxAIServiceActionOptions>): Promise<AxEmbedResponse>;
@@ -1630,10 +1615,11 @@ interface AxAgentic extends AxTunable, AxUsable {
1630
1615
  getFunction(): AxFunction;
1631
1616
  }
1632
1617
  type AxAgentOptions = Omit<AxGenOptions, 'functions'>;
1633
- declare class AxAgent<IN extends AxGenIn, OUT extends AxGenOut> implements AxAgentic {
1618
+ declare class AxAgent<IN extends AxGenIn, OUT extends AxGenOut = AxGenOut> implements AxAgentic {
1634
1619
  private ai?;
1635
1620
  private signature;
1636
1621
  private program;
1622
+ private functions?;
1637
1623
  private agents?;
1638
1624
  private name;
1639
1625
  private description;
@@ -1659,8 +1645,8 @@ declare class AxAgent<IN extends AxGenIn, OUT extends AxGenOut> implements AxAge
1659
1645
  resetUsage(): void;
1660
1646
  getFunction(): AxFunction;
1661
1647
  private init;
1662
- forward(ai: Readonly<AxAIService>, values: IN, options?: Readonly<AxProgramForwardOptions>): Promise<OUT>;
1663
- streamingForward(ai: Readonly<AxAIService>, values: IN, options?: Readonly<AxProgramStreamingForwardOptions>): AxGenStreamingOut<OUT>;
1648
+ forward(parentAi: Readonly<AxAIService>, values: IN, options?: Readonly<AxProgramForwardOptions>): Promise<OUT>;
1649
+ streamingForward(parentAi: Readonly<AxAIService>, values: IN, options?: Readonly<AxProgramStreamingForwardOptions>): AxGenStreamingOut<OUT>;
1664
1650
  }
1665
1651
 
1666
1652
  interface AxApacheTikaArgs {
@@ -1687,6 +1673,9 @@ declare class AxApacheTika {
1687
1673
  type AxBalancerOptions = {
1688
1674
  comparator?: (a: AxAIService, b: AxAIService) => number;
1689
1675
  debug?: boolean;
1676
+ initialBackoffMs?: number;
1677
+ maxBackoffMs?: number;
1678
+ maxRetries?: number;
1690
1679
  };
1691
1680
  /**
1692
1681
  * Balancer that rotates through services.
@@ -1696,6 +1685,10 @@ declare class AxBalancer implements AxAIService {
1696
1685
  private currentServiceIndex;
1697
1686
  private currentService;
1698
1687
  private debug;
1688
+ private initialBackoffMs;
1689
+ private maxBackoffMs;
1690
+ private maxRetries;
1691
+ private serviceFailures;
1699
1692
  constructor(services: readonly AxAIService[], options?: AxBalancerOptions);
1700
1693
  /**
1701
1694
  * Service comparator that respects the input order of services.
@@ -1705,17 +1698,18 @@ declare class AxBalancer implements AxAIService {
1705
1698
  * Service comparator that sorts services by cost.
1706
1699
  */
1707
1700
  static costComparator: (a: AxAIService, b: AxAIService) => number;
1708
- getModelMap(): AxAIModelMap | undefined;
1701
+ getModelList(): AxAIModelList | undefined;
1709
1702
  private getNextService;
1710
1703
  private reset;
1711
1704
  getName(): string;
1705
+ getId(): string;
1712
1706
  getModelInfo(): Readonly<AxModelInfoWithProvider>;
1713
1707
  getEmbedModelInfo(): Readonly<AxModelInfoWithProvider> | undefined;
1714
- getFeatures(model?: string): {
1715
- functions: boolean;
1716
- streaming: boolean;
1717
- };
1708
+ getFeatures(model?: string): AxAIFeatures;
1718
1709
  getMetrics(): AxAIServiceMetrics;
1710
+ private canRetryService;
1711
+ private handleFailure;
1712
+ private handleSuccess;
1719
1713
  chat(req: Readonly<AxChatRequest>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions> | undefined): Promise<AxChatResponse | ReadableStream$1<AxChatResponse>>;
1720
1714
  embed(req: Readonly<AxEmbedRequest>, options?: Readonly<AxAIServiceActionOptions> | undefined): Promise<AxEmbedResponse>;
1721
1715
  setOptions(options: Readonly<AxAIServiceOptions>): void;
@@ -2197,13 +2191,14 @@ declare class AxMockAIService implements AxAIService {
2197
2191
  private metrics;
2198
2192
  constructor(config?: {
2199
2193
  name?: string;
2194
+ id?: string;
2200
2195
  modelInfo?: Partial<AxModelInfoWithProvider>;
2201
2196
  embedModelInfo?: AxModelInfoWithProvider;
2202
2197
  features?: {
2203
2198
  functions?: boolean;
2204
2199
  streaming?: boolean;
2205
2200
  };
2206
- modelMap?: AxAIModelMap;
2201
+ models?: AxAIModelList;
2207
2202
  chatResponse?: AxChatResponse | ((req: Readonly<AxChatRequest>) => AxChatResponse | Promise<AxChatResponse>);
2208
2203
  embedResponse?: AxEmbedResponse | ((req: Readonly<AxEmbedRequest>) => AxEmbedResponse | Promise<AxEmbedResponse>);
2209
2204
  shouldError?: boolean;
@@ -2211,13 +2206,14 @@ declare class AxMockAIService implements AxAIService {
2211
2206
  latencyMs?: number;
2212
2207
  });
2213
2208
  getName(): string;
2209
+ getId(): string;
2214
2210
  getModelInfo(): Readonly<AxModelInfoWithProvider>;
2215
2211
  getEmbedModelInfo(): Readonly<AxModelInfoWithProvider> | undefined;
2216
2212
  getFeatures(_model?: string): {
2217
2213
  functions: boolean;
2218
2214
  streaming: boolean;
2219
2215
  };
2220
- getModelMap(): AxAIModelMap | undefined;
2216
+ getModelList(): AxAIModelList | undefined;
2221
2217
  getMetrics(): AxAIServiceMetrics;
2222
2218
  chat(req: Readonly<AxChatRequest>, _options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions>): Promise<AxChatResponse | ReadableStream<AxChatResponse>>;
2223
2219
  embed(req: Readonly<AxEmbedRequest>, _options?: Readonly<AxAIServiceActionOptions>): Promise<AxEmbedResponse>;
@@ -2246,4 +2242,4 @@ declare class AxRAG extends AxChainOfThought<{
2246
2242
  }>;
2247
2243
  }
2248
2244
 
2249
- export { AxAI, AxAIAnthropic, type AxAIAnthropicArgs, type AxAIAnthropicChatError, type AxAIAnthropicChatRequest, type AxAIAnthropicChatRequestCacheParam, type AxAIAnthropicChatResponse, type AxAIAnthropicChatResponseDelta, type AxAIAnthropicConfig, type AxAIAnthropicContentBlockDeltaEvent, type AxAIAnthropicContentBlockStartEvent, type AxAIAnthropicContentBlockStopEvent, type AxAIAnthropicErrorEvent, type AxAIAnthropicMessageDeltaEvent, type AxAIAnthropicMessageStartEvent, type AxAIAnthropicMessageStopEvent, AxAIAnthropicModel, type AxAIAnthropicPingEvent, AxAIAnthropicVertexModel, type AxAIArgs, AxAIAzureOpenAI, type AxAIAzureOpenAIArgs, AxAICohere, type AxAICohereArgs, type AxAICohereChatRequest, type AxAICohereChatRequestToolResults, type AxAICohereChatResponse, type AxAICohereChatResponseDelta, type AxAICohereChatResponseToolCalls, type AxAICohereConfig, AxAICohereEmbedModel, type AxAICohereEmbedRequest, type AxAICohereEmbedResponse, AxAICohereModel, AxAIDeepSeek, type AxAIDeepSeekArgs, AxAIDeepSeekModel, type AxAIEmbedModels, AxAIGoogleGemini, type AxAIGoogleGeminiArgs, type AxAIGoogleGeminiBatchEmbedRequest, type AxAIGoogleGeminiBatchEmbedResponse, type AxAIGoogleGeminiChatRequest, type AxAIGoogleGeminiChatResponse, type AxAIGoogleGeminiChatResponseDelta, type AxAIGoogleGeminiConfig, type AxAIGoogleGeminiContent, AxAIGoogleGeminiEmbedModel, type AxAIGoogleGeminiGenerationConfig, AxAIGoogleGeminiModel, type AxAIGoogleGeminiOptionsTools, AxAIGoogleGeminiSafetyCategory, type AxAIGoogleGeminiSafetySettings, AxAIGoogleGeminiSafetyThreshold, type AxAIGoogleGeminiTool, type AxAIGoogleGeminiToolConfig, type AxAIGoogleGeminiToolFunctionDeclaration, type AxAIGoogleGeminiToolGoogleSearchRetrieval, type AxAIGoogleVertexBatchEmbedRequest, type AxAIGoogleVertexBatchEmbedResponse, AxAIGroq, type AxAIGroqArgs, AxAIGroqModel, AxAIHuggingFace, type AxAIHuggingFaceArgs, type AxAIHuggingFaceConfig, AxAIHuggingFaceModel, type AxAIHuggingFaceRequest, type AxAIHuggingFaceResponse, type AxAIMemory, AxAIMistral, type AxAIMistralArgs, AxAIMistralEmbedModels, AxAIMistralModel, type AxAIModelMap, type AxAIModels, AxAIOllama, type AxAIOllamaAIConfig, type AxAIOllamaArgs, AxAIOpenAI, type AxAIOpenAIArgs, type AxAIOpenAIChatRequest, type AxAIOpenAIChatResponse, type AxAIOpenAIChatResponseDelta, type AxAIOpenAIConfig, AxAIOpenAIEmbedModel, type AxAIOpenAIEmbedRequest, type AxAIOpenAIEmbedResponse, type AxAIOpenAILogprob, AxAIOpenAIModel, type AxAIOpenAIResponseDelta, type AxAIOpenAIUsage, type AxAIPromptConfig, AxAIReka, type AxAIRekaArgs, type AxAIRekaChatRequest, type AxAIRekaChatResponse, type AxAIRekaChatResponseDelta, type AxAIRekaConfig, AxAIRekaModel, type AxAIRekaUsage, type AxAIService, type AxAIServiceActionOptions, AxAIServiceAuthenticationError, AxAIServiceError, type AxAIServiceImpl, type AxAIServiceMetrics, AxAIServiceNetworkError, type AxAIServiceOptions, AxAIServiceResponseError, AxAIServiceStatusError, AxAIServiceStreamTerminatedError, AxAIServiceTimeoutError, AxAITogether, type AxAITogetherArgs, type AxAPI, type AxAPIConfig, AxAgent, type AxAgentOptions, type AxAgentic, AxApacheTika, type AxApacheTikaArgs, type AxApacheTikaConvertOptions, type AxAssertion, AxAssertionError, AxBalancer, type AxBalancerOptions, AxBaseAI, type AxBaseAIArgs, type AxBaseAIFeatures, AxBootstrapFewShot, AxChainOfThought, type AxChatRequest, type AxChatResponse, type AxChatResponseFunctionCall, type AxChatResponseResult, AxDB, type AxDBArgs, AxDBBase, type AxDBBaseArgs, type AxDBBaseOpOptions, AxDBCloudflare, type AxDBCloudflareArgs, type AxDBCloudflareOpOptions, type AxDBLoaderOptions, AxDBManager, type AxDBManagerArgs, type AxDBMatch, AxDBMemory, type AxDBMemoryArgs, type AxDBMemoryOpOptions, AxDBPinecone, type AxDBPineconeArgs, type AxDBPineconeOpOptions, type AxDBQueryRequest, type AxDBQueryResponse, type AxDBQueryService, type AxDBService, type AxDBState, type AxDBUpsertRequest, type AxDBUpsertResponse, AxDBWeaviate, type AxDBWeaviateArgs, type AxDBWeaviateOpOptions, type AxDataRow, AxDefaultQueryRewriter, AxDefaultResultReranker, type AxDockerContainer, AxDockerSession, type AxEmbedRequest, type AxEmbedResponse, AxEmbeddingAdapter, type AxEvaluateArgs, type AxExample, type AxField, type AxFieldTemplateFn, type AxFieldValue, type AxFunction, AxFunctionError, type AxFunctionHandler, type AxFunctionJSONSchema, AxFunctionProcessor, AxGen, type AxGenDeltaOut, type AxGenIn, type AxGenOptions, type AxGenOut, type AxGenStreamingOut, type AxGenerateResult, AxHFDataLoader, type AxIField, type AxInputFunctionType, AxInstanceRegistry, type AxInternalChatRequest, type AxInternalEmbedRequest, AxJSInterpreter, AxJSInterpreterPermission, AxLLMRequestTypeValues, AxMemory, type AxMetricFn, type AxMetricFnArgs, AxMockAIService, type AxModelConfig, type AxModelInfo, type AxModelInfoWithProvider, type AxOptimizerArgs, AxProgram, type AxProgramDemos, type AxProgramExamples, type AxProgramForwardOptions, type AxProgramStreamingForwardOptions, type AxProgramTrace, type AxProgramUsage, AxProgramWithSignature, type AxProgramWithSignatureOptions, AxPromptTemplate, AxRAG, type AxRateLimiterFunction, AxRateLimiterTokenUsage, type AxRateLimiterTokenUsageOptions, type AxRerankerIn, type AxRerankerOut, type AxResponseHandlerArgs, type AxRewriteIn, type AxRewriteOut, AxRoute, AxRouter, type AxRouterForwardOptions, AxSignature, AxSpanKindValues, type AxStreamingAssertion, type AxStreamingEvent, AxTestPrompt, type AxTokenUsage, type AxTunable, type AxUsable };
2245
+ export { AxAI, AxAIAnthropic, type AxAIAnthropicArgs, type AxAIAnthropicChatError, type AxAIAnthropicChatRequest, type AxAIAnthropicChatRequestCacheParam, type AxAIAnthropicChatResponse, type AxAIAnthropicChatResponseDelta, type AxAIAnthropicConfig, type AxAIAnthropicContentBlockDeltaEvent, type AxAIAnthropicContentBlockStartEvent, type AxAIAnthropicContentBlockStopEvent, type AxAIAnthropicErrorEvent, type AxAIAnthropicMessageDeltaEvent, type AxAIAnthropicMessageStartEvent, type AxAIAnthropicMessageStopEvent, AxAIAnthropicModel, type AxAIAnthropicPingEvent, AxAIAnthropicVertexModel, type AxAIArgs, AxAIAzureOpenAI, type AxAIAzureOpenAIArgs, type AxAIAzureOpenAIConfig, AxAICohere, type AxAICohereArgs, type AxAICohereChatRequest, type AxAICohereChatRequestToolResults, type AxAICohereChatResponse, type AxAICohereChatResponseDelta, type AxAICohereChatResponseToolCalls, type AxAICohereConfig, AxAICohereEmbedModel, type AxAICohereEmbedRequest, type AxAICohereEmbedResponse, AxAICohereModel, AxAIDeepSeek, type AxAIDeepSeekArgs, AxAIDeepSeekModel, type AxAIEmbedModels, type AxAIFeatures, AxAIGoogleGemini, type AxAIGoogleGeminiArgs, type AxAIGoogleGeminiBatchEmbedRequest, type AxAIGoogleGeminiBatchEmbedResponse, type AxAIGoogleGeminiChatRequest, type AxAIGoogleGeminiChatResponse, type AxAIGoogleGeminiChatResponseDelta, type AxAIGoogleGeminiConfig, type AxAIGoogleGeminiContent, AxAIGoogleGeminiEmbedModel, type AxAIGoogleGeminiGenerationConfig, AxAIGoogleGeminiModel, type AxAIGoogleGeminiOptionsTools, AxAIGoogleGeminiSafetyCategory, type AxAIGoogleGeminiSafetySettings, AxAIGoogleGeminiSafetyThreshold, type AxAIGoogleGeminiTool, type AxAIGoogleGeminiToolConfig, type AxAIGoogleGeminiToolFunctionDeclaration, type AxAIGoogleGeminiToolGoogleSearchRetrieval, type AxAIGoogleVertexBatchEmbedRequest, type AxAIGoogleVertexBatchEmbedResponse, AxAIGroq, type AxAIGroqArgs, AxAIGroqModel, AxAIHuggingFace, type AxAIHuggingFaceArgs, type AxAIHuggingFaceConfig, AxAIHuggingFaceModel, type AxAIHuggingFaceRequest, type AxAIHuggingFaceResponse, type AxAIMemory, AxAIMistral, type AxAIMistralArgs, AxAIMistralEmbedModels, AxAIMistralModel, type AxAIModelList, type AxAIModels, AxAIOllama, type AxAIOllamaAIConfig, type AxAIOllamaArgs, AxAIOpenAI, type AxAIOpenAIArgs, AxAIOpenAIBase, type AxAIOpenAIBaseArgs, type AxAIOpenAIChatRequest, type AxAIOpenAIChatResponse, type AxAIOpenAIChatResponseDelta, type AxAIOpenAIConfig, AxAIOpenAIEmbedModel, type AxAIOpenAIEmbedRequest, type AxAIOpenAIEmbedResponse, type AxAIOpenAILogprob, AxAIOpenAIModel, type AxAIOpenAIResponseDelta, type AxAIOpenAIUsage, type AxAIPromptConfig, AxAIReka, type AxAIRekaArgs, type AxAIRekaChatRequest, type AxAIRekaChatResponse, type AxAIRekaChatResponseDelta, type AxAIRekaConfig, AxAIRekaModel, type AxAIRekaUsage, type AxAIService, type AxAIServiceActionOptions, AxAIServiceAuthenticationError, AxAIServiceError, type AxAIServiceImpl, type AxAIServiceMetrics, AxAIServiceNetworkError, type AxAIServiceOptions, AxAIServiceResponseError, AxAIServiceStatusError, AxAIServiceStreamTerminatedError, AxAIServiceTimeoutError, AxAITogether, type AxAITogetherArgs, type AxAPI, type AxAPIConfig, AxAgent, type AxAgentOptions, type AxAgentic, AxApacheTika, type AxApacheTikaArgs, type AxApacheTikaConvertOptions, type AxAssertion, AxAssertionError, AxBalancer, type AxBalancerOptions, AxBaseAI, type AxBaseAIArgs, AxBootstrapFewShot, AxChainOfThought, type AxChatRequest, type AxChatResponse, type AxChatResponseFunctionCall, type AxChatResponseResult, AxDB, type AxDBArgs, AxDBBase, type AxDBBaseArgs, type AxDBBaseOpOptions, AxDBCloudflare, type AxDBCloudflareArgs, type AxDBCloudflareOpOptions, type AxDBLoaderOptions, AxDBManager, type AxDBManagerArgs, type AxDBMatch, AxDBMemory, type AxDBMemoryArgs, type AxDBMemoryOpOptions, AxDBPinecone, type AxDBPineconeArgs, type AxDBPineconeOpOptions, type AxDBQueryRequest, type AxDBQueryResponse, type AxDBQueryService, type AxDBService, type AxDBState, type AxDBUpsertRequest, type AxDBUpsertResponse, AxDBWeaviate, type AxDBWeaviateArgs, type AxDBWeaviateOpOptions, type AxDataRow, AxDefaultQueryRewriter, AxDefaultResultReranker, type AxDockerContainer, AxDockerSession, type AxEmbedRequest, type AxEmbedResponse, AxEmbeddingAdapter, type AxEvaluateArgs, type AxExample, type AxField, type AxFieldTemplateFn, type AxFieldValue, type AxFunction, AxFunctionError, type AxFunctionHandler, type AxFunctionJSONSchema, AxFunctionProcessor, AxGen, type AxGenDeltaOut, type AxGenIn, type AxGenOptions, type AxGenOut, type AxGenStreamingOut, type AxGenerateResult, AxHFDataLoader, type AxIField, type AxInputFunctionType, AxInstanceRegistry, type AxInternalChatRequest, type AxInternalEmbedRequest, AxJSInterpreter, AxJSInterpreterPermission, AxLLMRequestTypeValues, AxMemory, type AxMetricFn, type AxMetricFnArgs, AxMockAIService, type AxModelConfig, type AxModelInfo, type AxModelInfoWithProvider, type AxOptimizerArgs, AxProgram, type AxProgramDemos, type AxProgramExamples, type AxProgramForwardOptions, type AxProgramStreamingForwardOptions, type AxProgramTrace, type AxProgramUsage, AxProgramWithSignature, type AxProgramWithSignatureOptions, AxPromptTemplate, AxRAG, type AxRateLimiterFunction, AxRateLimiterTokenUsage, type AxRateLimiterTokenUsageOptions, type AxRerankerIn, type AxRerankerOut, type AxResponseHandlerArgs, type AxRewriteIn, type AxRewriteOut, AxRoute, AxRouter, type AxRouterForwardOptions, AxSignature, AxSpanKindValues, type AxStreamingAssertion, type AxStreamingEvent, AxTestPrompt, type AxTokenUsage, type AxTunable, type AxUsable };