async-bulkhead-llm - v3.17.0
    Preparing search index...

    Type Alias AdaptiveTokenEstimatorOptions

    AdaptiveTokenEstimatorOptions: ModelAwareEstimatorOptions & {
        maxCorrection?: number;
        maxModels?: number;
        minCorrection?: number;
        minSamples?: number;
        overrides?: Record<string, number>;
        smoothing?: number;
    }

    Type Declaration

    • OptionalmaxCorrection?: number

      Upper clamp for the applied correction factor. Must be

      = minCorrection. Default: 2.

    • OptionalmaxModels?: number

      Maximum distinct models tracked. When a new model would exceed this, the oldest-inserted entry is evicted. Bounds memory in the face of unbounded / attacker-controlled model strings. Must be a positive integer. Default: 64.

    • OptionalminCorrection?: number

      Lower clamp for the applied correction factor. Guards admission against a run of anomalous observations collapsing estimates toward zero. Must be > 0. Default: 0.5.

    • OptionalminSamples?: number

      Observations required for a model before its correction is applied to estimates. Until then the estimator returns the uncorrected base estimate. Must be a positive integer. Default: 5.

    • Optionaloverrides?: Record<string, number>

      Exact-model ratio overrides, forwarded to the underlying model-aware estimator (same semantics as the two-argument form of createModelAwareTokenEstimator).

    • Optionalsmoothing?: number

      EWMA smoothing factor in (0, 1]. Each observation moves the per-model correction factor by smoothing * (observed - current). Higher adapts faster but is noisier. Default: 0.2.