@ax-llm/ax 12.0.7 → 12.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -2328,7 +2328,9 @@ type AxFieldValue = string | string[] | number | boolean | object | null | undef
2328
2328
  type AxGenIn = {
2329
2329
  [key: string]: AxFieldValue;
2330
2330
  };
2331
- type AxGenOut = Record<string, AxFieldValue>;
2331
+ type AxGenOut = {
2332
+ [key: string]: AxFieldValue;
2333
+ };
2332
2334
  type AxMessage<IN extends AxGenIn> = {
2333
2335
  role: 'user';
2334
2336
  values: IN;
@@ -2386,15 +2388,15 @@ declare class AxPromptTemplate {
2386
2388
  private defaultRenderInField;
2387
2389
  }
2388
2390
 
2389
- type AxProgramTrace = {
2390
- trace: Record<string, AxFieldValue>;
2391
+ type AxProgramTrace<IN extends AxGenIn, OUT extends AxGenOut> = {
2392
+ trace: OUT & IN;
2391
2393
  programId: string;
2392
2394
  };
2393
- type AxProgramDemos = {
2394
- traces: Record<string, AxFieldValue>[];
2395
+ type AxProgramDemos<IN extends AxGenIn, OUT extends AxGenOut> = {
2396
+ traces: (OUT & IN)[];
2395
2397
  programId: string;
2396
2398
  };
2397
- type AxProgramExamples = AxProgramDemos | AxProgramDemos['traces'];
2399
+ type AxProgramExamples<IN extends AxGenIn, OUT extends AxGenOut> = AxProgramDemos<IN, OUT> | AxProgramDemos<IN, OUT>['traces'];
2398
2400
  type AxProgramForwardOptions = {
2399
2401
  maxRetries?: number;
2400
2402
  maxSteps?: number;
@@ -2432,12 +2434,12 @@ type AxGenDeltaOut<OUT extends AxGenOut> = {
2432
2434
  };
2433
2435
  type AxGenStreamingOut<OUT extends AxGenOut> = AsyncGenerator<AxGenDeltaOut<OUT>, void | OUT, unknown>;
2434
2436
  type AxSetExamplesOptions = {};
2435
- interface AxTunable {
2436
- setExamples: (examples: Readonly<AxProgramExamples>, options?: Readonly<AxSetExamplesOptions>) => void;
2437
+ interface AxTunable<IN extends AxGenIn, OUT extends AxGenOut> {
2438
+ setExamples: (examples: Readonly<AxProgramExamples<IN, OUT>>, options?: Readonly<AxSetExamplesOptions>) => void;
2437
2439
  setId: (id: string) => void;
2438
2440
  setParentId: (parentId: string) => void;
2439
- getTraces: () => AxProgramTrace[];
2440
- setDemos: (demos: readonly AxProgramDemos[]) => void;
2441
+ getTraces: () => AxProgramTrace<IN, OUT>[];
2442
+ setDemos: (demos: readonly AxProgramDemos<IN, OUT>[]) => void;
2441
2443
  }
2442
2444
  interface AxUsable {
2443
2445
  getUsage: () => AxProgramUsage[];
@@ -2450,53 +2452,53 @@ type AxProgramUsage = AxChatResponse['modelUsage'] & {
2450
2452
  interface AxProgramWithSignatureOptions {
2451
2453
  description?: string;
2452
2454
  }
2453
- declare class AxProgramWithSignature<IN extends AxGenIn, OUT extends AxGenOut> implements AxTunable, AxUsable {
2455
+ declare class AxProgramWithSignature<IN extends AxGenIn, OUT extends AxGenOut> implements AxTunable<IN, OUT>, AxUsable {
2454
2456
  protected signature: AxSignature;
2455
2457
  protected sigHash: string;
2456
- protected examples?: Record<string, AxFieldValue>[];
2458
+ protected examples?: OUT[];
2457
2459
  protected examplesOptions?: AxSetExamplesOptions;
2458
- protected demos?: Record<string, AxFieldValue>[];
2459
- protected trace?: Record<string, AxFieldValue>;
2460
+ protected demos?: OUT[];
2461
+ protected trace?: OUT;
2460
2462
  protected usage: AxProgramUsage[];
2461
2463
  private key;
2462
2464
  private children;
2463
2465
  constructor(signature: NonNullable<ConstructorParameters<typeof AxSignature>[0]>, options?: Readonly<AxProgramWithSignatureOptions>);
2464
2466
  getSignature(): AxSignature;
2465
- register(prog: Readonly<AxTunable & AxUsable>): void;
2467
+ register(prog: Readonly<AxTunable<IN, OUT> & AxUsable>): void;
2466
2468
  forward(_ai: Readonly<AxAIService>, _values: IN | AxMessage<IN>[], _options?: Readonly<AxProgramForwardOptions>): Promise<OUT>;
2467
2469
  streamingForward(_ai: Readonly<AxAIService>, _values: IN | AxMessage<IN>[], _options?: Readonly<AxProgramStreamingForwardOptions>): AxGenStreamingOut<OUT>;
2468
2470
  setId(id: string): void;
2469
2471
  setParentId(parentId: string): void;
2470
- setExamples(examples: Readonly<AxProgramExamples>, options?: Readonly<AxSetExamplesOptions>): void;
2472
+ setExamples(examples: Readonly<AxProgramExamples<IN, OUT>>, options?: Readonly<AxSetExamplesOptions>): void;
2471
2473
  private _setExamples;
2472
- getTraces(): AxProgramTrace[];
2474
+ getTraces(): AxProgramTrace<IN, OUT>[];
2473
2475
  getUsage(): AxProgramUsage[];
2474
2476
  resetUsage(): void;
2475
- setDemos(demos: readonly AxProgramDemos[]): void;
2477
+ setDemos(demos: readonly AxProgramDemos<IN, OUT>[]): void;
2476
2478
  }
2477
- declare class AxProgram<IN extends AxGenIn, OUT extends AxGenOut> implements AxTunable, AxUsable {
2478
- protected trace?: Record<string, AxFieldValue>;
2479
+ declare class AxProgram<IN extends AxGenIn, OUT extends AxGenOut> implements AxTunable<IN, OUT>, AxUsable {
2480
+ protected trace?: OUT;
2479
2481
  protected usage: AxProgramUsage[];
2480
2482
  private key;
2481
2483
  private children;
2482
2484
  constructor();
2483
- register(prog: Readonly<AxTunable & AxUsable>): void;
2485
+ register(prog: Readonly<AxTunable<IN, OUT> & AxUsable>): void;
2484
2486
  forward(_ai: Readonly<AxAIService>, _values: IN | AxMessage<IN>[], _options?: Readonly<AxProgramForwardOptions>): Promise<OUT>;
2485
2487
  streamingForward(_ai: Readonly<AxAIService>, _values: IN | AxMessage<IN>[], _options?: Readonly<AxProgramStreamingForwardOptions>): AxGenStreamingOut<OUT>;
2486
2488
  setId(id: string): void;
2487
2489
  setParentId(parentId: string): void;
2488
- setExamples(examples: Readonly<AxProgramExamples>, options?: Readonly<AxSetExamplesOptions>): void;
2489
- getTraces(): AxProgramTrace[];
2490
+ setExamples(examples: Readonly<AxProgramExamples<IN, OUT>>, options?: Readonly<AxSetExamplesOptions>): void;
2491
+ getTraces(): AxProgramTrace<IN, OUT>[];
2490
2492
  getUsage(): AxProgramUsage[];
2491
2493
  resetUsage(): void;
2492
- setDemos(demos: readonly AxProgramDemos[]): void;
2494
+ setDemos(demos: readonly AxProgramDemos<IN, OUT>[]): void;
2493
2495
  }
2494
2496
 
2495
2497
  /**
2496
2498
  * Interface for agents that can be used as child agents.
2497
2499
  * Provides methods to get the agent's function definition and features.
2498
2500
  */
2499
- interface AxAgentic extends AxTunable, AxUsable {
2501
+ interface AxAgentic<IN extends AxGenIn, OUT extends AxGenOut> extends AxTunable<IN, OUT>, AxUsable {
2500
2502
  getFunction(): AxFunction;
2501
2503
  getFeatures(): AxAgentFeatures;
2502
2504
  }
@@ -2516,7 +2518,7 @@ interface AxAgentFeatures {
2516
2518
  * An AI agent that can process inputs using an AI service and coordinate with child agents.
2517
2519
  * Supports features like smart model routing and automatic input field passing to child agents.
2518
2520
  */
2519
- declare class AxAgent<IN extends AxGenIn, OUT extends AxGenOut = AxGenOut> implements AxAgentic {
2521
+ declare class AxAgent<IN extends AxGenIn, OUT extends AxGenOut> implements AxAgentic<IN, OUT> {
2520
2522
  private ai?;
2521
2523
  private program;
2522
2524
  private functions?;
@@ -2532,14 +2534,14 @@ declare class AxAgent<IN extends AxGenIn, OUT extends AxGenOut = AxGenOut> imple
2532
2534
  description: string;
2533
2535
  definition?: string;
2534
2536
  signature: NonNullable<ConstructorParameters<typeof AxSignature>[0]>;
2535
- agents?: AxAgentic[];
2537
+ agents?: AxAgentic<IN, OUT>[];
2536
2538
  functions?: AxInputFunctionType;
2537
2539
  }>, options?: Readonly<AxAgentOptions>);
2538
- setExamples(examples: Readonly<AxProgramExamples>, options?: Readonly<AxSetExamplesOptions>): void;
2540
+ setExamples(examples: Readonly<AxProgramExamples<IN, OUT>>, options?: Readonly<AxSetExamplesOptions>): void;
2539
2541
  setId(id: string): void;
2540
2542
  setParentId(parentId: string): void;
2541
- getTraces(): AxProgramTrace[];
2542
- setDemos(demos: readonly AxProgramDemos[]): void;
2543
+ getTraces(): AxProgramTrace<IN, OUT>[];
2544
+ setDemos(demos: readonly AxProgramDemos<IN, OUT>[]): void;
2543
2545
  getUsage(): (AxModelUsage & {
2544
2546
  ai: string;
2545
2547
  model: string;
@@ -2634,6 +2636,434 @@ declare class AxBalancer implements AxAIService<unknown, unknown> {
2634
2636
  getLogger(): AxLoggerFunction;
2635
2637
  }
2636
2638
 
2639
+ type AxExample = Record<string, AxFieldValue>;
2640
+ type AxMetricFn = <T extends AxGenOut = AxGenOut>(arg0: Readonly<{
2641
+ prediction: T;
2642
+ example: AxExample;
2643
+ }>) => number | Promise<number>;
2644
+ type AxMetricFnArgs = Parameters<AxMetricFn>[0];
2645
+ type AxMultiMetricFn = <T extends AxGenOut = AxGenOut>(arg0: Readonly<{
2646
+ prediction: T;
2647
+ example: AxExample;
2648
+ }>) => Record<string, number>;
2649
+ interface AxOptimizationProgress {
2650
+ round: number;
2651
+ totalRounds: number;
2652
+ currentScore: number;
2653
+ bestScore: number;
2654
+ tokensUsed: number;
2655
+ timeElapsed: number;
2656
+ successfulExamples: number;
2657
+ totalExamples: number;
2658
+ currentConfiguration?: Record<string, unknown>;
2659
+ convergenceInfo?: {
2660
+ improvement: number;
2661
+ stagnationRounds: number;
2662
+ isConverging: boolean;
2663
+ };
2664
+ }
2665
+ interface AxCostTracker {
2666
+ trackTokens(count: number, model: string): void;
2667
+ getCurrentCost(): number;
2668
+ getTokenUsage(): Record<string, number>;
2669
+ getTotalTokens(): number;
2670
+ isLimitReached(): boolean;
2671
+ reset(): void;
2672
+ }
2673
+ interface AxOptimizationCheckpoint {
2674
+ version: string;
2675
+ timestamp: number;
2676
+ optimizerType: string;
2677
+ optimizerConfig: Record<string, unknown>;
2678
+ currentRound: number;
2679
+ totalRounds: number;
2680
+ bestScore: number;
2681
+ bestConfiguration?: Record<string, unknown>;
2682
+ scoreHistory: number[];
2683
+ configurationHistory: Record<string, unknown>[];
2684
+ stats: AxOptimizationStats;
2685
+ optimizerState: Record<string, unknown>;
2686
+ examples: readonly AxExample[];
2687
+ validationSet?: readonly AxExample[];
2688
+ }
2689
+ type AxCheckpointSaveFn = (checkpoint: Readonly<AxOptimizationCheckpoint>) => Promise<string>;
2690
+ type AxCheckpointLoadFn = (checkpointId: string) => Promise<AxOptimizationCheckpoint | null>;
2691
+ interface AxCostTrackerOptions {
2692
+ costPerModel?: Record<string, number>;
2693
+ maxCost?: number;
2694
+ maxTokens?: number;
2695
+ }
2696
+ type AxOptimizerArgs = {
2697
+ studentAI: AxAIService;
2698
+ teacherAI?: AxAIService;
2699
+ examples: readonly AxExample[];
2700
+ validationSet?: readonly AxExample[];
2701
+ minSuccessRate?: number;
2702
+ targetScore?: number;
2703
+ onProgress?: (progress: Readonly<AxOptimizationProgress>) => void;
2704
+ onEarlyStop?: (reason: string, stats: Readonly<AxOptimizationStats>) => void;
2705
+ costTracker?: AxCostTracker;
2706
+ checkpointSave?: AxCheckpointSaveFn;
2707
+ checkpointLoad?: AxCheckpointLoadFn;
2708
+ checkpointInterval?: number;
2709
+ resumeFromCheckpoint?: string;
2710
+ seed?: number;
2711
+ };
2712
+ interface AxOptimizationStats {
2713
+ totalCalls: number;
2714
+ successfulDemos: number;
2715
+ estimatedTokenUsage: number;
2716
+ earlyStopped: boolean;
2717
+ earlyStopping?: {
2718
+ bestScoreRound: number;
2719
+ patienceExhausted: boolean;
2720
+ reason: string;
2721
+ };
2722
+ resourceUsage: {
2723
+ totalTokens: number;
2724
+ totalTime: number;
2725
+ avgLatencyPerEval: number;
2726
+ peakMemoryUsage?: number;
2727
+ costByModel: Record<string, number>;
2728
+ };
2729
+ convergenceInfo: {
2730
+ converged: boolean;
2731
+ finalImprovement: number;
2732
+ stagnationRounds: number;
2733
+ convergenceThreshold: number;
2734
+ };
2735
+ evaluationBreakdown?: {
2736
+ trainingScore: number;
2737
+ validationScore: number;
2738
+ crossValidationScores?: number[];
2739
+ standardDeviation?: number;
2740
+ };
2741
+ }
2742
+ interface AxOptimizerResult<OUT extends AxGenOut> {
2743
+ demos?: AxProgramDemos<AxGenIn, OUT>[];
2744
+ stats: AxOptimizationStats;
2745
+ bestScore: number;
2746
+ finalConfiguration?: Record<string, unknown>;
2747
+ scoreHistory?: number[];
2748
+ configurationHistory?: Record<string, unknown>[];
2749
+ }
2750
+ interface AxParetoResult<OUT extends AxGenOut = AxGenOut> extends AxOptimizerResult<OUT> {
2751
+ paretoFront: ReadonlyArray<{
2752
+ demos: readonly AxProgramDemos<AxGenIn, OUT>[];
2753
+ scores: Readonly<Record<string, number>>;
2754
+ configuration: Readonly<Record<string, unknown>>;
2755
+ dominatedSolutions: number;
2756
+ }>;
2757
+ hypervolume?: number;
2758
+ paretoFrontSize: number;
2759
+ convergenceMetrics?: Record<string, number>;
2760
+ }
2761
+ interface AxCompileOptions {
2762
+ maxIterations?: number;
2763
+ earlyStoppingPatience?: number;
2764
+ verbose?: boolean;
2765
+ overrideValidationSet?: readonly AxExample[];
2766
+ overrideTargetScore?: number;
2767
+ overrideCostTracker?: AxCostTracker;
2768
+ overrideTeacherAI?: AxAIService;
2769
+ overrideOnProgress?: (progress: Readonly<AxOptimizationProgress>) => void;
2770
+ overrideOnEarlyStop?: (reason: string, stats: Readonly<AxOptimizationStats>) => void;
2771
+ overrideCheckpointSave?: AxCheckpointSaveFn;
2772
+ overrideCheckpointLoad?: AxCheckpointLoadFn;
2773
+ overrideCheckpointInterval?: number;
2774
+ saveCheckpointOnComplete?: boolean;
2775
+ }
2776
+ interface AxOptimizer<IN extends AxGenIn = AxGenIn, OUT extends AxGenOut = AxGenOut> {
2777
+ /**
2778
+ * Optimize a program using the provided metric function
2779
+ * @param program The program to optimize (moved from constructor)
2780
+ * @param metricFn Evaluation metric function to assess program performance
2781
+ * @param options Optional configuration options that can override constructor settings
2782
+ * @returns Optimization result containing demos, stats, and configuration
2783
+ */
2784
+ compile(program: Readonly<AxProgram<IN, OUT>>, metricFn: AxMetricFn, options?: AxCompileOptions): Promise<AxOptimizerResult<OUT>>;
2785
+ /**
2786
+ * Optimize a program with real-time streaming updates
2787
+ * @param program The program to optimize
2788
+ * @param metricFn Evaluation metric function
2789
+ * @param options Optional configuration options
2790
+ * @returns Async iterator yielding optimization progress
2791
+ */
2792
+ compileStream?(program: Readonly<AxProgram<IN, OUT>>, metricFn: AxMetricFn, options?: AxCompileOptions): AsyncIterableIterator<AxOptimizationProgress>;
2793
+ /**
2794
+ * Multi-objective optimization using Pareto frontier
2795
+ * @param program The program to optimize
2796
+ * @param metricFn Multi-objective metric function
2797
+ * @param options Optional configuration options
2798
+ * @returns Pareto optimization result
2799
+ */
2800
+ compilePareto?(program: Readonly<AxProgram<IN, OUT>>, metricFn: AxMultiMetricFn, options?: AxCompileOptions): Promise<AxParetoResult<OUT>>;
2801
+ /**
2802
+ * Get current optimization statistics
2803
+ * @returns Current optimization statistics
2804
+ */
2805
+ getStats(): AxOptimizationStats;
2806
+ /**
2807
+ * Cancel ongoing optimization gracefully
2808
+ * @returns Promise that resolves when cancellation is complete
2809
+ */
2810
+ cancel?(): Promise<void>;
2811
+ /**
2812
+ * Reset optimizer state for reuse with different programs
2813
+ */
2814
+ reset?(): void;
2815
+ /**
2816
+ * Get optimizer-specific configuration
2817
+ * @returns Current optimizer configuration
2818
+ */
2819
+ getConfiguration?(): Record<string, unknown>;
2820
+ /**
2821
+ * Update optimizer configuration
2822
+ * @param config New configuration to merge with existing
2823
+ */
2824
+ updateConfiguration?(config: Readonly<Record<string, unknown>>): void;
2825
+ /**
2826
+ * Validate that the optimizer can handle the given program
2827
+ * @param program Program to validate
2828
+ * @returns Validation result with any issues found
2829
+ */
2830
+ validateProgram?(program: Readonly<AxProgram<IN, OUT>>): {
2831
+ isValid: boolean;
2832
+ issues: string[];
2833
+ suggestions: string[];
2834
+ };
2835
+ }
2836
+ interface AxBootstrapOptimizerOptions {
2837
+ maxRounds?: number;
2838
+ maxExamples?: number;
2839
+ maxDemos?: number;
2840
+ batchSize?: number;
2841
+ earlyStoppingPatience?: number;
2842
+ teacherAI?: AxAIService;
2843
+ costMonitoring?: boolean;
2844
+ maxTokensPerGeneration?: number;
2845
+ verboseMode?: boolean;
2846
+ debugMode?: boolean;
2847
+ adaptiveBatching?: boolean;
2848
+ dynamicTemperature?: boolean;
2849
+ qualityThreshold?: number;
2850
+ diversityWeight?: number;
2851
+ }
2852
+ interface AxMiPROOptimizerOptions {
2853
+ numCandidates?: number;
2854
+ initTemperature?: number;
2855
+ maxBootstrappedDemos?: number;
2856
+ maxLabeledDemos?: number;
2857
+ numTrials?: number;
2858
+ minibatch?: boolean;
2859
+ minibatchSize?: number;
2860
+ minibatchFullEvalSteps?: number;
2861
+ programAwareProposer?: boolean;
2862
+ dataAwareProposer?: boolean;
2863
+ viewDataBatchSize?: number;
2864
+ tipAwareProposer?: boolean;
2865
+ fewshotAwareProposer?: boolean;
2866
+ verbose?: boolean;
2867
+ earlyStoppingTrials?: number;
2868
+ minImprovementThreshold?: number;
2869
+ bayesianOptimization?: boolean;
2870
+ acquisitionFunction?: 'expected_improvement' | 'upper_confidence_bound' | 'probability_improvement';
2871
+ explorationWeight?: number;
2872
+ }
2873
+ interface AxBootstrapCompileOptions extends AxCompileOptions {
2874
+ valset?: readonly AxExample[];
2875
+ maxDemos?: number;
2876
+ teacherProgram?: Readonly<AxProgram<AxGenIn, AxGenOut>>;
2877
+ }
2878
+ interface AxMiPROCompileOptions extends AxCompileOptions {
2879
+ valset?: readonly AxExample[];
2880
+ teacher?: Readonly<AxProgram<AxGenIn, AxGenOut>>;
2881
+ auto?: 'light' | 'medium' | 'heavy';
2882
+ instructionCandidates?: string[];
2883
+ customProposer?: (context: Readonly<{
2884
+ programSummary: string;
2885
+ dataSummary: string;
2886
+ previousInstructions: string[];
2887
+ }>) => Promise<string[]>;
2888
+ }
2889
+ declare class AxDefaultCostTracker implements AxCostTracker {
2890
+ private tokenUsage;
2891
+ private totalTokens;
2892
+ private readonly costPerModel;
2893
+ private readonly maxCost?;
2894
+ private readonly maxTokens?;
2895
+ constructor(options?: AxCostTrackerOptions);
2896
+ trackTokens(count: number, model: string): void;
2897
+ getCurrentCost(): number;
2898
+ getTokenUsage(): Record<string, number>;
2899
+ getTotalTokens(): number;
2900
+ isLimitReached(): boolean;
2901
+ reset(): void;
2902
+ }
2903
+ /**
2904
+ * Abstract base class for optimizers that provides common functionality
2905
+ * and standardized handling of AxOptimizerArgs
2906
+ */
2907
+ declare abstract class AxBaseOptimizer<IN extends AxGenIn = AxGenIn, OUT extends AxGenOut = AxGenOut> implements AxOptimizer<IN, OUT> {
2908
+ protected readonly studentAI: AxAIService;
2909
+ protected readonly teacherAI?: AxAIService;
2910
+ protected readonly examples: readonly AxExample[];
2911
+ protected readonly validationSet?: readonly AxExample[];
2912
+ protected readonly targetScore?: number;
2913
+ protected readonly minSuccessRate?: number;
2914
+ protected readonly onProgress?: (progress: Readonly<AxOptimizationProgress>) => void;
2915
+ protected readonly onEarlyStop?: (reason: string, stats: Readonly<AxOptimizationStats>) => void;
2916
+ protected readonly costTracker?: AxCostTracker;
2917
+ protected readonly seed?: number;
2918
+ protected readonly checkpointSave?: AxCheckpointSaveFn;
2919
+ protected readonly checkpointLoad?: AxCheckpointLoadFn;
2920
+ protected readonly checkpointInterval?: number;
2921
+ protected readonly resumeFromCheckpoint?: string;
2922
+ private currentRound;
2923
+ private scoreHistory;
2924
+ private configurationHistory;
2925
+ protected stats: AxOptimizationStats;
2926
+ constructor(args: Readonly<AxOptimizerArgs>);
2927
+ /**
2928
+ * Initialize the optimization statistics structure
2929
+ */
2930
+ protected initializeStats(): AxOptimizationStats;
2931
+ /**
2932
+ * Set up reproducible random seed if provided
2933
+ */
2934
+ protected setupRandomSeed(): void;
2935
+ /**
2936
+ * Check if optimization should stop early due to cost limits
2937
+ */
2938
+ protected checkCostLimits(): boolean;
2939
+ /**
2940
+ * Check if target score has been reached
2941
+ */
2942
+ protected checkTargetScore(currentScore: number): boolean;
2943
+ /**
2944
+ * Update resource usage statistics
2945
+ */
2946
+ protected updateResourceUsage(startTime: number, tokensUsed?: number): void;
2947
+ /**
2948
+ * Trigger early stopping with appropriate callbacks
2949
+ */
2950
+ protected triggerEarlyStopping(reason: string, bestScoreRound: number): void;
2951
+ /**
2952
+ * Get the validation set, with fallback to a split of examples
2953
+ */
2954
+ protected getValidationSet(options?: AxCompileOptions): readonly AxExample[];
2955
+ /**
2956
+ * Get the AI service to use for a specific task, preferring teacher when available
2957
+ * @param preferTeacher Whether to prefer teacher AI over student AI
2958
+ * @param options Optional compile options that may override teacher AI
2959
+ * @returns The appropriate AI service to use
2960
+ */
2961
+ protected getAIService(preferTeacher?: boolean, options?: AxCompileOptions): AxAIService;
2962
+ /**
2963
+ * Check if teacher AI is available (including overrides)
2964
+ * @param options Optional compile options that may override teacher AI
2965
+ * @returns True if teacher AI is configured or overridden
2966
+ */
2967
+ protected hasTeacherAI(options?: AxCompileOptions): boolean;
2968
+ /**
2969
+ * Get teacher AI if available, otherwise return student AI
2970
+ * @param options Optional compile options that may override teacher AI
2971
+ * @returns Teacher AI if available, otherwise student AI
2972
+ */
2973
+ protected getTeacherOrStudentAI(options?: AxCompileOptions): AxAIService;
2974
+ /**
2975
+ * Execute a task with teacher AI if available, otherwise use student AI
2976
+ * @param task Function that takes an AI service and returns a promise
2977
+ * @param preferTeacher Whether to prefer teacher AI (default: true)
2978
+ * @param options Optional compile options that may override teacher AI
2979
+ * @returns Result of the task execution
2980
+ */
2981
+ protected executeWithTeacher<T>(task: (ai: AxAIService) => Promise<T>, preferTeacher?: boolean, options?: AxCompileOptions): Promise<T>;
2982
+ /**
2983
+ * Abstract method that must be implemented by concrete optimizers
2984
+ */
2985
+ abstract compile(program: Readonly<AxProgram<IN, OUT>>, metricFn: AxMetricFn, options?: AxCompileOptions): Promise<AxOptimizerResult<OUT>>;
2986
+ /**
2987
+ * Get current optimization statistics
2988
+ */
2989
+ getStats(): AxOptimizationStats;
2990
+ /**
2991
+ * Reset optimizer state for reuse with different programs
2992
+ */
2993
+ reset(): void;
2994
+ /**
2995
+ * Basic program validation that can be extended by concrete optimizers
2996
+ */
2997
+ validateProgram(program: Readonly<AxProgram<IN, OUT>>): {
2998
+ isValid: boolean;
2999
+ issues: string[];
3000
+ suggestions: string[];
3001
+ };
3002
+ /**
3003
+ * Multi-objective optimization using Pareto frontier
3004
+ * Default implementation that leverages the single-objective compile method
3005
+ * @param program The program to optimize
3006
+ * @param metricFn Multi-objective metric function that returns multiple scores
3007
+ * @param options Optional configuration options
3008
+ * @returns Pareto optimization result with frontier of non-dominated solutions
3009
+ */
3010
+ compilePareto(program: Readonly<AxProgram<IN, OUT>>, metricFn: AxMultiMetricFn, options?: AxCompileOptions): Promise<AxParetoResult<OUT>>;
3011
+ /**
3012
+ * Generate solutions using different weighted combinations of objectives
3013
+ */
3014
+ private generateWeightedSolutions;
3015
+ /**
3016
+ * Generate solutions using constraint-based optimization
3017
+ */
3018
+ private generateConstraintSolutions;
3019
+ /**
3020
+ * Generate different weight combinations for objectives
3021
+ */
3022
+ private generateWeightCombinations;
3023
+ /**
3024
+ * Evaluate a single-objective result with multi-objective metrics
3025
+ */
3026
+ private evaluateWithMultiObjective;
3027
+ /**
3028
+ * Find the Pareto frontier from a set of solutions
3029
+ */
3030
+ private findParetoFrontier;
3031
+ /**
3032
+ * Check if solution A dominates solution B
3033
+ * A dominates B if A is better or equal in all objectives and strictly better in at least one
3034
+ */
3035
+ private dominates;
3036
+ /**
3037
+ * Calculate hypervolume of the Pareto frontier
3038
+ * Simplified implementation using reference point at origin
3039
+ */
3040
+ private calculateHypervolume;
3041
+ /**
3042
+ * Save current optimization state to checkpoint
3043
+ */
3044
+ protected saveCheckpoint(optimizerType: string, optimizerConfig: Record<string, unknown>, bestScore: number, bestConfiguration?: Record<string, unknown>, optimizerState?: Record<string, unknown>, options?: AxCompileOptions): Promise<string | undefined>;
3045
+ /**
3046
+ * Load optimization state from checkpoint
3047
+ */
3048
+ protected loadCheckpoint(checkpointId: string, options?: AxCompileOptions): Promise<AxOptimizationCheckpoint | null>;
3049
+ /**
3050
+ * Restore optimizer state from checkpoint
3051
+ */
3052
+ protected restoreFromCheckpoint(checkpoint: Readonly<AxOptimizationCheckpoint>): void;
3053
+ /**
3054
+ * Check if checkpoint should be saved
3055
+ */
3056
+ protected shouldSaveCheckpoint(round: number, options?: AxCompileOptions): boolean;
3057
+ /**
3058
+ * Update optimization progress and handle checkpointing
3059
+ */
3060
+ protected updateOptimizationProgress(round: number, score: number, configuration: Record<string, unknown>, optimizerType: string, optimizerConfig: Record<string, unknown>, bestScore: number, bestConfiguration?: Record<string, unknown>, optimizerState?: Record<string, unknown>, options?: AxCompileOptions): Promise<void>;
3061
+ /**
3062
+ * Save final checkpoint on completion
3063
+ */
3064
+ protected saveFinalCheckpoint(optimizerType: string, optimizerConfig: Record<string, unknown>, bestScore: number, bestConfiguration?: Record<string, unknown>, optimizerState?: Record<string, unknown>, options?: AxCompileOptions): Promise<void>;
3065
+ }
3066
+
2637
3067
  type AxDBUpsertRequest = {
2638
3068
  id: string;
2639
3069
  text?: string;
@@ -2901,7 +3331,7 @@ declare class AxGen<IN extends AxGenIn, OUT extends AxGenerateResult<AxGenOut> =
2901
3331
  version: number;
2902
3332
  delta: Partial<OUT>;
2903
3333
  }, void, unknown>;
2904
- setExamples(examples: Readonly<AxProgramExamples>, options?: Readonly<AxSetExamplesOptions>): void;
3334
+ setExamples(examples: Readonly<AxProgramExamples<IN, OUT>>, options?: Readonly<AxSetExamplesOptions>): void;
2905
3335
  private isDebug;
2906
3336
  private getLogger;
2907
3337
  }
@@ -3251,111 +3681,10 @@ declare class AxMCPStreambleHTTPTransport implements AxMCPTransport {
3251
3681
  close(): void;
3252
3682
  }
3253
3683
 
3254
- type AxExample = Record<string, AxFieldValue>;
3255
- type AxMetricFn = <T extends AxGenOut = AxGenOut>(arg0: Readonly<{
3256
- prediction: T;
3257
- example: AxExample;
3258
- }>) => number;
3259
- type AxMetricFnArgs = Parameters<AxMetricFn>[0];
3260
- type AxOptimizerArgs<IN extends AxGenIn, OUT extends AxGenOut> = {
3261
- ai: AxAIService;
3262
- program: Readonly<AxProgram<IN, OUT>>;
3263
- examples: Readonly<AxExample[]>;
3264
- options?: Record<string, unknown>;
3265
- };
3266
- interface AxOptimizationStats {
3267
- totalCalls: number;
3268
- successfulDemos: number;
3269
- estimatedTokenUsage: number;
3270
- earlyStopped: boolean;
3271
- earlyStopping?: {
3272
- bestScoreRound: number;
3273
- patienceExhausted: boolean;
3274
- };
3275
- }
3276
- interface AxOptimizerResult<IN extends AxGenIn, OUT extends AxGenOut> {
3277
- program?: Readonly<AxProgram<IN, OUT>>;
3278
- demos?: AxProgramDemos[];
3279
- stats?: AxOptimizationStats;
3280
- }
3281
- interface AxOptimizer<IN extends AxGenIn = AxGenIn, OUT extends AxGenOut = AxGenOut> {
3282
- /**
3283
- * Main optimization method that optimizes the program using the provided metric function
3284
- * @param metricFn Evaluation metric function to assess program performance
3285
- * @param options Optional configuration options specific to the optimizer
3286
- * @returns Optimization result containing the optimized program, demos, and/or stats
3287
- */
3288
- compile(metricFn: AxMetricFn, options?: Record<string, unknown>): Promise<AxOptimizerResult<IN, OUT>>;
3289
- /**
3290
- * Get optimization statistics if available
3291
- * @returns Optimization statistics or undefined if not supported
3292
- */
3293
- getStats?(): AxOptimizationStats | undefined;
3294
- }
3295
- interface AxBootstrapOptimizerOptions {
3296
- maxRounds?: number;
3297
- maxExamples?: number;
3298
- maxDemos?: number;
3299
- batchSize?: number;
3300
- earlyStoppingPatience?: number;
3301
- teacherAI?: AxAIService;
3302
- costMonitoring?: boolean;
3303
- maxTokensPerGeneration?: number;
3304
- verboseMode?: boolean;
3305
- debugMode?: boolean;
3306
- }
3307
- interface AxMiPROOptimizerOptions {
3308
- numCandidates?: number;
3309
- initTemperature?: number;
3310
- maxBootstrappedDemos?: number;
3311
- maxLabeledDemos?: number;
3312
- numTrials?: number;
3313
- minibatch?: boolean;
3314
- minibatchSize?: number;
3315
- minibatchFullEvalSteps?: number;
3316
- programAwareProposer?: boolean;
3317
- dataAwareProposer?: boolean;
3318
- viewDataBatchSize?: number;
3319
- tipAwareProposer?: boolean;
3320
- fewshotAwareProposer?: boolean;
3321
- seed?: number;
3322
- verbose?: boolean;
3323
- earlyStoppingTrials?: number;
3324
- minImprovementThreshold?: number;
3325
- }
3326
- interface AxBootstrapCompileOptions {
3327
- valset?: readonly AxExample[];
3328
- maxDemos?: number;
3329
- }
3330
- interface AxMiPROCompileOptions {
3331
- valset?: readonly AxExample[];
3332
- teacher?: Readonly<AxProgram<AxGenIn, AxGenOut>>;
3333
- auto?: 'light' | 'medium' | 'heavy';
3334
- }
3335
-
3336
- interface AxMiPROOptions {
3337
- numCandidates?: number;
3338
- initTemperature?: number;
3339
- maxBootstrappedDemos?: number;
3340
- maxLabeledDemos?: number;
3341
- numTrials?: number;
3342
- minibatch?: boolean;
3343
- minibatchSize?: number;
3344
- minibatchFullEvalSteps?: number;
3345
- programAwareProposer?: boolean;
3346
- dataAwareProposer?: boolean;
3347
- viewDataBatchSize?: number;
3348
- tipAwareProposer?: boolean;
3349
- fewshotAwareProposer?: boolean;
3350
- seed?: number;
3351
- verbose?: boolean;
3352
- earlyStoppingTrials?: number;
3353
- minImprovementThreshold?: number;
3684
+ interface AxMiPROResult<IN extends AxGenIn, OUT extends AxGenOut> extends AxOptimizerResult<OUT> {
3685
+ optimizedGen?: AxGen<IN, OUT>;
3354
3686
  }
3355
- declare class AxMiPRO<IN extends AxGenIn = AxGenIn, OUT extends AxGenOut = AxGenOut> implements AxOptimizer<IN, OUT> {
3356
- private ai;
3357
- private program;
3358
- private examples;
3687
+ declare class AxMiPRO<IN extends AxGenIn = AxGenIn, OUT extends AxGenOut = AxGenOut> extends AxBaseOptimizer<IN, OUT> {
3359
3688
  private maxBootstrappedDemos;
3360
3689
  private maxLabeledDemos;
3361
3690
  private numCandidates;
@@ -3369,14 +3698,15 @@ declare class AxMiPRO<IN extends AxGenIn = AxGenIn, OUT extends AxGenOut = AxGen
3369
3698
  private viewDataBatchSize;
3370
3699
  private tipAwareProposer;
3371
3700
  private fewshotAwareProposer;
3372
- private seed?;
3373
3701
  private verbose;
3374
- private bootstrapper;
3375
3702
  private earlyStoppingTrials;
3376
3703
  private minImprovementThreshold;
3377
- constructor({ ai, program, examples, options, }: Readonly<AxOptimizerArgs<IN, OUT>> & {
3378
- options?: AxMiPROOptions;
3379
- });
3704
+ private bayesianOptimization;
3705
+ private acquisitionFunction;
3706
+ private explorationWeight;
3707
+ constructor(args: Readonly<AxOptimizerArgs & {
3708
+ options?: AxMiPROOptimizerOptions;
3709
+ }>);
3380
3710
  /**
3381
3711
  * Configures the optimizer for light, medium, or heavy optimization
3382
3712
  * @param level The optimization level: "light", "medium", or "heavy"
@@ -3387,21 +3717,11 @@ declare class AxMiPRO<IN extends AxGenIn = AxGenIn, OUT extends AxGenOut = AxGen
3387
3717
  */
3388
3718
  private generateTips;
3389
3719
  /**
3390
- * Generates instruction candidates for each predictor in the program
3720
+ * Generates instruction candidates using the teacher model if available
3721
+ * @param options Optional compile options that may override teacher AI
3391
3722
  * @returns Array of generated instruction candidates
3392
3723
  */
3393
3724
  private proposeInstructionCandidates;
3394
- /**
3395
- * Generates a summary of the program structure for instruction proposal
3396
- */
3397
- private generateProgramSummary;
3398
- /**
3399
- * Generates a summary of the dataset for instruction proposal
3400
- */
3401
- private generateDataSummary;
3402
- /**
3403
- * Generates a specific instruction candidate
3404
- */
3405
3725
  private generateInstruction;
3406
3726
  /**
3407
3727
  * Bootstraps few-shot examples for the program
@@ -3412,43 +3732,43 @@ declare class AxMiPRO<IN extends AxGenIn = AxGenIn, OUT extends AxGenOut = AxGen
3412
3732
  */
3413
3733
  private selectLabeledExamples;
3414
3734
  /**
3415
- * Runs Bayesian optimization to find the best combination of few-shot examples and instructions
3416
- */
3417
- private runBayesianOptimization;
3418
- /**
3419
- * Evaluates a configuration on the validation set
3735
+ * Runs optimization to find the best combination of few-shot examples and instructions
3420
3736
  */
3737
+ private runOptimization;
3421
3738
  private evaluateConfig;
3739
+ private applyConfigToProgram;
3422
3740
  /**
3423
- * Run full evaluation on the entire validation set
3741
+ * The main compile method to run MIPROv2 optimization
3424
3742
  */
3425
- private fullEvaluation;
3743
+ compile(program: Readonly<AxProgram<IN, OUT>>, metricFn: AxMetricFn, options?: AxCompileOptions): Promise<AxMiPROResult<IN, OUT>>;
3426
3744
  /**
3427
- * Implements a Bayesian-inspired selection of the next configuration to try
3428
- * This is a simplified version using Upper Confidence Bound (UCB) strategy
3745
+ * Applies a configuration to an AxGen instance
3429
3746
  */
3430
- private selectNextConfiguration;
3747
+ private applyConfigToAxGen;
3431
3748
  /**
3432
- * Applies a configuration to a program instance
3749
+ * Get optimizer-specific configuration
3750
+ * @returns Current optimizer configuration
3433
3751
  */
3434
- private applyConfigToProgram;
3752
+ getConfiguration(): Record<string, unknown>;
3435
3753
  /**
3436
- * Sets instruction to a program
3437
- * Note: Workaround since setInstruction may not be available directly
3754
+ * Update optimizer configuration
3755
+ * @param config New configuration to merge with existing
3438
3756
  */
3439
- private setInstructionToProgram;
3757
+ updateConfiguration(config: Readonly<Record<string, unknown>>): void;
3440
3758
  /**
3441
- * The main compile method to run MIPROv2 optimization
3442
- * @param metricFn Evaluation metric function
3443
- * @param options Optional configuration options
3444
- * @returns The optimization result
3759
+ * Reset optimizer state for reuse with different programs
3445
3760
  */
3446
- compile(metricFn: AxMetricFn, options?: Record<string, unknown>): Promise<AxOptimizerResult<IN, OUT>>;
3761
+ reset(): void;
3447
3762
  /**
3448
- * Get optimization statistics from the internal bootstrapper
3449
- * @returns Optimization statistics or undefined if not available
3763
+ * Validate that the optimizer can handle the given program
3764
+ * @param program Program to validate
3765
+ * @returns Validation result with any issues found
3450
3766
  */
3451
- getStats(): AxOptimizationStats | undefined;
3767
+ validateProgram(program: Readonly<AxProgram<IN, OUT>>): {
3768
+ isValid: boolean;
3769
+ issues: string[];
3770
+ suggestions: string[];
3771
+ };
3452
3772
  }
3453
3773
 
3454
3774
  type AxMockAIServiceConfig = {
@@ -3608,11 +3928,7 @@ Readonly<AxAIOpenAIEmbedResponse>> {
3608
3928
  createEmbedReq(req: Readonly<AxInternalEmbedRequest<TEmbedModel>>): [AxAPI, AxAIOpenAIEmbedRequest<TEmbedModel>];
3609
3929
  }
3610
3930
 
3611
- declare class AxBootstrapFewShot<IN extends AxGenIn = AxGenIn, OUT extends AxGenOut = AxGenOut> implements AxOptimizer<IN, OUT> {
3612
- private ai;
3613
- private teacherAI?;
3614
- private program;
3615
- private examples;
3931
+ declare class AxBootstrapFewShot<IN extends AxGenIn = AxGenIn, OUT extends AxGenOut = AxGenOut> extends AxBaseOptimizer<IN, OUT> {
3616
3932
  private maxRounds;
3617
3933
  private maxDemos;
3618
3934
  private maxExamples;
@@ -3623,11 +3939,11 @@ declare class AxBootstrapFewShot<IN extends AxGenIn = AxGenIn, OUT extends AxGen
3623
3939
  private verboseMode;
3624
3940
  private debugMode;
3625
3941
  private traces;
3626
- private stats;
3627
- constructor({ ai, program, examples, options, }: Readonly<AxOptimizerArgs<IN, OUT>>);
3942
+ constructor(args: Readonly<AxOptimizerArgs & {
3943
+ options?: AxBootstrapOptimizerOptions;
3944
+ }>);
3628
3945
  private compileRound;
3629
- compile(metricFn: AxMetricFn, options?: Record<string, unknown>): Promise<AxOptimizerResult<IN, OUT>>;
3630
- getStats(): AxOptimizationStats;
3946
+ compile(program: Readonly<AxProgram<IN, OUT>>, metricFn: AxMetricFn, options?: AxBootstrapCompileOptions): Promise<AxOptimizerResult<OUT>>;
3631
3947
  }
3632
3948
 
3633
3949
  declare class AxChainOfThought<IN extends AxGenIn = AxGenIn, OUT extends AxGenOut = AxGenOut> extends AxGen<IN, OUT> {
@@ -3701,11 +4017,12 @@ declare const AxEvalUtil: {
3701
4017
  novelF1ScoreOptimized: typeof novelF1ScoreOptimized;
3702
4018
  };
3703
4019
 
3704
- declare class AxInstanceRegistry<T> {
4020
+ type AxInstanceRegistryItem<T extends AxTunable<IN, OUT>, IN extends AxGenIn, OUT extends AxGenOut> = T & AxUsable;
4021
+ declare class AxInstanceRegistry<T extends AxTunable<IN, OUT>, IN extends AxGenIn, OUT extends AxGenOut> {
3705
4022
  private reg;
3706
4023
  constructor();
3707
- register(instance: T): void;
3708
- [Symbol.iterator](): Generator<T, void, unknown>;
4024
+ register(instance: AxInstanceRegistryItem<T, IN, OUT>): void;
4025
+ [Symbol.iterator](): Generator<AxInstanceRegistryItem<T, IN, OUT> | undefined, void, unknown>;
3709
4026
  }
3710
4027
 
3711
4028
  /**
@@ -3928,4 +4245,4 @@ declare const axModelInfoReka: AxModelInfo[];
3928
4245
 
3929
4246
  declare const axModelInfoTogether: AxModelInfo[];
3930
4247
 
3931
- export { AxAI, AxAIAnthropic, type AxAIAnthropicArgs, type AxAIAnthropicChatError, type AxAIAnthropicChatRequest, type AxAIAnthropicChatRequestCacheParam, type AxAIAnthropicChatResponse, type AxAIAnthropicChatResponseDelta, type AxAIAnthropicConfig, type AxAIAnthropicContentBlockDeltaEvent, type AxAIAnthropicContentBlockStartEvent, type AxAIAnthropicContentBlockStopEvent, type AxAIAnthropicErrorEvent, type AxAIAnthropicMessageDeltaEvent, type AxAIAnthropicMessageStartEvent, type AxAIAnthropicMessageStopEvent, AxAIAnthropicModel, type AxAIAnthropicPingEvent, AxAIAnthropicVertexModel, type AxAIArgs, AxAIAzureOpenAI, type AxAIAzureOpenAIArgs, type AxAIAzureOpenAIConfig, AxAICohere, type AxAICohereArgs, type AxAICohereChatRequest, type AxAICohereChatRequestToolResults, type AxAICohereChatResponse, type AxAICohereChatResponseDelta, type AxAICohereChatResponseToolCalls, type AxAICohereConfig, AxAICohereEmbedModel, type AxAICohereEmbedRequest, type AxAICohereEmbedResponse, AxAICohereModel, AxAIDeepSeek, type AxAIDeepSeekArgs, AxAIDeepSeekModel, type AxAIEmbedModels, type AxAIFeatures, AxAIGoogleGemini, type AxAIGoogleGeminiArgs, type AxAIGoogleGeminiBatchEmbedRequest, type AxAIGoogleGeminiBatchEmbedResponse, type AxAIGoogleGeminiChatRequest, type AxAIGoogleGeminiChatResponse, type AxAIGoogleGeminiChatResponseDelta, type AxAIGoogleGeminiConfig, type AxAIGoogleGeminiContent, type AxAIGoogleGeminiContentPart, AxAIGoogleGeminiEmbedModel, AxAIGoogleGeminiEmbedTypes, type AxAIGoogleGeminiGenerationConfig, AxAIGoogleGeminiModel, type AxAIGoogleGeminiOptionsTools, AxAIGoogleGeminiSafetyCategory, type AxAIGoogleGeminiSafetySettings, AxAIGoogleGeminiSafetyThreshold, type AxAIGoogleGeminiThinkingConfig, type AxAIGoogleGeminiThinkingTokenBudgetLevels, type AxAIGoogleGeminiTool, type AxAIGoogleGeminiToolConfig, type AxAIGoogleGeminiToolFunctionDeclaration, type AxAIGoogleGeminiToolGoogleSearchRetrieval, type AxAIGoogleVertexBatchEmbedRequest, type AxAIGoogleVertexBatchEmbedResponse, AxAIGrok, type AxAIGrokArgs, type AxAIGrokChatRequest, AxAIGrokEmbedModels, AxAIGrokModel, type AxAIGrokOptionsTools, type AxAIGrokSearchSource, AxAIGroq, type AxAIGroqArgs, AxAIGroqModel, AxAIHuggingFace, type AxAIHuggingFaceArgs, type AxAIHuggingFaceConfig, AxAIHuggingFaceModel, type AxAIHuggingFaceRequest, type AxAIHuggingFaceResponse, type AxAIInputModelList, type AxAIMemory, AxAIMistral, type AxAIMistralArgs, type AxAIMistralChatRequest, AxAIMistralEmbedModels, AxAIMistralModel, type AxAIModelList, type AxAIModelListBase, type AxAIModels, AxAIOllama, type AxAIOllamaAIConfig, type AxAIOllamaArgs, AxAIOpenAI, type AxAIOpenAIArgs, AxAIOpenAIBase, type AxAIOpenAIBaseArgs, type AxAIOpenAIChatRequest, type AxAIOpenAIChatResponse, type AxAIOpenAIChatResponseDelta, type AxAIOpenAIConfig, AxAIOpenAIEmbedModel, type AxAIOpenAIEmbedRequest, type AxAIOpenAIEmbedResponse, type AxAIOpenAILogprob, AxAIOpenAIModel, type AxAIOpenAIResponseDelta, 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 AxAIOpenAIUsage, type AxAIPromptConfig, AxAIReka, type AxAIRekaArgs, type AxAIRekaChatRequest, type AxAIRekaChatResponse, type AxAIRekaChatResponseDelta, type AxAIRekaConfig, AxAIRekaModel, type AxAIRekaUsage, type AxAIService, AxAIServiceAbortedError, type AxAIServiceActionOptions, AxAIServiceAuthenticationError, AxAIServiceError, type AxAIServiceImpl, type AxAIServiceMetrics, AxAIServiceNetworkError, type AxAIServiceOptions, AxAIServiceResponseError, AxAIServiceStatusError, AxAIServiceStreamTerminatedError, AxAIServiceTimeoutError, AxAITogether, type AxAITogetherArgs, type AxAPI, type AxAPIConfig, AxAgent, type AxAgentFeatures, type AxAgentOptions, type AxAgentic, AxApacheTika, type AxApacheTikaArgs, type AxApacheTikaConvertOptions, type AxAssertion, AxAssertionError, AxBalancer, type AxBalancerOptions, AxBaseAI, type AxBaseAIArgs, type AxBootstrapCompileOptions, AxBootstrapFewShot, type AxBootstrapOptimizerOptions, AxChainOfThought, type AxChatRequest, type AxChatResponse, type AxChatResponseFunctionCall, type AxChatResponseResult, AxDB, type AxDBArgs, AxDBBase, type AxDBBaseArgs, type AxDBBaseOpOptions, AxDBCloudflare, type AxDBCloudflareArgs, type AxDBCloudflareOpOptions, type AxDBLoaderOptions, AxDBManager, type AxDBManagerArgs, type AxDBMatch, AxDBMemory, type AxDBMemoryArgs, type AxDBMemoryOpOptions, AxDBPinecone, type AxDBPineconeArgs, type AxDBPineconeOpOptions, type AxDBQueryRequest, type AxDBQueryResponse, type AxDBQueryService, type AxDBService, type AxDBState, type AxDBUpsertRequest, type AxDBUpsertResponse, AxDBWeaviate, type AxDBWeaviateArgs, type AxDBWeaviateOpOptions, type AxDataRow, AxDefaultQueryRewriter, AxDefaultResultReranker, type AxDockerContainer, AxDockerSession, type AxEmbedRequest, type AxEmbedResponse, AxEmbeddingAdapter, AxEvalUtil, type AxEvaluateArgs, type AxExample, type AxField, type AxFieldDescriptor, type AxFieldProcessor, type AxFieldProcessorProcess, type AxFieldTemplateFn, type AxFieldType, type AxFieldValue, type AxFunction, AxFunctionError, type AxFunctionHandler, type AxFunctionJSONSchema, AxFunctionProcessor, AxGen, type AxGenDeltaOut, type AxGenIn, type AxGenOut, type AxGenStreamingOut, AxGenerateError, type AxGenerateErrorDetails, type AxGenerateResult, AxHFDataLoader, type AxIField, type AxInputFunctionType, AxInstanceRegistry, type AxInternalChatRequest, type AxInternalEmbedRequest, AxJSInterpreter, AxJSInterpreterPermission, AxLLMRequestTypeValues, type AxLoggerFunction, type AxLoggerTag, AxMCPClient, AxMCPHTTPSSETransport, AxMCPStdioTransport, type AxMCPStreamableHTTPTransportOptions, AxMCPStreambleHTTPTransport, type AxMCPTransport, AxMemory, type AxMessage, type AxMetricFn, type AxMetricFnArgs, AxMiPRO, type AxMiPROCompileOptions, type AxMiPROOptimizerOptions, type AxMiPROOptions, AxMockAIService, type AxMockAIServiceConfig, type AxModelConfig, type AxModelInfo, type AxModelInfoWithProvider, type AxModelUsage, AxMultiServiceRouter, type AxOptimizationStats, type AxOptimizer, type AxOptimizerArgs, type AxOptimizerResult, AxProgram, type AxProgramDemos, type AxProgramExamples, type AxProgramForwardOptions, type AxProgramStreamingForwardOptions, type AxProgramTrace, type AxProgramUsage, AxProgramWithSignature, type AxProgramWithSignatureOptions, AxPromptTemplate, type AxPromptTemplateOptions, AxRAG, type AxRateLimiterFunction, AxRateLimiterTokenUsage, type AxRateLimiterTokenUsageOptions, type AxRerankerIn, type AxRerankerOut, type AxResponseHandlerArgs, type AxRewriteIn, type AxRewriteOut, AxRewriter, type AxSetExamplesOptions, AxSignature, type AxSignatureConfig, type AxSignatureTemplateValue, AxSimpleClassifier, AxSimpleClassifierClass, type AxSimpleClassifierForwardOptions, AxSpanKindValues, type AxStreamingAssertion, type AxStreamingEvent, type AxStreamingFieldProcessorProcess, AxStringUtil, AxTestPrompt, type AxTokenUsage, type AxTunable, type AxUsable, ax, axAIAnthropicDefaultConfig, axAIAnthropicVertexDefaultConfig, axAIAzureOpenAIBestConfig, axAIAzureOpenAICreativeConfig, axAIAzureOpenAIDefaultConfig, axAIAzureOpenAIFastConfig, axAICohereCreativeConfig, axAICohereDefaultConfig, axAIDeepSeekCodeConfig, axAIDeepSeekDefaultConfig, axAIGoogleGeminiDefaultConfig, axAIGoogleGeminiDefaultCreativeConfig, axAIGrokBestConfig, axAIGrokDefaultConfig, axAIHuggingFaceCreativeConfig, axAIHuggingFaceDefaultConfig, axAIMistralBestConfig, axAIMistralDefaultConfig, axAIOllamaDefaultConfig, axAIOllamaDefaultCreativeConfig, axAIOpenAIBestConfig, axAIOpenAICreativeConfig, axAIOpenAIDefaultConfig, axAIOpenAIFastConfig, axAIOpenAIResponsesBestConfig, axAIOpenAIResponsesCreativeConfig, axAIOpenAIResponsesDefaultConfig, axAIRekaBestConfig, axAIRekaCreativeConfig, axAIRekaDefaultConfig, axAIRekaFastConfig, axAITogetherDefaultConfig, axBaseAIDefaultConfig, axBaseAIDefaultCreativeConfig, axGlobals, axModelInfoAnthropic, axModelInfoCohere, axModelInfoDeepSeek, axModelInfoGoogleGemini, axModelInfoGrok, axModelInfoGroq, axModelInfoHuggingFace, axModelInfoMistral, axModelInfoOpenAI, axModelInfoReka, axModelInfoTogether, axSpanAttributes, axSpanEvents, f, s };
4248
+ export { AxAI, AxAIAnthropic, type AxAIAnthropicArgs, type AxAIAnthropicChatError, type AxAIAnthropicChatRequest, type AxAIAnthropicChatRequestCacheParam, type AxAIAnthropicChatResponse, type AxAIAnthropicChatResponseDelta, type AxAIAnthropicConfig, type AxAIAnthropicContentBlockDeltaEvent, type AxAIAnthropicContentBlockStartEvent, type AxAIAnthropicContentBlockStopEvent, type AxAIAnthropicErrorEvent, type AxAIAnthropicMessageDeltaEvent, type AxAIAnthropicMessageStartEvent, type AxAIAnthropicMessageStopEvent, AxAIAnthropicModel, type AxAIAnthropicPingEvent, AxAIAnthropicVertexModel, type AxAIArgs, AxAIAzureOpenAI, type AxAIAzureOpenAIArgs, type AxAIAzureOpenAIConfig, AxAICohere, type AxAICohereArgs, type AxAICohereChatRequest, type AxAICohereChatRequestToolResults, type AxAICohereChatResponse, type AxAICohereChatResponseDelta, type AxAICohereChatResponseToolCalls, type AxAICohereConfig, AxAICohereEmbedModel, type AxAICohereEmbedRequest, type AxAICohereEmbedResponse, AxAICohereModel, AxAIDeepSeek, type AxAIDeepSeekArgs, AxAIDeepSeekModel, type AxAIEmbedModels, type AxAIFeatures, AxAIGoogleGemini, type AxAIGoogleGeminiArgs, type AxAIGoogleGeminiBatchEmbedRequest, type AxAIGoogleGeminiBatchEmbedResponse, type AxAIGoogleGeminiChatRequest, type AxAIGoogleGeminiChatResponse, type AxAIGoogleGeminiChatResponseDelta, type AxAIGoogleGeminiConfig, type AxAIGoogleGeminiContent, type AxAIGoogleGeminiContentPart, AxAIGoogleGeminiEmbedModel, AxAIGoogleGeminiEmbedTypes, type AxAIGoogleGeminiGenerationConfig, AxAIGoogleGeminiModel, type AxAIGoogleGeminiOptionsTools, AxAIGoogleGeminiSafetyCategory, type AxAIGoogleGeminiSafetySettings, AxAIGoogleGeminiSafetyThreshold, type AxAIGoogleGeminiThinkingConfig, type AxAIGoogleGeminiThinkingTokenBudgetLevels, type AxAIGoogleGeminiTool, type AxAIGoogleGeminiToolConfig, type AxAIGoogleGeminiToolFunctionDeclaration, type AxAIGoogleGeminiToolGoogleSearchRetrieval, type AxAIGoogleVertexBatchEmbedRequest, type AxAIGoogleVertexBatchEmbedResponse, AxAIGrok, type AxAIGrokArgs, type AxAIGrokChatRequest, AxAIGrokEmbedModels, AxAIGrokModel, type AxAIGrokOptionsTools, type AxAIGrokSearchSource, AxAIGroq, type AxAIGroqArgs, AxAIGroqModel, AxAIHuggingFace, type AxAIHuggingFaceArgs, type AxAIHuggingFaceConfig, AxAIHuggingFaceModel, type AxAIHuggingFaceRequest, type AxAIHuggingFaceResponse, type AxAIInputModelList, type AxAIMemory, AxAIMistral, type AxAIMistralArgs, type AxAIMistralChatRequest, AxAIMistralEmbedModels, AxAIMistralModel, type AxAIModelList, type AxAIModelListBase, type AxAIModels, AxAIOllama, type AxAIOllamaAIConfig, type AxAIOllamaArgs, AxAIOpenAI, type AxAIOpenAIArgs, AxAIOpenAIBase, type AxAIOpenAIBaseArgs, type AxAIOpenAIChatRequest, type AxAIOpenAIChatResponse, type AxAIOpenAIChatResponseDelta, type AxAIOpenAIConfig, AxAIOpenAIEmbedModel, type AxAIOpenAIEmbedRequest, type AxAIOpenAIEmbedResponse, type AxAIOpenAILogprob, AxAIOpenAIModel, type AxAIOpenAIResponseDelta, 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 AxAIOpenAIUsage, type AxAIPromptConfig, AxAIReka, type AxAIRekaArgs, type AxAIRekaChatRequest, type AxAIRekaChatResponse, type AxAIRekaChatResponseDelta, type AxAIRekaConfig, AxAIRekaModel, type AxAIRekaUsage, type AxAIService, AxAIServiceAbortedError, type AxAIServiceActionOptions, AxAIServiceAuthenticationError, AxAIServiceError, type AxAIServiceImpl, type AxAIServiceMetrics, AxAIServiceNetworkError, type AxAIServiceOptions, AxAIServiceResponseError, AxAIServiceStatusError, AxAIServiceStreamTerminatedError, AxAIServiceTimeoutError, AxAITogether, type AxAITogetherArgs, type AxAPI, type AxAPIConfig, AxAgent, type AxAgentFeatures, type AxAgentOptions, type AxAgentic, AxApacheTika, type AxApacheTikaArgs, type AxApacheTikaConvertOptions, type AxAssertion, AxAssertionError, AxBalancer, type AxBalancerOptions, AxBaseAI, type AxBaseAIArgs, AxBaseOptimizer, type AxBootstrapCompileOptions, AxBootstrapFewShot, type AxBootstrapOptimizerOptions, AxChainOfThought, type AxChatRequest, type AxChatResponse, type AxChatResponseFunctionCall, type AxChatResponseResult, type AxCheckpointLoadFn, type AxCheckpointSaveFn, type AxCompileOptions, type AxCostTracker, type AxCostTrackerOptions, AxDB, type AxDBArgs, AxDBBase, type AxDBBaseArgs, type AxDBBaseOpOptions, AxDBCloudflare, type AxDBCloudflareArgs, type AxDBCloudflareOpOptions, type AxDBLoaderOptions, AxDBManager, type AxDBManagerArgs, type AxDBMatch, AxDBMemory, type AxDBMemoryArgs, type AxDBMemoryOpOptions, AxDBPinecone, type AxDBPineconeArgs, type AxDBPineconeOpOptions, type AxDBQueryRequest, type AxDBQueryResponse, type AxDBQueryService, type AxDBService, type AxDBState, type AxDBUpsertRequest, type AxDBUpsertResponse, AxDBWeaviate, type AxDBWeaviateArgs, type AxDBWeaviateOpOptions, type AxDataRow, AxDefaultCostTracker, AxDefaultQueryRewriter, AxDefaultResultReranker, type AxDockerContainer, AxDockerSession, type AxEmbedRequest, type AxEmbedResponse, AxEmbeddingAdapter, AxEvalUtil, type AxEvaluateArgs, type AxExample, type AxField, type AxFieldDescriptor, type AxFieldProcessor, type AxFieldProcessorProcess, type AxFieldTemplateFn, type AxFieldType, type AxFieldValue, type AxFunction, AxFunctionError, type AxFunctionHandler, type AxFunctionJSONSchema, AxFunctionProcessor, AxGen, type AxGenDeltaOut, type AxGenIn, type AxGenOut, type AxGenStreamingOut, AxGenerateError, type AxGenerateErrorDetails, type AxGenerateResult, AxHFDataLoader, type AxIField, type AxInputFunctionType, AxInstanceRegistry, type AxInternalChatRequest, type AxInternalEmbedRequest, AxJSInterpreter, AxJSInterpreterPermission, AxLLMRequestTypeValues, type AxLoggerFunction, type AxLoggerTag, AxMCPClient, AxMCPHTTPSSETransport, AxMCPStdioTransport, type AxMCPStreamableHTTPTransportOptions, AxMCPStreambleHTTPTransport, type AxMCPTransport, AxMemory, type AxMessage, type AxMetricFn, type AxMetricFnArgs, AxMiPRO, type AxMiPROCompileOptions, type AxMiPROOptimizerOptions, type AxMiPROResult, AxMockAIService, type AxMockAIServiceConfig, type AxModelConfig, type AxModelInfo, type AxModelInfoWithProvider, type AxModelUsage, type AxMultiMetricFn, AxMultiServiceRouter, type AxOptimizationCheckpoint, type AxOptimizationProgress, type AxOptimizationStats, type AxOptimizer, type AxOptimizerArgs, type AxOptimizerResult, type AxParetoResult, AxProgram, type AxProgramDemos, type AxProgramExamples, type AxProgramForwardOptions, type AxProgramStreamingForwardOptions, type AxProgramTrace, type AxProgramUsage, AxProgramWithSignature, type AxProgramWithSignatureOptions, AxPromptTemplate, type AxPromptTemplateOptions, AxRAG, type AxRateLimiterFunction, AxRateLimiterTokenUsage, type AxRateLimiterTokenUsageOptions, type AxRerankerIn, type AxRerankerOut, type AxResponseHandlerArgs, type AxRewriteIn, type AxRewriteOut, AxRewriter, type AxSetExamplesOptions, AxSignature, type AxSignatureConfig, type AxSignatureTemplateValue, AxSimpleClassifier, AxSimpleClassifierClass, type AxSimpleClassifierForwardOptions, AxSpanKindValues, type AxStreamingAssertion, type AxStreamingEvent, type AxStreamingFieldProcessorProcess, AxStringUtil, AxTestPrompt, type AxTokenUsage, type AxTunable, type AxUsable, ax, axAIAnthropicDefaultConfig, axAIAnthropicVertexDefaultConfig, axAIAzureOpenAIBestConfig, axAIAzureOpenAICreativeConfig, axAIAzureOpenAIDefaultConfig, axAIAzureOpenAIFastConfig, axAICohereCreativeConfig, axAICohereDefaultConfig, axAIDeepSeekCodeConfig, axAIDeepSeekDefaultConfig, axAIGoogleGeminiDefaultConfig, axAIGoogleGeminiDefaultCreativeConfig, axAIGrokBestConfig, axAIGrokDefaultConfig, axAIHuggingFaceCreativeConfig, axAIHuggingFaceDefaultConfig, axAIMistralBestConfig, axAIMistralDefaultConfig, axAIOllamaDefaultConfig, axAIOllamaDefaultCreativeConfig, axAIOpenAIBestConfig, axAIOpenAICreativeConfig, axAIOpenAIDefaultConfig, axAIOpenAIFastConfig, axAIOpenAIResponsesBestConfig, axAIOpenAIResponsesCreativeConfig, axAIOpenAIResponsesDefaultConfig, axAIRekaBestConfig, axAIRekaCreativeConfig, axAIRekaDefaultConfig, axAIRekaFastConfig, axAITogetherDefaultConfig, axBaseAIDefaultConfig, axBaseAIDefaultCreativeConfig, axGlobals, axModelInfoAnthropic, axModelInfoCohere, axModelInfoDeepSeek, axModelInfoGoogleGemini, axModelInfoGrok, axModelInfoGroq, axModelInfoHuggingFace, axModelInfoMistral, axModelInfoOpenAI, axModelInfoReka, axModelInfoTogether, axSpanAttributes, axSpanEvents, f, s };