OptionaladmissionBounded policy class used for this admission, when configured.
Stable identifier of the admission this usage belongs to.
Cumulative reported consumption (input + output).
Tokens currently held against the budget for this request.
Immutable limit revision captured when this work was admitted or bypassed.
Output tokens reserved for this request (max_tokens/outputCap).
Output reservation remaining before the stream overruns it.
True once cumulative consumption exceeds the original reservation.
Original pre-admission reservation (0 when budget disabled).
Last effective usage-update sequence for this admission. Starts at 0 before any effective report, increments when cumulative usage increases or the effective held-token amount changes, and remains stable for stale/no-op reports.
OptionalstoppedPresent, and true, once the engine has stopped this admission
(v3.18), including on the report that caused the stop. The token hold
stays charged until release.
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—LLMBulkheadRejectedErrorand the two errors for admitted work that ended earlyprofiles.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: validates options and wires the engine parts togetherreconfigurable-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 ofbulkhead.tsDeep-importing the internal modules is not supported; the package
exportsmap exposes only this entry point.