AxBalancerCostContext Generated TypeScript API reference. typescript api api/reference build/apidocs/TypeAlias.AxBalancerCostContext.md type AxBalancerCostContext

AxBalancerCostContext

TypeScript
type AxBalancerCostContext<TModelKey> = Readonly<{
  expectedTokens:   | AxBalancerExpectedTokens
     | undefined;
  logicalModel: string;
  resolvedModel: string;
  routeKey: string;
  service: AxAIService<unknown, unknown, TModelKey>;
  serviceIndex: number;
}>;

Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/ai/balance_adaptive.ts#L82

Context supplied when overriding a route’s estimated request cost.

Type Parameters

Type ParameterDefault type
TModelKeystring
Docs