Successful LLM admissions (slot + budget acquired).
Borrowed concurrency slots returned before upstream work settled.
Borrowed concurrency abandonments split by cause.
Capacity-holding LLM admissions that have not reached final settlement.
Total LLM-layer rejections.
LLM-layer rejections by reason.
Successful LLM releases via the wrapped LLM token.
OptionalstoppedAdmitted calls the engine stopped (v3.18). Absent until the first stop, so a bulkhead that never stops anything reports the 3.17 shape.
OptionalstoppedStopped calls split by cause. Absent until the first stop.
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.