async-bulkhead-llm 1.0.3 → 2.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.
@@ -1,20 +1,44 @@
1
- import { type AcquireOptions, type Stats, type Token, type RejectReason as BaseRejectReason } from "async-bulkhead-ts";
1
+ import { type AcquireOptions, type Stats, type RejectReason as BaseRejectReason } from "async-bulkhead-ts";
2
2
  /**
3
- * Minimal request shape shared across estimators.
3
+ * A text content block. The only block type that contributes to
4
+ * character-based token estimation.
5
+ */
6
+ export type TextContentBlock = {
7
+ type: "text";
8
+ text: string;
9
+ };
10
+ /**
11
+ * A non-text content block (image, tool_result, document, etc.).
4
12
  *
5
- * `content` must be a plain string. Multimodal content blocks (images, documents)
6
- * are not supported in v1 — non-string content will be ignored by estimators,
7
- * causing underestimation. Treat token budget results as a lower bound for
8
- * multimodal requests.
13
+ * Built-in estimators ignore non-text blocks — token estimates for
14
+ * multimodal requests should be treated as a lower bound.
15
+ * Provide a custom estimator for accurate multimodal estimation.
16
+ */
17
+ export type OpaqueContentBlock = {
18
+ type: string;
19
+ [key: string]: unknown;
20
+ };
21
+ export type ContentBlock = TextContentBlock | OpaqueContentBlock;
22
+ /**
23
+ * Minimal message shape shared across estimators.
9
24
  *
10
- * Structural compatibility: most provider SDK request types satisfy this
11
- * interface without adaptation, provided `content` is a plain string.
25
+ * `content` may be a plain string (backward-compatible with v1) or
26
+ * an array of content blocks for multimodal requests.
12
27
  */
13
28
  export type LLMMessage = {
14
29
  role: string;
15
- content: string;
30
+ content: string | ContentBlock[];
16
31
  };
32
+ /**
33
+ * Minimal request shape.
34
+ *
35
+ * `model` is optional at the request level. When present, the estimator
36
+ * uses it for ratio lookup instead of the bulkhead-level default.
37
+ * This supports A/B testing, canary deployments, and mixed-model routing
38
+ * through a single bulkhead.
39
+ */
17
40
  export type LLMRequest = {
41
+ model?: string;
18
42
  messages: LLMMessage[];
19
43
  max_tokens?: number;
20
44
  };
@@ -26,8 +50,9 @@ export type TokenEstimator = (request: LLMRequest) => TokenEstimate;
26
50
  /**
27
51
  * Actual token usage returned by the provider after a call completes.
28
52
  *
29
- * Not acted on in v1 — exported as a forward-looking type for v2 refund support.
30
- * Callers can use this type today to annotate their own provider response handling.
53
+ * In v2, this drives the refund mechanism: when usage is reported at
54
+ * release time, the difference between the pre-admission reservation
55
+ * and actual consumption is returned to the budget immediately.
31
56
  */
