async-bulkhead-llm 1.0.3 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +376 -147
- package/dist/cjs/index.cjs +236 -75
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +235 -75
- package/dist/esm/index.js.map +1 -1
- package/dist/types/index.d.ts +139 -65
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +3 -2
package/dist/types/index.d.ts
CHANGED
|
@@ -1,20 +1,45 @@
|
|
|
1
|
-
import { type AcquireOptions, type Stats, type
|
|
1
|
+
import { type AcquireOptions, type Stats, type RejectReason as BaseRejectReason } from "async-bulkhead-ts";
|
|
2
|
+
type BulkheadSignal = NonNullable<AcquireOptions["signal"]>;
|
|
2
3
|
/**
|
|
3
|
-
*
|
|
4
|
+
* A text content block. The only block type that contributes to
|
|
5
|
+
* character-based token estimation.
|
|
6
|
+
*/
|
|
7
|
+
export type TextContentBlock = {
|
|
8
|
+
type: "text";
|
|
9
|
+
text: string;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* A non-text content block (image, tool_result, document, etc.).
|
|
4
13
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
|
|
14
|
+
* Built-in estimators ignore non-text blocks — token estimates for
|
|
15
|
+
* multimodal requests should be treated as a lower bound.
|
|
16
|
+
* Provide a custom estimator for accurate multimodal estimation.
|
|
17
|
+
*/
|
|
18
|
+
export type OpaqueContentBlock = {
|
|
19
|
+
type: string;
|
|
20
|
+
[key: string]: unknown;
|
|
21
|
+
};
|
|
22
|
+
export type ContentBlock = TextContentBlock | OpaqueContentBlock;
|
|
23
|
+
/**
|
|
24
|
+
* Minimal message shape shared across estimators.
|
|
9
25
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
26
|
+
* `content` may be a plain string (backward-compatible with v1) or
|
|
27
|
+
* an array of content blocks for multimodal requests.
|
|
12
28
|
*/
|
|
13
29
|
export type LLMMessage = {
|
|
14
30
|
role: string;
|
|
15
|
-
content: string;
|
|
31
|
+
content: string | ContentBlock[];
|
|
16
32
|
};
|
|
33
|
+
/**
|
|
34
|
+
* Minimal request shape.
|
|
35
|
+
*
|
|
36
|
+
* `model` is optional at the request level. When present, the estimator
|
|
37
|
+
* uses it for ratio lookup instead of the bulkhead-level default.
|
|
38
|
+
* This supports A/B testing, canary deployments, and mixed-model routing
|
|
39
|
+
* through a single bulkhead.
|
|
40
|
+
*/
|
|
17
41
|
export type LLMRequest = {
|
|
42
|
+
model?: string;
|
|
18
43
|
messages: LLMMessage[];
|
|
19
44
|
max_tokens?: number;
|
|
20
45
|
};
|
|
@@ -26,8 +51,9 @@ export type TokenEstimator = (request: LLMRequest) => TokenEstimate;
|
|
|
26
51
|
/**
|
|
27
52
|
* Actual token usage returned by the provider after a call completes.
|
|
28
53
|
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
54
|
+
* In v2, this drives the refund mechanism: when usage is reported at
|
|
55
|
+
* release time, the difference between the pre-admission reservation
|
|
56
|
+
* and actual consumption is returned to the budget immediately.
|
|
31
57
|
*/
|
|
32
58
|
export type TokenUsage = {
|
|
33
59
|
input: number;
|
|
@@ -39,18 +65,29 @@ export declare class LLMBulkheadRejectedError extends Error {
|
|
|
39
65
|
readonly code: "LLM_BULKHEAD_REJECTED";
|
|
40
66
|
constructor(reason: LLMRejectReason);
|
|
41
67
|
}
|
|
42
|
-
export type
|
|
43
|
-
/**
|
|
44
|
-
|
|
45
|
-
|
|
68
|
+
export type LLMRequestStats = {
|
|
69
|
+
/** Successful LLM admissions (slot + budget acquired). */
|
|
70
|
+
admitted: number;
|
|
71
|
+
/** Successful LLM releases via the wrapped LLM token. */
|
|
72
|
+
released: number;
|
|
73
|
+
/** Total LLM-layer rejections. */
|
|
74
|
+
rejected: number;
|
|
75
|
+
/** LLM-layer rejections by reason. */
|
|
76
|
+
rejectedByReason: Partial<Record<LLMRejectReason, number>>;
|
|
77
|
+
};
|
|
78
|
+
export type LLMStats = {
|
|
79
|
+
/** Underlying async-bulkhead-ts stats. */
|
|
80
|
+
bulkhead: Stats;
|
|
81
|
+
/** LLM-layer request stats. */
|
|
82
|
+
llm: LLMRequestStats; /** Present only when `tokenBudget` is configured. */
|
|
46
83
|
tokenBudget?: {
|
|
47
84
|
budget: number;
|
|
48
85
|
inFlightTokens: number;
|
|
49
86
|
available: number;
|
|
87
|
+
/** Cumulative tokens returned to the budget via the refund mechanism. */
|
|
88
|
+
totalRefunded: number;
|
|
50
89
|
};
|
|
51
|
-
/**
|
|
52
|
-
* Present only when `deduplication` is enabled.
|
|
53
|
-
*/
|
|
90
|
+
/** Present only when deduplication is enabled. */
|
|
54
91
|
deduplication?: {
|
|
55
92
|
/** Number of distinct in-flight deduplication keys. */
|
|
56
93
|
active: number;
|
|
@@ -58,6 +95,31 @@ export type LLMStats = Stats & {
|
|
|
58
95
|
hits: number;
|
|
59
96
|
};
|
|
60
97
|
};
|
|
98
|
+
export type LLMEventMap = {
|
|
99
|
+
/** Fired after a request is admitted (slot + budget acquired). */
|
|
100
|
+
admit: {
|
|
101
|
+
request: LLMRequest;
|
|
102
|
+
reservedTokens: number;
|
|
103
|
+
};
|
|
104
|
+
/** Fired when a request is rejected at any stage. */
|
|
105
|
+
reject: {
|
|
106
|
+
request: LLMRequest;
|
|
107
|
+
reason: LLMRejectReason;
|
|
108
|
+
};
|
|
109
|
+
/** Fired when a slot is released. */
|
|
110
|
+
release: {
|
|
111
|
+
request: LLMRequest;
|
|
112
|
+
reservedTokens: number;
|
|
113
|
+
refundedTokens: number;
|
|
114
|
+
usage?: TokenUsage;
|
|
115
|
+
};
|
|
116
|
+
/** Fired when a request joins an existing in-flight call via dedup. */
|
|
117
|
+
dedup: {
|
|
118
|
+
request: LLMRequest;
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
export type LLMEventType = keyof LLMEventMap;
|
|
122
|
+
type Listener<K extends LLMEventType> = (payload: LLMEventMap[K]) => void;
|
|
61
123
|
export type LLMBulkheadPreset = {
|
|
62
124
|
maxQueue?: number;
|
|
63
125
|
timeoutMs?: number;
|
|
@@ -65,7 +127,6 @@ export type LLMBulkheadPreset = {
|
|
|
65
127
|
/**
|
|
66
128
|
* Built-in presets for common deployment patterns.
|
|
67
129
|
* Explicit options always override preset defaults.
|
|
68
|
-
* Pass a plain `LLMBulkheadPreset` object to escape the named presets entirely.
|
|
69
130
|
*/
|
|
70
131
|
export declare const PROFILES: Record<"interactive" | "batch", LLMBulkheadPreset>;
|
|
71
132
|
export type TokenBudgetOptions = {
|
|
@@ -86,13 +147,25 @@ export type TokenBudgetOptions = {
|
|
|
86
147
|
*/
|
|
87
148
|
outputCap?: number;
|
|
88
149
|
};
|
|
150
|
+
export type DeduplicationOptions = {
|
|
151
|
+
/**
|
|
152
|
+
* Custom function to derive a deduplication key from a request.
|
|
153
|
+
* Requests with the same key that arrive while a matching call is
|
|
154
|
+
* already in-flight share that call.
|
|
155
|
+
*
|
|
156
|
+
* Default: `JSON.stringify({ m: request.messages, t: request.max_tokens })`.
|
|
157
|
+
*
|
|
158
|
+
* Return an empty string to opt a specific request out of deduplication.
|
|
159
|
+
*/
|
|
160
|
+
keyFn?: (request: LLMRequest) => string;
|
|
161
|
+
};
|
|
89
162
|
export type LLMBulkheadOptions = {
|
|
90
163
|
/**
|
|
91
164
|
* Model identifier. Used by the default estimator for ratio lookup.
|
|
92
165
|
*
|
|
93
|
-
* One bulkhead per model is the strongly recommended deployment pattern
|
|
94
|
-
*
|
|
95
|
-
*
|
|
166
|
+
* One bulkhead per model is the strongly recommended deployment pattern.
|
|
167
|
+
* When routing multiple models through one bulkhead, set `model` on
|
|
168
|
+
* individual `LLMRequest` objects for accurate estimation.
|
|
96
169
|
*/
|
|
97
170
|
model: string;
|
|
98
171
|
/** Maximum number of requests in-flight simultaneously. */
|
|
@@ -110,15 +183,6 @@ export type LLMBulkheadOptions = {
|
|
|
110
183
|
/**
|
|
111
184
|
* Opinionated defaults for common deployment patterns.
|
|
112
185
|
* Explicit options always override profile defaults.
|
|
113
|
-
*
|
|
114
|
-
* - `'interactive'` — fail-fast, no waiting (`maxQueue: 0`)
|
|
115
|
-
* - `'batch'` — bounded queue, 30s timeout (`maxQueue: 20, timeoutMs: 30_000`)
|
|
116
|
-
*
|
|
117
|
-
* Escape hatch: pass a plain `LLMBulkheadPreset` object for custom defaults.
|
|
118
|
-
*
|
|
119
|
-
* @example
|
|
120
|
-
* profile: 'batch'
|
|
121
|
-
* profile: { maxQueue: 5, timeoutMs: 5_000 }
|
|
122
186
|
*/
|
|
123
187
|
profile?: "interactive" | "batch" | LLMBulkheadPreset;
|
|
124
188
|
/**
|
|
@@ -128,30 +192,53 @@ export type LLMBulkheadOptions = {
|
|
|
128
192
|
*/
|
|
129
193
|
tokenBudget?: TokenBudgetOptions;
|
|
130
194
|
/**
|
|
131
|
-
*
|
|
132
|
-
* Requests with the same deduplication key share one in-flight call.
|
|
195
|
+
* Enable in-flight request deduplication.
|
|
133
196
|
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
* Default: false.
|
|
197
|
+
* - `true` — use the default key function
|
|
198
|
+
* - `DeduplicationOptions` — customize the key function
|
|
199
|
+
* - `false` / omitted — disabled
|
|
139
200
|
*/
|
|
140
|
-
deduplication?: boolean;
|
|
201
|
+
deduplication?: boolean | DeduplicationOptions;
|
|
141
202
|
};
|
|
203
|
+
/**
|
|
204
|
+
* Admission token returned by `acquire()`.
|
|
205
|
+
*
|
|
206
|
+
* Call `release()` exactly once when the request completes.
|
|
207
|
+
* Pass `TokenUsage` to enable the refund mechanism — the bulkhead
|
|
208
|
+
* returns the difference between the pre-admission reservation and
|
|
209
|
+
* actual consumption to the budget immediately.
|
|
210
|
+
*/
|
|
211
|
+
export type LLMToken = {
|
|
212
|
+
release(usage?: TokenUsage): void;
|
|
213
|
+
};
|
|
214
|
+
export type LLMAcquireResult = {
|
|
215
|
+
ok: true;
|
|
216
|
+
token: LLMToken;
|
|
217
|
+
} | {
|
|
218
|
+
ok: false;
|
|
219
|
+
reason: LLMRejectReason;
|
|
220
|
+
};
|
|
221
|
+
/**
|
|
222
|
+
* Extract total character count from message content.
|
|
223
|
+
* Handles both plain strings and multimodal content block arrays.
|
|
224
|
+
* Non-text blocks are ignored (contribute 0 characters).
|
|
225
|
+
*/
|
|
226
|
+
export declare function extractTextLength(content: string | ContentBlock[]): number;
|
|
142
227
|
/**
|
|
143
228
|
* Estimates token usage using a flat 4-characters-per-token ratio.
|
|
144
229
|
*
|
|
230
|
+
* Handles both plain string and multimodal content.
|
|
231
|
+
* Non-text content blocks are ignored (treated as zero tokens).
|
|
232
|
+
*
|
|
145
233
|
* Accuracy: ±25% for English prose.
|
|
146
|
-
* Underestimates for code and non-Latin scripts.
|
|
147
234
|
* Suitable for load-shedding; not suitable for cost accounting.
|
|
148
235
|
*/
|
|
149
236
|
export declare function naiveTokenEstimator(request: LLMRequest): TokenEstimate;
|
|
150
237
|
export type ModelAwareEstimatorOptions = {
|
|
151
238
|
/**
|
|
152
|
-
* Model string used for ratio lookup when the
|
|
153
|
-
*
|
|
154
|
-
* owning `LLMBulkhead`.
|
|
239
|
+
* Model string used for ratio lookup when the request does not
|
|
240
|
+
* carry its own `model` field. Should match the `model` field on
|
|
241
|
+
* the owning `LLMBulkhead`.
|
|
155
242
|
*/
|
|
156
243
|
defaultModel?: string | undefined;
|
|
157
244
|
/**
|
|
@@ -161,7 +248,6 @@ export type ModelAwareEstimatorOptions = {
|
|
|
161
248
|
outputCap?: number | undefined;
|
|
162
249
|
/**
|
|
163
250
|
* Called when the model string matches no built-in prefix and no override.
|
|
164
|
-
* Use to log a warning or throw in strict environments.
|
|
165
251
|
* The estimator falls back to the naive 4.0 ratio when this fires.
|
|
166
252
|
*/
|
|
167
253
|
onUnknownModel?: ((model: string) => void) | undefined;
|
|
@@ -171,32 +257,20 @@ export type ModelAwareEstimatorOptions = {
|
|
|
171
257
|
*
|
|
172
258
|
* Accuracy: ±15% for known models on English prose.
|
|
173
259
|
* Falls back to naiveTokenEstimator (ratio 4.0) for unknown models.
|
|
174
|
-
* Extend the model map via the `overrides` parameter.
|
|
175
|
-
* Suitable for load-shedding; not suitable for cost accounting.
|
|
176
|
-
*
|
|
177
|
-
* Matching rules:
|
|
178
|
-
* - `overrides` keys are exact-matched first (case-sensitive as provided,
|
|
179
|
-
* also tried lowercased). Exact match always wins over prefix scan.
|
|
180
|
-
* - Built-in ratios are prefix-matched; longest prefix wins.
|
|
181
|
-
* - Model string is lowercased before prefix scan.
|
|
182
|
-
* - Unknown models fire `onUnknownModel` and fall back to ratio 4.0.
|
|
183
260
|
*
|
|
184
|
-
*
|
|
185
|
-
*
|
|
186
|
-
* provide `onUnknownModel` to surface the miss.
|
|
261
|
+
* v2: respects `request.model` when present, falling back to `defaultModel`.
|
|
262
|
+
* v2: handles multimodal content (text blocks counted, others ignored).
|
|
187
263
|
*/
|
|
188
264
|
export declare function createModelAwareTokenEstimator(overrides?: Record<string, number>, opts?: ModelAwareEstimatorOptions): TokenEstimator;
|
|
189
|
-
type InternalAcquireResult = {
|
|
190
|
-
ok: true;
|
|
191
|
-
token: Token;
|
|
192
|
-
} | {
|
|
193
|
-
ok: false;
|
|
194
|
-
reason: LLMRejectReason;
|
|
195
|
-
};
|
|
196
265
|
export declare function createLLMBulkhead(opts: LLMBulkheadOptions): {
|
|
197
|
-
acquire: (request: LLMRequest, ao?: AcquireOptions) => Promise<
|
|
198
|
-
run: <T>(request: LLMRequest, fn: (signal?:
|
|
266
|
+
acquire: (request: LLMRequest, ao?: AcquireOptions) => Promise<LLMAcquireResult>;
|
|
267
|
+
run: <T>(request: LLMRequest, fn: (signal?: BulkheadSignal) => Promise<T>, ao?: AcquireOptions & {
|
|
268
|
+
getUsage?: (result: T) => TokenUsage | undefined;
|
|
269
|
+
}) => Promise<T>;
|
|
199
270
|
stats: () => LLMStats;
|
|
271
|
+
close: () => void;
|
|
272
|
+
drain: () => Promise<void>;
|
|
273
|
+
on: <K extends LLMEventType>(event: K, listener: Listener<K>) => () => void;
|
|
200
274
|
};
|
|
201
275
|
export type LLMBulkhead = ReturnType<typeof createLLMBulkhead>;
|
|
202
276
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,KAAK,EAEV,KAAK,YAAY,IAAI,gBAAgB,EACtC,MAAM,mBAAmB,CAAC;AAE3B,KAAK,cAAc,GAAG,WAAW,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC;AAM5D;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,gBAAgB,GAAG,kBAAkB,CAAC;AAMjE;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,GAAG,YAAY,EAAE,CAAC;CAClC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,UAAU,EAAE,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAMF,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,EAAE,M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I,GAAE,0BAA+B,GACpC,cAAc,CAuChB;AA6CD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,kBAAkB;uBAqM7C,UAAU,OACf,cAAc,KACjB,OAAO,CAAC,gBAAgB,CAAC;UAcT,CAAC,WACT,UAAU,MACf,CAAC,MAAM,CAAC,EAAE,cAAc,KAAK,OAAO,CAAC,CAAC,CAAC,OACvC,cAAc,GAAG;QACnB,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,UAAU,GAAG,SAAS,CAAC;KAClD,KACA,OAAO,CAAC,CAAC,CAAC;iBA2FK,QAAQ;iBAoCR,IAAI;iBASJ,OAAO,CAAC,IAAI,CAAC;SAWnB,CAAC,SAAS,YAAY,SACzB,CAAC,YACE,QAAQ,CAAC,CAAC,CAAC,KACpB,MAAM,IAAI;EAQd;AAED,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "async-bulkhead-llm",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Fail-fast admission control for LLM workloads built on async-bulkhead-ts.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "",
|
|
@@ -52,12 +52,13 @@
|
|
|
52
52
|
"prepublishOnly": "npm run build && npm test"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"async-bulkhead-ts": "^0.
|
|
55
|
+
"async-bulkhead-ts": "^0.4.1"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@eslint/js": "^10.0.1",
|
|
59
59
|
"@types/node": "^25.3.0",
|
|
60
60
|
"eslint": "^10.0.2",
|
|
61
|
+
"eslint-config-prettier": "^10.1.8",
|
|
61
62
|
"typescript": "^5.9.3",
|
|
62
63
|
"typescript-eslint": "^8.56.1",
|
|
63
64
|
"vitest": "^4.0.18"
|