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/686f8ba96cf652e044cf922b67c16c8f09754a70/src/ax/ai/balance_adaptive.ts#L82

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

Type Parameters

Type ParameterDefault type
TModelKeystring
Docs