32
57
  export type TokenUsage = {
33
58
  input: number;
@@ -40,17 +65,15 @@ export declare class LLMBulkheadRejectedError extends Error {
40
65
  constructor(reason: LLMRejectReason);
41
66
  }
42
67
  export type LLMStats = Stats & {
43
- /**
44
- * Present only when `tokenBudget` is configured.
45
- */
68
+ /** Present only when `tokenBudget` is configured. */
46
69
  tokenBudget?: {
47
70
  budget: number;
48
71
  inFlightTokens: number;
49
72
  available: number;
73
+ /** Cumulative tokens returned to the budget via the refund mechanism. */
74
+ totalRefunded: number;
50
75
  };
51
- /**
52
- * Present only when `deduplication` is enabled.
53
- */
76
+ /** Present only when deduplication is enabled. */
54
77
  deduplication?: {
55
78
  /** Number of distinct in-flight deduplication keys. */
56
79
  active: number;
@@ -58,6 +81,31 @@ export type LLMStats = Stats & {
58
81
  hits: number;
59
82
  };
60
83
  };
84
+ export type LLMEventMap = {
85
+ /** Fired after a request is admitted (slot + budget acquired). */
86
+ admit: {
87
+ request: LLMRequest;
88
+ reservedTokens: number;
89
+ };
90
+ /** Fired when a request is rejected at any stage. */
91
+ reject: {
92
+ request: LLMRequest;
93
+ reason: LLMRejectReason;
94
+ };
95
+ /** Fired when a slot is released. */
96
+ release: {
97
+ request: LLMRequest;
98
+ reservedTokens: number;
99
+ refundedTokens: number;
100
+ usage?: TokenUsage;
101
+ };
102
+ /** Fired when a request joins an existing in-flight call via dedup. */
103
+ dedup: {
104
+ request: LLMRequest;
105
+ };
106
+ };
107
+ export type LLMEventType = keyof LLMEventMap;
108
+ type Listener<K extends LLMEventType> = (payload: LLMEventMap[K]) => void;
61
109
  export type LLMBulkheadPreset = {
62
110
  maxQueue?: number;
63
111
  timeoutMs?: number;
@@ -65,7 +113,6 @@ export type LLMBulkheadPreset = {
65
113
  /**
66
114
  * Built-in presets for common deployment patterns.
67
115
  * Explicit options always override preset defaults.
68
- * Pass a plain `LLMBulkheadPreset` object to escape the named presets entirely.
69
116
  */
70
117
  export declare const PROFILES: Record<"interactive" | "batch", LLMBulkheadPreset>;
71
118
  export type TokenBudgetOptions = {
@@ -86,13 +133,25 @@ export type TokenBudgetOptions = {
86
133
  */
87
134
  outputCap?: number;
88
135
  };
136
+ export type DeduplicationOptions = {
137
+ /**
138
+ * Custom function to derive a deduplication key from a request.
139
+ * Requests with the same key that arrive while a matching call is
140
+ * already in-flight share that call.
141
+ *
142
+ * Default: `JSON.stringify({ m: request.messages, t: request.max_tokens })`.
143
+ *
144
+ * Return an empty string to opt a specific request out of deduplication.
145
+ */
146
+ keyFn?: (request: LLMRequest) => string;
147
+ };
89
148
  export type LLMBulkheadOptions = {
90
149
  /**
91
150
  * Model identifier. Used by the default estimator for ratio lookup.
92
151
  *
93
- * One bulkhead per model is the strongly recommended deployment pattern —
94
- * different models have different cost, latency, and rate-limit profiles.
95
- * See README for a multi-model routing recipe.
152
+ * One bulkhead per model is the strongly recommended deployment pattern.
153
+ * When routing multiple models through one bulkhead, set `model` on
154
+ * individual `LLMRequest` objects for accurate estimation.
96
155
  */
97
156
  model: string;
98
157
  /** Maximum number of requests in-flight simultaneously. */
@@ -110,15 +169,6 @@ export type LLMBulkheadOptions = {
110
169
  /**
111
170
  * Opinionated defaults for common deployment patterns.
112
171
  * 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
172
  */
123
173
  profile?: "interactive" | "batch" | LLMBulkheadPreset;
124
174
  /**
@@ -128,30 +178,53 @@ export type LLMBulkheadOptions = {
128
178
  */
129
179
  tokenBudget?: TokenBudgetOptions;
130
180
  /**
131
- * Deduplicate identical in-flight requests.
132
- * Requests with the same deduplication key share one in-flight call.
181
+ * Enable in-flight request deduplication.
133
182
  *
134
- * v1 key: `JSON.stringify(request.messages)`. Key design is a known
135
- * limitation in v1 — callers with non-string content or custom key
136
- * requirements should await v2.
137
- *
138
- * Default: false.
183
+ * - `true` — use the default key function
184
+ * - `DeduplicationOptions` — customize the key function
185
+ * - `false` / omitted — disabled
139
186
  */
140
- deduplication?: boolean;
187
+ deduplication?: boolean | DeduplicationOptions;
141
188
  };
189
+ /**
190
+ * Admission token returned by `acquire()`.
191
+ *
192
+ * Call `release()` exactly once when the request completes.
193
+ * Pass `TokenUsage` to enable the refund mechanism — the bulkhead
194
+ * returns the difference between the pre-admission reservation and
195
+ * actual consumption to the budget immediately.
196
+ */
197
+ export type LLMToken = {
198
+ release(usage?: TokenUsage): void;
199
+ };
200
+ export type LLMAcquireResult = {
201
+ ok: true;
202
+ token: LLMToken;
203
+ } | {
204
+ ok: false;
205
+ reason: LLMRejectReason;
206
+ };
207
+ /**
208
+ * Extract total character count from message content.
209
+ * Handles both plain strings and multimodal content block arrays.
210
+ * Non-text blocks are ignored (contribute 0 characters).
211
+ */
212
+ export declare function extractTextLength(content: string | ContentBlock[]): number;
142
213
  /**
143
214
  * Estimates token usage using a flat 4-characters-per-token ratio.
144
215
  *
216
+ * Handles both plain string and multimodal content.
217
+ * Non-text content blocks are ignored (treated as zero tokens).
218
+ *
145
219
  * Accuracy: ±25% for English prose.
146
- * Underestimates for code and non-Latin scripts.
147
220
  * Suitable for load-shedding; not suitable for cost accounting.
148
221
  */
149
222
  export declare function naiveTokenEstimator(request: LLMRequest): TokenEstimate;
150
223
  export type ModelAwareEstimatorOptions = {
151
224
  /**
152
- * Model string used for ratio lookup when the estimator is called without
153
- * per-request model information. Should match the `model` field on the
154
- * owning `LLMBulkhead`.
225
+ * Model string used for ratio lookup when the request does not
226
+ * carry its own `model` field. Should match the `model` field on
227
+ * the owning `LLMBulkhead`.
155
228
  */
156
229
  defaultModel?: string | undefined;
157
230
  /**
@@ -161,7 +234,6 @@ export type ModelAwareEstimatorOptions = {
161
234
  outputCap?: number | undefined;
162
235
  /**
163
236
  * 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
237
  * The estimator falls back to the naive 4.0 ratio when this fires.
166
238
  */
167
239
  onUnknownModel?: ((model: string) => void) | undefined;
@@ -171,32 +243,20 @@ export type ModelAwareEstimatorOptions = {
171
243
  *
172
244
  * Accuracy: ±15% for known models on English prose.
173
245
  * 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
246
  *
184
- * Azure OpenAI deployment names (e.g. `'my-gpt4-prod'`) will not match any
185
- * built-in prefix. Pass an override keyed on your deployment name, or
186
- * provide `onUnknownModel` to surface the miss.
247
+ * v2: respects `request.model` when present, falling back to `defaultModel`.
248
+ * v2: handles multimodal content (text blocks counted, others ignored).
187
249
  */
188
250
  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
251
  export declare function createLLMBulkhead(opts: LLMBulkheadOptions): {
197
- acquire: (request: LLMRequest, ao?: AcquireOptions) => Promise<InternalAcquireResult>;
198
- run: <T>(request: LLMRequest, fn: (signal?: AbortSignal) => Promise<T>, ao?: AcquireOptions) => Promise<T>;
252
+ acquire: (request: LLMRequest, ao?: AcquireOptions) => Promise<LLMAcquireResult>;
253
+ run: <T>(request: LLMRequest, fn: (signal?: AbortSignal) => Promise<T>, ao?: AcquireOptions & {
254
+ getUsage?: (result: T) => TokenUsage | undefined;
255
+ }) => Promise<T>;
199
256
  stats: () => LLMStats;
257
+ close: () => void;
258
+ drain: () => Promise<void>;
259
+ on: <K extends LLMEventType>(event: K, listener: Listener<K>) => () => void;
200
260
  };
201
261
  export type LLMBulkhead = ReturnType<typeof createLLMBulkhead>;
202
262
  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,EACV,KAAK,KAAK,EACV,KAAK,YAAY,IAAI,gBAAgB,EACtC,MAAM,mBAAmB,CAAC;AAI3B;;;;;;;;;;GAUG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,QAAQ,EAAE,UAAU,EAAE,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAIF,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE,UAAU,KAAK,aAAa,CAAC;AAEpE;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAIF,MAAM,MAAM,eAAe,GAAG,gBAAgB,GAAG,cAAc,CAAC;AAEhE,qBAAa,wBAAyB,SAAQ,KAAK;IA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IACH,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAElC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE/B;;;OAGG;IACH,cAAc,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;CACxD,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,8BAA8B,CAC5C,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAClC,IAAI,GAAE,0BAA+B,GACpC,cAAc,CAuChB;AA6CD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,kBAAkB;uBA+K7C,UAAU,OACf,cAAc,KACjB,OAAO,CAAC,gBAAgB,CAAC;UAcT,CAAC,WACT,UAAU,MACf,CAAC,MAAM,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,CAAC,CAAC,OACpC,cAAc,GAAG;QACnB,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,UAAU,GAAG,SAAS,CAAC;KAClD,KACA,OAAO,CAAC,CAAC,CAAC;iBA2FK,QAAQ;iBA4BR,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": "1.0.3",
3
+ "version": "2.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": "",
@@ -58,6 +58,7 @@
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"