@ax-llm/ax 13.0.11 → 13.0.13

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.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { Span, Context, Tracer, Meter, Histogram, Counter, Gauge } from '@opentelemetry/api';
1
+ import { Span, Tracer, Meter, Context, Histogram, Counter, Gauge } from '@opentelemetry/api';
2
2
 
3
3
  interface RetryConfig {
4
4
  maxRetries: number;
@@ -347,12 +347,6 @@ type AxLoggerData = {
347
347
  }[];
348
348
  };
349
349
  type AxLoggerFunction = (message: AxLoggerData) => void;
350
- type AxAIPromptConfig = {
351
- stream?: boolean;
352
- thinkingTokenBudget?: 'minimal' | 'low' | 'medium' | 'high' | 'highest' | 'none';
353
- showThoughts?: boolean;
354
- useExpensiveModel?: 'yes';
355
- };
356
350
  type AxAIServiceOptions = {
357
351
  debug?: boolean;
358
352
  rateLimiter?: AxRateLimiterFunction;
@@ -363,20 +357,14 @@ type AxAIServiceOptions = {
363
357
  excludeContentFromTrace?: boolean;
364
358
  abortSignal?: AbortSignal;
365
359
  logger?: AxLoggerFunction;
366
- };
367
- type AxAIServiceActionOptions<TModel = unknown, TEmbedModel = unknown, TModelKey = string> = {
368
- ai?: Readonly<AxAIService<TModel, TEmbedModel, TModelKey>>;
369
360
  sessionId?: string;
370
- traceId?: string | undefined;
371
- timeout?: number;
372
- rateLimiter?: AxRateLimiterFunction;
373
- debug?: boolean;
374
361
  debugHideSystemPrompt?: boolean;
375
362
  traceContext?: Context;
376
- abortSignal?: AbortSignal;
377
- logger?: AxLoggerFunction;
363
+ stream?: boolean;
364
+ thinkingTokenBudget?: 'minimal' | 'low' | 'medium' | 'high' | 'highest' | 'none';
365
+ showThoughts?: boolean;
366
+ useExpensiveModel?: 'yes';
378
367
  stepIndex?: number;
379
- functionResultFormatter?: (result: unknown) => string;
380
368
  };
381
369
  interface AxAIService<TModel = unknown, TEmbedModel = unknown, TModelKey = string> {
382
370
  getId(): string;
@@ -388,13 +376,13 @@ interface AxAIService<TModel = unknown, TEmbedModel = unknown, TModelKey = strin
388
376
  getLastUsedChatModel(): TModel | undefined;
389
377
  getLastUsedEmbedModel(): TEmbedModel | undefined;
390
378
  getLastUsedModelConfig(): AxModelConfig | undefined;
391
- chat(req: Readonly<AxChatRequest<TModel>>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions<TModel, TEmbedModel, TModelKey>>): Promise<AxChatResponse | ReadableStream<AxChatResponse>>;
392
- embed(req: Readonly<AxEmbedRequest<TEmbedModel>>, options?: Readonly<AxAIServiceActionOptions<TModel, TEmbedModel, TModelKey>>): Promise<AxEmbedResponse>;
379
+ chat(req: Readonly<AxChatRequest<TModel | TModelKey>>, options?: Readonly<AxAIServiceOptions>): Promise<AxChatResponse | ReadableStream<AxChatResponse>>;
380
+ embed(req: Readonly<AxEmbedRequest<TEmbedModel | TModelKey>>, options?: Readonly<AxAIServiceOptions>): Promise<AxEmbedResponse>;
393
381
  setOptions(options: Readonly<AxAIServiceOptions>): void;
394
382
  getOptions(): Readonly<AxAIServiceOptions>;
395
383
  }
396
384
  interface AxAIServiceImpl<TModel, TEmbedModel, TChatRequest, TEmbedRequest, TChatResponse, TChatResponseDelta, TEmbedResponse> {
397
- createChatReq(req: Readonly<AxInternalChatRequest<TModel>>, config: Readonly<AxAIPromptConfig>): Promise<[AxAPI, TChatRequest]> | [AxAPI, TChatRequest];
385
+ createChatReq(req: Readonly<AxInternalChatRequest<TModel>>, config?: Readonly<AxAIServiceOptions>): Promise<[AxAPI, TChatRequest]> | [AxAPI, TChatRequest];
398
386
  createChatResp(resp: Readonly<TChatResponse>): AxChatResponse;
399
387
  createChatStreamResp?(resp: Readonly<TChatResponseDelta>, state: object): AxChatResponse;
400
388
  createEmbedReq?(req: Readonly<AxInternalEmbedRequest<TEmbedModel>>): Promise<[AxAPI, TEmbedRequest]> | [AxAPI, TEmbedRequest];
@@ -459,7 +447,17 @@ declare class AxBaseAI<TModel, TEmbedModel, TChatRequest, TEmbedRequest, TChatRe
459
447
  setOptions(options: Readonly<AxAIServiceOptions>): void;
460
448
  getOptions(): Readonly<AxAIServiceOptions>;
461
449
  getLogger(): AxLoggerFunction;
462
- getModelList(): AxAIModelList<TModelKey>;
450
+ getModelList(): ({
451
+ readonly key: TModelKey;
452
+ readonly description: string;
453
+ readonly model: string;
454
+ readonly embedModel?: undefined;
455
+ } | {
456
+ readonly key: TModelKey;
457
+ readonly description: string;
458
+ readonly embedModel: string;
459
+ readonly model?: undefined;
460
+ })[];
463
461
  getName(): string;
464
462
  getFeatures(model?: TModel): AxAIFeatures;
465
463
  getLastUsedChatModel(): TModel | undefined;
@@ -482,11 +480,11 @@ declare class AxBaseAI<TModel, TEmbedModel, TChatRequest, TEmbedRequest, TChatRe
482
480
  private recordChatMetrics;
483
481
  private recordEmbedMetrics;
484
482
  getMetrics(): AxAIServiceMetrics;
485
- chat(req: Readonly<AxChatRequest<TModel>>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions<TModel, TEmbedModel, TModelKey>>): Promise<AxChatResponse | ReadableStream<AxChatResponse>>;
483
+ chat(req: Readonly<AxChatRequest<TModel | TModelKey>>, options?: Readonly<AxAIServiceOptions>): Promise<AxChatResponse | ReadableStream<AxChatResponse>>;
486
484
  private _chat1;
487
485
  private cleanupFunctionSchema;
488
486
  private _chat2;
489
- embed(req: Readonly<AxEmbedRequest<TEmbedModel>>, options?: Readonly<AxAIServiceActionOptions<TModel, TEmbedModel, TModelKey>>): Promise<AxEmbedResponse>;
487
+ embed(req: Readonly<AxEmbedRequest<TEmbedModel>>, options?: Readonly<AxAIServiceOptions>): Promise<AxEmbedResponse>;
490
488
  private _embed1;
491
489
  private _embed2;
492
490
  private buildHeaders;
@@ -729,6 +727,9 @@ type AxAIAnthropicChatResponseDelta = AxAIAnthropicMessageStartEvent | AxAIAnthr
729
727
 
730
728
  declare const axAIAnthropicDefaultConfig: () => AxAIAnthropicConfig;
731
729
  declare const axAIAnthropicVertexDefaultConfig: () => AxAIAnthropicConfig;
730
+ type ExtractModelKeys$1<T> = T extends readonly {
731
+ key: infer K;
732
+ }[] ? K : never;
732
733
  interface AxAIAnthropicArgs<TModelKey = string> {
733
734
  name: 'anthropic';
734
735
  apiKey?: string | (() => Promise<string>);
@@ -738,7 +739,10 @@ interface AxAIAnthropicArgs<TModelKey = string> {
738
739
  options?: Readonly<AxAIServiceOptions>;
739
740
  models?: AxAIInputModelList<AxAIAnthropicModel | AxAIAnthropicVertexModel, undefined, TModelKey>;
740
741
  }
741
- declare class AxAIAnthropic<TModelKey = string> extends AxBaseAI<AxAIAnthropicModel | AxAIAnthropicVertexModel, unknown, AxAIAnthropicChatRequest, unknown, AxAIAnthropicChatResponse, AxAIAnthropicChatResponseDelta, unknown, TModelKey> {
742
+ declare class AxAIAnthropic<TModelKey = string> extends AxBaseAI<AxAIAnthropicModel | AxAIAnthropicVertexModel, unknown, AxAIAnthropicChatRequest, never, AxAIAnthropicChatResponse, AxAIAnthropicChatResponseDelta, never, TModelKey> {
743
+ static create<const T extends AxAIAnthropicArgs<any>>(options: T): T extends {
744
+ models: infer M;
745
+ } ? AxAIAnthropic<ExtractModelKeys$1<M>> : AxAIAnthropic<string>;
742
746
  constructor({ apiKey, projectId, region, config, options, models, }: Readonly<Omit<AxAIAnthropicArgs<TModelKey>, 'name'>>);
743
747
  }
744
748
 
@@ -1020,15 +1024,20 @@ declare const axAIAzureOpenAICreativeConfig: () => AxAIOpenAIConfig<AxAIOpenAIMo
1020
1024
  declare const axAIAzureOpenAIFastConfig: () => AxAIOpenAIConfig<AxAIOpenAIModel, AxAIOpenAIEmbedModel>;
1021
1025
  declare const axAIAzureOpenAIBestConfig: () => AxAIOpenAIConfig<AxAIOpenAIModel, AxAIOpenAIEmbedModel>;
1022
1026
  type AxAIAzureOpenAIConfig = AxAIOpenAIConfig<AxAIOpenAIModel, AxAIOpenAIEmbedModel>;
1023
- type AxAIAzureOpenAIArgs<TModelKey = string> = AxAIOpenAIArgs<'azure-openai', AxAIOpenAIModel, AxAIOpenAIEmbedModel, TModelKey> & {
1027
+ type AxAIAzureOpenAIArgs<TModelKey> = AxAIOpenAIArgs<'azure-openai', AxAIOpenAIModel, AxAIOpenAIEmbedModel, TModelKey> & {
1024
1028
  resourceName: string;
1025
1029
  deploymentName: string;
1026
1030
  version?: string;
1027
1031
  };
1028
- declare class AxAIAzureOpenAI<TModelKey = string> extends AxAIOpenAIBase<AxAIOpenAIModel, AxAIOpenAIEmbedModel, TModelKey> {
1032
+ declare class AxAIAzureOpenAI<TModelKey> extends AxAIOpenAIBase<AxAIOpenAIModel, AxAIOpenAIEmbedModel, TModelKey> {
1029
1033
  constructor({ apiKey, resourceName, deploymentName, version, config, options, models, modelInfo, }: Readonly<Omit<AxAIAzureOpenAIArgs<TModelKey>, 'name'>>);
1030
1034
  }
1031
1035
 
1036
+ type ExtractServiceModelKeys$1<T> = T extends AxAIService<any, any, infer K> ? K : never;
1037
+ type ExtractAllModelKeys$1<T extends readonly any[]> = T extends readonly [
1038
+ infer First,
1039
+ ...infer Rest
1040
+ ] ? ExtractServiceModelKeys$1<First> | ExtractAllModelKeys$1<Rest> : never;
1032
1041
  /**
1033
1042
  * Options for the balancer.
1034
1043
  */
@@ -1042,7 +1051,7 @@ type AxBalancerOptions<TModelKey = string> = {
1042
1051
  /**
1043
1052
  * Balancer that rotates through services.
1044
1053
  */
1045
- declare class AxBalancer<TModelKey = string> implements AxAIService<unknown, unknown, TModelKey> {
1054
+ declare class AxBalancer<TServices extends readonly AxAIService<any, any, any>[] = readonly AxAIService[], TModelKey = ExtractAllModelKeys$1<TServices>> implements AxAIService<unknown, unknown, TModelKey> {
1046
1055
  private services;
1047
1056
  private currentServiceIndex;
1048
1057
  private currentService;
@@ -1051,7 +1060,11 @@ declare class AxBalancer<TModelKey = string> implements AxAIService<unknown, unk
1051
1060
  private maxBackoffMs;
1052
1061
  private maxRetries;
1053
1062
  private serviceFailures;
1054
- constructor(services: readonly AxAIService<unknown, unknown, TModelKey>[], options?: AxBalancerOptions<TModelKey>);
1063
+ constructor(services: TServices, options?: AxBalancerOptions<TModelKey>);
1064
+ /**
1065
+ * Static factory method for type-safe balancer creation with automatic model key inference.
1066
+ */
1067
+ static create<const TServices extends readonly AxAIService<any, any, any>[]>(services: TServices, options?: AxBalancerOptions<ExtractAllModelKeys$1<TServices>>): AxBalancer<TServices, ExtractAllModelKeys$1<TServices>>;
1055
1068
  getLastUsedChatModel(): unknown;
1056
1069
  getLastUsedEmbedModel(): unknown;
1057
1070
  getLastUsedModelConfig(): AxModelConfig | undefined;
@@ -1073,8 +1086,8 @@ declare class AxBalancer<TModelKey = string> implements AxAIService<unknown, unk
1073
1086
  private canRetryService;
1074
1087
  private handleFailure;
1075
1088
  private handleSuccess;
1076
- chat(req: Readonly<AxChatRequest>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions<unknown, unknown, TModelKey>> | undefined): Promise<AxChatResponse | ReadableStream<AxChatResponse>>;
1077
- embed(req: Readonly<AxEmbedRequest>, options?: Readonly<AxAIServiceActionOptions<unknown, unknown, TModelKey>> | undefined): Promise<AxEmbedResponse>;
1089
+ chat(req: Readonly<AxChatRequest<TModelKey>>, options?: Readonly<AxAIServiceOptions>): Promise<AxChatResponse | ReadableStream<AxChatResponse>>;
1090
+ embed(req: Readonly<AxEmbedRequest<TModelKey>>, options?: Readonly<AxAIServiceOptions>): Promise<AxEmbedResponse>;
1078
1091
  setOptions(options: Readonly<AxAIServiceOptions>): void;
1079
1092
  getOptions(): Readonly<AxAIServiceOptions>;
1080
1093
  getLogger(): AxLoggerFunction;
@@ -1181,14 +1194,14 @@ type AxAICohereEmbedResponse = {
1181
1194
 
1182
1195
  declare const axAICohereDefaultConfig: () => AxAICohereConfig;
1183
1196
  declare const axAICohereCreativeConfig: () => AxAICohereConfig;
1184
- interface AxAICohereArgs<TModelKey = string> {
1197
+ interface AxAICohereArgs<TModelKey> {
1185
1198
  name: 'cohere';
1186
1199
  apiKey: string;
1187
1200
  config?: Readonly<Partial<AxAICohereConfig>>;
1188
1201
  options?: Readonly<AxAIServiceOptions>;
1189
1202
  models?: AxAIInputModelList<AxAICohereModel, AxAICohereEmbedModel, TModelKey>;
1190
1203
  }
1191
- declare class AxAICohere<TModelKey = string> extends AxBaseAI<AxAICohereModel, AxAICohereEmbedModel, AxAICohereChatRequest, AxAICohereEmbedRequest, AxAICohereChatResponse, AxAICohereChatResponseDelta, AxAICohereEmbedResponse, TModelKey> {
1204
+ declare class AxAICohere<TModelKey> extends AxBaseAI<AxAICohereModel, AxAICohereEmbedModel, AxAICohereChatRequest, AxAICohereEmbedRequest, AxAICohereChatResponse, AxAICohereChatResponseDelta, AxAICohereEmbedResponse, TModelKey> {
1192
1205
  constructor({ apiKey, config, options, models, }: Readonly<Omit<AxAICohereArgs<TModelKey>, 'name'>>);
1193
1206
  }
1194
1207
 
@@ -1206,8 +1219,8 @@ declare enum AxAIDeepSeekModel {
1206
1219
  type DeepSeekConfig = AxAIOpenAIConfig<AxAIDeepSeekModel, undefined>;
1207
1220
  declare const axAIDeepSeekDefaultConfig: () => DeepSeekConfig;
1208
1221
  declare const axAIDeepSeekCodeConfig: () => DeepSeekConfig;
1209
- type AxAIDeepSeekArgs<TModelKey = string> = AxAIOpenAIArgs<'deepseek', AxAIDeepSeekModel, undefined, TModelKey>;
1210
- declare class AxAIDeepSeek<TModelKey = string> extends AxAIOpenAIBase<AxAIDeepSeekModel, undefined, TModelKey> {
1222
+ type AxAIDeepSeekArgs<TModelKey> = AxAIOpenAIArgs<'deepseek', AxAIDeepSeekModel, undefined, TModelKey>;
1223
+ declare class AxAIDeepSeek<TModelKey> extends AxAIOpenAIBase<AxAIDeepSeekModel, undefined, TModelKey> {
1211
1224
  constructor({ apiKey, config, options, models, modelInfo, }: Readonly<Omit<AxAIDeepSeekArgs<TModelKey>, 'name'>>);
1212
1225
  }
1213
1226
 
@@ -1451,7 +1464,7 @@ interface AxAIGoogleGeminiOptionsTools {
1451
1464
  googleSearch?: boolean;
1452
1465
  urlContext?: boolean;
1453
1466
  }
1454
- interface AxAIGoogleGeminiArgs<TModelKey = string> {
1467
+ interface AxAIGoogleGeminiArgs<TModelKey> {
1455
1468
  name: 'google-gemini';
1456
1469
  apiKey?: string | (() => Promise<string>);
1457
1470
  projectId?: string;
@@ -1462,10 +1475,13 @@ interface AxAIGoogleGeminiArgs<TModelKey = string> {
1462
1475
  models?: AxAIInputModelList<AxAIGoogleGeminiModel, AxAIGoogleGeminiEmbedModel, TModelKey>;
1463
1476
  modelInfo?: AxModelInfo[];
1464
1477
  }
1465
- /**
1466
- * AxAIGoogleGemini: AI Service
1467
- */
1478
+ type ExtractModelKeys<T> = T extends readonly {
1479
+ key: infer K;
1480
+ }[] ? K : never;
1468
1481
  declare class AxAIGoogleGemini<TModelKey = string> extends AxBaseAI<AxAIGoogleGeminiModel, AxAIGoogleGeminiEmbedModel, AxAIGoogleGeminiChatRequest, AxAIGoogleGeminiBatchEmbedRequest | AxAIGoogleVertexBatchEmbedRequest, AxAIGoogleGeminiChatResponse, AxAIGoogleGeminiChatResponseDelta, AxAIGoogleGeminiBatchEmbedResponse | AxAIGoogleVertexBatchEmbedResponse, TModelKey> {
1482
+ static create<const T extends AxAIGoogleGeminiArgs<any>>(options: T): T extends {
1483
+ models: infer M;
1484
+ } ? AxAIGoogleGemini<ExtractModelKeys<M>> : AxAIGoogleGemini<string>;
1469
1485
  constructor({ apiKey, projectId, region, endpointId, config, options, models, modelInfo, }: Readonly<Omit<AxAIGoogleGeminiArgs<TModelKey>, 'name'>>);
1470
1486
  }
1471
1487
 
@@ -1481,13 +1497,13 @@ declare enum AxAIGroqModel {
1481
1497
  Gemma2_9B = "gemma2-9b-it"
1482
1498
  }
1483
1499
 
1484
- type AxAIGroqArgs<TModelKey = string> = AxAIOpenAIArgs<'groq', AxAIGroqModel, undefined, TModelKey> & {
1500
+ type AxAIGroqArgs<TModelKey> = AxAIOpenAIArgs<'groq', AxAIGroqModel, undefined, TModelKey> & {
1485
1501
  options?: Readonly<AxAIServiceOptions> & {
1486
1502
  tokensPerMinute?: number;
1487
1503
  };
1488
1504
  modelInfo?: AxModelInfo[];
1489
1505
  };
1490
- declare class AxAIGroq<TModelKey = string> extends AxAIOpenAIBase<AxAIGroqModel, undefined, TModelKey> {
1506
+ declare class AxAIGroq<TModelKey> extends AxAIOpenAIBase<AxAIGroqModel, undefined, TModelKey> {
1491
1507
  constructor({ apiKey, config, options, models, modelInfo, }: Readonly<Omit<AxAIGroqArgs<TModelKey>, 'name'>>);
1492
1508
  setOptions: (options: Readonly<AxAIServiceOptions>) => void;
1493
1509
  private newRateLimiter;
@@ -1534,14 +1550,14 @@ type AxAIHuggingFaceResponse = {
1534
1550
 
1535
1551
  declare const axAIHuggingFaceDefaultConfig: () => AxAIHuggingFaceConfig;
1536
1552
  declare const axAIHuggingFaceCreativeConfig: () => AxAIHuggingFaceConfig;
1537
- interface AxAIHuggingFaceArgs<TModelKey = string> {
1553
+ interface AxAIHuggingFaceArgs<TModelKey> {
1538
1554
  name: 'huggingface';
1539
1555
  apiKey: string;
1540
1556
  config?: Readonly<Partial<AxAIHuggingFaceConfig>>;
1541
1557
  options?: Readonly<AxAIServiceOptions>;
1542
1558
  models?: AxAIInputModelList<AxAIHuggingFaceModel, undefined, TModelKey>;
1543
1559
  }
1544
- declare class AxAIHuggingFace<TModelKey = string> extends AxBaseAI<AxAIHuggingFaceModel, unknown, AxAIHuggingFaceRequest, unknown, AxAIHuggingFaceResponse, unknown, unknown, TModelKey> {
1560
+ declare class AxAIHuggingFace<TModelKey> extends AxBaseAI<AxAIHuggingFaceModel, unknown, AxAIHuggingFaceRequest, unknown, AxAIHuggingFaceResponse, unknown, unknown, TModelKey> {
1545
1561
  constructor({ apiKey, config, options, models, }: Readonly<Omit<AxAIHuggingFaceArgs<TModelKey>, 'name'>>);
1546
1562
  }
1547
1563
 
@@ -1626,20 +1642,20 @@ type AxAIMistralChatRequest = Omit<AxAIOpenAIChatRequest<AxAIMistralModel>, 'max
1626
1642
  tool_call_id: string;
1627
1643
  })[];
1628
1644
  };
1629
- type AxAIMistralArgs<TModelKey = string> = AxAIOpenAIArgs<'mistral', AxAIMistralModel, AxAIMistralEmbedModels, TModelKey> & {
1645
+ type AxAIMistralArgs<TModelKey> = AxAIOpenAIArgs<'mistral', AxAIMistralModel, AxAIMistralEmbedModels, TModelKey> & {
1630
1646
  options?: Readonly<AxAIServiceOptions> & {
1631
1647
  tokensPerMinute?: number;
1632
1648
  };
1633
1649
  modelInfo?: AxModelInfo[];
1634
1650
  };
1635
- declare class AxAIMistral<TModelKey = string> extends AxAIOpenAIBase<AxAIMistralModel, AxAIMistralEmbedModels, TModelKey> {
1651
+ declare class AxAIMistral<TModelKey> extends AxAIOpenAIBase<AxAIMistralModel, AxAIMistralEmbedModels, TModelKey> {
1636
1652
  constructor({ apiKey, config, options, models, modelInfo, }: Readonly<Omit<AxAIMistralArgs<TModelKey>, 'name'>>);
1637
1653
  private updateMessages;
1638
1654
  }
1639
1655
 
1640
1656
  declare const axModelInfoMistral: AxModelInfo[];
1641
1657
 
1642
- type AxMockAIServiceConfig<TModelKey = string> = {
1658
+ type AxMockAIServiceConfig<TModelKey> = {
1643
1659
  name?: string;
1644
1660
  id?: string;
1645
1661
  modelInfo?: Partial<AxModelInfoWithProvider>;
@@ -1650,13 +1666,13 @@ type AxMockAIServiceConfig<TModelKey = string> = {
1650
1666
  };
1651
1667
  models?: AxAIModelList<TModelKey>;
1652
1668
  options?: AxAIServiceOptions;
1653
- chatResponse?: AxChatResponse | ReadableStream<AxChatResponse> | (() => Promise<AxChatResponse | ReadableStream<AxChatResponse>>) | ((req: Readonly<AxChatRequest<unknown>>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions<unknown, unknown>>) => Promise<AxChatResponse | ReadableStream<AxChatResponse>>);
1669
+ chatResponse?: AxChatResponse | ReadableStream<AxChatResponse> | (() => Promise<AxChatResponse | ReadableStream<AxChatResponse>>) | ((req: Readonly<AxChatRequest<unknown>>, options?: Readonly<AxAIServiceOptions>) => Promise<AxChatResponse | ReadableStream<AxChatResponse>>);
1654
1670
  embedResponse?: AxEmbedResponse | ((req: Readonly<AxEmbedRequest>) => AxEmbedResponse | Promise<AxEmbedResponse>);
1655
1671
  shouldError?: boolean;
1656
1672
  errorMessage?: string;
1657
1673
  latencyMs?: number;
1658
1674
  };
1659
- declare class AxMockAIService<TModelKey = string> implements AxAIService<unknown, unknown, TModelKey> {
1675
+ declare class AxMockAIService<TModelKey> implements AxAIService<unknown, unknown, TModelKey> {
1660
1676
  private readonly config;
1661
1677
  private metrics;
1662
1678
  constructor(config?: AxMockAIServiceConfig<TModelKey>);
@@ -1671,8 +1687,8 @@ declare class AxMockAIService<TModelKey = string> implements AxAIService<unknown
1671
1687
  };
1672
1688
  getModelList(): AxAIModelList<TModelKey> | undefined;
1673
1689
  getMetrics(): AxAIServiceMetrics;
1674
- chat(req: Readonly<AxChatRequest<unknown>>, _options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions<unknown, unknown, TModelKey>>): Promise<AxChatResponse | ReadableStream<AxChatResponse>>;
1675
- embed(req: Readonly<AxEmbedRequest>, _options?: Readonly<AxAIServiceActionOptions<unknown, unknown, TModelKey>>): Promise<AxEmbedResponse>;
1690
+ chat(req: Readonly<AxChatRequest<unknown>>, _options?: Readonly<AxAIServiceOptions>): Promise<AxChatResponse | ReadableStream<AxChatResponse>>;
1691
+ embed(req: Readonly<AxEmbedRequest>, _options?: Readonly<AxAIServiceOptions>): Promise<AxEmbedResponse>;
1676
1692
  setOptions(options: Readonly<AxAIServiceOptions>): void;
1677
1693
  getOptions(): Readonly<AxAIServiceOptions>;
1678
1694
  getLogger(): AxLoggerFunction;
@@ -1685,7 +1701,12 @@ type AxAIServiceListItem<TModel = unknown, TEmbedModel = unknown, TModelKey = st
1685
1701
  description: string;
1686
1702
  isInternal?: boolean;
1687
1703
  };
1688
- declare class AxMultiServiceRouter<TModelKey = string> implements AxAIService<unknown, unknown, TModelKey> {
1704
+ type ExtractServiceModelKeys<T> = T extends AxAIService<any, any, infer K> ? K : T extends AxAIServiceListItem<any, any, infer K> ? K : never;
1705
+ type ExtractAllModelKeys<T extends readonly any[]> = T extends readonly [
1706
+ infer First,
1707
+ ...infer Rest
1708
+ ] ? ExtractServiceModelKeys<First> | ExtractAllModelKeys<Rest> : never;
1709
+ declare class AxMultiServiceRouter<TServices extends readonly (AxAIService | AxAIServiceListItem<any, any, any>)[] = readonly AxAIService[], TModelKey = ExtractAllModelKeys<TServices>> implements AxAIService<unknown, unknown, TModelKey> {
1689
1710
  private options?;
1690
1711
  private lastUsedService?;
1691
1712
  private services;
@@ -1694,18 +1715,22 @@ declare class AxMultiServiceRouter<TModelKey = string> implements AxAIService<un
1694
1715
  * It validates that each service provides a unique set of model keys,
1695
1716
  * then builds a lookup (map) for routing the chat/embed requests.
1696
1717
  */
1697
- constructor(services: (AxAIServiceListItem<unknown, unknown, TModelKey> | AxAIService<unknown, unknown, TModelKey>)[]);
1718
+ constructor(services: TServices);
1719
+ /**
1720
+ * Static factory method for type-safe multi-service router creation with automatic model key inference.
1721
+ */
1722
+ static create<const TServices extends readonly (AxAIService | AxAIServiceListItem<any, any, any>)[]>(services: TServices): AxMultiServiceRouter<TServices, ExtractAllModelKeys<TServices>>;
1698
1723
  getLastUsedChatModel(): unknown | undefined;
1699
1724
  getLastUsedEmbedModel(): unknown | undefined;
1700
1725
  getLastUsedModelConfig(): AxModelConfig | undefined;
1701
1726
  /**
1702
1727
  * Delegates the chat call to the service matching the provided model key.
1703
1728
  */
1704
- chat(req: Readonly<AxChatRequest<string>>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions<unknown, unknown, TModelKey>>): Promise<AxChatResponse | ReadableStream<AxChatResponse>>;
1729
+ chat(req: Readonly<AxChatRequest<TModelKey>>, options?: Readonly<AxAIServiceOptions>): Promise<AxChatResponse | ReadableStream<AxChatResponse>>;
1705
1730
  /**
1706
1731
  * Delegates the embed call to the service matching the provided embed model key.
1707
1732
  */
1708
- embed(req: Readonly<AxEmbedRequest<string>>, options?: Readonly<AxAIServiceActionOptions<unknown, unknown, TModelKey>>): Promise<AxEmbedResponse>;
1733
+ embed(req: Readonly<AxEmbedRequest<TModelKey>>, options?: Readonly<AxAIServiceOptions>): Promise<AxEmbedResponse>;
1709
1734
  /**
1710
1735
  * Returns a composite ID built from the IDs of the underlying services.
1711
1736
  */
@@ -1764,7 +1789,7 @@ declare class AxMultiServiceRouter<TModelKey = string> implements AxAIService<un
1764
1789
  type AxAIOllamaAIConfig = AxAIOpenAIConfig<string, string>;
1765
1790
  declare const axAIOllamaDefaultConfig: () => AxAIOllamaAIConfig;
1766
1791
  declare const axAIOllamaDefaultCreativeConfig: () => AxAIOllamaAIConfig;
1767
- type AxAIOllamaArgs<TModelKey = string> = AxAIOpenAIArgs<'ollama', string, string, TModelKey> & {
1792
+ type AxAIOllamaArgs<TModelKey> = AxAIOpenAIArgs<'ollama', string, string, TModelKey> & {
1768
1793
  model?: string;
1769
1794
  embedModel?: string;
1770
1795
  url?: string;
@@ -1772,7 +1797,7 @@ type AxAIOllamaArgs<TModelKey = string> = AxAIOpenAIArgs<'ollama', string, strin
1772
1797
  /**
1773
1798
  * OllamaAI: AI Service
1774
1799
  */
1775
- declare class AxAIOllama<TModelKey = string> extends AxAIOpenAIBase<string, string, TModelKey> {
1800
+ declare class AxAIOllama<TModelKey> extends AxAIOpenAIBase<string, string, TModelKey> {
1776
1801
  constructor({ apiKey, url, config, options, models, }: Readonly<Omit<AxAIOllamaArgs<TModelKey>, 'name'>>);
1777
1802
  }
1778
1803
 
@@ -2293,7 +2318,7 @@ Readonly<AxAIOpenAIEmbedResponse>> {
2293
2318
  getModelConfig(): Readonly<AxModelConfig>;
2294
2319
  private mapInternalContentToResponsesInput;
2295
2320
  private createResponsesReqInternalInput;
2296
- createChatReq(req: Readonly<AxInternalChatRequest<TModel>>, config: Readonly<AxAIPromptConfig>): [Readonly<AxAPI>, Readonly<AxAIOpenAIResponsesRequest<TModel>>];
2321
+ createChatReq(req: Readonly<AxInternalChatRequest<TModel>>, config: Readonly<AxAIServiceOptions>): [Readonly<AxAPI>, Readonly<AxAIOpenAIResponsesRequest<TModel>>];
2297
2322
  createChatResp(resp: Readonly<AxAIOpenAIResponsesResponse>): Readonly<AxChatResponse>;
2298
2323
  createChatStreamResp(streamEvent: Readonly<AxAIOpenAIResponsesResponseDelta>): Readonly<AxChatResponse>;
2299
2324
  createEmbedReq(req: Readonly<AxInternalEmbedRequest<TEmbedModel>>): [AxAPI, AxAIOpenAIEmbedRequest<TEmbedModel>];
@@ -2404,7 +2429,7 @@ declare const axAIRekaDefaultConfig: () => AxAIRekaConfig;
2404
2429
  declare const axAIRekaBestConfig: () => AxAIRekaConfig;
2405
2430
  declare const axAIRekaCreativeConfig: () => AxAIRekaConfig;
2406
2431
  declare const axAIRekaFastConfig: () => AxAIRekaConfig;
2407
- interface AxAIRekaArgs<TModelKey = string> {
2432
+ interface AxAIRekaArgs<TModelKey> {
2408
2433
  name: 'reka';
2409
2434
  apiKey: string;
2410
2435
  apiURL?: string;
@@ -2415,7 +2440,7 @@ interface AxAIRekaArgs<TModelKey = string> {
2415
2440
  modelInfo?: Readonly<AxModelInfo[]>;
2416
2441
  models?: AxAIInputModelList<AxAIRekaModel, undefined, TModelKey>;
2417
2442
  }
2418
- declare class AxAIReka<TModelKey = string> extends AxBaseAI<AxAIRekaModel, undefined, AxAIRekaChatRequest, unknown, AxAIRekaChatResponse, AxAIRekaChatResponseDelta, unknown, TModelKey> {
2443
+ declare class AxAIReka<TModelKey> extends AxBaseAI<AxAIRekaModel, undefined, AxAIRekaChatRequest, unknown, AxAIRekaChatResponse, AxAIRekaChatResponseDelta, unknown, TModelKey> {
2419
2444
  constructor({ apiKey, config, options, apiURL, modelInfo, models, }: Readonly<Omit<AxAIRekaArgs<TModelKey>, 'name'>>);
2420
2445
  }
2421
2446
 
@@ -2427,7 +2452,7 @@ declare const axModelInfoReka: AxModelInfo[];
2427
2452
  type TogetherAIConfig = AxAIOpenAIConfig<string, unknown>;
2428
2453
  declare const axAITogetherDefaultConfig: () => TogetherAIConfig;
2429
2454
  type AxAITogetherArgs<TModelKey> = AxAIOpenAIArgs<'together', string, unknown, TModelKey>;
2430
- declare class AxAITogether<TModelKey = string> extends AxAIOpenAIBase<string, unknown, TModelKey> {
2455
+ declare class AxAITogether<TModelKey> extends AxAIOpenAIBase<string, unknown, TModelKey> {
2431
2456
  constructor({ apiKey, config, options, models, modelInfo, }: Readonly<Omit<AxAITogetherArgs<TModelKey>, 'name'>>);
2432
2457
  }
2433
2458
 
@@ -2488,21 +2513,29 @@ type AxAIGrokChatRequest = AxAIOpenAIChatRequest<AxAIGrokModel> & {
2488
2513
  sources?: AxAIGrokSearchSource[];
2489
2514
  };
2490
2515
  };
2491
- type AxAIGrokArgs<TModelKey = string> = AxAIOpenAIArgs<'grok', AxAIGrokModel, AxAIGrokEmbedModels, TModelKey, AxAIGrokChatRequest> & {
2516
+ type AxAIGrokArgs<TModelKey> = AxAIOpenAIArgs<'grok', AxAIGrokModel, AxAIGrokEmbedModels, TModelKey, AxAIGrokChatRequest> & {
2492
2517
  options?: Readonly<AxAIServiceOptions & AxAIGrokOptionsTools> & {
2493
2518
  tokensPerMinute?: number;
2494
2519
  };
2495
2520
  modelInfo?: AxModelInfo[];
2496
2521
  };
2497
- declare class AxAIGrok<TModelKey = string> extends AxAIOpenAIBase<AxAIGrokModel, AxAIGrokEmbedModels, TModelKey, AxAIGrokChatRequest> {
2522
+ declare class AxAIGrok<TModelKey> extends AxAIOpenAIBase<AxAIGrokModel, AxAIGrokEmbedModels, TModelKey, AxAIGrokChatRequest> {
2498
2523
  constructor({ apiKey, config, options, models, modelInfo, }: Readonly<Omit<AxAIGrokArgs<TModelKey>, 'name'>>);
2499
2524
  }
2500
2525
 
2501
2526
  type AxAIArgs<TModelKey> = AxAIOpenAIArgs<'openai', AxAIOpenAIModel, AxAIOpenAIEmbedModel, TModelKey> | AxAIOpenAIResponsesArgs<'openai-responses', AxAIOpenAIResponsesModel, AxAIOpenAIEmbedModel, TModelKey> | AxAIAzureOpenAIArgs<TModelKey> | AxAITogetherArgs<TModelKey> | AxAIAnthropicArgs<TModelKey> | AxAIGroqArgs<TModelKey> | AxAIGoogleGeminiArgs<TModelKey> | AxAICohereArgs<TModelKey> | AxAIHuggingFaceArgs<TModelKey> | AxAIMistralArgs<TModelKey> | AxAIDeepSeekArgs<TModelKey> | AxAIOllamaArgs<TModelKey> | AxAIRekaArgs<TModelKey> | AxAIGrokArgs<TModelKey>;
2502
2527
  type AxAIModels = AxAIOpenAIModel | AxAIAnthropicModel | AxAIGroqModel | AxAIGoogleGeminiModel | AxAICohereModel | AxAIHuggingFaceModel | AxAIMistralModel | AxAIDeepSeekModel | AxAIGrokModel;
2503
2528
  type AxAIEmbedModels = AxAIOpenAIEmbedModel | AxAIGoogleGeminiEmbedModel | AxAICohereEmbedModel;
2529
+ type ExtractModelKeysAndValues<T> = T extends readonly {
2530
+ key: infer K;
2531
+ model: infer M;
2532
+ }[] ? K | M : never;
2533
+ type InferTModelKey<T> = T extends {
2534
+ models: infer M;
2535
+ } ? ExtractModelKeysAndValues<M> : string;
2504
2536
  declare class AxAI<TModelKey = string> implements AxAIService<unknown, unknown, TModelKey> {
2505
2537
  private ai;
2538
+ static create<const T extends AxAIArgs<any>>(options: T): AxAI<InferTModelKey<T>>;
2506
2539
  constructor(options: Readonly<AxAIArgs<TModelKey>>);
2507
2540
  getName(): string;
2508
2541
  getId(): string;
@@ -2515,8 +2548,8 @@ declare class AxAI<TModelKey = string> implements AxAIService<unknown, unknown,
2515
2548
  getLastUsedEmbedModel(): unknown;
2516
2549
  getLastUsedModelConfig(): AxModelConfig | undefined;
2517
2550
  getMetrics(): AxAIServiceMetrics;
2518
- chat(req: Readonly<AxChatRequest>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions<unknown, unknown, TModelKey>>): Promise<AxChatResponse | ReadableStream<AxChatResponse>>;
2519
- embed(req: Readonly<AxEmbedRequest>, options?: Readonly<AxAIServiceActionOptions<unknown, unknown, TModelKey>>): Promise<AxEmbedResponse>;
2551
+ chat(req: Readonly<AxChatRequest<TModelKey>>, options?: Readonly<AxAIServiceOptions>): Promise<AxChatResponse | ReadableStream<AxChatResponse>>;
2552
+ embed(req: Readonly<AxEmbedRequest<TModelKey>>, options?: Readonly<AxAIServiceOptions>): Promise<AxEmbedResponse>;
2520
2553
  setOptions(options: Readonly<AxAIServiceOptions>): void;
2521
2554
  getOptions(): Readonly<AxAIServiceOptions>;
2522
2555
  getLogger(): AxLoggerFunction;
@@ -2834,7 +2867,7 @@ declare class AxFunctionProcessor {
2834
2867
  private funcList;
2835
2868
  constructor(funcList: Readonly<AxFunction[]>);
2836
2869
  private executeFunction;
2837
- execute: (func: Readonly<AxChatResponseFunctionCall>, options?: Readonly<AxAIServiceActionOptions>) => Promise<string>;
2870
+ execute: <MODEL>(func: Readonly<AxChatResponseFunctionCall>, options?: Readonly<AxProgramForwardOptions<MODEL>>) => Promise<string>;
2838
2871
  }
2839
2872
  type AxInputFunctionType = (AxFunction | {
2840
2873
  toFunction: () => AxFunction | AxFunction[];
@@ -2945,18 +2978,13 @@ type AxResultPickerFunctionFunctionResults = {
2945
2978
  }[];
2946
2979
  };
2947
2980
  type AxResultPickerFunction<OUT extends AxGenOut> = (data: AxResultPickerFunctionFieldResults<OUT> | AxResultPickerFunctionFunctionResults) => number | Promise<number>;
2948
- type AxProgramForwardOptions<MODEL> = {
2981
+ type AxProgramForwardOptions<MODEL> = AxAIServiceOptions & {
2949
2982
  maxRetries?: number;
2950
2983
  maxSteps?: number;
2951
2984
  mem?: AxAIMemory;
2952
2985
  ai?: AxAIService;
2953
2986
  modelConfig?: AxModelConfig;
2954
2987
  model?: MODEL;
2955
- sessionId?: string;
2956
- traceId?: string | undefined;
2957
- tracer?: Tracer;
2958
- rateLimiter?: AxRateLimiterFunction;
2959
- stream?: boolean;
2960
2988
  sampleCount?: number;
2961
2989
  resultPicker?: AxResultPickerFunction<AxGenOut>;
2962
2990
  functions?: AxInputFunctionType;
@@ -2964,12 +2992,8 @@ type AxProgramForwardOptions<MODEL> = {
2964
2992
  stopFunction?: string;
2965
2993
  functionResultFormatter?: (result: unknown) => string;
2966
2994
  fastFail?: boolean;
2967
- debug?: boolean;
2968
- thinkingTokenBudget?: 'minimal' | 'low' | 'medium' | 'high' | 'highest' | 'none';
2969
2995
  showThoughts?: boolean;
2970
2996
  traceLabel?: string;
2971
- abortSignal?: AbortSignal;
2972
- logger?: AxLoggerFunction;
2973
2997
  description?: string;
2974
2998
  thoughtFieldName?: string;
2975
2999
  promptTemplate?: typeof AxPromptTemplate;
@@ -2978,7 +3002,14 @@ type AxProgramForwardOptions<MODEL> = {
2978
3002
  excludeContentFromTrace?: boolean;
2979
3003
  strictMode?: boolean;
2980
3004
  };
3005
+ type AxAIServiceActionOptions<TModel = unknown, TEmbedModel = unknown, TModelKey = string> = AxAIServiceOptions & {
3006
+ ai?: Readonly<AxAIService<TModel, TEmbedModel, TModelKey>>;
3007
+ functionResultFormatter?: (result: unknown) => string;
3008
+ };
2981
3009
  type AxProgramStreamingForwardOptions<MODEL> = Omit<AxProgramForwardOptions<MODEL>, 'stream'>;
3010
+ type AxAIServiceModelType<T extends Readonly<AxAIService<any, any, any>>> = T extends Readonly<AxAIService<infer TModel, any, infer TModelKey>> ? TModel extends unknown ? TModelKey : TModel | TModelKey : never;
3011
+ type AxProgramForwardOptionsWithModels<T extends Readonly<AxAIService<any, any, any>>> = AxProgramForwardOptions<AxAIServiceModelType<T>>;
3012
+ type AxProgramStreamingForwardOptionsWithModels<T extends Readonly<AxAIService<any, any, any>>> = AxProgramStreamingForwardOptions<AxAIServiceModelType<T>>;
2982
3013
  type AxGenDeltaOut<OUT extends AxGenOut> = {
2983
3014
  version: number;
2984
3015
  index: number;
@@ -3129,8 +3160,8 @@ declare class AxGen<IN extends AxGenIn = AxGenIn, OUT extends AxGenOut = AxGenOu
3129
3160
  private forwardCore;
3130
3161
  private _forward2;
3131
3162
  _forward1(ai: Readonly<AxAIService>, values: IN | AxMessage<IN>[], options: Readonly<AxProgramForwardOptions<any>>): AxGenStreamingOut<OUT>;
3132
- forward<T extends Readonly<AxAIService>>(ai: T, values: IN | AxMessage<IN>[], options?: Readonly<AxProgramForwardOptions<NonNullable<ReturnType<T['getModelList']>>[number]['key']>>): Promise<OUT>;
3133
- streamingForward<T extends Readonly<AxAIService>>(ai: T, values: IN | AxMessage<IN>[], options?: Readonly<AxProgramStreamingForwardOptions<NonNullable<ReturnType<T['getModelList']>>[number]['key']>>): AxGenStreamingOut<OUT>;
3163
+ forward<T extends Readonly<AxAIService>>(ai: T, values: IN | AxMessage<IN>[], options?: Readonly<AxProgramForwardOptionsWithModels<T>>): Promise<OUT>;
3164
+ streamingForward<T extends Readonly<AxAIService>>(ai: T, values: IN | AxMessage<IN>[], options?: Readonly<AxProgramStreamingForwardOptionsWithModels<T>>): AxGenStreamingOut<OUT>;
3134
3165
  setExamples(examples: Readonly<AxProgramExamples<IN, OUT>>, options?: Readonly<AxSetExamplesOptions>): void;
3135
3166
  private isDebug;
3136
3167
  private getLogger;
@@ -3202,7 +3233,7 @@ declare class AxDBManager {
3202
3233
 
3203
3234
  declare class AxDefaultResultReranker extends AxGen<AxRerankerIn, AxRerankerOut> {
3204
3235
  constructor(options?: Readonly<AxProgramForwardOptions<string>>);
3205
- forward: <T extends Readonly<AxAIService>>(ai: T, input: Readonly<AxRerankerIn>, options?: Readonly<AxProgramForwardOptions<NonNullable<ReturnType<T["getModelList"]>>[number]["key"]>>) => Promise<AxRerankerOut>;
3236
+ forward: <T extends Readonly<AxAIService>>(ai: T, input: Readonly<AxRerankerIn>, options?: Readonly<AxProgramForwardOptionsWithModels<T>>) => Promise<AxRerankerOut>;
3206
3237
  }
3207
3238
 
3208
3239
  interface AxApacheTikaArgs {
@@ -4661,7 +4692,7 @@ TState extends AxFlowState = IN> implements AxFlowable<IN, OUT> {
4661
4692
  * @returns Object mapping node names to their trace data
4662
4693
  */
4663
4694
  getTracesReport(): Record<string, AxProgramTrace<any, any>[]>;
4664
- streamingForward<T extends Readonly<AxAIService>>(ai: T, values: IN | AxMessage<IN>[], options?: Readonly<AxProgramStreamingForwardOptions<NonNullable<ReturnType<T['getModelList']>>[number]['key']>>): AxGenStreamingOut<OUT>;
4695
+ streamingForward<T extends Readonly<AxAIService>>(ai: T, values: IN | AxMessage<IN>[], options?: Readonly<AxProgramStreamingForwardOptionsWithModels<T>>): AxGenStreamingOut<OUT>;
4665
4696
  /**
4666
4697
  * Executes the flow with the given AI service and input values.
4667
4698
  *
@@ -4692,7 +4723,7 @@ TState extends AxFlowState = IN> implements AxFlowable<IN, OUT> {
4692
4723
  * @param options - Optional forward options to use as defaults (includes autoParallel override)
4693
4724
  * @returns Promise that resolves to the final output
4694
4725
  */
4695
- forward<T extends Readonly<AxAIService>>(ai: T, values: IN | AxMessage<IN>[], options?: Readonly<AxProgramForwardOptions<NonNullable<ReturnType<T['getModelList']>>[number]['key']> & {
4726
+ forward<T extends Readonly<AxAIService>>(ai: T, values: IN | AxMessage<IN>[], options?: Readonly<AxProgramForwardOptionsWithModels<T> & {
4696
4727
  autoParallel?: boolean;
4697
4728
  }>): Promise<OUT>;
4698
4729
  /**
@@ -5204,7 +5235,7 @@ declare class AxEmbeddingAdapter {
5204
5235
  description: string;
5205
5236
  argumentDescription: string;
5206
5237
  }>;
5207
- func: (args: readonly number[], extra?: Readonly<AxAIServiceActionOptions>) => Promise<unknown>;
5238
+ func: (args: readonly number[], extra?: Readonly<AxAIServiceOptions>) => Promise<unknown>;
5208
5239
  }>);
5209
5240
  private embedAdapter;
5210
5241
  toFunction(): AxFunction;
@@ -5479,8 +5510,8 @@ declare class AxAgent<IN extends AxGenIn, OUT extends AxGenOut> implements AxAge
5479
5510
  * Initializes the agent's execution context, processing child agents and their functions.
5480
5511
  */
5481
5512
  private init;
5482
- forward<T extends Readonly<AxAIService>>(parentAi: T, values: IN | AxMessage<IN>[], options?: Readonly<AxProgramForwardOptions<NonNullable<ReturnType<T['getModelList']>>[number]['key']>>): Promise<OUT>;
5483
- streamingForward<T extends Readonly<AxAIService>>(parentAi: T, values: IN | AxMessage<IN>[], options?: Readonly<AxProgramStreamingForwardOptions<NonNullable<ReturnType<T['getModelList']>>[number]['key']>>): AxGenStreamingOut<OUT>;
5513
+ forward<T extends Readonly<AxAIService>>(parentAi: T, values: IN | AxMessage<IN>[], options?: Readonly<AxProgramForwardOptionsWithModels<T>>): Promise<OUT>;
5514
+ streamingForward<T extends Readonly<AxAIService>>(parentAi: T, values: IN | AxMessage<IN>[], options?: Readonly<AxProgramStreamingForwardOptionsWithModels<T>>): AxGenStreamingOut<OUT>;
5484
5515
  /**
5485
5516
  * Updates the agent's description.
5486
5517
  * This updates both the stored description and the function's description.
@@ -5519,7 +5550,7 @@ declare class AxRAG extends AxChainOfThought<{
5519
5550
  } | AxMessage<{
5520
5551
  context: string[];
5521
5552
  question: string;
5522
- }>[], options?: Readonly<AxProgramForwardOptions<NonNullable<ReturnType<T['getModelList']>>[number]['key']>>): Promise<{
5553
+ }>[], options?: Readonly<AxProgramForwardOptionsWithModels<T>>): Promise<{
5523
5554
  answer: string;
5524
5555
  }>;
5525
5556
  }
@@ -5595,4 +5626,4 @@ declare class AxRateLimiterTokenUsage {
5595
5626
  acquire(tokens: number): Promise<void>;
5596
5627
  }
5597
5628
 
5598
- 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, type AxAIAnthropicThinkingConfig, type AxAIAnthropicThinkingTokenBudgetLevels, 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, type AxAIGoogleGeminiContentPart, AxAIGoogleGeminiEmbedModel, AxAIGoogleGeminiEmbedTypes, type AxAIGoogleGeminiGenerationConfig, AxAIGoogleGeminiModel, type AxAIGoogleGeminiOptionsTools, AxAIGoogleGeminiSafetyCategory, type AxAIGoogleGeminiSafetySettings, AxAIGoogleGeminiSafetyThreshold, type AxAIGoogleGeminiThinkingConfig, type AxAIGoogleGeminiThinkingTokenBudgetLevels, type AxAIGoogleGeminiTool, type AxAIGoogleGeminiToolConfig, type AxAIGoogleGeminiToolFunctionDeclaration, type AxAIGoogleGeminiToolGoogleSearchRetrieval, type AxAIGoogleVertexBatchEmbedRequest, type AxAIGoogleVertexBatchEmbedResponse, AxAIGrok, type AxAIGrokArgs, type AxAIGrokChatRequest, AxAIGrokEmbedModels, AxAIGrokModel, type AxAIGrokOptionsTools, type AxAIGrokSearchSource, AxAIGroq, type AxAIGroqArgs, AxAIGroqModel, AxAIHuggingFace, type AxAIHuggingFaceArgs, type AxAIHuggingFaceConfig, AxAIHuggingFaceModel, type AxAIHuggingFaceRequest, type AxAIHuggingFaceResponse, type AxAIInputModelList, type AxAIMemory, type AxAIMetricsInstruments, AxAIMistral, type AxAIMistralArgs, type AxAIMistralChatRequest, AxAIMistralEmbedModels, AxAIMistralModel, type AxAIModelList, type AxAIModelListBase, type AxAIModels, AxAIOllama, type AxAIOllamaAIConfig, type AxAIOllamaArgs, AxAIOpenAI, type AxAIOpenAIAnnotation, type AxAIOpenAIArgs, AxAIOpenAIBase, type AxAIOpenAIBaseArgs, type AxAIOpenAIChatRequest, type AxAIOpenAIChatResponse, type AxAIOpenAIChatResponseDelta, type AxAIOpenAIConfig, AxAIOpenAIEmbedModel, type AxAIOpenAIEmbedRequest, type AxAIOpenAIEmbedResponse, type AxAIOpenAILogprob, AxAIOpenAIModel, type AxAIOpenAIResponseDelta, AxAIOpenAIResponses, type AxAIOpenAIResponsesArgs, AxAIOpenAIResponsesBase, type AxAIOpenAIResponsesCodeInterpreterToolCall, type AxAIOpenAIResponsesComputerToolCall, type AxAIOpenAIResponsesConfig, type AxAIOpenAIResponsesContentPartAddedEvent, type AxAIOpenAIResponsesContentPartDoneEvent, type AxAIOpenAIResponsesDefineFunctionTool, type AxAIOpenAIResponsesErrorEvent, type AxAIOpenAIResponsesFileSearchCallCompletedEvent, type AxAIOpenAIResponsesFileSearchCallInProgressEvent, type AxAIOpenAIResponsesFileSearchCallSearchingEvent, type AxAIOpenAIResponsesFileSearchToolCall, type AxAIOpenAIResponsesFunctionCallArgumentsDeltaEvent, type AxAIOpenAIResponsesFunctionCallArgumentsDoneEvent, type AxAIOpenAIResponsesFunctionCallItem, type AxAIOpenAIResponsesImageGenerationCallCompletedEvent, type AxAIOpenAIResponsesImageGenerationCallGeneratingEvent, type AxAIOpenAIResponsesImageGenerationCallInProgressEvent, type AxAIOpenAIResponsesImageGenerationCallPartialImageEvent, type AxAIOpenAIResponsesImageGenerationToolCall, AxAIOpenAIResponsesImpl, type AxAIOpenAIResponsesInputAudioContentPart, type AxAIOpenAIResponsesInputContentPart, type AxAIOpenAIResponsesInputFunctionCallItem, type AxAIOpenAIResponsesInputFunctionCallOutputItem, type AxAIOpenAIResponsesInputImageUrlContentPart, type AxAIOpenAIResponsesInputItem, type AxAIOpenAIResponsesInputMessageItem, type AxAIOpenAIResponsesInputTextContentPart, type AxAIOpenAIResponsesLocalShellToolCall, type AxAIOpenAIResponsesMCPCallArgumentsDeltaEvent, type AxAIOpenAIResponsesMCPCallArgumentsDoneEvent, type AxAIOpenAIResponsesMCPCallCompletedEvent, type AxAIOpenAIResponsesMCPCallFailedEvent, type AxAIOpenAIResponsesMCPCallInProgressEvent, type AxAIOpenAIResponsesMCPListToolsCompletedEvent, type AxAIOpenAIResponsesMCPListToolsFailedEvent, type AxAIOpenAIResponsesMCPListToolsInProgressEvent, type AxAIOpenAIResponsesMCPToolCall, AxAIOpenAIResponsesModel, type AxAIOpenAIResponsesOutputItem, type AxAIOpenAIResponsesOutputItemAddedEvent, type AxAIOpenAIResponsesOutputItemDoneEvent, type AxAIOpenAIResponsesOutputMessageItem, type AxAIOpenAIResponsesOutputRefusalContentPart, type AxAIOpenAIResponsesOutputTextAnnotationAddedEvent, type AxAIOpenAIResponsesOutputTextContentPart, type AxAIOpenAIResponsesOutputTextDeltaEvent, type AxAIOpenAIResponsesOutputTextDoneEvent, type AxAIOpenAIResponsesReasoningDeltaEvent, type AxAIOpenAIResponsesReasoningDoneEvent, type AxAIOpenAIResponsesReasoningItem, type AxAIOpenAIResponsesReasoningSummaryDeltaEvent, type AxAIOpenAIResponsesReasoningSummaryDoneEvent, type AxAIOpenAIResponsesReasoningSummaryPart, type AxAIOpenAIResponsesReasoningSummaryPartAddedEvent, type AxAIOpenAIResponsesReasoningSummaryPartDoneEvent, type AxAIOpenAIResponsesReasoningSummaryTextDeltaEvent, type AxAIOpenAIResponsesReasoningSummaryTextDoneEvent, type AxAIOpenAIResponsesRefusalDeltaEvent, type AxAIOpenAIResponsesRefusalDoneEvent, type AxAIOpenAIResponsesRequest, type AxAIOpenAIResponsesResponse, type AxAIOpenAIResponsesResponseCompletedEvent, type AxAIOpenAIResponsesResponseCreatedEvent, type AxAIOpenAIResponsesResponseDelta, type AxAIOpenAIResponsesResponseFailedEvent, type AxAIOpenAIResponsesResponseInProgressEvent, type AxAIOpenAIResponsesResponseIncompleteEvent, type AxAIOpenAIResponsesResponseQueuedEvent, type AxAIOpenAIResponsesStreamEvent, type AxAIOpenAIResponsesStreamEventBase, type AxAIOpenAIResponsesToolCall, type AxAIOpenAIResponsesToolCallBase, type AxAIOpenAIResponsesToolChoice, type AxAIOpenAIResponsesToolDefinition, type AxAIOpenAIResponsesWebSearchCallCompletedEvent, type AxAIOpenAIResponsesWebSearchCallInProgressEvent, type AxAIOpenAIResponsesWebSearchCallSearchingEvent, type AxAIOpenAIResponsesWebSearchToolCall, type AxAIOpenAIUrlCitation, type AxAIOpenAIUsage, type AxAIPromptConfig, AxAIRefusalError, AxAIReka, type AxAIRekaArgs, type AxAIRekaChatRequest, type AxAIRekaChatResponse, type AxAIRekaChatResponseDelta, type AxAIRekaConfig, AxAIRekaModel, type AxAIRekaUsage, type AxAIService, AxAIServiceAbortedError, type AxAIServiceActionOptions, AxAIServiceAuthenticationError, AxAIServiceError, type AxAIServiceImpl, type AxAIServiceMetrics, AxAIServiceNetworkError, type AxAIServiceOptions, AxAIServiceResponseError, AxAIServiceStatusError, AxAIServiceStreamTerminatedError, AxAIServiceTimeoutError, AxAITogether, type AxAITogetherArgs, type AxAPI, type AxAPIConfig, AxAgent, type AxAgentFeatures, type AxAgentOptions, type AxAgentic, AxApacheTika, type AxApacheTikaArgs, type AxApacheTikaConvertOptions, type AxAssertion, AxAssertionError, AxBalancer, type AxBalancerOptions, AxBaseAI, type AxBaseAIArgs, AxBaseOptimizer, type AxBootstrapCompileOptions, AxBootstrapFewShot, type AxBootstrapOptimizerOptions, AxChainOfThought, type AxChatRequest, type AxChatResponse, type AxChatResponseFunctionCall, type AxChatResponseResult, type AxCheckpointLoadFn, type AxCheckpointSaveFn, type AxCompileOptions, type AxCostTracker, type AxCostTrackerOptions, 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, AxDefaultCostTracker, AxDefaultResultReranker, type AxDockerContainer, AxDockerSession, type AxEmbedRequest, type AxEmbedResponse, AxEmbeddingAdapter, type AxErrorCategory, AxEvalUtil, type AxEvaluateArgs, type AxExample, type AxField, type AxFieldDescriptor, type AxFieldProcessor, type AxFieldProcessorProcess, type AxFieldTemplateFn, type AxFieldType, type AxFieldValue, AxFlow, type AxFlowAutoParallelConfig, type AxFlowBranchContext, AxFlowDependencyAnalyzer, type AxFlowDynamicContext, AxFlowExecutionPlanner, type AxFlowExecutionStep, type AxFlowNodeDefinition, type AxFlowParallelBranch, type AxFlowParallelGroup, type AxFlowState, type AxFlowStepFunction, type AxFlowSubContext, AxFlowSubContextImpl, type AxFlowTypedParallelBranch, type AxFlowTypedSubContext, AxFlowTypedSubContextImpl, type AxFlowable, type AxForwardable, type AxFunction, AxFunctionError, type AxFunctionHandler, type AxFunctionJSONSchema, AxFunctionProcessor, type AxFunctionResult, type AxFunctionResultFormatter, AxGen, type AxGenDeltaOut, type AxGenIn, type AxGenMetricsInstruments, type AxGenOut, type AxGenStreamingOut, AxGenerateError, type AxGenerateErrorDetails, type AxGenerateResult, AxHFDataLoader, type AxIField, type AxInputFunctionType, AxInstanceRegistry, type AxInternalChatRequest, type AxInternalEmbedRequest, AxLLMRequestTypeValues, type AxLoggerData, type AxLoggerFunction, AxMCPClient, type AxMCPFunctionDescription, AxMCPHTTPSSETransport, type AxMCPInitializeParams, type AxMCPInitializeResult, type AxMCPJSONRPCErrorResponse, type AxMCPJSONRPCNotification, type AxMCPJSONRPCRequest, type AxMCPJSONRPCResponse, type AxMCPJSONRPCSuccessResponse, type AxMCPStreamableHTTPTransportOptions, AxMCPStreambleHTTPTransport, type AxMCPToolsListResult, type AxMCPTransport, AxMemory, type AxMemoryData, type AxMessage, type AxMetricFn, type AxMetricFnArgs, type AxMetricsConfig, AxMiPRO, type AxMiPROCompileOptions, type AxMiPROOptimizerOptions, type AxMiPROResult, AxMockAIService, type AxMockAIServiceConfig, type AxModelConfig, type AxModelInfo, type AxModelInfoWithProvider, type AxModelUsage, type AxMultiMetricFn, AxMultiServiceRouter, type AxOptimizationCheckpoint, type AxOptimizationProgress, type AxOptimizationStats, type AxOptimizer, type AxOptimizerArgs, type AxOptimizerLoggerData, type AxOptimizerLoggerFunction, type AxOptimizerMetricsConfig, type AxOptimizerMetricsInstruments, type AxOptimizerResult, type AxParetoResult, AxProgram, type AxProgramDemos, type AxProgramExamples, type AxProgramForwardOptions, type AxProgramOptions, type AxProgramStreamingForwardOptions, type AxProgramTrace, type AxProgramUsage, type AxProgrammable, AxPromptTemplate, type AxPromptTemplateOptions, AxRAG, type AxRateLimiterFunction, AxRateLimiterTokenUsage, type AxRateLimiterTokenUsageOptions, type AxRerankerIn, type AxRerankerOut, type AxResponseHandlerArgs, type AxResultPickerFunction, type AxResultPickerFunctionFieldResults, type AxResultPickerFunctionFunctionResults, type AxRewriteIn, type AxRewriteOut, type AxSamplePickerOptions, type AxSetExamplesOptions, AxSignature, type AxSignatureConfig, type AxSignatureTemplateValue, AxSimpleClassifier, AxSimpleClassifierClass, type AxSimpleClassifierForwardOptions, AxSpanKindValues, type AxStreamingAssertion, type AxStreamingEvent, type AxStreamingFieldProcessorProcess, AxStringUtil, AxTestPrompt, type AxTokenUsage, type AxTunable, type AxUsable, ax, axAIAnthropicDefaultConfig, axAIAnthropicVertexDefaultConfig, axAIAzureOpenAIBestConfig, axAIAzureOpenAICreativeConfig, axAIAzureOpenAIDefaultConfig, axAIAzureOpenAIFastConfig, axAICohereCreativeConfig, axAICohereDefaultConfig, axAIDeepSeekCodeConfig, axAIDeepSeekDefaultConfig, axAIGoogleGeminiDefaultConfig, axAIGoogleGeminiDefaultCreativeConfig, axAIGrokBestConfig, axAIGrokDefaultConfig, axAIHuggingFaceCreativeConfig, axAIHuggingFaceDefaultConfig, axAIMistralBestConfig, axAIMistralDefaultConfig, axAIOllamaDefaultConfig, axAIOllamaDefaultCreativeConfig, axAIOpenAIBestConfig, axAIOpenAICreativeConfig, axAIOpenAIDefaultConfig, axAIOpenAIFastConfig, axAIOpenAIResponsesBestConfig, axAIOpenAIResponsesCreativeConfig, axAIOpenAIResponsesDefaultConfig, axAIRekaBestConfig, axAIRekaCreativeConfig, axAIRekaDefaultConfig, axAIRekaFastConfig, axAITogetherDefaultConfig, axBaseAIDefaultConfig, axBaseAIDefaultCreativeConfig, axCheckMetricsHealth, axCreateDefaultColorLogger, axCreateDefaultOptimizerColorLogger, axCreateDefaultOptimizerTextLogger, axCreateDefaultTextLogger, axDefaultMetricsConfig, axDefaultOptimizerLogger, axDefaultOptimizerMetricsConfig, axGetMetricsConfig, axGetOptimizerMetricsConfig, axGlobals, axModelInfoAnthropic, axModelInfoCohere, axModelInfoDeepSeek, axModelInfoGoogleGemini, axModelInfoGrok, axModelInfoGroq, axModelInfoHuggingFace, axModelInfoMistral, axModelInfoOpenAI, axModelInfoOpenAIResponses, axModelInfoReka, axModelInfoTogether, axSpanAttributes, axSpanEvents, axUpdateMetricsConfig, axUpdateOptimizerMetricsConfig, axValidateChatRequestMessage, axValidateChatResponseResult, f, s };
5629
+ 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, type AxAIAnthropicThinkingConfig, type AxAIAnthropicThinkingTokenBudgetLevels, 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, type AxAIGoogleGeminiContentPart, AxAIGoogleGeminiEmbedModel, AxAIGoogleGeminiEmbedTypes, type AxAIGoogleGeminiGenerationConfig, AxAIGoogleGeminiModel, type AxAIGoogleGeminiOptionsTools, AxAIGoogleGeminiSafetyCategory, type AxAIGoogleGeminiSafetySettings, AxAIGoogleGeminiSafetyThreshold, type AxAIGoogleGeminiThinkingConfig, type AxAIGoogleGeminiThinkingTokenBudgetLevels, type AxAIGoogleGeminiTool, type AxAIGoogleGeminiToolConfig, type AxAIGoogleGeminiToolFunctionDeclaration, type AxAIGoogleGeminiToolGoogleSearchRetrieval, type AxAIGoogleVertexBatchEmbedRequest, type AxAIGoogleVertexBatchEmbedResponse, AxAIGrok, type AxAIGrokArgs, type AxAIGrokChatRequest, AxAIGrokEmbedModels, AxAIGrokModel, type AxAIGrokOptionsTools, type AxAIGrokSearchSource, AxAIGroq, type AxAIGroqArgs, AxAIGroqModel, AxAIHuggingFace, type AxAIHuggingFaceArgs, type AxAIHuggingFaceConfig, AxAIHuggingFaceModel, type AxAIHuggingFaceRequest, type AxAIHuggingFaceResponse, type AxAIInputModelList, type AxAIMemory, type AxAIMetricsInstruments, AxAIMistral, type AxAIMistralArgs, type AxAIMistralChatRequest, AxAIMistralEmbedModels, AxAIMistralModel, type AxAIModelList, type AxAIModelListBase, type AxAIModels, AxAIOllama, type AxAIOllamaAIConfig, type AxAIOllamaArgs, AxAIOpenAI, type AxAIOpenAIAnnotation, type AxAIOpenAIArgs, AxAIOpenAIBase, type AxAIOpenAIBaseArgs, type AxAIOpenAIChatRequest, type AxAIOpenAIChatResponse, type AxAIOpenAIChatResponseDelta, type AxAIOpenAIConfig, AxAIOpenAIEmbedModel, type AxAIOpenAIEmbedRequest, type AxAIOpenAIEmbedResponse, type AxAIOpenAILogprob, AxAIOpenAIModel, type AxAIOpenAIResponseDelta, AxAIOpenAIResponses, type AxAIOpenAIResponsesArgs, AxAIOpenAIResponsesBase, type AxAIOpenAIResponsesCodeInterpreterToolCall, type AxAIOpenAIResponsesComputerToolCall, type AxAIOpenAIResponsesConfig, type AxAIOpenAIResponsesContentPartAddedEvent, type AxAIOpenAIResponsesContentPartDoneEvent, type AxAIOpenAIResponsesDefineFunctionTool, type AxAIOpenAIResponsesErrorEvent, type AxAIOpenAIResponsesFileSearchCallCompletedEvent, type AxAIOpenAIResponsesFileSearchCallInProgressEvent, type AxAIOpenAIResponsesFileSearchCallSearchingEvent, type AxAIOpenAIResponsesFileSearchToolCall, type AxAIOpenAIResponsesFunctionCallArgumentsDeltaEvent, type AxAIOpenAIResponsesFunctionCallArgumentsDoneEvent, type AxAIOpenAIResponsesFunctionCallItem, type AxAIOpenAIResponsesImageGenerationCallCompletedEvent, type AxAIOpenAIResponsesImageGenerationCallGeneratingEvent, type AxAIOpenAIResponsesImageGenerationCallInProgressEvent, type AxAIOpenAIResponsesImageGenerationCallPartialImageEvent, type AxAIOpenAIResponsesImageGenerationToolCall, AxAIOpenAIResponsesImpl, type AxAIOpenAIResponsesInputAudioContentPart, type AxAIOpenAIResponsesInputContentPart, type AxAIOpenAIResponsesInputFunctionCallItem, type AxAIOpenAIResponsesInputFunctionCallOutputItem, type AxAIOpenAIResponsesInputImageUrlContentPart, type AxAIOpenAIResponsesInputItem, type AxAIOpenAIResponsesInputMessageItem, type AxAIOpenAIResponsesInputTextContentPart, type AxAIOpenAIResponsesLocalShellToolCall, type AxAIOpenAIResponsesMCPCallArgumentsDeltaEvent, type AxAIOpenAIResponsesMCPCallArgumentsDoneEvent, type AxAIOpenAIResponsesMCPCallCompletedEvent, type AxAIOpenAIResponsesMCPCallFailedEvent, type AxAIOpenAIResponsesMCPCallInProgressEvent, type AxAIOpenAIResponsesMCPListToolsCompletedEvent, type AxAIOpenAIResponsesMCPListToolsFailedEvent, type AxAIOpenAIResponsesMCPListToolsInProgressEvent, type AxAIOpenAIResponsesMCPToolCall, AxAIOpenAIResponsesModel, type AxAIOpenAIResponsesOutputItem, type AxAIOpenAIResponsesOutputItemAddedEvent, type AxAIOpenAIResponsesOutputItemDoneEvent, type AxAIOpenAIResponsesOutputMessageItem, type AxAIOpenAIResponsesOutputRefusalContentPart, type AxAIOpenAIResponsesOutputTextAnnotationAddedEvent, type AxAIOpenAIResponsesOutputTextContentPart, type AxAIOpenAIResponsesOutputTextDeltaEvent, type AxAIOpenAIResponsesOutputTextDoneEvent, type AxAIOpenAIResponsesReasoningDeltaEvent, type AxAIOpenAIResponsesReasoningDoneEvent, type AxAIOpenAIResponsesReasoningItem, type AxAIOpenAIResponsesReasoningSummaryDeltaEvent, type AxAIOpenAIResponsesReasoningSummaryDoneEvent, type AxAIOpenAIResponsesReasoningSummaryPart, type AxAIOpenAIResponsesReasoningSummaryPartAddedEvent, type AxAIOpenAIResponsesReasoningSummaryPartDoneEvent, type AxAIOpenAIResponsesReasoningSummaryTextDeltaEvent, type AxAIOpenAIResponsesReasoningSummaryTextDoneEvent, type AxAIOpenAIResponsesRefusalDeltaEvent, type AxAIOpenAIResponsesRefusalDoneEvent, type AxAIOpenAIResponsesRequest, type AxAIOpenAIResponsesResponse, type AxAIOpenAIResponsesResponseCompletedEvent, type AxAIOpenAIResponsesResponseCreatedEvent, type AxAIOpenAIResponsesResponseDelta, type AxAIOpenAIResponsesResponseFailedEvent, type AxAIOpenAIResponsesResponseInProgressEvent, type AxAIOpenAIResponsesResponseIncompleteEvent, type AxAIOpenAIResponsesResponseQueuedEvent, type AxAIOpenAIResponsesStreamEvent, type AxAIOpenAIResponsesStreamEventBase, type AxAIOpenAIResponsesToolCall, type AxAIOpenAIResponsesToolCallBase, type AxAIOpenAIResponsesToolChoice, type AxAIOpenAIResponsesToolDefinition, type AxAIOpenAIResponsesWebSearchCallCompletedEvent, type AxAIOpenAIResponsesWebSearchCallInProgressEvent, type AxAIOpenAIResponsesWebSearchCallSearchingEvent, type AxAIOpenAIResponsesWebSearchToolCall, type AxAIOpenAIUrlCitation, type AxAIOpenAIUsage, AxAIRefusalError, AxAIReka, type AxAIRekaArgs, type AxAIRekaChatRequest, type AxAIRekaChatResponse, type AxAIRekaChatResponseDelta, type AxAIRekaConfig, AxAIRekaModel, type AxAIRekaUsage, type AxAIService, AxAIServiceAbortedError, type AxAIServiceActionOptions, AxAIServiceAuthenticationError, AxAIServiceError, type AxAIServiceImpl, type AxAIServiceMetrics, type AxAIServiceModelType, AxAIServiceNetworkError, type AxAIServiceOptions, AxAIServiceResponseError, AxAIServiceStatusError, AxAIServiceStreamTerminatedError, AxAIServiceTimeoutError, AxAITogether, type AxAITogetherArgs, type AxAPI, type AxAPIConfig, AxAgent, type AxAgentFeatures, type AxAgentOptions, type AxAgentic, AxApacheTika, type AxApacheTikaArgs, type AxApacheTikaConvertOptions, type AxAssertion, AxAssertionError, AxBalancer, type AxBalancerOptions, AxBaseAI, type AxBaseAIArgs, AxBaseOptimizer, type AxBootstrapCompileOptions, AxBootstrapFewShot, type AxBootstrapOptimizerOptions, AxChainOfThought, type AxChatRequest, type AxChatResponse, type AxChatResponseFunctionCall, type AxChatResponseResult, type AxCheckpointLoadFn, type AxCheckpointSaveFn, type AxCompileOptions, type AxCostTracker, type AxCostTrackerOptions, 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, AxDefaultCostTracker, AxDefaultResultReranker, type AxDockerContainer, AxDockerSession, type AxEmbedRequest, type AxEmbedResponse, AxEmbeddingAdapter, type AxErrorCategory, AxEvalUtil, type AxEvaluateArgs, type AxExample, type AxField, type AxFieldDescriptor, type AxFieldProcessor, type AxFieldProcessorProcess, type AxFieldTemplateFn, type AxFieldType, type AxFieldValue, AxFlow, type AxFlowAutoParallelConfig, type AxFlowBranchContext, AxFlowDependencyAnalyzer, type AxFlowDynamicContext, AxFlowExecutionPlanner, type AxFlowExecutionStep, type AxFlowNodeDefinition, type AxFlowParallelBranch, type AxFlowParallelGroup, type AxFlowState, type AxFlowStepFunction, type AxFlowSubContext, AxFlowSubContextImpl, type AxFlowTypedParallelBranch, type AxFlowTypedSubContext, AxFlowTypedSubContextImpl, type AxFlowable, type AxForwardable, type AxFunction, AxFunctionError, type AxFunctionHandler, type AxFunctionJSONSchema, AxFunctionProcessor, type AxFunctionResult, type AxFunctionResultFormatter, AxGen, type AxGenDeltaOut, type AxGenIn, type AxGenMetricsInstruments, type AxGenOut, type AxGenStreamingOut, AxGenerateError, type AxGenerateErrorDetails, type AxGenerateResult, AxHFDataLoader, type AxIField, type AxInputFunctionType, AxInstanceRegistry, type AxInternalChatRequest, type AxInternalEmbedRequest, AxLLMRequestTypeValues, type AxLoggerData, type AxLoggerFunction, AxMCPClient, type AxMCPFunctionDescription, AxMCPHTTPSSETransport, type AxMCPInitializeParams, type AxMCPInitializeResult, type AxMCPJSONRPCErrorResponse, type AxMCPJSONRPCNotification, type AxMCPJSONRPCRequest, type AxMCPJSONRPCResponse, type AxMCPJSONRPCSuccessResponse, type AxMCPStreamableHTTPTransportOptions, AxMCPStreambleHTTPTransport, type AxMCPToolsListResult, type AxMCPTransport, AxMemory, type AxMemoryData, type AxMessage, type AxMetricFn, type AxMetricFnArgs, type AxMetricsConfig, AxMiPRO, type AxMiPROCompileOptions, type AxMiPROOptimizerOptions, type AxMiPROResult, AxMockAIService, type AxMockAIServiceConfig, type AxModelConfig, type AxModelInfo, type AxModelInfoWithProvider, type AxModelUsage, type AxMultiMetricFn, AxMultiServiceRouter, type AxOptimizationCheckpoint, type AxOptimizationProgress, type AxOptimizationStats, type AxOptimizer, type AxOptimizerArgs, type AxOptimizerLoggerData, type AxOptimizerLoggerFunction, type AxOptimizerMetricsConfig, type AxOptimizerMetricsInstruments, type AxOptimizerResult, type AxParetoResult, AxProgram, type AxProgramDemos, type AxProgramExamples, type AxProgramForwardOptions, type AxProgramForwardOptionsWithModels, type AxProgramOptions, type AxProgramStreamingForwardOptions, type AxProgramStreamingForwardOptionsWithModels, type AxProgramTrace, type AxProgramUsage, type AxProgrammable, AxPromptTemplate, type AxPromptTemplateOptions, AxRAG, type AxRateLimiterFunction, AxRateLimiterTokenUsage, type AxRateLimiterTokenUsageOptions, type AxRerankerIn, type AxRerankerOut, type AxResponseHandlerArgs, type AxResultPickerFunction, type AxResultPickerFunctionFieldResults, type AxResultPickerFunctionFunctionResults, type AxRewriteIn, type AxRewriteOut, type AxSamplePickerOptions, type AxSetExamplesOptions, AxSignature, type AxSignatureConfig, type AxSignatureTemplateValue, AxSimpleClassifier, AxSimpleClassifierClass, type AxSimpleClassifierForwardOptions, AxSpanKindValues, type AxStreamingAssertion, type AxStreamingEvent, type AxStreamingFieldProcessorProcess, AxStringUtil, AxTestPrompt, type AxTokenUsage, type AxTunable, type AxUsable, ax, axAIAnthropicDefaultConfig, axAIAnthropicVertexDefaultConfig, axAIAzureOpenAIBestConfig, axAIAzureOpenAICreativeConfig, axAIAzureOpenAIDefaultConfig, axAIAzureOpenAIFastConfig, axAICohereCreativeConfig, axAICohereDefaultConfig, axAIDeepSeekCodeConfig, axAIDeepSeekDefaultConfig, axAIGoogleGeminiDefaultConfig, axAIGoogleGeminiDefaultCreativeConfig, axAIGrokBestConfig, axAIGrokDefaultConfig, axAIHuggingFaceCreativeConfig, axAIHuggingFaceDefaultConfig, axAIMistralBestConfig, axAIMistralDefaultConfig, axAIOllamaDefaultConfig, axAIOllamaDefaultCreativeConfig, axAIOpenAIBestConfig, axAIOpenAICreativeConfig, axAIOpenAIDefaultConfig, axAIOpenAIFastConfig, axAIOpenAIResponsesBestConfig, axAIOpenAIResponsesCreativeConfig, axAIOpenAIResponsesDefaultConfig, axAIRekaBestConfig, axAIRekaCreativeConfig, axAIRekaDefaultConfig, axAIRekaFastConfig, axAITogetherDefaultConfig, axBaseAIDefaultConfig, axBaseAIDefaultCreativeConfig, axCheckMetricsHealth, axCreateDefaultColorLogger, axCreateDefaultOptimizerColorLogger, axCreateDefaultOptimizerTextLogger, axCreateDefaultTextLogger, axDefaultMetricsConfig, axDefaultOptimizerLogger, axDefaultOptimizerMetricsConfig, axGetMetricsConfig, axGetOptimizerMetricsConfig, axGlobals, axModelInfoAnthropic, axModelInfoCohere, axModelInfoDeepSeek, axModelInfoGoogleGemini, axModelInfoGrok, axModelInfoGroq, axModelInfoHuggingFace, axModelInfoMistral, axModelInfoOpenAI, axModelInfoOpenAIResponses, axModelInfoReka, axModelInfoTogether, axSpanAttributes, axSpanEvents, axUpdateMetricsConfig, axUpdateOptimizerMetricsConfig, axValidateChatRequestMessage, axValidateChatResponseResult, f, s };