@ax-llm/ax 21.0.0 → 21.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.cts CHANGED
@@ -82,7 +82,10 @@ declare class AxMemory implements AxAIMemory {
82
82
  } | {
83
83
  type: "audio";
84
84
  data: string;
85
- format?: "wav" | "mp3" | "ogg";
85
+ format?: AxAudioFormat;
86
+ mimeType?: string;
87
+ sampleRate?: number;
88
+ channels?: number;
86
89
  cache?: boolean;
87
90
  transcription?: string;
88
91
  duration?: number;
@@ -123,6 +126,10 @@ declare class AxMemory implements AxAIMemory {
123
126
  }[];
124
127
  thought?: string;
125
128
  thoughtBlocks?: AxThoughtBlockItem[];
129
+ audio?: {
130
+ id: string;
131
+ transcript?: string;
132
+ };
126
133
  cache?: boolean;
127
134
  } | {
128
135
  role: "function";
@@ -1561,7 +1568,10 @@ declare class AxPromptTemplate {
1561
1568
  } | {
1562
1569
  type: "audio";
1563
1570
  data: string;
1564
- format?: "wav" | "mp3" | "ogg";
1571
+ format?: AxAudioFormat;
1572
+ mimeType?: string;
1573
+ sampleRate?: number;
1574
+ channels?: number;
1565
1575
  cache?: boolean;
1566
1576
  transcription?: string;
1567
1577
  duration?: number;
@@ -2220,6 +2230,43 @@ declare class AxContentProcessingError extends Error {
2220
2230
  toString(): string;
2221
2231
  }
2222
2232
 
2233
+ type AxAudioFormat = 'wav' | 'mp3' | 'flac' | 'opus' | 'aac' | 'pcm16' | 'pcm' | 'ogg';
2234
+ type AxChatAudioConfig = {
2235
+ input?: {
2236
+ format?: AxAudioFormat;
2237
+ mimeType?: string;
2238
+ sampleRate?: number;
2239
+ channels?: number;
2240
+ };
2241
+ output?: {
2242
+ enabled?: boolean;
2243
+ voice?: string | {
2244
+ id: string;
2245
+ };
2246
+ format?: AxAudioFormat;
2247
+ mimeType?: string;
2248
+ sampleRate?: number;
2249
+ channels?: number;
2250
+ includeTranscript?: boolean;
2251
+ };
2252
+ live?: {
2253
+ turnTimeoutMs?: number;
2254
+ enableAffectiveDialog?: boolean;
2255
+ proactiveAudio?: boolean;
2256
+ };
2257
+ };
2258
+ type AxChatAudioOutput = {
2259
+ data: string;
2260
+ id?: string;
2261
+ mimeType?: string;
2262
+ format?: AxAudioFormat;
2263
+ transcript?: string;
2264
+ expiresAt?: number;
2265
+ sampleRate?: number;
2266
+ channels?: number;
2267
+ isDelta?: boolean;
2268
+ };
2269
+
2223
2270
  interface AxAIFeatures {
2224
2271
  functions: boolean;
2225
2272
  streaming: boolean;
@@ -2249,6 +2296,17 @@ interface AxAIFeatures {
2249
2296
  formats: string[];
2250
2297
  /** Maximum audio duration in seconds */
2251
2298
  maxDuration?: number;
2299
+ /** Audio output capabilities for conversational audio models */
2300
+ output?: {
2301
+ /** Whether the provider supports generated audio responses */
2302
+ supported: boolean;
2303
+ /** Supported generated audio formats */
2304
+ formats: string[];
2305
+ /** Default output sample rate, when fixed by the provider */
2306
+ sampleRate?: number;
2307
+ /** Known built-in voice names, when enumerable */
2308
+ voices?: string[];
2309
+ };
2252
2310
  };
2253
2311
  /** File processing capabilities */
2254
2312
  files: {
@@ -2317,6 +2375,7 @@ declare class AxBaseAI<TModel, TEmbedModel, TChatRequest, TEmbedRequest, TChatRe
2317
2375
  private customLabels?;
2318
2376
  private contextCache?;
2319
2377
  private beta?;
2378
+ private includeRequestBodyInErrors?;
2320
2379
  private modelInfo;
2321
2380
  private modelUsage?;
2322
2381
  private embedModelUsage?;
@@ -2461,6 +2520,10 @@ type AxModelInfo = {
2461
2520
  temperature?: boolean;
2462
2521
  topP?: boolean;
2463
2522
  };
2523
+ audio?: {
2524
+ input?: boolean;
2525
+ output?: boolean;
2526
+ };
2464
2527
  maxTokens?: number;
2465
2528
  isExpensive?: boolean;
2466
2529
  contextWindow?: number;
@@ -2587,6 +2650,8 @@ type AxModelConfig = {
2587
2650
  * you to display partial results as they're generated.
2588
2651
  */
2589
2652
  stream?: boolean;
2653
+ /** Conversational audio input/output configuration for chat models. */
2654
+ audio?: AxChatAudioConfig;
2590
2655
  /**
2591
2656
  * Number of completions to generate for each prompt.
2592
2657
  *
@@ -2653,6 +2718,7 @@ type AxChatResponseResult = {
2653
2718
  thoughtBlocks?: AxThoughtBlockItem[];
2654
2719
  name?: string;
2655
2720
  id?: string;
2721
+ audio?: AxChatAudioOutput;
2656
2722
  functionCalls?: {
2657
2723
  id: string;
2658
2724
  type: 'function';
@@ -2736,7 +2802,10 @@ type AxChatRequest<TModel = string> = {
2736
2802
  } | {
2737
2803
  type: 'audio';
2738
2804
  data: string;
2739
- format?: 'wav' | 'mp3' | 'ogg';
2805
+ format?: AxAudioFormat;
2806
+ mimeType?: string;
2807
+ sampleRate?: number;
2808
+ channels?: number;
2740
2809
  cache?: boolean;
2741
2810
  /** Pre-transcribed text content for fallback */
2742
2811
  transcription?: string;
@@ -2796,6 +2865,11 @@ type AxChatRequest<TModel = string> = {
2796
2865
  thought?: string;
2797
2866
  /** Array of thinking blocks, each with its own signature */
2798
2867
  thoughtBlocks?: AxThoughtBlockItem[];
2868
+ /** Previous assistant audio response reference for audio-capable chat models */
2869
+ audio?: {
2870
+ id: string;
2871
+ transcript?: string;
2872
+ };
2799
2873
  cache?: boolean;
2800
2874
  } | {
2801
2875
  role: 'function';
@@ -2810,6 +2884,8 @@ type AxChatRequest<TModel = string> = {
2810
2884
  requiresImages?: boolean;
2811
2885
  /** Whether the request requires audio support */
2812
2886
  requiresAudio?: boolean;
2887
+ /** Whether the request requires generated audio responses */
2888
+ requiresAudioOutput?: boolean;
2813
2889
  /** Whether the request requires file support */
2814
2890
  requiresFiles?: boolean;
2815
2891
  /** Whether the request requires web search capabilities */
@@ -3084,6 +3160,8 @@ type AxAIServiceOptions = {
3084
3160
  rateLimiter?: AxRateLimiterFunction;
3085
3161
  /** Custom fetch implementation (useful for proxies or custom HTTP handling). */
3086
3162
  fetch?: typeof fetch;
3163
+ /** Custom WebSocket constructor for providers that use realtime WebSocket transports. */
3164
+ webSocket?: any;
3087
3165
  /** OpenTelemetry tracer for distributed tracing. */
3088
3166
  tracer?: Tracer;
3089
3167
  /** OpenTelemetry meter for metrics collection. */
@@ -3220,6 +3298,16 @@ type AxAIServiceOptions = {
3220
3298
  * @example { environment: 'production', feature: 'search' }
3221
3299
  */
3222
3300
  customLabels?: Record<string, string>;
3301
+ /**
3302
+ * Whether to include the request body in `AxAIServiceError` messages.
3303
+ *
3304
+ * When `false`, the request body is omitted from thrown errors. Useful when
3305
+ * requests may contain sensitive data (API keys, PII) or large base64-encoded
3306
+ * content that would bloat error logs.
3307
+ *
3308
+ * @default true
3309
+ */
3310
+ includeRequestBodyInErrors?: boolean;
3223
3311
  };
3224
3312
  interface AxAIService<TModel = unknown, TEmbedModel = unknown, TModelKey = string> {
3225
3313
  getId(): string;
@@ -5868,6 +5956,15 @@ declare class AxAIAnthropic<TModelKey = string> extends AxBaseAI<AxAIAnthropicMo
5868
5956
 
5869
5957
  declare const axModelInfoAnthropic: AxModelInfo[];
5870
5958
 
5959
+ declare const axOpenAIChatAudioDefaults: () => AxChatAudioConfig;
5960
+ declare const axGoogleGeminiLiveAudioDefaults: () => AxChatAudioConfig;
5961
+ declare const axMergeChatAudioConfig: (base?: Readonly<AxChatAudioConfig>, override?: Readonly<AxChatAudioConfig>) => AxChatAudioConfig | undefined;
5962
+ declare const axIsAudioOutputEnabled: (audio?: Readonly<AxChatAudioConfig>) => boolean;
5963
+
5964
+ declare const axAudioMimeType: (format?: AxAudioFormat, sampleRate?: number, fallback?: string) => string;
5965
+ declare const axAudioFormatFromMimeType: (mimeType?: string) => AxAudioFormat | undefined;
5966
+ declare const axConcatBase64: (chunks: readonly string[]) => string;
5967
+
5871
5968
  declare enum AxAIOpenAIModel {
5872
5969
  GPT4 = "gpt-4",
5873
5970
  GPT41 = "gpt-4.1",
@@ -5875,6 +5972,10 @@ declare enum AxAIOpenAIModel {
5875
5972
  GPT41Nano = "gpt-4.1-nano",
5876
5973
  GPT4O = "gpt-4o",
5877
5974
  GPT4OMini = "gpt-4o-mini",
5975
+ GPTAudio = "gpt-audio",
5976
+ GPTAudioMini = "gpt-audio-mini",
5977
+ GPTRealtime2 = "gpt-realtime-2",
5978
+ GPTRealtimeWhisper = "gpt-realtime-whisper",
5878
5979
  GPT4ChatGPT4O = "chatgpt-4o-latest",
5879
5980
  GPT4Turbo = "gpt-4-turbo",
5880
5981
  GPT35Turbo = "gpt-3.5-turbo",
@@ -5968,15 +6069,22 @@ interface AxAIOpenAIResponseDelta<T> {
5968
6069
  choices: {
5969
6070
  index: number;
5970
6071
  delta: T;
5971
- finish_reason: 'stop' | 'length' | 'content_filter' | 'tool_calls';
6072
+ finish_reason?: 'stop' | 'length' | 'content_filter' | 'tool_calls' | null;
5972
6073
  }[];
5973
6074
  usage?: AxAIOpenAIUsage;
5974
6075
  system_fingerprint: string;
5975
6076
  }
5976
6077
  type AxAIOpenAIChatRequest<TModel> = {
5977
6078
  model: TModel;
5978
- reasoning_effort?: 'minimal' | 'low' | 'medium' | 'high';
6079
+ reasoning_effort?: 'none' | 'minimal' | 'low' | 'medium' | 'high';
5979
6080
  store?: boolean;
6081
+ modalities?: readonly ('text' | 'audio')[];
6082
+ audio?: {
6083
+ format: 'wav' | 'mp3' | 'flac' | 'opus' | 'aac' | 'pcm16';
6084
+ voice: string | {
6085
+ id: string;
6086
+ };
6087
+ };
5980
6088
  messages: ({
5981
6089
  role: 'system';
5982
6090
  content: string;
@@ -5995,7 +6103,10 @@ type AxAIOpenAIChatRequest<TModel> = {
5995
6103
  type: 'input_audio';
5996
6104
  input_audio: {
5997
6105
  data: string;
5998
- format?: 'wav';
6106
+ format: 'wav' | 'mp3' | 'pcm16';
6107
+ mimeType?: string;
6108
+ sampleRate?: number;
6109
+ channels?: number;
5999
6110
  };
6000
6111
  } | {
6001
6112
  type: 'file';
@@ -6007,11 +6118,14 @@ type AxAIOpenAIChatRequest<TModel> = {
6007
6118
  name?: string;
6008
6119
  } | {
6009
6120
  role: 'assistant';
6010
- content: string | {
6121
+ content?: string | {
6011
6122
  type: string;
6012
6123
  text: string;
6013
6124
  };
6014
6125
  name?: string;
6126
+ audio?: {
6127
+ id: string;
6128
+ };
6015
6129
  } | {
6016
6130
  role: 'assistant';
6017
6131
  content?: string | {
@@ -6086,6 +6200,12 @@ type AxAIOpenAIChatResponse = {
6086
6200
  role: string;
6087
6201
  content: string | null;
6088
6202
  refusal: string | null;
6203
+ audio?: {
6204
+ id: string;
6205
+ data?: string;
6206
+ expires_at?: number;
6207
+ transcript?: string;
6208
+ } | null;
6089
6209
  reasoning_content?: string;
6090
6210
  annotations?: AxAIOpenAIAnnotation[];
6091
6211
  tool_calls?: {
@@ -6111,6 +6231,13 @@ type AxAIOpenAIChatResponse = {
6111
6231
  type AxAIOpenAIChatResponseDelta = AxAIOpenAIResponseDelta<{
6112
6232
  content: string | null;
6113
6233
  refusal?: string | null;
6234
+ audio?: {
6235
+ id?: string;
6236
+ data?: string;
6237
+ delta?: string;
6238
+ expires_at?: number;
6239
+ transcript?: string;
6240
+ } | null;
6114
6241
  reasoning_content?: string;
6115
6242
  role?: string;
6116
6243
  annotations?: AxAIOpenAIAnnotation[];
@@ -6133,6 +6260,55 @@ type AxAIOpenAIEmbedResponse = {
6133
6260
  usage: AxAIOpenAIUsage;
6134
6261
  };
6135
6262
 
6263
+ type AxOpenAIInputAudioFormat = 'wav' | 'mp3';
6264
+ type AxOpenAIRealtimeInputAudioFormat = AxOpenAIInputAudioFormat | 'pcm16';
6265
+ type AxOpenAIAudioPart = {
6266
+ type: 'audio';
6267
+ data: string;
6268
+ format?: AxAudioFormat;
6269
+ mimeType?: string;
6270
+ sampleRate?: number;
6271
+ channels?: number;
6272
+ };
6273
+ declare const axAIOpenAIAudioDefaultConfig: () => AxAIOpenAIConfig<AxAIOpenAIModel, AxAIOpenAIEmbedModel>;
6274
+ declare const axIsOpenAIChatAudioModel: (model: string) => boolean;
6275
+ declare const axResolveOpenAIChatAudioConfig: (providerAudio?: Readonly<AxChatAudioConfig>, requestAudio?: Readonly<AxChatAudioConfig>) => AxChatAudioConfig | undefined;
6276
+ declare const axMapOpenAIInputAudioPart: (part: Readonly<AxOpenAIAudioPart>, options?: Readonly<{
6277
+ allowPcm16?: boolean;
6278
+ }>) => {
6279
+ type: "input_audio";
6280
+ input_audio: {
6281
+ data: string;
6282
+ format: AxOpenAIRealtimeInputAudioFormat;
6283
+ mimeType?: string;
6284
+ sampleRate?: number;
6285
+ channels?: number;
6286
+ };
6287
+ };
6288
+ declare const axApplyOpenAIChatAudioRequest: <TModel>(reqValue: AxAIOpenAIChatRequest<TModel>, req: Readonly<AxInternalChatRequest<TModel>>, providerAudio?: Readonly<AxChatAudioConfig>) => AxAIOpenAIChatRequest<TModel>;
6289
+ declare const axMapOpenAIChatAudioResponse: (audio: NonNullable<AxAIOpenAIChatResponse["choices"][number]["message"]["audio"]> | null | undefined) => AxChatAudioOutput | undefined;
6290
+ declare const axMapOpenAIChatAudioDelta: (audio: NonNullable<AxAIOpenAIChatResponseDelta["choices"][number]["delta"]["audio"]> | null | undefined) => AxChatAudioOutput | undefined;
6291
+
6292
+ type OpenAIRealtimeRequest<TModel> = {
6293
+ model: TModel;
6294
+ request: AxAIOpenAIChatRequest<TModel>;
6295
+ apiKey: string;
6296
+ audio: AxChatAudioConfig;
6297
+ webSocket?: any;
6298
+ debug?: boolean;
6299
+ apiName?: string;
6300
+ providerName?: string;
6301
+ wsURL?: (model: string) => string;
6302
+ createSessionUpdate?: (request: Readonly<OpenAIRealtimeRequest<TModel>>) => object;
6303
+ };
6304
+ declare const axAIOpenAIRealtimeDefaultConfig: () => AxAIOpenAIConfig<AxAIOpenAIModel, AxAIOpenAIEmbedModel>;
6305
+ declare const axAIOpenAIRealtimeTranscriptionDefaultConfig: () => AxAIOpenAIConfig<AxAIOpenAIModel, AxAIOpenAIEmbedModel>;
6306
+ declare const axIsOpenAIRealtimeModel: (model: string) => boolean;
6307
+ declare const axIsOpenAIRealtimeTranscriptionModel: (model: string) => boolean;
6308
+ declare const axResolveOpenAIRealtimeAudioConfig: (providerAudio?: Readonly<AxChatAudioConfig>, requestAudio?: Readonly<AxChatAudioConfig>) => AxChatAudioConfig;
6309
+ declare const axShouldUseOpenAIRealtime: (model: string, providerAudio?: Readonly<AxChatAudioConfig>, requestAudio?: Readonly<AxChatAudioConfig>) => boolean;
6310
+ declare const axCreateOpenAIRealtimeApi: <TModel>(realtimeRequest: OpenAIRealtimeRequest<TModel>) => AxAPI;
6311
+
6136
6312
  declare const axAIOpenAIDefaultConfig: () => AxAIOpenAIConfig<AxAIOpenAIModel, AxAIOpenAIEmbedModel>;
6137
6313
  declare const axAIOpenAIBestConfig: () => AxAIOpenAIConfig<AxAIOpenAIModel, AxAIOpenAIEmbedModel>;
6138
6314
  declare const axAIOpenAICreativeConfig: () => AxAIOpenAIConfig<AxAIOpenAIModel, AxAIOpenAIEmbedModel>;
@@ -6145,6 +6321,12 @@ interface AxAIOpenAIArgs<TName = 'openai', TModel = AxAIOpenAIModel, TEmbedModel
6145
6321
  type ChatReqUpdater<TModel, TChatReq extends AxAIOpenAIChatRequest<TModel>> = (req: Readonly<TChatReq>, config: Readonly<AxAIServiceOptions>) => TChatReq;
6146
6322
  type ChatRespProcessor = (resp: AxChatResponse) => AxChatResponse;
6147
6323
  type ChatStreamRespProcessor = (resp: AxChatResponse, state: object) => AxChatResponse;
6324
+ type RealtimeAdapter<TModel> = {
6325
+ apiName: string;
6326
+ shouldUse: (model: string, providerAudio?: Readonly<AxChatAudioConfig>, requestAudio?: Readonly<AxChatAudioConfig>) => boolean;
6327
+ resolveAudioConfig: (providerAudio?: Readonly<AxChatAudioConfig>, requestAudio?: Readonly<AxChatAudioConfig>) => AxChatAudioConfig;
6328
+ createApi: (request: OpenAIRealtimeRequest<TModel>) => AxAPI;
6329
+ };
6148
6330
  interface AxAIOpenAIBaseArgs<TModel, TEmbedModel, TModelKey, TChatReq extends AxAIOpenAIChatRequest<TModel>> {
6149
6331
  apiKey: string;
6150
6332
  apiURL?: string;
@@ -6157,10 +6339,11 @@ interface AxAIOpenAIBaseArgs<TModel, TEmbedModel, TModelKey, TChatReq extends Ax
6157
6339
  chatReqUpdater?: ChatReqUpdater<TModel, TChatReq>;
6158
6340
  chatRespProcessor?: ChatRespProcessor;
6159
6341
  chatStreamRespProcessor?: ChatStreamRespProcessor;
6342
+ realtime?: RealtimeAdapter<TModel>;
6160
6343
  supportFor: AxAIFeatures | ((model: TModel) => AxAIFeatures);
6161
6344
  }
6162
6345
  declare class AxAIOpenAIBase<TModel, TEmbedModel, TModelKey, TChatReq extends AxAIOpenAIChatRequest<TModel> = AxAIOpenAIChatRequest<TModel>> extends AxBaseAI<TModel, TEmbedModel, AxAIOpenAIChatRequest<TModel>, AxAIOpenAIEmbedRequest<TEmbedModel>, AxAIOpenAIChatResponse, AxAIOpenAIChatResponseDelta, AxAIOpenAIEmbedResponse, TModelKey> {
6163
- constructor({ apiKey, config, options, apiURL, modelInfo, models, chatReqUpdater, chatRespProcessor, chatStreamRespProcessor, supportFor, }: Readonly<Omit<AxAIOpenAIBaseArgs<TModel, TEmbedModel, TModelKey, TChatReq>, 'name'>>);
6346
+ constructor({ apiKey, config, options, apiURL, modelInfo, models, chatReqUpdater, chatRespProcessor, chatStreamRespProcessor, realtime, supportFor, }: Readonly<Omit<AxAIOpenAIBaseArgs<TModel, TEmbedModel, TModelKey, TChatReq>, 'name'>>);
6164
6347
  }
6165
6348
  declare class AxAIOpenAI<TModelKey = string> extends AxAIOpenAIBase<AxAIOpenAIModel, AxAIOpenAIEmbedModel, TModelKey> {
6166
6349
  constructor({ apiKey, apiURL, config, options, models, modelInfo, }: Readonly<Omit<AxAIOpenAIArgs<'openai', AxAIOpenAIModel, AxAIOpenAIEmbedModel, TModelKey>, 'name'>>);
@@ -6394,6 +6577,7 @@ interface CapabilityValidationResult {
6394
6577
  * ```
6395
6578
  */
6396
6579
  declare function axAnalyzeRequestRequirements(request: AxChatRequest): MediaRequirements & {
6580
+ hasAudioOutput: boolean;
6397
6581
  requiresFunctions: boolean;
6398
6582
  requiresStreaming: boolean;
6399
6583
  requiresCaching: boolean;
@@ -6674,8 +6858,6 @@ declare class AxAICohere<TModelKey> extends AxBaseAI<AxAICohereModel, AxAICohere
6674
6858
  constructor({ apiKey, config, options, models, }: Readonly<Omit<AxAICohereArgs<TModelKey>, 'name'>>);
6675
6859
  }
6676
6860
 
6677
- declare const axModelInfoCohere: AxModelInfo[];
6678
-
6679
6861
  /**
6680
6862
  * DeepSeek: Models for text generation
6681
6863
  */
@@ -6723,8 +6905,6 @@ declare class AxAIDeepSeek<TModelKey> extends AxAIOpenAIBase<AxAIDeepSeekModel,
6723
6905
  constructor({ apiKey, config, options, models, modelInfo, }: Readonly<Omit<AxAIDeepSeekArgs<TModelKey>, 'name'>>);
6724
6906
  }
6725
6907
 
6726
- declare const axModelInfoDeepSeek: AxModelInfo[];
6727
-
6728
6908
  declare enum AxAIGoogleGeminiModel {
6729
6909
  Gemini31Pro = "gemini-3.1-pro-preview",
6730
6910
  Gemini3FlashLite = "gemini-3.1-flash-lite-preview",
@@ -6733,6 +6913,7 @@ declare enum AxAIGoogleGeminiModel {
6733
6913
  Gemini3ProImage = "gemini-3-pro-image-preview",
6734
6914
  Gemini25Pro = "gemini-2.5-pro",
6735
6915
  Gemini25Flash = "gemini-2.5-flash",
6916
+ Gemini25FlashNativeAudio = "gemini-2.5-flash-native-audio-preview-12-2025",
6736
6917
  Gemini25FlashLite = "gemini-2.5-flash-lite",
6737
6918
  Gemini20Flash = "gemini-2.0-flash",
6738
6919
  Gemini20FlashLite = "gemini-2.0-flash-lite",
@@ -7057,6 +7238,20 @@ type AxAIGoogleGeminiCacheUpdateRequest = {
7057
7238
  expireTime?: string;
7058
7239
  };
7059
7240
 
7241
+ type GeminiLiveRequest = {
7242
+ model: AxAIGoogleGeminiModel;
7243
+ request: AxAIGoogleGeminiChatRequest;
7244
+ apiKey: string;
7245
+ audio: AxChatAudioConfig;
7246
+ };
7247
+ declare const axAIGoogleGeminiLiveAudioDefaultConfig: () => AxAIGoogleGeminiConfig;
7248
+ declare const axIsGeminiLiveAudioModel: (model: string) => boolean;
7249
+ declare const axResolveGeminiLiveAudioConfig: (providerAudio?: Readonly<AxChatAudioConfig>, requestAudio?: Readonly<AxChatAudioConfig>) => AxChatAudioConfig | undefined;
7250
+ declare const axShouldUseGeminiLiveAudio: (model: string, providerAudio?: Readonly<AxChatAudioConfig>, requestAudio?: Readonly<AxChatAudioConfig>) => boolean;
7251
+ declare const axValidateGeminiLiveAudioInput: (part: Readonly<AxAIGoogleGeminiContentPart>) => void;
7252
+ declare const axMapGeminiLiveAudioPart: (part: Readonly<AxAIGoogleGeminiContentPart>) => AxChatAudioOutput | undefined;
7253
+ declare const axCreateGeminiLiveAudioApi: (liveRequest: GeminiLiveRequest) => AxAPI;
7254
+
7060
7255
  /**
7061
7256
  * AxAIGoogleGemini: Default Model options for text generation
7062
7257
  */
@@ -7094,11 +7289,6 @@ declare class AxAIGoogleGemini<TModelKey = string> extends AxBaseAI<AxAIGoogleGe
7094
7289
  constructor({ apiKey, projectId, region, endpointId, config, options, models, modelInfo, }: Readonly<Omit<AxAIGoogleGeminiArgs<TModelKey>, 'name'>>);
7095
7290
  }
7096
7291
 
7097
- /**
7098
- * AxAIGoogleGemini: Model information
7099
- */
7100
- declare const axModelInfoGoogleGemini: AxModelInfo[];
7101
-
7102
7292
  declare enum AxAIGroqModel {
7103
7293
  Llama3_8B = "llama3-8b-8192",
7104
7294
  Llama33_70B = "llama-3.3-70b-versatile",
@@ -7118,11 +7308,6 @@ declare class AxAIGroq<TModelKey> extends AxAIOpenAIBase<AxAIGroqModel, undefine
7118
7308
  private newRateLimiter;
7119
7309
  }
7120
7310
 
7121
- /**
7122
- * AxAIGroq: Model information
7123
- */
7124
- declare const axModelInfoGroq: AxModelInfo[];
7125
-
7126
7311
  declare enum AxAIHuggingFaceModel {
7127
7312
  MetaLlama270BChatHF = "meta-llama/Llama-2-70b-chat-hf"
7128
7313
  }
@@ -7170,40 +7355,6 @@ declare class AxAIHuggingFace<TModelKey> extends AxBaseAI<AxAIHuggingFaceModel,
7170
7355
  constructor({ apiKey, config, options, models, }: Readonly<Omit<AxAIHuggingFaceArgs<TModelKey>, 'name'>>);
7171
7356
  }
7172
7357
 
7173
- /**
7174
- * HuggingFace: Model information
7175
- */
7176
- declare const axModelInfoHuggingFace: AxModelInfo[];
7177
-
7178
- interface AxAIMetricsInstruments {
7179
- latencyHistogram?: Histogram;
7180
- errorCounter?: Counter;
7181
- requestCounter?: Counter;
7182
- tokenCounter?: Counter;
7183
- inputTokenCounter?: Counter;
7184
- outputTokenCounter?: Counter;
7185
- errorRateGauge?: Gauge;
7186
- meanLatencyGauge?: Gauge;
7187
- p95LatencyGauge?: Gauge;
7188
- p99LatencyGauge?: Gauge;
7189
- streamingRequestsCounter?: Counter;
7190
- functionCallsCounter?: Counter;
7191
- functionCallLatencyHistogram?: Histogram;
7192
- requestSizeHistogram?: Histogram;
7193
- responseSizeHistogram?: Histogram;
7194
- temperatureGauge?: Gauge;
7195
- maxTokensGauge?: Gauge;
7196
- estimatedCostCounter?: Counter;
7197
- promptLengthHistogram?: Histogram;
7198
- contextWindowUsageGauge?: Gauge;
7199
- timeoutsCounter?: Counter;
7200
- abortsCounter?: Counter;
7201
- thinkingBudgetUsageCounter?: Counter;
7202
- multimodalRequestsCounter?: Counter;
7203
- cacheReadTokensCounter?: Counter;
7204
- cacheWriteTokensCounter?: Counter;
7205
- }
7206
-
7207
7358
  declare enum AxAIMistralModel {
7208
7359
  Mistral7B = "open-mistral-7b",
7209
7360
  Mistral8x7B = "open-mixtral-8x7b",
@@ -7264,136 +7415,6 @@ declare class AxAIMistral<TModelKey> extends AxAIOpenAIBase<AxAIMistralModel, Ax
7264
7415
  private updateMessages;
7265
7416
  }
7266
7417
 
7267
- declare const axModelInfoMistral: AxModelInfo[];
7268
-
7269
- type AxMockAIServiceConfig<TModelKey> = {
7270
- name?: string;
7271
- id?: string;
7272
- modelInfo?: Partial<AxModelInfoWithProvider>;
7273
- embedModelInfo?: AxModelInfoWithProvider;
7274
- features?: {
7275
- functions?: boolean;
7276
- streaming?: boolean;
7277
- structuredOutputs?: boolean;
7278
- media?: Partial<AxAIFeatures['media']>;
7279
- };
7280
- models?: AxAIModelList<TModelKey>;
7281
- options?: AxAIServiceOptions;
7282
- chatResponse?: AxChatResponse | ReadableStream<AxChatResponse> | (() => Promise<AxChatResponse | ReadableStream<AxChatResponse>>) | ((req: Readonly<AxChatRequest<unknown>>, options?: Readonly<AxAIServiceOptions>) => Promise<AxChatResponse | ReadableStream<AxChatResponse>>);
7283
- embedResponse?: AxEmbedResponse | ((req: Readonly<AxEmbedRequest>) => AxEmbedResponse | Promise<AxEmbedResponse>);
7284
- shouldError?: boolean;
7285
- errorMessage?: string;
7286
- latencyMs?: number;
7287
- };
7288
- declare class AxMockAIService<TModelKey> implements AxAIService<unknown, unknown, TModelKey> {
7289
- private readonly config;
7290
- private metrics;
7291
- constructor(config?: AxMockAIServiceConfig<TModelKey>);
7292
- getLastUsedChatModel(): unknown;
7293
- getLastUsedEmbedModel(): unknown;
7294
- getLastUsedModelConfig(): AxModelConfig | undefined;
7295
- getName(): string;
7296
- getId(): string;
7297
- getFeatures(_model?: string): AxAIFeatures;
7298
- getModelList(): AxAIModelList<TModelKey> | undefined;
7299
- getMetrics(): AxAIServiceMetrics;
7300
- getEstimatedCost(): number;
7301
- chat(req: Readonly<AxChatRequest<unknown>>, _options?: Readonly<AxAIServiceOptions>): Promise<AxChatResponse | ReadableStream<AxChatResponse>>;
7302
- embed(req: Readonly<AxEmbedRequest>, _options?: Readonly<AxAIServiceOptions>): Promise<AxEmbedResponse>;
7303
- setOptions(options: Readonly<AxAIServiceOptions>): void;
7304
- getOptions(): Readonly<AxAIServiceOptions>;
7305
- getLogger(): AxLoggerFunction;
7306
- private updateMetrics;
7307
- }
7308
-
7309
- type AxAIServiceListItem<TModel = unknown, TEmbedModel = unknown, TModelKey = string> = {
7310
- key: TModelKey;
7311
- service: AxAIService<TModel, TEmbedModel, TModelKey>;
7312
- description: string;
7313
- isInternal?: boolean;
7314
- };
7315
- type ExtractServiceModelKeys<T> = T extends AxAIService<any, any, infer K> ? K : T extends AxAIServiceListItem<any, any, infer K> ? K : never;
7316
- type ExtractAllModelKeys<T extends readonly any[]> = T extends readonly [
7317
- infer First,
7318
- ...infer Rest
7319
- ] ? ExtractServiceModelKeys<First> | ExtractAllModelKeys<Rest> : never;
7320
- declare class AxMultiServiceRouter<TServices extends readonly (AxAIService | AxAIServiceListItem<any, any, any>)[] = readonly AxAIService[], TModelKey = ExtractAllModelKeys<TServices>> implements AxAIService<unknown, unknown, TModelKey> {
7321
- private options?;
7322
- private lastUsedService?;
7323
- private services;
7324
- /**
7325
- * Constructs a new multi-service router.
7326
- * It validates that each service provides a unique set of model keys,
7327
- * then builds a lookup (map) for routing the chat/embed requests.
7328
- */
7329
- constructor(services: TServices);
7330
- /**
7331
- * Static factory method for type-safe multi-service router creation with automatic model key inference.
7332
- */
7333
- static create<const TServices extends readonly (AxAIService | AxAIServiceListItem<any, any, any>)[]>(services: TServices): AxMultiServiceRouter<TServices, ExtractAllModelKeys<TServices>>;
7334
- getLastUsedChatModel(): unknown | undefined;
7335
- getLastUsedEmbedModel(): unknown | undefined;
7336
- getLastUsedModelConfig(): AxModelConfig | undefined;
7337
- /**
7338
- * Delegates the chat call to the service matching the provided model key.
7339
- */
7340
- chat(req: Readonly<AxChatRequest<TModelKey>>, options?: Readonly<AxAIServiceOptions>): Promise<AxChatResponse | ReadableStream<AxChatResponse>>;
7341
- /**
7342
- * Delegates the embed call to the service matching the provided embed model key.
7343
- */
7344
- embed(req: Readonly<AxEmbedRequest<TModelKey>>, options?: Readonly<AxAIServiceOptions>): Promise<AxEmbedResponse>;
7345
- /**
7346
- * Returns a composite ID built from the IDs of the underlying services.
7347
- */
7348
- getId(): string;
7349
- /**
7350
- * Returns the name of this router.
7351
- */
7352
- getName(): string;
7353
- /**
7354
- * Aggregates all available models across the underlying services.
7355
- */
7356
- getModelList(): AxAIModelList<TModelKey>;
7357
- /**
7358
- * If a model key is provided, delegate to the corresponding service's features.
7359
- * Otherwise, returns a default feature set.
7360
- */
7361
- getFeatures(model?: TModelKey): AxAIFeatures;
7362
- /**
7363
- * Returns aggregated metrics from the underlying service.
7364
- * Uses the metrics from the last service that was used,
7365
- * or falls back to the first service if none has been used.
7366
- */
7367
- getMetrics(): AxAIServiceMetrics;
7368
- getEstimatedCost(modelUsage?: AxModelUsage): number;
7369
- /**
7370
- * Sets options on all underlying services.
7371
- */
7372
- setOptions(options: Readonly<AxAIServiceOptions>): void;
7373
- /**
7374
- * Returns the options from the last used service,
7375
- * or falls back to the first service if none has been used.
7376
- */
7377
- getOptions(): Readonly<AxAIServiceOptions>;
7378
- /**
7379
- * Returns the logger from the last used service,
7380
- * or falls back to the first service if none has been used.
7381
- */
7382
- getLogger(): AxLoggerFunction;
7383
- /**
7384
- * Sets a service entry for a given key. This method is intended for testing purposes.
7385
- * @param key - The model key
7386
- * @param entry - The service entry to set
7387
- */
7388
- setServiceEntry(key: TModelKey, entry: {
7389
- isInternal?: boolean;
7390
- description: string;
7391
- model?: string;
7392
- embedModel?: string;
7393
- service: AxAIService<unknown, unknown, TModelKey>;
7394
- }): void;
7395
- }
7396
-
7397
7418
  /**
7398
7419
  * Configuration type for Ollama AI service
7399
7420
  */
@@ -7438,15 +7459,6 @@ declare class AxAIOllama<TModelKey> extends AxAIOpenAIBase<string, string, TMode
7438
7459
  constructor({ apiKey, url, config, options, models, }: Readonly<Omit<AxAIOllamaArgs<TModelKey>, 'name'>>);
7439
7460
  }
7440
7461
 
7441
- /**
7442
- * OpenAI: Model information
7443
- */
7444
- declare const axModelInfoOpenAI: AxModelInfo[];
7445
- /**
7446
- * OpenAI: Model information
7447
- */
7448
- declare const axModelInfoOpenAIResponses: AxModelInfo[];
7449
-
7450
7462
  declare enum AxAIOpenAIResponsesModel {
7451
7463
  GPT4 = "gpt-4",
7452
7464
  GPT41 = "gpt-4.1",
@@ -7960,28 +7972,6 @@ interface AxAIOpenAIResponsesMCPToolCall extends AxAIOpenAIResponsesToolCallBase
7960
7972
  }
7961
7973
  type AxAIOpenAIResponsesToolCall = AxAIOpenAIResponsesFunctionCallItem | AxAIOpenAIResponsesFileSearchToolCall | AxAIOpenAIResponsesWebSearchToolCall | AxAIOpenAIResponsesComputerToolCall | AxAIOpenAIResponsesCodeInterpreterToolCall | AxAIOpenAIResponsesImageGenerationToolCall | AxAIOpenAIResponsesLocalShellToolCall | AxAIOpenAIResponsesMCPToolCall;
7962
7974
 
7963
- declare class AxAIOpenAIResponsesImpl<TModel, TEmbedModel, // Kept for interface compatibility, but not used by this impl.
7964
- TResponsesReq extends AxAIOpenAIResponsesRequest<TModel>> implements AxAIServiceImpl<TModel, TEmbedModel, Readonly<AxAIOpenAIResponsesRequest<TModel>>, // ChatReq (now ResponsesReq)
7965
- Readonly<AxAIOpenAIEmbedRequest<TEmbedModel>>, // EmbedReq
7966
- Readonly<AxAIOpenAIResponsesResponse>, // ChatResp (now ResponsesResp)
7967
- Readonly<AxAIOpenAIResponsesResponseDelta>, // ChatRespDelta (now ResponsesRespDelta)
7968
- Readonly<AxAIOpenAIEmbedResponse>> {
7969
- private readonly config;
7970
- private readonly streamingUsage;
7971
- private readonly responsesReqUpdater?;
7972
- private tokensUsed;
7973
- constructor(config: Readonly<AxAIOpenAIResponsesConfig<TModel, TEmbedModel>>, streamingUsage: boolean, // If /v1/responses supports include_usage for streams
7974
- responsesReqUpdater?: ResponsesReqUpdater<TModel, TResponsesReq> | undefined);
7975
- getTokenUsage(): Readonly<AxTokenUsage> | undefined;
7976
- getModelConfig(): Readonly<AxModelConfig>;
7977
- private mapInternalContentToResponsesInput;
7978
- private createResponsesReqInternalInput;
7979
- createChatReq(req: Readonly<AxInternalChatRequest<TModel>>, config: Readonly<AxAIServiceOptions>): [Readonly<AxAPI>, Readonly<AxAIOpenAIResponsesRequest<TModel>>];
7980
- createChatResp(resp: Readonly<AxAIOpenAIResponsesResponse>): Readonly<AxChatResponse>;
7981
- createChatStreamResp: (streamEvent: Readonly<AxAIOpenAIResponsesResponseDelta>) => Readonly<AxChatResponse>;
7982
- createEmbedReq(req: Readonly<AxInternalEmbedRequest<TEmbedModel>>): [AxAPI, AxAIOpenAIEmbedRequest<TEmbedModel>];
7983
- }
7984
-
7985
7975
  declare const axAIOpenAIResponsesDefaultConfig: () => AxAIOpenAIResponsesConfig<AxAIOpenAIResponsesModel, AxAIOpenAIEmbedModel>;
7986
7976
  declare const axAIOpenAIResponsesBestConfig: () => AxAIOpenAIResponsesConfig<AxAIOpenAIResponsesModel, AxAIOpenAIEmbedModel>;
7987
7977
  declare const axAIOpenAIResponsesCreativeConfig: () => AxAIOpenAIResponsesConfig<AxAIOpenAIResponsesModel, AxAIOpenAIEmbedModel>;
@@ -8113,240 +8103,6 @@ declare class AxAIReka<TModelKey> extends AxBaseAI<AxAIRekaModel, undefined, AxA
8113
8103
  constructor({ apiKey, config, options, apiURL, modelInfo, models, }: Readonly<Omit<AxAIRekaArgs<TModelKey>, 'name'>>);
8114
8104
  }
8115
8105
 
8116
- /**
8117
- * OpenAI: Model information
8118
- */
8119
- declare const axModelInfoReka: AxModelInfo[];
8120
-
8121
- /**
8122
- * Services for converting unsupported content types to text or optimized formats
8123
- */
8124
- interface AxContentProcessingServices {
8125
- /** Service to convert images to text descriptions */
8126
- imageToText?: (imageData: string) => Promise<string>;
8127
- /** Service to convert audio to text transcriptions */
8128
- audioToText?: (audioData: string, format?: string) => Promise<string>;
8129
- /** Service to extract text from files */
8130
- fileToText?: (fileData: string, mimeType: string) => Promise<string>;
8131
- /** Service to fetch and extract text from URLs */
8132
- urlToText?: (url: string) => Promise<string>;
8133
- /** Service to optimize images for size/quality */
8134
- imageOptimization?: (imageData: string, options: OptimizationOptions) => Promise<string>;
8135
- }
8136
- /**
8137
- * Options for image optimization processing
8138
- */
8139
- interface OptimizationOptions {
8140
- /** Image quality (0-100) */
8141
- quality?: number;
8142
- /** Maximum file size in bytes */
8143
- maxSize?: number;
8144
- /** Target image format */
8145
- format?: 'jpeg' | 'png' | 'webp';
8146
- }
8147
- /**
8148
- * Configuration for multi-provider routing with fallback capabilities
8149
- */
8150
- interface AxMultiProviderConfig {
8151
- /** Provider hierarchy for routing */
8152
- providers: {
8153
- /** Primary provider to try first */
8154
- primary: AxAIService;
8155
- /** Alternative providers for fallback */
8156
- alternatives: AxAIService[];
8157
- };
8158
- /** Routing behavior configuration */
8159
- routing: {
8160
- /** Order of preferences when selecting providers */
8161
- preferenceOrder: ('capability' | 'cost' | 'speed' | 'quality')[];
8162
- /** Capability matching requirements */
8163
- capability: {
8164
- /** Only use providers with full capability support */
8165
- requireExactMatch: boolean;
8166
- /** Allow providers that require content processing fallbacks */
8167
- allowDegradation: boolean;
8168
- };
8169
- };
8170
- /** Content processing services for unsupported media types */
8171
- processing: AxContentProcessingServices;
8172
- }
8173
- /**
8174
- * Result of the routing process including provider selection and processing information
8175
- */
8176
- interface AxRoutingResult {
8177
- /** The selected AI service provider */
8178
- provider: AxAIService;
8179
- /** List of content processing steps that were applied */
8180
- processingApplied: string[];
8181
- /** List of capability degradations that occurred */
8182
- degradations: string[];
8183
- /** Non-critical warnings about the routing decision */
8184
- warnings: string[];
8185
- }
8186
- /**
8187
- * Multi-provider router that automatically selects optimal AI providers and handles content processing.
8188
- *
8189
- * The router analyzes requests to determine capability requirements, scores available providers,
8190
- * and automatically handles content transformation for unsupported media types. It provides
8191
- * graceful degradation and fallback mechanisms for robust multi-modal AI applications.
8192
- *
8193
- * @example
8194
- * ```typescript
8195
- * const router = new AxProviderRouter({
8196
- * providers: {
8197
- * primary: openaiProvider,
8198
- * alternatives: [geminiProvider, cohereProvider]
8199
- * },
8200
- * routing: {
8201
- * preferenceOrder: ['capability', 'quality'],
8202
- * capability: {
8203
- * requireExactMatch: false,
8204
- * allowDegradation: true
8205
- * }
8206
- * },
8207
- * processing: {
8208
- * imageToText: async (data) => await visionService.describe(data),
8209
- * audioToText: async (data) => await speechService.transcribe(data)
8210
- * }
8211
- * });
8212
- *
8213
- * const result = await router.chat(multiModalRequest);
8214
- * console.log(`Used: ${result.routing.provider.getName()}`);
8215
- * ```
8216
- */
8217
- declare class AxProviderRouter {
8218
- private providers;
8219
- private processingServices;
8220
- private config;
8221
- /**
8222
- * Creates a new provider router with the specified configuration.
8223
- *
8224
- * @param config - Router configuration including providers, routing preferences, and processing services
8225
- */
8226
- constructor(config: AxMultiProviderConfig);
8227
- /**
8228
- * Routes a chat request to the most appropriate provider with automatic content processing.
8229
- *
8230
- * This method analyzes the request, selects the optimal provider, preprocesses content
8231
- * for compatibility, and executes the request with fallback support.
8232
- *
8233
- * @param request - The chat request to process
8234
- * @param options - Extended options including fallback providers and routing preferences
8235
- * @param options.fallbackProviders - Additional providers to try if primary selection fails
8236
- * @param options.processingOptions - Content processing options and conversion services
8237
- * @param options.routingOptions - Provider selection and routing behavior options
8238
- * @param options.routingOptions.requireExactMatch - Only use providers with full capability support
8239
- * @param options.routingOptions.allowDegradation - Allow content processing for unsupported types
8240
- * @param options.routingOptions.maxRetries - Maximum number of fallback providers to try
8241
- * @returns Promise resolving to the AI response and routing information
8242
- * @throws AxMediaNotSupportedError when no suitable provider can handle the request
8243
- *
8244
- * @example
8245
- * ```typescript
8246
- * const result = await router.chat(
8247
- * { chatPrompt: [{ role: 'user', content: [{ type: 'image', image: '...' }] }] },
8248
- * {
8249
- * processingOptions: { fallbackBehavior: 'degrade' },
8250
- * routingOptions: { allowDegradation: true }
8251
- * }
8252
- * );
8253
- *
8254
- * console.log(`Provider: ${result.routing.provider.getName()}`);
8255
- * console.log(`Processing applied: ${result.routing.processingApplied}`);
8256
- * ```
8257
- */
8258
- chat(request: AxChatRequest, options?: AxAIServiceOptions & {
8259
- fallbackProviders?: AxAIService[];
8260
- processingOptions?: ProcessingOptions;
8261
- routingOptions?: {
8262
- requireExactMatch?: boolean;
8263
- allowDegradation?: boolean;
8264
- maxRetries?: number;
8265
- };
8266
- }): Promise<{
8267
- response: AxChatResponse | ReadableStream<AxChatResponse>;
8268
- routing: AxRoutingResult;
8269
- }>;
8270
- /**
8271
- * Preprocesses request content for the target provider
8272
- */
8273
- private preprocessRequest;
8274
- /**
8275
- * Selects provider with graceful degradation
8276
- */
8277
- private selectProviderWithDegradation;
8278
- /**
8279
- * Tries fallback providers when primary provider fails
8280
- */
8281
- private tryFallbackProviders;
8282
- /**
8283
- * Gets routing recommendation without executing the request.
8284
- *
8285
- * Analyzes the request and returns routing information including which provider
8286
- * would be selected, what processing would be applied, and any degradations or warnings.
8287
- *
8288
- * @param request - The chat request to analyze
8289
- * @returns Promise resolving to routing result with provider selection and processing info
8290
- *
8291
- * @example
8292
- * ```typescript
8293
- * const recommendation = await router.getRoutingRecommendation(request);
8294
- * console.log(`Would use: ${recommendation.provider.getName()}`);
8295
- * console.log(`Degradations: ${recommendation.degradations.join(', ')}`);
8296
- * ```
8297
- */
8298
- getRoutingRecommendation(request: AxChatRequest): Promise<AxRoutingResult>;
8299
- /**
8300
- * Validates whether the configured providers can handle a specific request.
8301
- *
8302
- * Performs pre-flight validation to check if the request can be successfully
8303
- * processed by available providers, identifies potential issues, and provides
8304
- * recommendations for improving compatibility.
8305
- *
8306
- * @param request - The chat request to validate
8307
- * @returns Promise resolving to validation result with handling capability and recommendations
8308
- *
8309
- * @example
8310
- * ```typescript
8311
- * const validation = await router.validateRequest(request);
8312
- * if (!validation.canHandle) {
8313
- * console.log('Issues:', validation.issues);
8314
- * console.log('Recommendations:', validation.recommendations);
8315
- * }
8316
- * ```
8317
- */
8318
- validateRequest(request: AxChatRequest): Promise<{
8319
- canHandle: boolean;
8320
- issues: string[];
8321
- recommendations: string[];
8322
- }>;
8323
- /**
8324
- * Gets detailed statistics about the router's provider capabilities.
8325
- *
8326
- * Returns information about available providers, their supported capabilities,
8327
- * and routing recommendations for analysis and debugging purposes.
8328
- *
8329
- * @returns Object containing provider statistics and capability matrix
8330
- *
8331
- * @example
8332
- * ```typescript
8333
- * const stats = router.getRoutingStats();
8334
- * console.log(`Total providers: ${stats.totalProviders}`);
8335
- * console.log('Capabilities:');
8336
- * for (const [capability, providers] of Object.entries(stats.capabilityMatrix)) {
8337
- * console.log(` ${capability}: ${providers.join(', ')}`);
8338
- * }
8339
- * ```
8340
- */
8341
- getRoutingStats(): {
8342
- totalProviders: number;
8343
- capabilityMatrix: {
8344
- [capability: string]: string[];
8345
- };
8346
- recommendedProvider: string;
8347
- };
8348
- }
8349
-
8350
8106
  declare enum AxAITogetherModel {
8351
8107
  KimiK25 = "moonshotai/Kimi-K2.5",
8352
8108
  KimiK2Instruct0905 = "moonshotai/Kimi-K2-Instruct-0905",
@@ -8376,22 +8132,6 @@ declare class AxAITogether<TModelKey> extends AxAIOpenAIBase<AxAITogetherChatMod
8376
8132
  constructor({ apiKey, config, options, models, modelInfo, }: Readonly<Omit<AxAITogetherArgs<TModelKey>, 'name'>>);
8377
8133
  }
8378
8134
 
8379
- declare const axModelInfoTogether: AxModelInfo[];
8380
-
8381
- type AxChatRequestMessage = AxChatRequest['chatPrompt'][number];
8382
- /**
8383
- * Validates a chat request message item to ensure it meets the required criteria
8384
- * @param item - The chat request message to validate
8385
- * @throws {Error} When validation fails with a descriptive error message
8386
- */
8387
- declare function axValidateChatRequestMessage(item: AxChatRequestMessage): void;
8388
- /**
8389
- * Validates a chat response result to ensure it meets the required criteria
8390
- * @param results - The chat response results to validate (single result or array)
8391
- * @throws {Error} When validation fails with a descriptive error message
8392
- */
8393
- declare function axValidateChatResponseResult(results: Readonly<AxChatResponseResult[]> | Readonly<AxChatResponseResult>): void;
8394
-
8395
8135
  /**
8396
8136
  * WebLLM: Models for text generation
8397
8137
  * Based on WebLLM's supported models
@@ -8566,14 +8306,20 @@ declare class AxAIWebLLM<TModelKey> extends AxBaseAI<AxAIWebLLMModel, AxAIWebLLM
8566
8306
  constructor({ engine, config, options, models, }: Readonly<Omit<AxAIWebLLMArgs<TModelKey>, 'name'>>);
8567
8307
  }
8568
8308
 
8569
- /**
8570
- * WebLLM model information
8571
- * Note: WebLLM runs models locally in the browser, so there are no API costs
8572
- * However, we include context window and capability information
8573
- */
8574
- declare const axModelInfoWebLLM: AxModelInfo[];
8575
-
8576
8309
  declare enum AxAIGrokModel {
8310
+ Grok43 = "grok-4.3",
8311
+ Grok43Latest = "grok-4.3-latest",
8312
+ GrokLatest = "grok-latest",
8313
+ Grok420Reasoning = "grok-4.20-reasoning",
8314
+ Grok420Reasoning0309 = "grok-4.20-0309-reasoning",
8315
+ Grok420NonReasoning = "grok-4.20-non-reasoning",
8316
+ Grok420NonReasoning0309 = "grok-4.20-0309-non-reasoning",
8317
+ Grok420MultiAgent = "grok-4.20-multi-agent",
8318
+ Grok420MultiAgent0309 = "grok-4.20-multi-agent-0309",
8319
+ Grok41FastReasoning = "grok-4-1-fast-reasoning",
8320
+ Grok41FastNonReasoning = "grok-4-1-fast-non-reasoning",
8321
+ GrokVoiceThinkFast = "grok-voice-think-fast-1.0",
8322
+ GrokVoiceFast = "grok-voice-fast-1.0",
8577
8323
  Grok3 = "grok-3",
8578
8324
  Grok3Mini = "grok-3-mini",
8579
8325
  Grok3Fast = "grok-3-fast",
@@ -8585,6 +8331,11 @@ declare enum AxAIGrokEmbedModels {
8585
8331
 
8586
8332
  declare const axAIGrokDefaultConfig: () => AxAIOpenAIConfig<AxAIGrokModel, AxAIGrokEmbedModels>;
8587
8333
  declare const axAIGrokBestConfig: () => AxAIOpenAIConfig<AxAIGrokModel, AxAIGrokEmbedModels>;
8334
+ declare const axAIGrokVoiceDefaultConfig: () => AxAIOpenAIConfig<AxAIGrokModel, AxAIGrokEmbedModels>;
8335
+ declare const axIsGrokVoiceModel: (model: string) => boolean;
8336
+ declare const axResolveGrokRealtimeAudioConfig: (providerAudio?: Readonly<AxChatAudioConfig>, requestAudio?: Readonly<AxChatAudioConfig>) => AxChatAudioConfig;
8337
+ declare const axShouldUseGrokRealtime: (model: string, providerAudio?: Readonly<AxChatAudioConfig>, requestAudio?: Readonly<AxChatAudioConfig>) => boolean;
8338
+ declare const axCreateGrokRealtimeApi: <TModel>(realtimeRequest: OpenAIRealtimeRequest<TModel>) => AxAPI;
8588
8339
  interface AxAIGrokSearchSource {
8589
8340
  type: 'web' | 'x' | 'news' | 'rss';
8590
8341
  country?: string;
@@ -8749,6 +8500,515 @@ declare class AxAI<TModelKey = string> implements AxAIService<any, any, TModelKe
8749
8500
  getLogger(): AxLoggerFunction;
8750
8501
  }
8751
8502
 
8503
+ type AxAIModelCatalogProviderName = AxAIArgs<string>['name'];
8504
+ type AxAIModelCatalogModelCapabilities = {
8505
+ thinkingBudget: boolean;
8506
+ showThoughts: boolean;
8507
+ structuredOutputs: boolean;
8508
+ temperature: boolean;
8509
+ topP: boolean;
8510
+ audioInput: boolean;
8511
+ audioOutput: boolean;
8512
+ };
8513
+ type AxAIModelCatalogAudioSupport = {
8514
+ input?: boolean;
8515
+ output?: boolean;
8516
+ };
8517
+ type AxAIModelCatalogModelType = 'text' | 'embeddings' | 'code' | 'audio';
8518
+ type AxAIModelCatalogFilter = 'all' | AxAIModelCatalogModelType;
8519
+ type AxAIModelCatalogModel = AxModelInfo & {
8520
+ provider: AxAIModelCatalogProviderName;
8521
+ audio?: AxAIModelCatalogAudioSupport;
8522
+ type: AxAIModelCatalogModelType;
8523
+ isDefault: boolean;
8524
+ capabilities: AxAIModelCatalogModelCapabilities;
8525
+ };
8526
+ type AxAIModelCatalogProvider = {
8527
+ name: AxAIModelCatalogProviderName;
8528
+ displayName: string;
8529
+ defaultModel?: string;
8530
+ defaultEmbedModel?: string;
8531
+ isDynamic: boolean;
8532
+ models: AxAIModelCatalogModel[];
8533
+ };
8534
+ type AxAIModelCatalogOptions = {
8535
+ type?: AxAIModelCatalogFilter | readonly AxAIModelCatalogFilter[];
8536
+ };
8537
+ /**
8538
+ * Returns the static Ax AI provider/model catalog.
8539
+ *
8540
+ * The catalog is built from bundled Ax metadata and does not fetch live provider
8541
+ * pricing. Dynamic providers can support arbitrary user-selected models or
8542
+ * deployments, so their model lists are intentionally empty or static-limited.
8543
+ */
8544
+ declare const axGetSupportedAIModels: (options?: Readonly<AxAIModelCatalogOptions>) => AxAIModelCatalogProvider[];
8545
+
8546
+ declare const axModelInfoCohere: AxModelInfo[];
8547
+
8548
+ declare const axModelInfoDeepSeek: AxModelInfo[];
8549
+
8550
+ /**
8551
+ * AxAIGoogleGemini: Model information
8552
+ */
8553
+ declare const axModelInfoGoogleGemini: AxModelInfo[];
8554
+
8555
+ /**
8556
+ * AxAIGroq: Model information
8557
+ */
8558
+ declare const axModelInfoGroq: AxModelInfo[];
8559
+
8560
+ /**
8561
+ * HuggingFace: Model information
8562
+ */
8563
+ declare const axModelInfoHuggingFace: AxModelInfo[];
8564
+
8565
+ interface AxAIMetricsInstruments {
8566
+ latencyHistogram?: Histogram;
8567
+ errorCounter?: Counter;
8568
+ requestCounter?: Counter;
8569
+ tokenCounter?: Counter;
8570
+ inputTokenCounter?: Counter;
8571
+ outputTokenCounter?: Counter;
8572
+ errorRateGauge?: Gauge;
8573
+ meanLatencyGauge?: Gauge;
8574
+ p95LatencyGauge?: Gauge;
8575
+ p99LatencyGauge?: Gauge;
8576
+ streamingRequestsCounter?: Counter;
8577
+ functionCallsCounter?: Counter;
8578
+ functionCallLatencyHistogram?: Histogram;
8579
+ requestSizeHistogram?: Histogram;
8580
+ responseSizeHistogram?: Histogram;
8581
+ temperatureGauge?: Gauge;
8582
+ maxTokensGauge?: Gauge;
8583
+ estimatedCostCounter?: Counter;
8584
+ promptLengthHistogram?: Histogram;
8585
+ contextWindowUsageGauge?: Gauge;
8586
+ timeoutsCounter?: Counter;
8587
+ abortsCounter?: Counter;
8588
+ thinkingBudgetUsageCounter?: Counter;
8589
+ multimodalRequestsCounter?: Counter;
8590
+ cacheReadTokensCounter?: Counter;
8591
+ cacheWriteTokensCounter?: Counter;
8592
+ }
8593
+
8594
+ declare const axModelInfoMistral: AxModelInfo[];
8595
+
8596
+ type AxMockAIServiceConfig<TModelKey> = {
8597
+ name?: string;
8598
+ id?: string;
8599
+ modelInfo?: Partial<AxModelInfoWithProvider>;
8600
+ embedModelInfo?: AxModelInfoWithProvider;
8601
+ features?: {
8602
+ functions?: boolean;
8603
+ streaming?: boolean;
8604
+ structuredOutputs?: boolean;
8605
+ media?: Partial<AxAIFeatures['media']>;
8606
+ };
8607
+ models?: AxAIModelList<TModelKey>;
8608
+ options?: AxAIServiceOptions;
8609
+ chatResponse?: AxChatResponse | ReadableStream<AxChatResponse> | (() => Promise<AxChatResponse | ReadableStream<AxChatResponse>>) | ((req: Readonly<AxChatRequest<unknown>>, options?: Readonly<AxAIServiceOptions>) => Promise<AxChatResponse | ReadableStream<AxChatResponse>>);
8610
+ embedResponse?: AxEmbedResponse | ((req: Readonly<AxEmbedRequest>) => AxEmbedResponse | Promise<AxEmbedResponse>);
8611
+ shouldError?: boolean;
8612
+ errorMessage?: string;
8613
+ latencyMs?: number;
8614
+ };
8615
+ declare class AxMockAIService<TModelKey> implements AxAIService<unknown, unknown, TModelKey> {
8616
+ private readonly config;
8617
+ private metrics;
8618
+ constructor(config?: AxMockAIServiceConfig<TModelKey>);
8619
+ getLastUsedChatModel(): unknown;
8620
+ getLastUsedEmbedModel(): unknown;
8621
+ getLastUsedModelConfig(): AxModelConfig | undefined;
8622
+ getName(): string;
8623
+ getId(): string;
8624
+ getFeatures(_model?: string): AxAIFeatures;
8625
+ getModelList(): AxAIModelList<TModelKey> | undefined;
8626
+ getMetrics(): AxAIServiceMetrics;
8627
+ getEstimatedCost(): number;
8628
+ chat(req: Readonly<AxChatRequest<unknown>>, _options?: Readonly<AxAIServiceOptions>): Promise<AxChatResponse | ReadableStream<AxChatResponse>>;
8629
+ embed(req: Readonly<AxEmbedRequest>, _options?: Readonly<AxAIServiceOptions>): Promise<AxEmbedResponse>;
8630
+ setOptions(options: Readonly<AxAIServiceOptions>): void;
8631
+ getOptions(): Readonly<AxAIServiceOptions>;
8632
+ getLogger(): AxLoggerFunction;
8633
+ private updateMetrics;
8634
+ }
8635
+
8636
+ type AxAIServiceListItem<TModel = unknown, TEmbedModel = unknown, TModelKey = string> = {
8637
+ key: TModelKey;
8638
+ service: AxAIService<TModel, TEmbedModel, TModelKey>;
8639
+ description: string;
8640
+ isInternal?: boolean;
8641
+ };
8642
+ type ExtractServiceModelKeys<T> = T extends AxAIService<any, any, infer K> ? K : T extends AxAIServiceListItem<any, any, infer K> ? K : never;
8643
+ type ExtractAllModelKeys<T extends readonly any[]> = T extends readonly [
8644
+ infer First,
8645
+ ...infer Rest
8646
+ ] ? ExtractServiceModelKeys<First> | ExtractAllModelKeys<Rest> : never;
8647
+ declare class AxMultiServiceRouter<TServices extends readonly (AxAIService | AxAIServiceListItem<any, any, any>)[] = readonly AxAIService[], TModelKey = ExtractAllModelKeys<TServices>> implements AxAIService<unknown, unknown, TModelKey> {
8648
+ private options?;
8649
+ private lastUsedService?;
8650
+ private services;
8651
+ /**
8652
+ * Constructs a new multi-service router.
8653
+ * It validates that each service provides a unique set of model keys,
8654
+ * then builds a lookup (map) for routing the chat/embed requests.
8655
+ */
8656
+ constructor(services: TServices);
8657
+ /**
8658
+ * Static factory method for type-safe multi-service router creation with automatic model key inference.
8659
+ */
8660
+ static create<const TServices extends readonly (AxAIService | AxAIServiceListItem<any, any, any>)[]>(services: TServices): AxMultiServiceRouter<TServices, ExtractAllModelKeys<TServices>>;
8661
+ getLastUsedChatModel(): unknown | undefined;
8662
+ getLastUsedEmbedModel(): unknown | undefined;
8663
+ getLastUsedModelConfig(): AxModelConfig | undefined;
8664
+ /**
8665
+ * Delegates the chat call to the service matching the provided model key.
8666
+ */
8667
+ chat(req: Readonly<AxChatRequest<TModelKey>>, options?: Readonly<AxAIServiceOptions>): Promise<AxChatResponse | ReadableStream<AxChatResponse>>;
8668
+ /**
8669
+ * Delegates the embed call to the service matching the provided embed model key.
8670
+ */
8671
+ embed(req: Readonly<AxEmbedRequest<TModelKey>>, options?: Readonly<AxAIServiceOptions>): Promise<AxEmbedResponse>;
8672
+ /**
8673
+ * Returns a composite ID built from the IDs of the underlying services.
8674
+ */
8675
+ getId(): string;
8676
+ /**
8677
+ * Returns the name of this router.
8678
+ */
8679
+ getName(): string;
8680
+ /**
8681
+ * Aggregates all available models across the underlying services.
8682
+ */
8683
+ getModelList(): AxAIModelList<TModelKey>;
8684
+ /**
8685
+ * If a model key is provided, delegate to the corresponding service's features.
8686
+ * Otherwise, returns a default feature set.
8687
+ */
8688
+ getFeatures(model?: TModelKey): AxAIFeatures;
8689
+ /**
8690
+ * Returns aggregated metrics from the underlying service.
8691
+ * Uses the metrics from the last service that was used,
8692
+ * or falls back to the first service if none has been used.
8693
+ */
8694
+ getMetrics(): AxAIServiceMetrics;
8695
+ getEstimatedCost(modelUsage?: AxModelUsage): number;
8696
+ /**
8697
+ * Sets options on all underlying services.
8698
+ */
8699
+ setOptions(options: Readonly<AxAIServiceOptions>): void;
8700
+ /**
8701
+ * Returns the options from the last used service,
8702
+ * or falls back to the first service if none has been used.
8703
+ */
8704
+ getOptions(): Readonly<AxAIServiceOptions>;
8705
+ /**
8706
+ * Returns the logger from the last used service,
8707
+ * or falls back to the first service if none has been used.
8708
+ */
8709
+ getLogger(): AxLoggerFunction;
8710
+ /**
8711
+ * Sets a service entry for a given key. This method is intended for testing purposes.
8712
+ * @param key - The model key
8713
+ * @param entry - The service entry to set
8714
+ */
8715
+ setServiceEntry(key: TModelKey, entry: {
8716
+ isInternal?: boolean;
8717
+ description: string;
8718
+ model?: string;
8719
+ embedModel?: string;
8720
+ service: AxAIService<unknown, unknown, TModelKey>;
8721
+ }): void;
8722
+ }
8723
+
8724
+ /**
8725
+ * OpenAI: Model information
8726
+ */
8727
+ declare const axModelInfoOpenAI: AxModelInfo[];
8728
+ /**
8729
+ * OpenAI: Model information
8730
+ */
8731
+ declare const axModelInfoOpenAIResponses: AxModelInfo[];
8732
+
8733
+ declare class AxAIOpenAIResponsesImpl<TModel, TEmbedModel, // Kept for interface compatibility, but not used by this impl.
8734
+ TResponsesReq extends AxAIOpenAIResponsesRequest<TModel>> implements AxAIServiceImpl<TModel, TEmbedModel, Readonly<AxAIOpenAIResponsesRequest<TModel>>, // ChatReq (now ResponsesReq)
8735
+ Readonly<AxAIOpenAIEmbedRequest<TEmbedModel>>, // EmbedReq
8736
+ Readonly<AxAIOpenAIResponsesResponse>, // ChatResp (now ResponsesResp)
8737
+ Readonly<AxAIOpenAIResponsesResponseDelta>, // ChatRespDelta (now ResponsesRespDelta)
8738
+ Readonly<AxAIOpenAIEmbedResponse>> {
8739
+ private readonly config;
8740
+ private readonly streamingUsage;
8741
+ private readonly responsesReqUpdater?;
8742
+ private tokensUsed;
8743
+ constructor(config: Readonly<AxAIOpenAIResponsesConfig<TModel, TEmbedModel>>, streamingUsage: boolean, // If /v1/responses supports include_usage for streams
8744
+ responsesReqUpdater?: ResponsesReqUpdater<TModel, TResponsesReq> | undefined);
8745
+ getTokenUsage(): Readonly<AxTokenUsage> | undefined;
8746
+ getModelConfig(): Readonly<AxModelConfig>;
8747
+ private mapInternalContentToResponsesInput;
8748
+ private createResponsesReqInternalInput;
8749
+ createChatReq(req: Readonly<AxInternalChatRequest<TModel>>, config: Readonly<AxAIServiceOptions>): [Readonly<AxAPI>, Readonly<AxAIOpenAIResponsesRequest<TModel>>];
8750
+ createChatResp(resp: Readonly<AxAIOpenAIResponsesResponse>): Readonly<AxChatResponse>;
8751
+ createChatStreamResp: (streamEvent: Readonly<AxAIOpenAIResponsesResponseDelta>) => Readonly<AxChatResponse>;
8752
+ createEmbedReq(req: Readonly<AxInternalEmbedRequest<TEmbedModel>>): [AxAPI, AxAIOpenAIEmbedRequest<TEmbedModel>];
8753
+ }
8754
+
8755
+ /**
8756
+ * OpenAI: Model information
8757
+ */
8758
+ declare const axModelInfoReka: AxModelInfo[];
8759
+
8760
+ /**
8761
+ * Services for converting unsupported content types to text or optimized formats
8762
+ */
8763
+ interface AxContentProcessingServices {
8764
+ /** Service to convert images to text descriptions */
8765
+ imageToText?: (imageData: string) => Promise<string>;
8766
+ /** Service to convert audio to text transcriptions */
8767
+ audioToText?: (audioData: string, format?: string) => Promise<string>;
8768
+ /** Service to extract text from files */
8769
+ fileToText?: (fileData: string, mimeType: string) => Promise<string>;
8770
+ /** Service to fetch and extract text from URLs */
8771
+ urlToText?: (url: string) => Promise<string>;
8772
+ /** Service to optimize images for size/quality */
8773
+ imageOptimization?: (imageData: string, options: OptimizationOptions) => Promise<string>;
8774
+ }
8775
+ /**
8776
+ * Options for image optimization processing
8777
+ */
8778
+ interface OptimizationOptions {
8779
+ /** Image quality (0-100) */
8780
+ quality?: number;
8781
+ /** Maximum file size in bytes */
8782
+ maxSize?: number;
8783
+ /** Target image format */
8784
+ format?: 'jpeg' | 'png' | 'webp';
8785
+ }
8786
+ /**
8787
+ * Configuration for multi-provider routing with fallback capabilities
8788
+ */
8789
+ interface AxMultiProviderConfig {
8790
+ /** Provider hierarchy for routing */
8791
+ providers: {
8792
+ /** Primary provider to try first */
8793
+ primary: AxAIService;
8794
+ /** Alternative providers for fallback */
8795
+ alternatives: AxAIService[];
8796
+ };
8797
+ /** Routing behavior configuration */
8798
+ routing: {
8799
+ /** Order of preferences when selecting providers */
8800
+ preferenceOrder: ('capability' | 'cost' | 'speed' | 'quality')[];
8801
+ /** Capability matching requirements */
8802
+ capability: {
8803
+ /** Only use providers with full capability support */
8804
+ requireExactMatch: boolean;
8805
+ /** Allow providers that require content processing fallbacks */
8806
+ allowDegradation: boolean;
8807
+ };
8808
+ };
8809
+ /** Content processing services for unsupported media types */
8810
+ processing: AxContentProcessingServices;
8811
+ }
8812
+ /**
8813
+ * Result of the routing process including provider selection and processing information
8814
+ */
8815
+ interface AxRoutingResult {
8816
+ /** The selected AI service provider */
8817
+ provider: AxAIService;
8818
+ /** List of content processing steps that were applied */
8819
+ processingApplied: string[];
8820
+ /** List of capability degradations that occurred */
8821
+ degradations: string[];
8822
+ /** Non-critical warnings about the routing decision */
8823
+ warnings: string[];
8824
+ }
8825
+ /**
8826
+ * Multi-provider router that automatically selects optimal AI providers and handles content processing.
8827
+ *
8828
+ * The router analyzes requests to determine capability requirements, scores available providers,
8829
+ * and automatically handles content transformation for unsupported media types. It provides
8830
+ * graceful degradation and fallback mechanisms for robust multi-modal AI applications.
8831
+ *
8832
+ * @example
8833
+ * ```typescript
8834
+ * const router = new AxProviderRouter({
8835
+ * providers: {
8836
+ * primary: openaiProvider,
8837
+ * alternatives: [geminiProvider, cohereProvider]
8838
+ * },
8839
+ * routing: {
8840
+ * preferenceOrder: ['capability', 'quality'],
8841
+ * capability: {
8842
+ * requireExactMatch: false,
8843
+ * allowDegradation: true
8844
+ * }
8845
+ * },
8846
+ * processing: {
8847
+ * imageToText: async (data) => await visionService.describe(data),
8848
+ * audioToText: async (data) => await speechService.transcribe(data)
8849
+ * }
8850
+ * });
8851
+ *
8852
+ * const result = await router.chat(multiModalRequest);
8853
+ * console.log(`Used: ${result.routing.provider.getName()}`);
8854
+ * ```
8855
+ */
8856
+ declare class AxProviderRouter {
8857
+ private providers;
8858
+ private processingServices;
8859
+ private config;
8860
+ /**
8861
+ * Creates a new provider router with the specified configuration.
8862
+ *
8863
+ * @param config - Router configuration including providers, routing preferences, and processing services
8864
+ */
8865
+ constructor(config: AxMultiProviderConfig);
8866
+ /**
8867
+ * Routes a chat request to the most appropriate provider with automatic content processing.
8868
+ *
8869
+ * This method analyzes the request, selects the optimal provider, preprocesses content
8870
+ * for compatibility, and executes the request with fallback support.
8871
+ *
8872
+ * @param request - The chat request to process
8873
+ * @param options - Extended options including fallback providers and routing preferences
8874
+ * @param options.fallbackProviders - Additional providers to try if primary selection fails
8875
+ * @param options.processingOptions - Content processing options and conversion services
8876
+ * @param options.routingOptions - Provider selection and routing behavior options
8877
+ * @param options.routingOptions.requireExactMatch - Only use providers with full capability support
8878
+ * @param options.routingOptions.allowDegradation - Allow content processing for unsupported types
8879
+ * @param options.routingOptions.maxRetries - Maximum number of fallback providers to try
8880
+ * @returns Promise resolving to the AI response and routing information
8881
+ * @throws AxMediaNotSupportedError when no suitable provider can handle the request
8882
+ *
8883
+ * @example
8884
+ * ```typescript
8885
+ * const result = await router.chat(
8886
+ * { chatPrompt: [{ role: 'user', content: [{ type: 'image', image: '...' }] }] },
8887
+ * {
8888
+ * processingOptions: { fallbackBehavior: 'degrade' },
8889
+ * routingOptions: { allowDegradation: true }
8890
+ * }
8891
+ * );
8892
+ *
8893
+ * console.log(`Provider: ${result.routing.provider.getName()}`);
8894
+ * console.log(`Processing applied: ${result.routing.processingApplied}`);
8895
+ * ```
8896
+ */
8897
+ chat(request: AxChatRequest, options?: AxAIServiceOptions & {
8898
+ fallbackProviders?: AxAIService[];
8899
+ processingOptions?: ProcessingOptions;
8900
+ routingOptions?: {
8901
+ requireExactMatch?: boolean;
8902
+ allowDegradation?: boolean;
8903
+ maxRetries?: number;
8904
+ };
8905
+ }): Promise<{
8906
+ response: AxChatResponse | ReadableStream<AxChatResponse>;
8907
+ routing: AxRoutingResult;
8908
+ }>;
8909
+ /**
8910
+ * Preprocesses request content for the target provider
8911
+ */
8912
+ private preprocessRequest;
8913
+ /**
8914
+ * Selects provider with graceful degradation
8915
+ */
8916
+ private selectProviderWithDegradation;
8917
+ /**
8918
+ * Tries fallback providers when primary provider fails
8919
+ */
8920
+ private tryFallbackProviders;
8921
+ /**
8922
+ * Gets routing recommendation without executing the request.
8923
+ *
8924
+ * Analyzes the request and returns routing information including which provider
8925
+ * would be selected, what processing would be applied, and any degradations or warnings.
8926
+ *
8927
+ * @param request - The chat request to analyze
8928
+ * @returns Promise resolving to routing result with provider selection and processing info
8929
+ *
8930
+ * @example
8931
+ * ```typescript
8932
+ * const recommendation = await router.getRoutingRecommendation(request);
8933
+ * console.log(`Would use: ${recommendation.provider.getName()}`);
8934
+ * console.log(`Degradations: ${recommendation.degradations.join(', ')}`);
8935
+ * ```
8936
+ */
8937
+ getRoutingRecommendation(request: AxChatRequest): Promise<AxRoutingResult>;
8938
+ /**
8939
+ * Validates whether the configured providers can handle a specific request.
8940
+ *
8941
+ * Performs pre-flight validation to check if the request can be successfully
8942
+ * processed by available providers, identifies potential issues, and provides
8943
+ * recommendations for improving compatibility.
8944
+ *
8945
+ * @param request - The chat request to validate
8946
+ * @returns Promise resolving to validation result with handling capability and recommendations
8947
+ *
8948
+ * @example
8949
+ * ```typescript
8950
+ * const validation = await router.validateRequest(request);
8951
+ * if (!validation.canHandle) {
8952
+ * console.log('Issues:', validation.issues);
8953
+ * console.log('Recommendations:', validation.recommendations);
8954
+ * }
8955
+ * ```
8956
+ */
8957
+ validateRequest(request: AxChatRequest): Promise<{
8958
+ canHandle: boolean;
8959
+ issues: string[];
8960
+ recommendations: string[];
8961
+ }>;
8962
+ /**
8963
+ * Gets detailed statistics about the router's provider capabilities.
8964
+ *
8965
+ * Returns information about available providers, their supported capabilities,
8966
+ * and routing recommendations for analysis and debugging purposes.
8967
+ *
8968
+ * @returns Object containing provider statistics and capability matrix
8969
+ *
8970
+ * @example
8971
+ * ```typescript
8972
+ * const stats = router.getRoutingStats();
8973
+ * console.log(`Total providers: ${stats.totalProviders}`);
8974
+ * console.log('Capabilities:');
8975
+ * for (const [capability, providers] of Object.entries(stats.capabilityMatrix)) {
8976
+ * console.log(` ${capability}: ${providers.join(', ')}`);
8977
+ * }
8978
+ * ```
8979
+ */
8980
+ getRoutingStats(): {
8981
+ totalProviders: number;
8982
+ capabilityMatrix: {
8983
+ [capability: string]: string[];
8984
+ };
8985
+ recommendedProvider: string;
8986
+ };
8987
+ }
8988
+
8989
+ declare const axModelInfoTogether: AxModelInfo[];
8990
+
8991
+ type AxChatRequestMessage = AxChatRequest['chatPrompt'][number];
8992
+ /**
8993
+ * Validates a chat request message item to ensure it meets the required criteria
8994
+ * @param item - The chat request message to validate
8995
+ * @throws {Error} When validation fails with a descriptive error message
8996
+ */
8997
+ declare function axValidateChatRequestMessage(item: AxChatRequestMessage): void;
8998
+ /**
8999
+ * Validates a chat response result to ensure it meets the required criteria
9000
+ * @param results - The chat response results to validate (single result or array)
9001
+ * @throws {Error} When validation fails with a descriptive error message
9002
+ */
9003
+ declare function axValidateChatResponseResult(results: Readonly<AxChatResponseResult[]> | Readonly<AxChatResponseResult>): void;
9004
+
9005
+ /**
9006
+ * WebLLM model information
9007
+ * Note: WebLLM runs models locally in the browser, so there are no API costs
9008
+ * However, we include context window and capability information
9009
+ */
9010
+ declare const axModelInfoWebLLM: AxModelInfo[];
9011
+
8752
9012
  declare const axModelInfoGrok: AxModelInfo[];
8753
9013
 
8754
9014
  type AxDBUpsertRequest = {
@@ -12396,4 +12656,4 @@ declare class AxRateLimiterTokenUsage {
12396
12656
  acquire(tokens: number): Promise<void>;
12397
12657
  }
12398
12658
 
12399
- export { AxACE, type AxACEBullet, type AxACECuratorOperation, type AxACECuratorOperationType, type AxACECuratorOutput, type AxACEFeedbackEvent, type AxACEGeneratorOutput, type AxACEOptimizationArtifact, AxACEOptimizedProgram, type AxACEOptions, type AxACEPlaybook, type AxACEReflectionOutput, type AxACEResult, AxAI, AxAIAnthropic, type AxAIAnthropicArgs, type AxAIAnthropicChatError, type AxAIAnthropicChatRequest, type AxAIAnthropicChatRequestCacheParam, type AxAIAnthropicChatResponse, type AxAIAnthropicChatResponseDelta, type AxAIAnthropicConfig, type AxAIAnthropicContentBlockDeltaEvent, type AxAIAnthropicContentBlockStartEvent, type AxAIAnthropicContentBlockStopEvent, type AxAIAnthropicEffortLevel, type AxAIAnthropicEffortLevelMapping, type AxAIAnthropicErrorEvent, type AxAIAnthropicFunctionTool, type AxAIAnthropicMessageDeltaEvent, type AxAIAnthropicMessageStartEvent, type AxAIAnthropicMessageStopEvent, AxAIAnthropicModel, type AxAIAnthropicOutputConfig, type AxAIAnthropicPingEvent, type AxAIAnthropicRequestTool, type AxAIAnthropicThinkingConfig, type AxAIAnthropicThinkingTokenBudgetLevels, type AxAIAnthropicThinkingWire, AxAIAnthropicVertexModel, type AxAIAnthropicWebSearchTool, 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 AxAIGoogleGeminiCacheCreateRequest, type AxAIGoogleGeminiCacheResponse, type AxAIGoogleGeminiCacheUpdateRequest, type AxAIGoogleGeminiChatRequest, type AxAIGoogleGeminiChatResponse, type AxAIGoogleGeminiChatResponseDelta, type AxAIGoogleGeminiConfig, type AxAIGoogleGeminiContent, type AxAIGoogleGeminiContentPart, AxAIGoogleGeminiEmbedModel, AxAIGoogleGeminiEmbedTypes, type AxAIGoogleGeminiGenerationConfig, AxAIGoogleGeminiModel, type AxAIGoogleGeminiOptionsTools, type AxAIGoogleGeminiRetrievalConfig, AxAIGoogleGeminiSafetyCategory, type AxAIGoogleGeminiSafetySettings, AxAIGoogleGeminiSafetyThreshold, type AxAIGoogleGeminiThinkingConfig, type AxAIGoogleGeminiThinkingLevel, type AxAIGoogleGeminiThinkingLevelMapping, type AxAIGoogleGeminiThinkingTokenBudgetLevels, type AxAIGoogleGeminiTool, type AxAIGoogleGeminiToolConfig, type AxAIGoogleGeminiToolFunctionDeclaration, type AxAIGoogleGeminiToolGoogleMaps, 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, AxAIOpenRouter, type AxAIOpenRouterArgs, 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 AxAITogetherChatModel, AxAITogetherModel, AxAIWebLLM, type AxAIWebLLMArgs, type AxAIWebLLMChatRequest, type AxAIWebLLMChatResponse, type AxAIWebLLMChatResponseDelta, type AxAIWebLLMConfig, type AxAIWebLLMEmbedModel, type AxAIWebLLMEmbedRequest, type AxAIWebLLMEmbedResponse, AxAIWebLLMModel, type AxAPI, type AxAPIConfig, AxAgent, type AxAgentClarification, type AxAgentClarificationChoice, AxAgentClarificationError, type AxAgentClarificationKind, type AxAgentCompletionProtocol, type AxAgentConfig, type AxAgentDemos, type AxAgentDiscoveryPromptState, type AxAgentEvalDataset, type AxAgentEvalFunctionCall, type AxAgentEvalPrediction, type AxAgentEvalTask, type AxAgentExecutorResultPayload, type AxAgentExecutorTurnCallbackArgs, type AxAgentForwardOptions, type AxAgentFunction, type AxAgentFunctionCall, type AxAgentFunctionCallRecorder, type AxAgentFunctionCollection, type AxAgentFunctionExample, type AxAgentFunctionGroup, type AxAgentFunctionModuleMeta, type AxAgentGuidanceLogEntry, type AxAgentGuidancePayload, type AxAgentGuidanceState, type AxAgentIdentity, type AxAgentInputUpdateCallback, type AxAgentInternalCompletionPayload, type AxAgentJudgeEvalInput, type AxAgentJudgeEvalOutput, type AxAgentJudgeInput, type AxAgentJudgeOptions, type AxAgentJudgeOutput, type AxAgentMemoriesSearchFn, type AxAgentMemoryEntry, type AxAgentMemoryResult, type AxAgentOnFunctionCall, type AxAgentOptimizationTargetDescriptor, type AxAgentOptimizeOptions, type AxAgentOptimizeResult, type AxAgentOptimizeTarget, type AxAgentOptions, AxAgentProtocolCompletionSignal, type AxAgentRecursionOptions, type AxAgentRecursiveExpensiveNode, type AxAgentRecursiveFunctionCall, type AxAgentRecursiveNodeRole, type AxAgentRecursiveStats, type AxAgentRecursiveTargetId, type AxAgentRecursiveTraceNode, type AxAgentRecursiveTurn, type AxAgentRecursiveUsage, type AxAgentRuntimeCompletionState, type AxAgentRuntimeExecutionContext, type AxAgentRuntimeInputState, type AxAgentSkillResult, type AxAgentSkillsPromptState, type AxAgentSkillsSearchFn, type AxAgentState, type AxAgentStateActionLogEntry, type AxAgentStateCheckpointState, type AxAgentStateExecutorModelState, type AxAgentStateRuntimeEntry, type AxAgentStreamingForwardOptions, type AxAgentStructuredClarification, type AxAgentTestCompletionPayload, type AxAgentTestResult, type AxAgentUsage, type AxAgentic, type AxAnyAgentic, AxApacheTika, type AxApacheTikaArgs, type AxApacheTikaConvertOptions, type AxAssertion, AxAssertionError, AxBalancer, type AxBalancerOptions, AxBaseAI, type AxBaseAIArgs, AxBaseOptimizer, AxBootstrapFewShot, type AxBootstrapOptimizerOptions, type AxChatLogEntry, type AxChatLogMessage, type AxChatRequest, type AxChatResponse, type AxChatResponseFunctionCall, type AxChatResponseResult, type AxCheckpoint, type AxCheckpointLoadFn, type AxCheckpointSaveFn, type AxCitation, type AxCodeInterpreter, type AxCodeRuntime, type AxCodeSession, type AxCodeSessionSnapshot, type AxCodeSessionSnapshotEntry, type AxCompileOptions, AxContentProcessingError, type AxContentProcessingServices, type AxContextCacheInfo, type AxContextCacheOperation, type AxContextCacheOptions, type AxContextCacheRegistry, type AxContextCacheRegistryEntry, type AxContextFieldInput, type AxContextFieldPromptConfig, type AxContextPolicyBudget, type AxContextPolicyConfig, type AxContextPolicyPreset, 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, type AxDebugChatResponseUsage, AxDefaultCostTracker, AxDefaultResultReranker, type AxDiscoveryTurnSummary, type AxDockerContainer, AxDockerSession, type AxEmbedRequest, type AxEmbedResponse, AxEmbeddingAdapter, type AxErrorCategory, AxEvalUtil, type AxEvaluateArgs, type AxExample, type AxExamples, type AxExecutorModelPolicy, type AxExecutorModelPolicyEntry, type AxField, type AxFieldOptions, type AxFieldProcessor, type AxFieldProcessorProcess, type AxFieldTemplateFn, type AxFieldType, type AxFieldValue, AxFlow, type AxFlowAutoParallelConfig, type AxFlowBranchContext, type AxFlowBranchEvaluationData, type AxFlowCompleteData, AxFlowDependencyAnalyzer, type AxFlowDynamicContext, type AxFlowErrorData, AxFlowExecutionPlanner, type AxFlowExecutionStep, type AxFlowLogData, type AxFlowLoggerData, type AxFlowLoggerFunction, type AxFlowNodeDefinition, type AxFlowParallelBranch, type AxFlowParallelGroup, type AxFlowParallelGroupCompleteData, type AxFlowParallelGroupStartData, type AxFlowStartData, type AxFlowState, type AxFlowStepCompleteData, type AxFlowStepFunction, type AxFlowStepStartData, type AxFlowSubContext, AxFlowSubContextImpl, type AxFlowTypedParallelBranch, type AxFlowTypedSubContext, AxFlowTypedSubContextImpl, type AxFlowable, type AxFluentFieldInfo, AxFluentFieldType, type AxForwardable, type AxFunction, type AxFunctionCallRecord, type AxFunctionCallTrace, AxFunctionError, type AxFunctionHandler, type AxFunctionJSONSchema, AxFunctionProcessor, type AxFunctionResult, type AxFunctionResultFormatter, AxGEPA, type AxGEPAAdapter, type AxGEPABatchEvaluation, type AxGEPABatchRow, type AxGEPABootstrapOptions, type AxGEPAComponentBanditState, AxGEPAComponentSelector, type AxGEPAComponentTarget, type AxGEPAEvaluationBatch, type AxGEPAEvaluationState, type AxGEPAOptimizationReport, type AxGEPAReflectiveTuple, type AxGEPATraceSummary, type AxGEPATraceSummaryCall, AxGen, type AxGenDeltaOut, type AxGenIn, type AxGenInput, type AxGenMetricsInstruments, type AxGenOut, type AxGenOutput, type AxGenStreamingOut, AxGenerateError, type AxGenerateErrorDetails, type AxGenerateResult, AxHFDataLoader, type AxIField, type AxInputFunctionType, AxInstanceRegistry, type AxInternalChatRequest, type AxInternalEmbedRequest, AxJSRuntime, type AxJSRuntimeNodePermissionAllowlist, type AxJSRuntimeOutputMode, AxJSRuntimePermission, type AxJSRuntimeResourceLimits, type AxJudgeForwardOptions, type AxJudgeOptions, AxLLMRequestTypeValues, AxLearn, type AxLearnArtifact, type AxLearnCheckpointMode, type AxLearnCheckpointState, type AxLearnContinuousOptions, type AxLearnMode, type AxLearnOptimizeOptions, type AxLearnOptions, type AxLearnPlaybook, type AxLearnPlaybookOptions, type AxLearnPlaybookSummary, type AxLearnProgress, type AxLearnResult, type AxLearnUpdateFeedback, type AxLearnUpdateInput, type AxLearnUpdateOptions, type AxLlmQueryBudgetState, type AxLlmQueryPromptMode, type AxLoggerData, type AxLoggerFunction, type AxMCPBlobResourceContents, AxMCPClient, type AxMCPEmbeddedResource, type AxMCPFunctionDescription, AxMCPHTTPSSETransport, type AxMCPImageContent, type AxMCPInitializeParams, type AxMCPInitializeResult, type AxMCPJSONRPCErrorResponse, type AxMCPJSONRPCNotification, type AxMCPJSONRPCRequest, type AxMCPJSONRPCResponse, type AxMCPJSONRPCSuccessResponse, type AxMCPOAuthOptions, type AxMCPPrompt, type AxMCPPromptArgument, type AxMCPPromptGetResult, type AxMCPPromptMessage, type AxMCPPromptsListResult, type AxMCPResource, type AxMCPResourceReadResult, type AxMCPResourceTemplate, type AxMCPResourceTemplatesListResult, type AxMCPResourcesListResult, type AxMCPStreamableHTTPTransportOptions, AxMCPStreambleHTTPTransport, type AxMCPTextContent, type AxMCPTextResourceContents, type AxMCPToolsListResult, type AxMCPTransport, AxMediaNotSupportedError, AxMemory, type AxMemoryData, type AxMemoryMessageValue, type AxMetricFn, type AxMetricFnArgs, type AxMetricsConfig, AxMockAIService, type AxMockAIServiceConfig, type AxModelConfig, type AxModelInfo, type AxModelInfoWithProvider, type AxModelUsage, type AxMultiMetricFn, type AxMultiProviderConfig, AxMultiServiceRouter, type AxMutableDiscoveryPromptState, type AxMutableSkillsPromptState, type AxNamedProgramInstance, type AxNormalizedAgentEvalDataset, type AxOptimizableComponent, type AxOptimizableValidator, type AxOptimizationCheckpoint, type AxOptimizationProgress, type AxOptimizationStats, type AxOptimizedProgram, AxOptimizedProgramImpl, type AxOptimizer, type AxOptimizerArgs, type AxOptimizerLoggerData, type AxOptimizerLoggerFunction, type AxOptimizerMetricsConfig, type AxOptimizerMetricsInstruments, type AxOptimizerResult, type AxParetoResult, type AxPreparedChatRequest, type AxPreparedRestoredState, AxProgram, type AxProgramDemos, type AxProgramExamples, type AxProgramForwardOptions, type AxProgramForwardOptionsWithModels, type AxProgramOptions, type AxProgramStreamingForwardOptions, type AxProgramStreamingForwardOptionsWithModels, type AxProgramTrace, type AxProgramUsage, type AxProgrammable, type AxPromptMetrics, AxPromptTemplate, type AxPromptTemplateOptions, AxProviderRouter, type AxRLMConfig, type AxRateLimiterFunction, AxRateLimiterTokenUsage, type AxRateLimiterTokenUsageOptions, type AxRenderedPrompt, type AxRerankerIn, type AxRerankerOut, type AxResolvedContextPolicy, type AxResolvedExecutorModelPolicy, type AxResolvedExecutorModelPolicyEntry, type AxResponseHandlerArgs, type AxResultPickerFunction, type AxResultPickerFunctionFieldResults, type AxResultPickerFunctionFunctionResults, type AxRewriteIn, type AxRewriteOut, type AxRolloutTrace, type AxRoutingResult, type AxRuntimePrimitive, type AxRuntimePrimitiveStage, type AxSamplePickerOptions, type AxSelfTuningConfig, type AxSerializedOptimizedProgram, type AxSetExamplesOptions, AxSignature, AxSignatureBuilder, type AxSignatureConfig, AxSimpleClassifier, AxSimpleClassifierClass, type AxSimpleClassifierForwardOptions, AxSpanKindValues, type AxStageDefinitionBuildOptions, type AxStageOptions, type AxStepContext, AxStepContextImpl, type AxStepHooks, type AxStepUsage, AxStopFunctionCallException, type AxStorage, type AxStorageQuery, type AxStreamingAssertion, type AxStreamingEvent, type AxStreamingFieldProcessorProcess, AxStringUtil, AxSynth, type AxSynthExample, type AxSynthOptions, type AxSynthResult, type AxSynthesizerInit, type AxSynthesizerOptions, type AxSynthesizerRole, AxTestPrompt, type AxThoughtBlockItem, AxTokenLimitError, type AxTokenUsage, type AxTrace, AxTraceLogger, type AxTraceLoggerOptions, type AxTunable, type AxTypedExample, type AxUsable, type AxWorkerRuntimeConfig, agent, ai, 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, axAIOpenRouterDefaultConfig, axAIRekaBestConfig, axAIRekaCreativeConfig, axAIRekaDefaultConfig, axAIRekaFastConfig, axAITogetherDefaultConfig, axAIWebLLMCreativeConfig, axAIWebLLMDefaultConfig, axAnalyzeChatPromptRequirements, axAnalyzeRequestRequirements, axBaseAIDefaultConfig, axBaseAIDefaultCreativeConfig, axBuildDistillerDefinition, axBuildExecutorDefinition, axBuildResponderDefinition, axCheckMetricsHealth, axCreateDefaultColorLogger, axCreateDefaultOptimizerColorLogger, axCreateDefaultOptimizerTextLogger, axCreateDefaultTextLogger, axCreateFlowColorLogger, axCreateFlowTextLogger, axCreateJSRuntime, axDefaultFlowLogger, axDefaultMetricsConfig, axDefaultOptimizerLogger, axDefaultOptimizerMetricsConfig, axDeserializeOptimizedProgram, axGetCompatibilityReport, axGetFormatCompatibility, axGetMetricsConfig, axGetOptimizerMetricsConfig, axGetProvidersWithMediaSupport, axGlobals, axModelInfoAnthropic, axModelInfoCohere, axModelInfoDeepSeek, axModelInfoGoogleGemini, axModelInfoGrok, axModelInfoGroq, axModelInfoHuggingFace, axModelInfoMistral, axModelInfoOpenAI, axModelInfoOpenAIResponses, axModelInfoReka, axModelInfoTogether, axModelInfoWebLLM, axOptimizableValidators, axProcessContentForProvider, axRAG, axRuntimePrimitives, axScoreProvidersForRequest, axSelectOptimalProvider, axSerializeOptimizedProgram, axSpanAttributes, axSpanEvents, axUpdateMetricsConfig, axUpdateOptimizerMetricsConfig, axValidateChatRequestMessage, axValidateChatResponseResult, axValidateProviderCapabilities, axWorkerRuntime, f, flow, fn, s };
12659
+ export { AxACE, type AxACEBullet, type AxACECuratorOperation, type AxACECuratorOperationType, type AxACECuratorOutput, type AxACEFeedbackEvent, type AxACEGeneratorOutput, type AxACEOptimizationArtifact, AxACEOptimizedProgram, type AxACEOptions, type AxACEPlaybook, type AxACEReflectionOutput, type AxACEResult, AxAI, AxAIAnthropic, type AxAIAnthropicArgs, type AxAIAnthropicChatError, type AxAIAnthropicChatRequest, type AxAIAnthropicChatRequestCacheParam, type AxAIAnthropicChatResponse, type AxAIAnthropicChatResponseDelta, type AxAIAnthropicConfig, type AxAIAnthropicContentBlockDeltaEvent, type AxAIAnthropicContentBlockStartEvent, type AxAIAnthropicContentBlockStopEvent, type AxAIAnthropicEffortLevel, type AxAIAnthropicEffortLevelMapping, type AxAIAnthropicErrorEvent, type AxAIAnthropicFunctionTool, type AxAIAnthropicMessageDeltaEvent, type AxAIAnthropicMessageStartEvent, type AxAIAnthropicMessageStopEvent, AxAIAnthropicModel, type AxAIAnthropicOutputConfig, type AxAIAnthropicPingEvent, type AxAIAnthropicRequestTool, type AxAIAnthropicThinkingConfig, type AxAIAnthropicThinkingTokenBudgetLevels, type AxAIAnthropicThinkingWire, AxAIAnthropicVertexModel, type AxAIAnthropicWebSearchTool, 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 AxAIGoogleGeminiCacheCreateRequest, type AxAIGoogleGeminiCacheResponse, type AxAIGoogleGeminiCacheUpdateRequest, type AxAIGoogleGeminiChatRequest, type AxAIGoogleGeminiChatResponse, type AxAIGoogleGeminiChatResponseDelta, type AxAIGoogleGeminiConfig, type AxAIGoogleGeminiContent, type AxAIGoogleGeminiContentPart, AxAIGoogleGeminiEmbedModel, AxAIGoogleGeminiEmbedTypes, type AxAIGoogleGeminiGenerationConfig, AxAIGoogleGeminiModel, type AxAIGoogleGeminiOptionsTools, type AxAIGoogleGeminiRetrievalConfig, AxAIGoogleGeminiSafetyCategory, type AxAIGoogleGeminiSafetySettings, AxAIGoogleGeminiSafetyThreshold, type AxAIGoogleGeminiThinkingConfig, type AxAIGoogleGeminiThinkingLevel, type AxAIGoogleGeminiThinkingLevelMapping, type AxAIGoogleGeminiThinkingTokenBudgetLevels, type AxAIGoogleGeminiTool, type AxAIGoogleGeminiToolConfig, type AxAIGoogleGeminiToolFunctionDeclaration, type AxAIGoogleGeminiToolGoogleMaps, 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 AxAIModelCatalogAudioSupport, type AxAIModelCatalogFilter, type AxAIModelCatalogModel, type AxAIModelCatalogModelCapabilities, type AxAIModelCatalogModelType, type AxAIModelCatalogOptions, type AxAIModelCatalogProvider, type AxAIModelCatalogProviderName, 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, AxAIOpenRouter, type AxAIOpenRouterArgs, 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 AxAITogetherChatModel, AxAITogetherModel, AxAIWebLLM, type AxAIWebLLMArgs, type AxAIWebLLMChatRequest, type AxAIWebLLMChatResponse, type AxAIWebLLMChatResponseDelta, type AxAIWebLLMConfig, type AxAIWebLLMEmbedModel, type AxAIWebLLMEmbedRequest, type AxAIWebLLMEmbedResponse, AxAIWebLLMModel, type AxAPI, type AxAPIConfig, AxAgent, type AxAgentClarification, type AxAgentClarificationChoice, AxAgentClarificationError, type AxAgentClarificationKind, type AxAgentCompletionProtocol, type AxAgentConfig, type AxAgentDemos, type AxAgentDiscoveryPromptState, type AxAgentEvalDataset, type AxAgentEvalFunctionCall, type AxAgentEvalPrediction, type AxAgentEvalTask, type AxAgentExecutorResultPayload, type AxAgentExecutorTurnCallbackArgs, type AxAgentForwardOptions, type AxAgentFunction, type AxAgentFunctionCall, type AxAgentFunctionCallRecorder, type AxAgentFunctionCollection, type AxAgentFunctionExample, type AxAgentFunctionGroup, type AxAgentFunctionModuleMeta, type AxAgentGuidanceLogEntry, type AxAgentGuidancePayload, type AxAgentGuidanceState, type AxAgentIdentity, type AxAgentInputUpdateCallback, type AxAgentInternalCompletionPayload, type AxAgentJudgeEvalInput, type AxAgentJudgeEvalOutput, type AxAgentJudgeInput, type AxAgentJudgeOptions, type AxAgentJudgeOutput, type AxAgentMemoriesSearchFn, type AxAgentMemoryEntry, type AxAgentMemoryResult, type AxAgentOnFunctionCall, type AxAgentOptimizationTargetDescriptor, type AxAgentOptimizeOptions, type AxAgentOptimizeResult, type AxAgentOptimizeTarget, type AxAgentOptions, AxAgentProtocolCompletionSignal, type AxAgentRecursionOptions, type AxAgentRecursiveExpensiveNode, type AxAgentRecursiveFunctionCall, type AxAgentRecursiveNodeRole, type AxAgentRecursiveStats, type AxAgentRecursiveTargetId, type AxAgentRecursiveTraceNode, type AxAgentRecursiveTurn, type AxAgentRecursiveUsage, type AxAgentRuntimeCompletionState, type AxAgentRuntimeExecutionContext, type AxAgentRuntimeInputState, type AxAgentSkillResult, type AxAgentSkillsPromptState, type AxAgentSkillsSearchFn, type AxAgentState, type AxAgentStateActionLogEntry, type AxAgentStateCheckpointState, type AxAgentStateExecutorModelState, type AxAgentStateRuntimeEntry, type AxAgentStreamingForwardOptions, type AxAgentStructuredClarification, type AxAgentTestCompletionPayload, type AxAgentTestResult, type AxAgentUsage, type AxAgentic, type AxAnyAgentic, AxApacheTika, type AxApacheTikaArgs, type AxApacheTikaConvertOptions, type AxAssertion, AxAssertionError, type AxAudioFormat, AxBalancer, type AxBalancerOptions, AxBaseAI, type AxBaseAIArgs, AxBaseOptimizer, AxBootstrapFewShot, type AxBootstrapOptimizerOptions, type AxChatAudioConfig, type AxChatAudioOutput, type AxChatLogEntry, type AxChatLogMessage, type AxChatRequest, type AxChatResponse, type AxChatResponseFunctionCall, type AxChatResponseResult, type AxCheckpoint, type AxCheckpointLoadFn, type AxCheckpointSaveFn, type AxCitation, type AxCodeInterpreter, type AxCodeRuntime, type AxCodeSession, type AxCodeSessionSnapshot, type AxCodeSessionSnapshotEntry, type AxCompileOptions, AxContentProcessingError, type AxContentProcessingServices, type AxContextCacheInfo, type AxContextCacheOperation, type AxContextCacheOptions, type AxContextCacheRegistry, type AxContextCacheRegistryEntry, type AxContextFieldInput, type AxContextFieldPromptConfig, type AxContextPolicyBudget, type AxContextPolicyConfig, type AxContextPolicyPreset, 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, type AxDebugChatResponseUsage, AxDefaultCostTracker, AxDefaultResultReranker, type AxDiscoveryTurnSummary, type AxDockerContainer, AxDockerSession, type AxEmbedRequest, type AxEmbedResponse, AxEmbeddingAdapter, type AxErrorCategory, AxEvalUtil, type AxEvaluateArgs, type AxExample, type AxExamples, type AxExecutorModelPolicy, type AxExecutorModelPolicyEntry, type AxField, type AxFieldOptions, type AxFieldProcessor, type AxFieldProcessorProcess, type AxFieldTemplateFn, type AxFieldType, type AxFieldValue, AxFlow, type AxFlowAutoParallelConfig, type AxFlowBranchContext, type AxFlowBranchEvaluationData, type AxFlowCompleteData, AxFlowDependencyAnalyzer, type AxFlowDynamicContext, type AxFlowErrorData, AxFlowExecutionPlanner, type AxFlowExecutionStep, type AxFlowLogData, type AxFlowLoggerData, type AxFlowLoggerFunction, type AxFlowNodeDefinition, type AxFlowParallelBranch, type AxFlowParallelGroup, type AxFlowParallelGroupCompleteData, type AxFlowParallelGroupStartData, type AxFlowStartData, type AxFlowState, type AxFlowStepCompleteData, type AxFlowStepFunction, type AxFlowStepStartData, type AxFlowSubContext, AxFlowSubContextImpl, type AxFlowTypedParallelBranch, type AxFlowTypedSubContext, AxFlowTypedSubContextImpl, type AxFlowable, type AxFluentFieldInfo, AxFluentFieldType, type AxForwardable, type AxFunction, type AxFunctionCallRecord, type AxFunctionCallTrace, AxFunctionError, type AxFunctionHandler, type AxFunctionJSONSchema, AxFunctionProcessor, type AxFunctionResult, type AxFunctionResultFormatter, AxGEPA, type AxGEPAAdapter, type AxGEPABatchEvaluation, type AxGEPABatchRow, type AxGEPABootstrapOptions, type AxGEPAComponentBanditState, AxGEPAComponentSelector, type AxGEPAComponentTarget, type AxGEPAEvaluationBatch, type AxGEPAEvaluationState, type AxGEPAOptimizationReport, type AxGEPAReflectiveTuple, type AxGEPATraceSummary, type AxGEPATraceSummaryCall, AxGen, type AxGenDeltaOut, type AxGenIn, type AxGenInput, type AxGenMetricsInstruments, type AxGenOut, type AxGenOutput, type AxGenStreamingOut, AxGenerateError, type AxGenerateErrorDetails, type AxGenerateResult, AxHFDataLoader, type AxIField, type AxInputFunctionType, AxInstanceRegistry, type AxInternalChatRequest, type AxInternalEmbedRequest, AxJSRuntime, type AxJSRuntimeNodePermissionAllowlist, type AxJSRuntimeOutputMode, AxJSRuntimePermission, type AxJSRuntimeResourceLimits, type AxJudgeForwardOptions, type AxJudgeOptions, AxLLMRequestTypeValues, AxLearn, type AxLearnArtifact, type AxLearnCheckpointMode, type AxLearnCheckpointState, type AxLearnContinuousOptions, type AxLearnMode, type AxLearnOptimizeOptions, type AxLearnOptions, type AxLearnPlaybook, type AxLearnPlaybookOptions, type AxLearnPlaybookSummary, type AxLearnProgress, type AxLearnResult, type AxLearnUpdateFeedback, type AxLearnUpdateInput, type AxLearnUpdateOptions, type AxLlmQueryBudgetState, type AxLlmQueryPromptMode, type AxLoggerData, type AxLoggerFunction, type AxMCPBlobResourceContents, AxMCPClient, type AxMCPEmbeddedResource, type AxMCPFunctionDescription, AxMCPHTTPSSETransport, type AxMCPImageContent, type AxMCPInitializeParams, type AxMCPInitializeResult, type AxMCPJSONRPCErrorResponse, type AxMCPJSONRPCNotification, type AxMCPJSONRPCRequest, type AxMCPJSONRPCResponse, type AxMCPJSONRPCSuccessResponse, type AxMCPOAuthOptions, type AxMCPPrompt, type AxMCPPromptArgument, type AxMCPPromptGetResult, type AxMCPPromptMessage, type AxMCPPromptsListResult, type AxMCPResource, type AxMCPResourceReadResult, type AxMCPResourceTemplate, type AxMCPResourceTemplatesListResult, type AxMCPResourcesListResult, type AxMCPStreamableHTTPTransportOptions, AxMCPStreambleHTTPTransport, type AxMCPTextContent, type AxMCPTextResourceContents, type AxMCPToolsListResult, type AxMCPTransport, AxMediaNotSupportedError, AxMemory, type AxMemoryData, type AxMemoryMessageValue, type AxMetricFn, type AxMetricFnArgs, type AxMetricsConfig, AxMockAIService, type AxMockAIServiceConfig, type AxModelConfig, type AxModelInfo, type AxModelInfoWithProvider, type AxModelUsage, type AxMultiMetricFn, type AxMultiProviderConfig, AxMultiServiceRouter, type AxMutableDiscoveryPromptState, type AxMutableSkillsPromptState, type AxNamedProgramInstance, type AxNormalizedAgentEvalDataset, type AxOptimizableComponent, type AxOptimizableValidator, type AxOptimizationCheckpoint, type AxOptimizationProgress, type AxOptimizationStats, type AxOptimizedProgram, AxOptimizedProgramImpl, type AxOptimizer, type AxOptimizerArgs, type AxOptimizerLoggerData, type AxOptimizerLoggerFunction, type AxOptimizerMetricsConfig, type AxOptimizerMetricsInstruments, type AxOptimizerResult, type AxParetoResult, type AxPreparedChatRequest, type AxPreparedRestoredState, AxProgram, type AxProgramDemos, type AxProgramExamples, type AxProgramForwardOptions, type AxProgramForwardOptionsWithModels, type AxProgramOptions, type AxProgramStreamingForwardOptions, type AxProgramStreamingForwardOptionsWithModels, type AxProgramTrace, type AxProgramUsage, type AxProgrammable, type AxPromptMetrics, AxPromptTemplate, type AxPromptTemplateOptions, AxProviderRouter, type AxRLMConfig, type AxRateLimiterFunction, AxRateLimiterTokenUsage, type AxRateLimiterTokenUsageOptions, type AxRenderedPrompt, type AxRerankerIn, type AxRerankerOut, type AxResolvedContextPolicy, type AxResolvedExecutorModelPolicy, type AxResolvedExecutorModelPolicyEntry, type AxResponseHandlerArgs, type AxResultPickerFunction, type AxResultPickerFunctionFieldResults, type AxResultPickerFunctionFunctionResults, type AxRewriteIn, type AxRewriteOut, type AxRolloutTrace, type AxRoutingResult, type AxRuntimePrimitive, type AxRuntimePrimitiveStage, type AxSamplePickerOptions, type AxSelfTuningConfig, type AxSerializedOptimizedProgram, type AxSetExamplesOptions, AxSignature, AxSignatureBuilder, type AxSignatureConfig, AxSimpleClassifier, AxSimpleClassifierClass, type AxSimpleClassifierForwardOptions, AxSpanKindValues, type AxStageDefinitionBuildOptions, type AxStageOptions, type AxStepContext, AxStepContextImpl, type AxStepHooks, type AxStepUsage, AxStopFunctionCallException, type AxStorage, type AxStorageQuery, type AxStreamingAssertion, type AxStreamingEvent, type AxStreamingFieldProcessorProcess, AxStringUtil, AxSynth, type AxSynthExample, type AxSynthOptions, type AxSynthResult, type AxSynthesizerInit, type AxSynthesizerOptions, type AxSynthesizerRole, AxTestPrompt, type AxThoughtBlockItem, AxTokenLimitError, type AxTokenUsage, type AxTrace, AxTraceLogger, type AxTraceLoggerOptions, type AxTunable, type AxTypedExample, type AxUsable, type AxWorkerRuntimeConfig, agent, ai, ax, axAIAnthropicDefaultConfig, axAIAnthropicVertexDefaultConfig, axAIAzureOpenAIBestConfig, axAIAzureOpenAICreativeConfig, axAIAzureOpenAIDefaultConfig, axAIAzureOpenAIFastConfig, axAICohereCreativeConfig, axAICohereDefaultConfig, axAIDeepSeekCodeConfig, axAIDeepSeekDefaultConfig, axAIGoogleGeminiDefaultConfig, axAIGoogleGeminiDefaultCreativeConfig, axAIGoogleGeminiLiveAudioDefaultConfig, axAIGrokBestConfig, axAIGrokDefaultConfig, axAIGrokVoiceDefaultConfig, axAIHuggingFaceCreativeConfig, axAIHuggingFaceDefaultConfig, axAIMistralBestConfig, axAIMistralDefaultConfig, axAIOllamaDefaultConfig, axAIOllamaDefaultCreativeConfig, axAIOpenAIAudioDefaultConfig, axAIOpenAIBestConfig, axAIOpenAICreativeConfig, axAIOpenAIDefaultConfig, axAIOpenAIFastConfig, axAIOpenAIRealtimeDefaultConfig, axAIOpenAIRealtimeTranscriptionDefaultConfig, axAIOpenAIResponsesBestConfig, axAIOpenAIResponsesCreativeConfig, axAIOpenAIResponsesDefaultConfig, axAIOpenRouterDefaultConfig, axAIRekaBestConfig, axAIRekaCreativeConfig, axAIRekaDefaultConfig, axAIRekaFastConfig, axAITogetherDefaultConfig, axAIWebLLMCreativeConfig, axAIWebLLMDefaultConfig, axAnalyzeChatPromptRequirements, axAnalyzeRequestRequirements, axApplyOpenAIChatAudioRequest, axAudioFormatFromMimeType, axAudioMimeType, axBaseAIDefaultConfig, axBaseAIDefaultCreativeConfig, axBuildDistillerDefinition, axBuildExecutorDefinition, axBuildResponderDefinition, axCheckMetricsHealth, axConcatBase64, axCreateDefaultColorLogger, axCreateDefaultOptimizerColorLogger, axCreateDefaultOptimizerTextLogger, axCreateDefaultTextLogger, axCreateFlowColorLogger, axCreateFlowTextLogger, axCreateGeminiLiveAudioApi, axCreateGrokRealtimeApi, axCreateJSRuntime, axCreateOpenAIRealtimeApi, axDefaultFlowLogger, axDefaultMetricsConfig, axDefaultOptimizerLogger, axDefaultOptimizerMetricsConfig, axDeserializeOptimizedProgram, axGetCompatibilityReport, axGetFormatCompatibility, axGetMetricsConfig, axGetOptimizerMetricsConfig, axGetProvidersWithMediaSupport, axGetSupportedAIModels, axGlobals, axGoogleGeminiLiveAudioDefaults, axIsAudioOutputEnabled, axIsGeminiLiveAudioModel, axIsGrokVoiceModel, axIsOpenAIChatAudioModel, axIsOpenAIRealtimeModel, axIsOpenAIRealtimeTranscriptionModel, axMapGeminiLiveAudioPart, axMapOpenAIChatAudioDelta, axMapOpenAIChatAudioResponse, axMapOpenAIInputAudioPart, axMergeChatAudioConfig, axModelInfoAnthropic, axModelInfoCohere, axModelInfoDeepSeek, axModelInfoGoogleGemini, axModelInfoGrok, axModelInfoGroq, axModelInfoHuggingFace, axModelInfoMistral, axModelInfoOpenAI, axModelInfoOpenAIResponses, axModelInfoReka, axModelInfoTogether, axModelInfoWebLLM, axOpenAIChatAudioDefaults, axOptimizableValidators, axProcessContentForProvider, axRAG, axResolveGeminiLiveAudioConfig, axResolveGrokRealtimeAudioConfig, axResolveOpenAIChatAudioConfig, axResolveOpenAIRealtimeAudioConfig, axRuntimePrimitives, axScoreProvidersForRequest, axSelectOptimalProvider, axSerializeOptimizedProgram, axShouldUseGeminiLiveAudio, axShouldUseGrokRealtime, axShouldUseOpenAIRealtime, axSpanAttributes, axSpanEvents, axUpdateMetricsConfig, axUpdateOptimizerMetricsConfig, axValidateChatRequestMessage, axValidateChatResponseResult, axValidateGeminiLiveAudioInput, axValidateProviderCapabilities, axWorkerRuntime, f, flow, fn, s };