ModelRouterConfig
Configuration for the model.router() middleware.
Properties
Section titled “Properties”classify?
Section titled “classify?”
optionalclassify?: (ctx) =>ComplexityTier
Custom classifier function. Overrides the default heuristic.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”routes
Section titled “routes”routes:
Record<ComplexityTier,string>
Model ID mapping for each complexity tier.
tokenCounter?
Section titled “tokenCounter?”
optionaltokenCounter?:TokenCounter
Token counter for input complexity estimation. Default: chars/4.