AxBalancerOptions
type AxBalancerOptions<TModelKey> = object;Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/ai/balance.ts#L85
Options for the balancer.
Type Parameters
| Type Parameter | Default type |
|---|---|
TModelKey | string |
Properties
comparator()?
optional comparator: (a: AxAIService<unknown, unknown, TModelKey>, b: AxAIService<unknown, unknown, TModelKey>) => number;Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/ai/balance.ts#L86
Parameters
| Parameter | Type |
|---|---|
a | AxAIService<unknown, unknown, TModelKey> |
b | AxAIService<unknown, unknown, TModelKey> |
Returns
number
debug?
optional debug: boolean;Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/ai/balance.ts#L90
initialBackoffMs?
optional initialBackoffMs: number;Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/ai/balance.ts#L91
maxBackoffMs?
optional maxBackoffMs: number;Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/ai/balance.ts#L92
maxRetries?
optional maxRetries: number;Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/ai/balance.ts#L93
strategy?
optional strategy: AxBalancerAdaptiveStrategy<TModelKey>;Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/ai/balance.ts#L99
Opt into request-time provider selection using learned failure rate, successful latency, and estimated cost. When omitted, the existing comparator-ordered behavior is unchanged.