OptionaladmissionPresent only when bounded admission classes are configured.
Underlying async-bulkhead-ts-compatible stats.
OptionaldeduplicationPresent only when deduplication is enabled.
Number of distinct in-flight deduplication keys.
Cumulative requests that shared an existing in-flight call.
Currently applied atomic admission-limit snapshot.
LLM-layer request stats.
OptionalobservePresent after at least one observe-mode bypass has occurred.
OptionaltokenPresent only when tokenBudget is configured.
Budget headroom reserved for priority: "high" requests.
Cumulative actual tokens consumed (usage.input + usage.output),
summed across releases that reported TokenUsage. Releases without
usage contribute 0 — totalConsumed is meaningful only when
getUsage is wired up consistently. Not clamped: over-consumption
(actual > reserved) is reported as-is.
Cumulative tokens held beyond original reservations because
reportUsage() reported consumption exceeding the reserved hold.
Overrun expands inFlightTokens (possibly above budget), which
correctly blocks new admissions until the overrunning work releases.
Cumulative tokens returned to the budget via the refund mechanism —
both early refunds from reportUsage() and refunds at release.
Cumulative tokens reserved at admission across all successful admissions. Monotonically increasing.
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 typeserrors.ts—LLMBulkheadRejectedErrorprofiles.ts—PROFILESpresetsestimators.ts— naive + model-aware estimators,extractTextLengthadaptive.ts—createAdaptiveTokenEstimator(v3.8)dedup.ts— deduplication internals (keying, share safety)validation.ts— internal numeric/estimate/usage guardsbulkhead.ts—createLLMBulkhead(admission, budget, events)Deep-importing the internal modules is not supported; the package
exportsmap exposes only this entry point.