AxBalancerOptions
type AxBalancerOptions<TModelKey> = object;Defined in: https://github.com/ax-llm/ax/blob/e690b4823b8309e258594064abe941d4cff6ef89/src/ax/ai/balance.ts#L87
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/e690b4823b8309e258594064abe941d4cff6ef89/src/ax/ai/balance.ts#L88
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/e690b4823b8309e258594064abe941d4cff6ef89/src/ax/ai/balance.ts#L92
initialBackoffMs?
optional initialBackoffMs: number;Defined in: https://github.com/ax-llm/ax/blob/e690b4823b8309e258594064abe941d4cff6ef89/src/ax/ai/balance.ts#L93
maxBackoffMs?
optional maxBackoffMs: number;Defined in: https://github.com/ax-llm/ax/blob/e690b4823b8309e258594064abe941d4cff6ef89/src/ax/ai/balance.ts#L94
maxRetries?
optional maxRetries: number;Defined in: https://github.com/ax-llm/ax/blob/e690b4823b8309e258594064abe941d4cff6ef89/src/ax/ai/balance.ts#L95
strategy?
optional strategy: AxBalancerAdaptiveStrategy<TModelKey>;Defined in: https://github.com/ax-llm/ax/blob/e690b4823b8309e258594064abe941d4cff6ef89/src/ax/ai/balance.ts#L101
Opt into request-time provider selection using learned failure rate, successful latency, and estimated cost. When omitted, the existing comparator-ordered behavior is unchanged.