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

    Type Alias LLMAdmissionClassStats

    async-bulkhead-llm — public API surface.

    This entry point re-exports everything the package supports; the implementation lives in focused modules:

    • types.ts — request/result/options/stats/event types
    • errors.ts — LLMBulkheadRejectedError and the two errors for admitted work that ended early
    • profiles.ts — PROFILES presets
    • estimators.ts — naive + model-aware estimators, extractTextLength
    • adaptive.ts — createAdaptiveTokenEstimator (v3.8)
    • dedup.ts — deduplication internals (keying, share safety)
    • validation.ts — internal numeric/estimate/usage guards
    • bulkhead.ts — createLLMBulkhead: validates options and wires the engine parts together
    • reconfigurable-bulkhead.ts — internal concurrency gate (global slot count and queue)
    • engine/ — the parts of the admission engine, one concern per file (limits, token ledger, class slots, admission counts, capacity checks, the admitted token, run(), observe mode, deduplication, stats, shutdown, the running calls and the stop triggers); the full list is in the header of bulkhead.ts

    Deep-importing the internal modules is not supported; the package exports map exposes only this entry point.

    type LLMAdmissionClassStats = {
        admitted: number;
        borrowedConcurrencyAbandoned: number;
        borrowedConcurrent: number;
        borrowedInFlightTokens: number;
        inFlight: number;
        inFlightTokens: number;
        limits: LLMAdmissionClassLimits;
        protectedConcurrentInUse: number;
        protectedTokensInUse: number;
        rejected: number;
        rejectedByReason: Partial<Record<LLMRejectReason, number>>;
        released: number;
        stopped?: number;
        totalBorrowedAdmissions: number;
        totalBorrowedTokensReserved: number;
        totalConsumed: number;
        totalOverrun: number;
        totalRefunded: number;
        totalReserved: number;
    }
    Index
    admitted: number
    borrowedConcurrencyAbandoned: number

    Borrowed class concurrency slots returned before final settlement.

    borrowedConcurrent: number
    borrowedInFlightTokens: number
    inFlight: number
    inFlightTokens: number
    protectedConcurrentInUse: number
    protectedTokensInUse: number
    rejected: number
    rejectedByReason: Partial<Record<LLMRejectReason, number>>
    released: number
    stopped?: number

    Calls of this class the engine stopped (v3.18). Absent on every class until the bulkhead's first stop; from then on each class reports it.

    totalBorrowedAdmissions: number

    Admissions whose concurrency slot came from shared capacity.

    totalBorrowedTokensReserved: number

    Reservation tokens placed in shared capacity at admission time.

    totalConsumed: number
    totalOverrun: number
    totalRefunded: number
    totalReserved: number