batchwork 1.2.1 → 1.4.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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"azure.d.ts","sourceRoot":"","sources":["../../src/providers/azure.ts"],"names":[],"mappings":"AAiEA;;;;;GAKG;AACH,eAAO,MAAM,YAAY,kCAavB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/providers/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAmB9C,eAAO,MAAM,UAAU,aAAc,aAAa,KAAG,YACjC,CAAC;AAErB,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/providers/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAqB9C,eAAO,MAAM,UAAU,aAAc,aAAa,KAAG,YACjC,CAAC;AAErB,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC"}
@@ -4,13 +4,24 @@
4
4
  * referencing the file, poll a `status` field, then download output/error files
5
5
  * — differing only in base URL, credentials, and minor request-line shape.
6
6
  */
7
- import type { BatchProvider } from "../types";
7
+ import type { BatchProvider, ProviderCredentials } from "../types";
8
8
  import type { BatchAdapter } from "./adapter";
9
9
  export type BatchLineFormat = "body-only" | "method-url";
10
10
  export interface OpenAICompatibleConfig {
11
+ /** Env var for the default Bearer auth; unused when `authHeaders` is set. */
11
12
  apiKeyEnv: string;
12
13
  apiKeyLabel: string;
13
- baseUrl: string;
14
+ /**
15
+ * Default API root. Providers with a resource-specific endpoint (Azure) can
16
+ * resolve it from credentials or environment configuration instead.
17
+ */
18
+ baseUrl?: string;
19
+ /** Build provider authentication headers instead of the default Bearer key. */
20
+ authHeaders?: (credentials: ProviderCredentials) => Record<string, string>;
21
+ /**
22
+ * Resolve a provider API root when `credentials.baseURL` is not provided.
23
+ */
24
+ resolveBaseUrl?: (credentials: ProviderCredentials) => string;
14
25
  completionWindow?: string;
15
26
  filePurpose?: string;
16
27
  id: BatchProvider;
@@ -30,12 +41,22 @@ export interface OpenAICompatibleConfig {
30
41
  * (OpenAI, Groq); `body-only` writes `{ custom_id, body }` (Together).
31
42
  */
32
43
  lineFormat?: BatchLineFormat;
44
+ /**
45
+ * Extra fields merged into each `body-only` line for a given endpoint
46
+ * (e.g. Together audio lines require `method: "FILE"`).
47
+ */
48
+ lineExtras?: (endpoint: string) => Record<string, unknown> | undefined;
33
49
  /**
34
50
  * Map the captured endpoint path to the value the provider expects in the
35
51
  * batch `url`/`endpoint` field (e.g. Groq serves under `/openai/v1` but its
36
52
  * batch `url` must be `/v1/chat/completions`).
37
53
  */
38
54
  normalizeEndpoint?: (endpoint: string) => string;
55
+ /**
56
+ * Map the JSONL request URL to the value required by batch creation. Azure
57
+ * requires `/chat/completions` here while its input lines use `/v1/...`.
58
+ */
59
+ batchEndpoint?: (endpoint: string) => string;
39
60
  }
40
61
  export declare const createOpenAICompatibleAdapter: (config: OpenAICompatibleConfig) => BatchAdapter;
41
62
  //# sourceMappingURL=openai-compatible.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"openai-compatible.d.ts","sourceRoot":"","sources":["../../src/providers/openai-compatible.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,KAAK,EACV,aAAa,EAKd,MAAM,UAAU,CAAC;AAElB,OAAO,KAAK,EAAE,YAAY,EAAe,MAAM,WAAW,CAAC;AAK3D,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG,YAAY,CAAC;AAEzD,MAAM,WAAW,sBAAsB;IACrC,S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AW,EAAE,mBAAmB,KAAK,MAAM,CAAC;IAE9D,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,EAAE,EAAE,aAAa,CAAC;IAClB;;;;OAIG;IACH,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE;QAClB,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAChC,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,CAAC;KACjB,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACtB;;;OAGG;IACH,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B;;;OAGG;IACH,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;IACvE;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAC;IACjD;;;OAGG;IACH,aAAa,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAC;CAC9C;AAgDD,eAAO,MAAM,6BAA6B,WAChC,sBAAsB,KAC7B,YAmIF,CAAC"}
@@ -4,10 +4,17 @@
4
4
  * JSONL keyed by `custom_id`, and shape each result line like OpenAI's
5
5
  * (`{ custom_id, response: { status_code, body }, error }`).
6
6
  */
7
- import type { BatchImage, BatchResult, BatchUsage, ProviderCredentials } from "../types";
7
+ import type { BatchImage, BatchModeration, BatchResult, BatchTranscriptionSegment, BatchUsage, ProviderCredentials } from "../types";
8
8
  /** Resolve an API key from credentials or the provider's env var, or throw. */
9
9
  export declare const resolveApiKey: (credentials: ProviderCredentials, envVar: string, label: string) => string;
10
10
  export declare const textFromBody: (body: unknown) => string | undefined;
11
+ /**
12
+ * Read timestamped segments from a transcription-shaped response body
13
+ * (`{ text, segments: [{ text, start, end }] }`, Groq `verbose_json` and
14
+ * Mistral alike). Returns undefined when the body carries no segments, so
15
+ * chat/embedding/image results are unaffected.
16
+ */
17
+ export declare const segmentsFromBody: (body: unknown) => BatchTranscriptionSegment[] | undefined;
11
18
  /** Read the embedding vector from an OpenAI-shaped embeddings response body. */
12
19
  export declare const embeddingFromBody: (body: unknown) => number[] | undefined;
13
20
  /**
@@ -16,6 +23,14 @@ export declare const embeddingFromBody: (body: unknown) => number[] | undefined;
16
23
  * carries no image data, so chat/embedding results are unaffected.
17
24
  */
18
25
  export declare const imagesFromBody: (body: unknown) => BatchImage[] | undefined;
26
+ /**
27
+ * Read the verdict from a moderation-shaped response body
28
+ * (`{ results: [{ flagged?, categories, category_scores }] }`, OpenAI and
29
+ * Mistral alike). Mistral reports no `flagged`, so it falls back to "any
30
+ * category flagged". Returns undefined when the body carries no categories, so
31
+ * other result shapes are unaffected.
32
+ */
33
+ export declare const moderationFromBody: (body: unknown) => BatchModeration | undefined;
19
34
  export declare const usageFromBody: (body: unknown) => BatchUsage | undefined;
20
35
  /** Normalize an OpenAI-shaped result line into a {@link BatchResult}. */
21
36
  export declare const normalizeOpenAIResult: (line: unknown) => BatchResult;
@@ -1 +1 @@
1
- {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/providers/shared.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,EACV,UAAU,EACV,WAAW,EAEX,UAAU,EACV,mBAAmB,EACpB,MAAM,UAAU,CAAC;AAMlB,+EAA+E;AAC/E,eAAO,MAAM,aAAa,gBACX,mBAAmB,UACxB,MAAM,SACP,MAAM,KACZ,MAQF,CAAC;AAEF,eAAO,MAAM,YAAY,SAAU,OAAO,KAAG,MAAM,GAAG,SAUrD,CAAC;AAEF,gFAAgF;AAChF,eAAO,MAAM,iBAAiB,SAAU,OAAO,KAAG,MAAM,EAAE,GAAG,SAM5D,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,cAAc,SAAU,OAAO,KAAG,UAAU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,KACZ,eAAe,GAAG,SA2BpB,CAAC;AAEF,eAAO,MAAM,aAAa,SAAU,OAAO,KAAG,UAAU,GAAG,SAmB1D,CAAC;AAaF,yEAAyE;AACzE,eAAO,MAAM,qBAAqB,SAAU,OAAO,KAAG,WAsCrD,CAAC;AAGF,eAAO,MAAM,eAAe,UACnB,MAAM,WACJ,MAAM,WACN,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,YACtB;IAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,KACnC,OAAO,CAAC,MAAM,CAkBhB,CAAC;AAEF;;;;GAIG;AAEH,wBAAuB,gBAAgB,CACrC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC9B,cAAc,CAAC,WAAW,CAAC,CAQ7B"}
@@ -1 +1 @@
1
- {"version":3,"file":"together.d.ts","sourceRoot":"","sources":["../../src/providers/together.ts"],"names":[],"mappings":"AAiKA;;;;;GAKG;AACH,eAAO,MAAM,eAAe,kCAQ1B,CAAC"}
1
+ {"version":3,"file":"together.d.ts","sourceRoot":"","sources":["../../src/providers/together.ts"],"names":[],"mappings":"AAiKA;;;;;GAKG;AACH,eAAO,MAAM,eAAe,kCAY1B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"xai.d.ts","sourceRoot":"","sources":["../../src/providers/xai.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,YAAY,EAAe,MAAM,WAAW,CAAC;AA+M3D;;;;GAIG;AACH,eAAO,MAAM,UAAU,EAAE,YAMxB,CAAC"}
1
+ {"version":3,"file":"xai.d.ts","sourceRoot":"","sources":["../../src/providers/xai.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,YAAY,EAAe,MAAM,WAAW,CAAC;AAsP3D;;;;GAIG;AACH,eAAO,MAAM,UAAU,EAAE,YAMxB,CAAC"}
@@ -4,8 +4,8 @@ import {
4
4
  signWebhook,
5
5
  verifyBatchWebhook,
6
6
  verifyWebhook
7
- } from "../chunk-c7hzcpdy.js";
8
- import"../chunk-jvrfwjwq.js";
7
+ } from "../chunk-ka9d4t6v.js";
8
+ import"../chunk-vy4w8mpb.js";
9
9
  import"../chunk-v0bahtg2.js";
10
10
  export {
11
11
  verifyWebhook,
package/dist/types.d.ts CHANGED
@@ -1,6 +1,12 @@
1
- import type { EmbeddingModel, ImageModel, JSONValue, LanguageModel, ModelMessage, ToolChoice, ToolSet } from "ai";
1
+ import type { EmbeddingModel, experimental_generateVideo, ImageModel, JSONValue, LanguageModel, ModelMessage, ToolChoice, ToolSet, TranscriptionModel } from "ai";
2
+ /**
3
+ * The `model` argument of the AI SDK's `experimental_generateVideo` — a video
4
+ * model object or a `"provider/model"` string. Derived from the function
5
+ * signature because the AI SDK does not export a video model type yet.
6
+ */
7
+ export type VideoModel = Parameters<typeof experimental_generateVideo>[0]["model"];
2
8
  /** Providers with a batch adapter. */
3
- export type BatchProvider = "anthropic" | "google" | "groq" | "mistral" | "openai" | "together" | "xai";
9
+ export type BatchProvider = "anthropic" | "azure" | "google" | "groq" | "mistral" | "openai" | "together" | "xai";
4
10
  /**
5
11
  * Provider-specific options, forwarded verbatim into the underlying request
6
12
  * body. Structurally identical to the AI SDK's `ProviderOptions`.
@@ -65,8 +71,8 @@ export interface BatchImage {
65
71
  }
66
72
  /**
67
73
  * A single image-generation request within a batch. One `prompt` produces one
68
- * or more images, correlated to its result by `customId`. Generation only;
69
- * image editing (input images / masks) is not supported by batch APIs.
74
+ * or more images, correlated to its result by `customId`. For editing an
75
+ * existing image, use `batch.images.edit` with a {@link BatchImageEditRequest}.
70
76
  */
71
77
  export interface BatchImageRequest {
72
78
  /** Aspect ratio, `"{width}:{height}"` (e.g. Gemini image models). */
@@ -86,6 +92,143 @@ export interface BatchImageRequest {
86
92
  }
87
93
  /** Defaults merged into every image request; request-level values take precedence. */
88
94
  export type BatchImageDefaults = Partial<Omit<BatchImageRequest, "customId" | "prompt">>;
95
+ /**
96
+ * Reference to an input image asset: an already-uploaded provider file id
97
+ * (OpenAI Files API), or a hosted image URL (data URIs also work). Batch
98
+ * requests are JSON, so raw image uploads aren't possible — stage assets ahead
99
+ * of time.
100
+ */
101
+ export type BatchImageRef = {
102
+ fileId: string;
103
+ } | {
104
+ imageUrl: string;
105
+ };
106
+ /**
107
+ * A single image-edit request within a batch. One `prompt` applied to one or
108
+ * more source `images` produces one or more edited images, correlated to its
109
+ * result by `customId`.
110
+ */
111
+ export interface BatchImageEditRequest {
112
+ /** Correlates this request to its result. Auto-generated when omitted. */
113
+ customId?: string;
114
+ /** Source image(s) to edit. xAI accepts URL references only (no file ids). */
115
+ images: BatchImageRef[];
116
+ /**
117
+ * Mask whose transparent areas indicate where to edit (OpenAI only; xAI
118
+ * throws before submitting).
119
+ */
120
+ mask?: BatchImageRef;
121
+ /** Number of edited images to generate. Defaults to 1. */
122
+ n?: number;
123
+ /** The text prompt describing the edit. */
124
+ prompt: string;
125
+ /** Forwarded to the provider edit call (e.g. `{ openai: { quality } }`). */
126
+ providerOptions?: ProviderOptions;
127
+ /** Output size, `"{width}x{height}"` (OpenAI; xAI uses `providerOptions`). */
128
+ size?: `${number}x${number}`;
129
+ }
130
+ /** Defaults merged into every image-edit request; request-level values win. */
131
+ export type BatchImageEditDefaults = Partial<Omit<BatchImageEditRequest, "customId" | "images" | "prompt">>;
132
+ /**
133
+ * A single audio-transcription request within a batch. Batch audio endpoints
134
+ * accept hosted audio only (no file uploads): the provider fetches `audioUrl`
135
+ * while processing, so the URL must stay reachable until the batch completes.
136
+ */
137
+ export interface BatchTranscriptionRequest {
138
+ /** Publicly reachable URL of the audio file to transcribe. */
139
+ audioUrl: string;
140
+ /** Correlates this request to its result. Auto-generated when omitted. */
141
+ customId?: string;
142
+ /** Language of the audio, as an ISO-639-1 code (e.g. `"en"`). */
143
+ language?: string;
144
+ /** Merged into the provider request body (e.g. `{ groq: { prompt } }`). */
145
+ providerOptions?: ProviderOptions;
146
+ /** Timestamp detail to request; populates `segments` on the result. */
147
+ timestampGranularities?: ("segment" | "word")[];
148
+ }
149
+ /** Defaults merged into every transcription request; request-level values win. */
150
+ export type BatchTranscriptionDefaults = Partial<Omit<BatchTranscriptionRequest, "customId" | "audioUrl">>;
151
+ /** A timestamped span of a transcript. */
152
+ export interface BatchTranscriptionSegment {
153
+ endSecond?: number;
154
+ startSecond?: number;
155
+ text: string;
156
+ }
157
+ /**
158
+ * A single audio-translation request within a batch: the audio at `audioUrl`
159
+ * is translated into English text (Whisper's translate task — English is the
160
+ * only target, so there is no language field). Same URL rules as
161
+ * {@link BatchTranscriptionRequest}.
162
+ */
163
+ export type BatchTranslationRequest = Omit<BatchTranscriptionRequest, "language">;
164
+ /** Defaults merged into every translation request; request-level values win. */
165
+ export type BatchTranslationDefaults = Partial<Omit<BatchTranslationRequest, "customId" | "audioUrl">>;
166
+ /**
167
+ * A single video-generation request within a batch. One `prompt` produces one
168
+ * video, correlated to its result by `customId`. Editing and extending an
169
+ * existing video route through `providerOptions` (e.g. xAI's
170
+ * `{ xai: { videoUrl } }` for edits, `{ xai: { mode: "extend-video", videoUrl } }`
171
+ * to extend), mirroring the AI SDK's `generateVideo`.
172
+ */
173
+ export interface BatchVideoRequest {
174
+ /** Aspect ratio, `"{width}:{height}"` (e.g. `"16:9"`). */
175
+ aspectRatio?: `${number}:${number}`;
176
+ /** Correlates this request to its result. Auto-generated when omitted. */
177
+ customId?: string;
178
+ /** Clip length in seconds, where the model supports it. */
179
+ duration?: number;
180
+ /** The text prompt describing the video to generate. */
181
+ prompt: string;
182
+ /** Forwarded to the provider video call (e.g. `{ xai: { videoUrl } }`). */
183
+ providerOptions?: ProviderOptions;
184
+ /** Resolution, `"{width}x{height}"` (e.g. `"1280x720"`). */
185
+ resolution?: `${number}x${number}`;
186
+ }
187
+ /** Defaults merged into every video request; request-level values take precedence. */
188
+ export type BatchVideoDefaults = Partial<Omit<BatchVideoRequest, "customId" | "prompt">>;
189
+ /**
190
+ * A generated video. Returned as a hosted `url` — xAI batch signs URLs that
191
+ * expire ~1h after completion, so download promptly.
192
+ */
193
+ export interface BatchVideo {
194
+ /** Video length in seconds, when the provider reports it. */
195
+ durationSeconds?: number;
196
+ /** Hosted video URL. */
197
+ url?: string;
198
+ }
199
+ /**
200
+ * A single moderation request within a batch. Provide `value` (text),
201
+ * `imageUrls` (OpenAI omni moderation only), or both; each request produces
202
+ * one verdict, correlated by `customId`.
203
+ */
204
+ export interface BatchModerationRequest {
205
+ /** Correlates this request to its result. Auto-generated when omitted. */
206
+ customId?: string;
207
+ /**
208
+ * Image URLs to moderate alongside (or instead of) `value`. Supported by
209
+ * OpenAI omni moderation models only; Mistral moderation is text-only.
210
+ */
211
+ imageUrls?: string[];
212
+ /** Merged into the provider request body. */
213
+ providerOptions?: ProviderOptions;
214
+ /** The text to moderate. */
215
+ value?: string;
216
+ }
217
+ /**
218
+ * A normalized moderation verdict. Category names are provider-native (e.g.
219
+ * OpenAI `"hate/threatening"`, Mistral `"hate_and_discrimination"`).
220
+ */
221
+ export interface BatchModeration {
222
+ /** Per-category boolean flags. */
223
+ categories: Record<string, boolean>;
224
+ /** Per-category confidence scores. */
225
+ categoryScores: Record<string, number>;
226
+ /**
227
+ * True when the input was flagged: the provider's own flag (OpenAI), or any
228
+ * category flag when the provider reports none (Mistral).
229
+ */
230
+ flagged: boolean;
231
+ }
89
232
  /** Normalized batch lifecycle status, unified across providers. */
90
233
  export type BatchStatus = "validating" | "in_progress" | "finalizing" | "completed" | "failed" | "expired" | "cancelling" | "cancelled";
91
234
  /** Normalized per-request tallies. `completed` = succeeded, `failed` = errored. */
@@ -118,12 +261,18 @@ export interface BatchResult {
118
261
  error?: BatchResultError;
119
262
  /** Generated images, when the request produced images. */
120
263
  images?: BatchImage[];
264
+ /** Normalized moderation verdict, when the request produced one. */
265
+ moderation?: BatchModeration;
121
266
  /** Raw provider response body (OpenAI `response.body` / Anthropic message). */
122
267
  response?: unknown;
268
+ /** Timestamped transcript segments, when requested via `timestampGranularities`. */
269
+ segments?: BatchTranscriptionSegment[];
123
270
  status: BatchResultStatus;
124
- /** Normalized text output, when the request produced a message. */
271
+ /** Normalized text output, when the request produced a message or transcript. */
125
272
  text?: string;
126
273
  usage?: BatchUsage;
274
+ /** Generated videos, when the request produced videos. */
275
+ videos?: BatchVideo[];
127
276
  }
128
277
  /** A point-in-time, normalized view of a batch's status. */
129
278
  export interface BatchSnapshot {
@@ -173,6 +322,62 @@ export interface BatchImageOptions extends ProviderCredentials {
173
322
  model: ImageModel;
174
323
  requests: BatchImageRequest[];
175
324
  }
325
+ /** Input to `batch.moderations()`. */
326
+ export interface BatchModerationOptions extends ProviderCredentials {
327
+ limits?: BatchLimits;
328
+ metadata?: Record<string, string>;
329
+ /**
330
+ * A `"provider/model"` string (e.g. `"openai/omni-moderation-latest"` or
331
+ * `"mistral/mistral-moderation-latest"`) — the AI SDK has no moderation
332
+ * model type.
333
+ */
334
+ model: string;
335
+ requests: BatchModerationRequest[];
336
+ }
337
+ /** Input to `batch.images.edit()`. */
338
+ export interface BatchImageEditOptions extends ProviderCredentials {
339
+ defaults?: BatchImageEditDefaults;
340
+ limits?: BatchLimits;
341
+ metadata?: Record<string, string>;
342
+ model: ImageModel;
343
+ requests: BatchImageEditRequest[];
344
+ }
345
+ /** Input to `batch.translations()`. */
346
+ export interface BatchTranslationOptions extends ProviderCredentials {
347
+ defaults?: BatchTranslationDefaults;
348
+ limits?: BatchLimits;
349
+ metadata?: Record<string, string>;
350
+ /**
351
+ * A transcription model object (e.g. `groq.transcription("whisper-large-v3")`)
352
+ * or a `"provider/model"` string (e.g. `"together/openai/whisper-large-v3"`).
353
+ */
354
+ model: TranscriptionModel;
355
+ requests: BatchTranslationRequest[];
356
+ }
357
+ /** Input to `batch.videos()`. */
358
+ export interface BatchVideoOptions extends ProviderCredentials {
359
+ defaults?: BatchVideoDefaults;
360
+ limits?: BatchLimits;
361
+ metadata?: Record<string, string>;
362
+ /**
363
+ * A video model object (e.g. `xai.video("grok-imagine-video")`) or a
364
+ * `"provider/model"` string.
365
+ */
366
+ model: VideoModel;
367
+ requests: BatchVideoRequest[];
368
+ }
369
+ /** Input to `batch.transcriptions()`. */
370
+ export interface BatchTranscriptionOptions extends ProviderCredentials {
371
+ defaults?: BatchTranscriptionDefaults;
372
+ limits?: BatchLimits;
373
+ metadata?: Record<string, string>;
374
+ /**
375
+ * A transcription model object (e.g. `groq.transcription("whisper-large-v3")`)
376
+ * or a `"provider/model"` string (e.g. `"mistral/voxtral-mini-latest"`).
377
+ */
378
+ model: TranscriptionModel;
379
+ requests: BatchTranscriptionRequest[];
380
+ }
176
381
  /**
177
382
  * Reference to an existing batch, used to rehydrate a handle. Identify the
178
383
  * provider with either `model` or `provider` (e.g. from a webhook event).
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,UAAU,EACV,SAAS,EACT,aAAa,EACb,YAAY,EACZ,UAAU,EACV,OAAO,EACR,MAAM,IAAI,CAAC;AAEZ,sCAAsC;AACtC,MAAM,MAAM,aAAa,GACrB,WAAW,GACX,QAAQ,GACR,MAAM,GACN,SAAS,GACT,QAAQ,GACR,UAAU,GACV,KAAK,CAAC;AAEV;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;AAExE;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,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,CAAC,CAAC;IAClC;;;OAGG;IACH,KAAK,EAAE,kBAAkB,CAAC;IAC1B,QAAQ,EAAE,yBAAyB,EAAE,CAAC;CACvC;AAED;;;GAGG;AACH,MAAM,WAAW,QAAS,SAAQ,mBAAmB;IACnD,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,QAAQ,CAAC,EAAE,aAAa,CAAC;CAC1B;AAED,MAAM,WAAW,WAAW;IAC1B,yDAAyD;IACzD,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,aAAa,KAAK,IAAI,CAAC;IAC3C,4CAA4C;IAC5C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,oDAAoD;IACpD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "batchwork",
3
- "version": "1.2.1",
3
+ "version": "1.4.0",
4
4
  "description": "Unified batch API for AI providers — low-cost LLM batch processing at scale.",
5
5
  "keywords": [
6
6
  "ai",
@@ -57,7 +57,7 @@
57
57
  "scripts": {
58
58
  "build": "bun run scripts/build.ts",
59
59
  "dev": "bun run scripts/build.ts --watch",
60
- "typecheck": "tsgo --noEmit && tsgo --noEmit -p tsconfig.bun.json",
60
+ "typecheck": "tsc --noEmit && tsc --noEmit -p tsconfig.bun.json",
61
61
  "test": "bun test ./test",
62
62
  "test:coverage": "bun test ./test --coverage",
63
63
  "test:live": "bun test --env-file=.env.local ./live"
@@ -67,6 +67,7 @@
67
67
  },
68
68
  "devDependencies": {
69
69
  "@ai-sdk/anthropic": "^4.0.8",
70
+ "@ai-sdk/azure": "^4.0.8",
70
71
  "@ai-sdk/google": "^4.0.8",
71
72
  "@ai-sdk/groq": "^4.0.5",
72
73
  "@ai-sdk/mistral": "^4.0.5",
@@ -77,13 +78,13 @@
77
78
  "@types/bun": "^1.3.14",
78
79
  "@types/node": "^26.1.0",
79
80
  "@types/pg": "^8.20.0",
80
- "@typescript/native-preview": "^7.0.0-dev.20260705.1",
81
81
  "@upstash/redis": "^1.38.0",
82
82
  "pg": "^8.22.0",
83
- "typescript": "^6.0.3"
83
+ "typescript": "^7.0.0"
84
84
  },
85
85
  "peerDependencies": {
86
86
  "@ai-sdk/anthropic": ">=3",
87
+ "@ai-sdk/azure": ">=3",
87
88
  "@ai-sdk/google": ">=3",
88
89
  "@ai-sdk/groq": ">=3",
89
90
  "@ai-sdk/mistral": ">=3",
@@ -99,6 +100,9 @@
99
100
  "@ai-sdk/anthropic": {
100
101
  "optional": true
101
102
  },
103
+ "@ai-sdk/azure": {
104
+ "optional": true
105
+ },
102
106
  "@ai-sdk/google": {
103
107
  "optional": true
104
108
  },
@@ -1,12 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/model.ts", "../src/body.ts", "../src/batch.ts"],
4
- "sourcesContent": [
5
- "import type { createAnthropic } from \"@ai-sdk/anthropic\";\nimport type { createGoogleGenerativeAI } from \"@ai-sdk/google\";\nimport type { createGroq } from \"@ai-sdk/groq\";\nimport type { createMistral } from \"@ai-sdk/mistral\";\nimport type { createOpenAI } from \"@ai-sdk/openai\";\nimport type { createTogetherAI } from \"@ai-sdk/togetherai\";\nimport type { createXai } from \"@ai-sdk/xai\";\nimport type { EmbeddingModel, ImageModel, LanguageModel } from \"ai\";\n\nimport { MissingDependencyError, UnsupportedProviderError } from \"./errors\";\nimport type { BatchProvider, ProviderCredentials } from \"./types\";\n\n/** The shape `loadProvider` expects from each optional `@ai-sdk/*` package. */\ninterface AnthropicModule {\n createAnthropic: typeof createAnthropic;\n}\ninterface GoogleModule {\n createGoogleGenerativeAI: typeof createGoogleGenerativeAI;\n}\ninterface GroqModule {\n createGroq: typeof createGroq;\n}\ninterface MistralModule {\n createMistral: typeof createMistral;\n}\ninterface OpenAIModule {\n createOpenAI: typeof createOpenAI;\n}\ninterface TogetherModule {\n createTogetherAI: typeof createTogetherAI;\n}\ninterface XaiModule {\n createXai: typeof createXai;\n}\n\n/** A fetch implementation compatible with the AI SDK provider `fetch` option. */\nexport type CapturingFetch = typeof globalThis.fetch;\n\n/** OpenAI exposes several request shapes; we mirror the one the model implies. */\nexport type OpenAIModelKind = \"chat\" | \"responses\" | \"completion\";\n\nexport interface ResolvedModel {\n /** Relevant for OpenAI; other providers always use a single chat endpoint. */\n kind: OpenAIModelKind;\n modelId: string;\n provider: BatchProvider;\n}\n\n/**\n * Placeholder API key used only when building request bodies. Body building\n * intercepts the request before it is sent, so no real credential is needed —\n * but the provider refuses to construct a model without one.\n */\nconst CAPTURE_API_KEY = \"batchwork-capture\";\n\n/** The optional `@ai-sdk/*` package backing each provider. */\nconst PACKAGE_BY_PROVIDER: Record<\n BatchProvider,\n { label: string; specifier: string }\n> = {\n anthropic: { label: \"Anthropic\", specifier: \"@ai-sdk/anthropic\" },\n google: { label: \"Google Gemini\", specifier: \"@ai-sdk/google\" },\n groq: { label: \"Groq\", specifier: \"@ai-sdk/groq\" },\n mistral: { label: \"Mistral\", specifier: \"@ai-sdk/mistral\" },\n openai: { label: \"OpenAI\", specifier: \"@ai-sdk/openai\" },\n together: { label: \"Together AI\", specifier: \"@ai-sdk/togetherai\" },\n xai: { label: \"xAI\", specifier: \"@ai-sdk/xai\" },\n};\n\n/**\n * AI SDK provider id prefixes (the part before the first `.` in `model.provider`)\n * mapped to batch providers.\n */\nconst PROVIDER_BY_FAMILY: Record<string, BatchProvider> = {\n anthropic: \"anthropic\",\n google: \"google\",\n groq: \"groq\",\n mistral: \"mistral\",\n openai: \"openai\",\n together: \"together\",\n togetherai: \"together\",\n xai: \"xai\",\n};\n\n/** Aliases accepted in the `\"provider/model\"` string form. */\nconst PROVIDER_BY_ALIAS: Record<string, BatchProvider> = {\n ...PROVIDER_BY_FAMILY,\n gemini: \"google\",\n};\n\nconst splitOnce = (value: string, separator: string): [string, string] => {\n const index = value.indexOf(separator);\n if (index === -1) {\n return [value, \"\"];\n }\n return [value.slice(0, index), value.slice(index + separator.length)];\n};\n\nconst openaiKind = (suffix: string): OpenAIModelKind => {\n if (suffix === \"responses\") {\n return \"responses\";\n }\n if (suffix === \"completion\") {\n return \"completion\";\n }\n // Default to chat completions: the most widely supported batch endpoint.\n return \"chat\";\n};\n\n/** Resolve a `\"provider/model\"` string into a provider + model id. */\nconst resolveModelString = (value: string): ResolvedModel => {\n const [providerId, modelId] = splitOnce(value, \"/\");\n if (modelId === \"\") {\n throw new UnsupportedProviderError(value);\n }\n const provider = PROVIDER_BY_ALIAS[providerId];\n if (!provider) {\n throw new UnsupportedProviderError(providerId);\n }\n return { kind: \"chat\", modelId, provider };\n};\n\n/**\n * Resolve any AI SDK `model` (a `\"provider/model\"` string or a provider model\n * object such as `openai(\"gpt-5.5\")`) to a provider + model id + request\n * shape. Gateway/registry model objects whose `modelId` is itself\n * `\"provider/model\"` are also handled.\n */\nexport const resolveModel = (\n model: LanguageModel | EmbeddingModel | ImageModel\n): ResolvedModel => {\n if (typeof model === \"string\") {\n return resolveModelString(model);\n }\n\n const [family, suffix] = splitOnce(model.provider, \".\");\n const provider = PROVIDER_BY_FAMILY[family];\n if (provider === \"openai\") {\n return { kind: openaiKind(suffix), modelId: model.modelId, provider };\n }\n if (provider) {\n return { kind: \"chat\", modelId: model.modelId, provider };\n }\n // Gateway/registry providers carry the real target in the model id.\n if (model.modelId.includes(\"/\")) {\n return resolveModelString(model.modelId);\n }\n throw new UnsupportedProviderError(model.provider);\n};\n\nconst importProvider = (provider: BatchProvider): Promise<unknown> => {\n switch (provider) {\n case \"anthropic\": {\n return import(\"@ai-sdk/anthropic\");\n }\n case \"google\": {\n return import(\"@ai-sdk/google\");\n }\n case \"groq\": {\n return import(\"@ai-sdk/groq\");\n }\n case \"mistral\": {\n return import(\"@ai-sdk/mistral\");\n }\n case \"openai\": {\n return import(\"@ai-sdk/openai\");\n }\n case \"together\": {\n return import(\"@ai-sdk/togetherai\");\n }\n case \"xai\": {\n return import(\"@ai-sdk/xai\");\n }\n default: {\n return Promise.reject(new UnsupportedProviderError(provider));\n }\n }\n};\n\n/**\n * Import the `@ai-sdk/*` package for a provider, translating a missing optional\n * dependency into a `MissingDependencyError`. The importer is injectable (like\n * the capturing `fetch`) so tests can drive the failure paths without\n * uninstalling a package. Exported for testing; not part of the public API.\n */\nexport const loadProvider = async <T>(\n provider: BatchProvider,\n load: (target: BatchProvider) => Promise<unknown> = importProvider\n): Promise<T> => {\n try {\n return (await load(provider)) as T;\n } catch (error) {\n if (error instanceof UnsupportedProviderError) {\n throw error;\n }\n const { specifier, label } = PACKAGE_BY_PROVIDER[provider];\n throw new MissingDependencyError(specifier, label);\n }\n};\n\n/**\n * Construct an AI SDK model wired to a capturing `fetch`, used to derive the\n * provider request body for each batch item without making a network call.\n */\nexport const createCaptureModel = async (\n resolved: ResolvedModel,\n credentials: ProviderCredentials,\n fetchImpl: CapturingFetch\n): Promise<LanguageModel> => {\n const settings = {\n apiKey: credentials.apiKey ?? CAPTURE_API_KEY,\n baseURL: credentials.baseURL,\n fetch: fetchImpl,\n headers: credentials.headers,\n };\n\n switch (resolved.provider) {\n case \"openai\": {\n const { createOpenAI } = await loadProvider<OpenAIModule>(\"openai\");\n const provider = createOpenAI(settings);\n if (resolved.kind === \"responses\") {\n return provider.responses(resolved.modelId);\n }\n if (resolved.kind === \"completion\") {\n return provider.completion(resolved.modelId);\n }\n return provider.chat(resolved.modelId);\n }\n case \"anthropic\": {\n const { createAnthropic } =\n await loadProvider<AnthropicModule>(\"anthropic\");\n return createAnthropic(settings).messages(resolved.modelId);\n }\n case \"groq\": {\n const { createGroq } = await loadProvider<GroqModule>(\"groq\");\n return createGroq(settings).languageModel(resolved.modelId);\n }\n case \"mistral\": {\n const { createMistral } = await loadProvider<MistralModule>(\"mistral\");\n return createMistral(settings).languageModel(resolved.modelId);\n }\n case \"google\": {\n const { createGoogleGenerativeAI } =\n await loadProvider<GoogleModule>(\"google\");\n return createGoogleGenerativeAI(settings).languageModel(resolved.modelId);\n }\n case \"xai\": {\n const { createXai } = await loadProvider<XaiModule>(\"xai\");\n return createXai(settings).languageModel(resolved.modelId);\n }\n case \"together\": {\n const { createTogetherAI } =\n await loadProvider<TogetherModule>(\"together\");\n return createTogetherAI(settings).languageModel(resolved.modelId);\n }\n default: {\n throw new UnsupportedProviderError(resolved.provider);\n }\n }\n};\n\n/**\n * Providers whose batch API accepts embeddings. Together is excluded: it exposes\n * an embedding model, but its batch endpoint rejects `/v1/embeddings`. Anthropic,\n * Groq, and xAI have no embedding model at all.\n */\nexport const EMBEDDING_PROVIDERS = new Set<BatchProvider>([\n \"google\",\n \"mistral\",\n \"openai\",\n]);\n\nexport const unsupportedEmbeddingProvider = (\n provider: BatchProvider\n): UnsupportedProviderError =>\n new UnsupportedProviderError(\n provider,\n `batchwork: provider \"${provider}\" does not offer batch embeddings. Embeddings are supported for: openai, mistral, google.`\n );\n\n/**\n * Construct an AI SDK text embedding model wired to a capturing `fetch`, used to\n * derive the provider embedding request body for each batch item without making\n * a network call. Throws for providers without an embedding model.\n */\nexport const createCaptureEmbeddingModel = async (\n resolved: ResolvedModel,\n credentials: ProviderCredentials,\n fetchImpl: CapturingFetch\n): Promise<EmbeddingModel> => {\n const settings = {\n apiKey: credentials.apiKey ?? CAPTURE_API_KEY,\n baseURL: credentials.baseURL,\n fetch: fetchImpl,\n headers: credentials.headers,\n };\n\n switch (resolved.provider) {\n case \"openai\": {\n const { createOpenAI } = await loadProvider<OpenAIModule>(\"openai\");\n return createOpenAI(settings).embeddingModel(resolved.modelId);\n }\n case \"mistral\": {\n const { createMistral } = await loadProvider<MistralModule>(\"mistral\");\n return createMistral(settings).embeddingModel(resolved.modelId);\n }\n case \"google\": {\n const { createGoogleGenerativeAI } =\n await loadProvider<GoogleModule>(\"google\");\n return createGoogleGenerativeAI(settings).embeddingModel(\n resolved.modelId\n );\n }\n default: {\n throw unsupportedEmbeddingProvider(resolved.provider);\n }\n }\n};\n\n/**\n * Providers whose batch API accepts image generation. OpenAI and xAI expose\n * `/v1/images/generations` as a batch endpoint; Google runs Gemini image models\n * through `:batchGenerateContent`. Imagen (Google `:predict`) is not\n * batch-supported, Together's batch API is chat/audio only, and Anthropic, Groq,\n * and Mistral have no image model.\n */\nexport const IMAGE_PROVIDERS = new Set<BatchProvider>([\n \"google\",\n \"openai\",\n \"xai\",\n]);\n\nexport const unsupportedImageProvider = (\n provider: BatchProvider\n): UnsupportedProviderError =>\n new UnsupportedProviderError(\n provider,\n `batchwork: provider \"${provider}\" does not offer batch image generation. Image batches are supported for: openai, google, xai.`\n );\n\n/**\n * Construct an AI SDK image model wired to a capturing `fetch`, used to derive\n * the provider image-generation request body for each batch item without making\n * a network call. Throws for providers without batch image support.\n */\nexport const createCaptureImageModel = async (\n resolved: ResolvedModel,\n credentials: ProviderCredentials,\n fetchImpl: CapturingFetch\n): Promise<ImageModel> => {\n const settings = {\n apiKey: credentials.apiKey ?? CAPTURE_API_KEY,\n baseURL: credentials.baseURL,\n fetch: fetchImpl,\n headers: credentials.headers,\n };\n\n switch (resolved.provider) {\n case \"openai\": {\n const { createOpenAI } = await loadProvider<OpenAIModule>(\"openai\");\n return createOpenAI(settings).image(resolved.modelId);\n }\n case \"google\": {\n const { createGoogleGenerativeAI } =\n await loadProvider<GoogleModule>(\"google\");\n return createGoogleGenerativeAI(settings).image(resolved.modelId);\n }\n case \"xai\": {\n const { createXai } = await loadProvider<XaiModule>(\"xai\");\n return createXai(settings).image(resolved.modelId);\n }\n default: {\n throw unsupportedImageProvider(resolved.provider);\n }\n }\n};\n",
6
- "import { embed, generateImage, generateText } from \"ai\";\nimport type { EmbeddingModel, ImageModel, LanguageModel } from \"ai\";\n\nimport { BatchworkError } from \"./errors\";\nimport {\n assertByteLength,\n mapWithConcurrency,\n resolveBatchLimits,\n} from \"./limits\";\nimport type { ResolvedBatchLimits } from \"./limits\";\nimport {\n createCaptureEmbeddingModel,\n createCaptureImageModel,\n createCaptureModel,\n} from \"./model\";\nimport type { CapturingFetch, ResolvedModel } from \"./model\";\nimport type {\n BatchDefaults,\n BatchEmbeddingRequest,\n BatchImageDefaults,\n BatchImageRequest,\n BatchLimits,\n BatchRequest,\n ProviderCredentials,\n} from \"./types\";\n\ntype GenerateTextInput = Parameters<typeof generateText>[0];\n\n/** A provider request body derived from a single batch item. */\nexport interface BuiltRequest {\n /** The serialized provider request body (becomes the batch line). */\n body: Record<string, unknown>;\n customId: string;\n /** API endpoint path the model targets, e.g. `/v1/chat/completions`. */\n endpoint: string;\n}\n\nconst MAX_CAUSE_DEPTH = 10;\n\n/**\n * Thrown by the capturing `fetch` to abort the request after its body has been\n * serialized. The body travels inside the error (not shared state), so capture\n * is correct even under concurrency.\n */\nclass CaptureSignalError extends Error {\n readonly url: string;\n readonly rawBody: string;\n\n constructor(url: string, rawBody: string) {\n super(\"batchwork:capture\");\n this.name = \"CaptureSignalError\";\n this.url = url;\n this.rawBody = rawBody;\n }\n}\n\nconst resolveUrl = (input: string | URL | Request): string => {\n if (typeof input === \"string\") {\n return input;\n }\n if (input instanceof URL) {\n return input.toString();\n }\n return input.url;\n};\n\nconst extractBody = (init?: RequestInit): string => {\n const body = init?.body;\n if (typeof body === \"string\") {\n return body;\n }\n if (body instanceof Uint8Array) {\n return new TextDecoder().decode(body);\n }\n throw new BatchworkError(\n \"batchwork: unable to read the provider request body during capture.\"\n );\n};\n\n// `CapturingFetch` is `typeof fetch`, whose shape varies by runtime types (e.g.\n// Bun adds a required `preconnect` method). We only ever call it as a plain\n// fetch, so cast the bare implementation rather than stub the extra members.\nconst captureFetch = ((input: string | URL | Request, init?: RequestInit) =>\n Promise.reject(\n new CaptureSignalError(resolveUrl(input), extractBody(init))\n )) as unknown as CapturingFetch;\n\nconst findCapture = (error: unknown): CaptureSignalError | undefined => {\n let current: unknown = error;\n let depth = 0;\n while (current && depth < MAX_CAUSE_DEPTH) {\n if (current instanceof CaptureSignalError) {\n return current;\n }\n current = (current as { cause?: unknown }).cause;\n depth += 1;\n }\n};\n\nconst endpointFromUrl = (url: string): string => {\n try {\n return new URL(url).pathname;\n } catch {\n return url;\n }\n};\n\nconst mergeDefaults = <Request extends object>(\n request: Request,\n defaults: NoInfer<Partial<Request>> | undefined\n): Request => {\n if (!defaults) {\n return request;\n }\n return { ...defaults, ...request };\n};\n\n/**\n * Map a batch request to AI SDK `generateText` input. Fields are listed\n * explicitly so `customId` never leaks into the provider request.\n */\nconst toGenerateInput = (\n model: LanguageModel,\n request: BatchRequest\n): GenerateTextInput =>\n // `prompt`/`messages` form a discriminated union in the AI SDK types; we\n // pass both keys and let `generateText` validate the XOR at runtime.\n ({\n frequencyPenalty: request.frequencyPenalty,\n maxOutputTokens: request.maxOutputTokens,\n maxRetries: 0,\n messages: request.messages,\n model,\n presencePenalty: request.presencePenalty,\n prompt: request.prompt,\n providerOptions: request.providerOptions,\n seed: request.seed,\n stopSequences: request.stopSequences,\n system: request.system,\n temperature: request.temperature,\n toolChoice: request.toolChoice,\n tools: request.tools,\n topK: request.topK,\n topP: request.topP,\n }) as GenerateTextInput;\n\n/**\n * Turn a thrown capture into a {@link BuiltRequest}. A genuine failure (one that\n * never reached the capturing `fetch`, e.g. an invalid prompt) is rethrown.\n */\nconst bodyFromCapture = (\n error: unknown,\n customId: string,\n maxRequestBytes: number\n): BuiltRequest => {\n const capture = findCapture(error);\n if (capture) {\n assertByteLength(`request \"${customId}\"`, capture.rawBody, maxRequestBytes);\n return {\n body: JSON.parse(capture.rawBody) as Record<string, unknown>,\n customId,\n endpoint: endpointFromUrl(capture.url),\n };\n }\n throw error;\n};\n\nconst captureOne = async (\n model: LanguageModel,\n request: BatchRequest,\n customId: string,\n maxRequestBytes: number\n): Promise<BuiltRequest> => {\n try {\n await generateText(toGenerateInput(model, request));\n } catch (error) {\n return bodyFromCapture(error, customId, maxRequestBytes);\n }\n throw new BatchworkError(\n \"batchwork: the request was not intercepted while building the batch body.\"\n );\n};\n\nconst captureEmbeddingOne = async (\n model: EmbeddingModel,\n request: BatchEmbeddingRequest,\n customId: string,\n maxRequestBytes: number\n): Promise<BuiltRequest> => {\n try {\n // `maxRetries: 0` is load-bearing: with retries enabled the capture error\n // is wrapped in a `RetryError` (under `.errors`, not `.cause`) and\n // `findCapture`'s cause walk would miss it.\n await embed({\n maxRetries: 0,\n model,\n providerOptions: request.providerOptions,\n value: request.value,\n });\n } catch (error) {\n return bodyFromCapture(error, customId, maxRequestBytes);\n }\n throw new BatchworkError(\n \"batchwork: the request was not intercepted while building the embedding body.\"\n );\n};\n\nconst captureImageOne = async (\n model: ImageModel,\n request: BatchImageRequest,\n customId: string,\n maxRequestBytes: number\n): Promise<BuiltRequest> => {\n try {\n await generateImage({\n aspectRatio: request.aspectRatio,\n // `maxImagesPerCall: n` forces a single `doGenerate` call so the captured\n // body carries the requested `n` rather than a fanned-out per-call count.\n maxImagesPerCall: request.n,\n // `maxRetries: 0` is load-bearing: with retries enabled the capture error\n // is wrapped in a `RetryError` (under `.errors`, not `.cause`) and\n // `findCapture`'s cause walk would miss it.\n maxRetries: 0,\n model,\n n: request.n,\n prompt: request.prompt,\n providerOptions: request.providerOptions,\n seed: request.seed,\n size: request.size,\n });\n } catch (error) {\n return bodyFromCapture(error, customId, maxRequestBytes);\n }\n throw new BatchworkError(\n \"batchwork: the request was not intercepted while building the image body.\"\n );\n};\n\n/**\n * Assign and validate a unique `customId` for each request (sequentially, so\n * duplicates are reported deterministically before bodies are captured in\n * parallel). Auto-generates `request-{index}` when omitted.\n */\nconst assignCustomIds = <T extends { customId?: string }>(\n requests: readonly T[]\n): { customId: string; request: T }[] => {\n const seen = new Set<string>();\n return requests.map((request, index) => {\n const customId = request.customId ?? `request-${index}`;\n if (seen.has(customId)) {\n throw new BatchworkError(\n `batchwork: duplicate customId \"${customId}\". customId values must be unique within a batch.`\n );\n }\n seen.add(customId);\n return { customId, request };\n });\n};\n\n/**\n * Derive provider request bodies for every batch item by running each through\n * the AI SDK with a capturing `fetch`. This reuses the AI SDK's full message,\n * tool, and multimodal conversion, so the body matches what `generateText`\n * would send — minus the network call.\n */\nexport const buildRequestBodies = async (\n resolved: ResolvedModel,\n requests: readonly BatchRequest[],\n defaults: BatchDefaults | undefined,\n credentials: ProviderCredentials,\n rawLimits?: BatchLimits | ResolvedBatchLimits\n): Promise<BuiltRequest[]> => {\n const limits = resolveBatchLimits(rawLimits);\n if (requests.length > limits.maxRequests) {\n throw new BatchworkError(\n `batchwork: requests length ${requests.length} exceeds the ${limits.maxRequests} request limit.`\n );\n }\n const model = await createCaptureModel(resolved, credentials, captureFetch);\n const items = assignCustomIds(requests);\n\n return await mapWithConcurrency(\n items,\n limits.captureConcurrency,\n async (item) => {\n const built = await captureOne(\n model,\n mergeDefaults(item.request, defaults),\n item.customId,\n limits.maxRequestBytes\n );\n assertByteLength(\n `request \"${item.customId}\"`,\n JSON.stringify(built.body),\n limits.maxRequestBytes\n );\n return built;\n }\n );\n};\n\n/**\n * Derive provider embedding request bodies for every batch item by running each\n * through the AI SDK `embed` with a capturing `fetch`. Mirrors\n * {@link buildRequestBodies} for the embedding endpoint; each item maps to a\n * single embedding (`input: [value]`), correlated by `customId`.\n */\nexport const buildEmbeddingBodies = async (\n resolved: ResolvedModel,\n requests: readonly BatchEmbeddingRequest[],\n credentials: ProviderCredentials,\n rawLimits?: BatchLimits | ResolvedBatchLimits\n): Promise<BuiltRequest[]> => {\n const limits = resolveBatchLimits(rawLimits);\n if (requests.length > limits.maxRequests) {\n throw new BatchworkError(\n `batchwork: requests length ${requests.length} exceeds the ${limits.maxRequests} request limit.`\n );\n }\n const model = await createCaptureEmbeddingModel(\n resolved,\n credentials,\n captureFetch\n );\n const items = assignCustomIds(requests);\n\n return await mapWithConcurrency(\n items,\n limits.captureConcurrency,\n async (item) => {\n const built = await captureEmbeddingOne(\n model,\n item.request,\n item.customId,\n limits.maxRequestBytes\n );\n assertByteLength(\n `request \"${item.customId}\"`,\n JSON.stringify(built.body),\n limits.maxRequestBytes\n );\n return built;\n }\n );\n};\n\n/**\n * Derive provider image-generation request bodies for every batch item by\n * running each through the AI SDK `generateImage` with a capturing `fetch`.\n * Mirrors {@link buildRequestBodies} for the image endpoint; each item maps to a\n * single image-generation call, correlated by `customId`.\n */\nexport const buildImageBodies = async (\n resolved: ResolvedModel,\n requests: readonly BatchImageRequest[],\n defaults: BatchImageDefaults | undefined,\n credentials: ProviderCredentials,\n rawLimits?: BatchLimits | ResolvedBatchLimits\n): Promise<BuiltRequest[]> => {\n const limits = resolveBatchLimits(rawLimits);\n if (requests.length > limits.maxRequests) {\n throw new BatchworkError(\n `batchwork: requests length ${requests.length} exceeds the ${limits.maxRequests} request limit.`\n );\n }\n const model = await createCaptureImageModel(\n resolved,\n credentials,\n captureFetch\n );\n const items = assignCustomIds(requests);\n\n return await mapWithConcurrency(\n items,\n limits.captureConcurrency,\n async (item) => {\n const built = await captureImageOne(\n model,\n mergeDefaults(item.request, defaults),\n item.customId,\n limits.maxRequestBytes\n );\n assertByteLength(\n `request \"${item.customId}\"`,\n JSON.stringify(built.body),\n limits.maxRequestBytes\n );\n return built;\n }\n );\n};\n",
7
- "import {\n buildEmbeddingBodies,\n buildImageBodies,\n buildRequestBodies,\n} from \"./body\";\nimport { BatchworkError } from \"./errors\";\nimport { BatchJob } from \"./job\";\nimport { resolveBatchLimits } from \"./limits\";\nimport {\n EMBEDDING_PROVIDERS,\n IMAGE_PROVIDERS,\n resolveModel,\n unsupportedEmbeddingProvider,\n unsupportedImageProvider,\n} from \"./model\";\nimport { getAdapter } from \"./providers\";\nimport type {\n BatchEmbeddingsOptions,\n BatchImageOptions,\n BatchOptions,\n BatchProvider,\n BatchRef,\n BatchResult,\n ProviderCredentials,\n} from \"./types\";\n\nconst EMPTY_REQUESTS_MESSAGE = \"batchwork: `requests` must not be empty.\";\n\nconst pickCredentials = (source: ProviderCredentials): ProviderCredentials => ({\n apiKey: source.apiKey,\n baseURL: source.baseURL,\n headers: source.headers,\n});\n\nconst providerFromRef = (ref: BatchRef): BatchProvider => {\n if (ref.provider) {\n return ref.provider;\n }\n if (ref.model !== undefined) {\n return resolveModel(ref.model).provider;\n }\n throw new BatchworkError(\n \"batchwork: provide `provider` or `model` to identify the batch.\"\n );\n};\n\n/**\n * Submit a batch of text/chat requests to the model's provider and return a\n * handle. Reachable as both `batch()` (shorthand) and `batch.text()`.\n *\n * Resolves immediately once the batch is accepted — it does not wait for\n * processing. Use the returned {@link BatchJob} to poll, wait, or stream\n * results.\n *\n * @example\n * const job = await batch({\n * model: openai(\"gpt-5.5\"),\n * requests: [{ customId: \"a\", prompt: \"Say hi\" }],\n * });\n * const results = await job.wait().then(() => job.collect());\n */\nconst submitText = async (options: BatchOptions): Promise<BatchJob> => {\n if (options.requests.length === 0) {\n throw new BatchworkError(EMPTY_REQUESTS_MESSAGE);\n }\n\n const resolved = resolveModel(options.model);\n const credentials = pickCredentials(options);\n const limits = resolveBatchLimits(options.limits);\n const adapter = getAdapter(resolved.provider);\n\n const built = await buildRequestBodies(\n resolved,\n options.requests,\n options.defaults,\n credentials,\n limits\n );\n const snapshot = await adapter.submit({\n built,\n credentials,\n endpoint: built[0]?.endpoint ?? \"\",\n limits,\n metadata: options.metadata,\n modelId: resolved.modelId,\n });\n\n return new BatchJob(adapter, credentials, snapshot);\n};\n\n/**\n * Submit a batch of embedding requests to the model's provider and return a\n * handle. Each request's `value` produces one vector, correlated by `customId`\n * via {@link BatchJob.results}. Supported for OpenAI, Mistral, Together, and\n * Google; other providers throw {@link UnsupportedProviderError}.\n *\n * @example\n * const job = await batch.embeddings({\n * model: openai.embeddingModel(\"text-embedding-3-small\"),\n * requests: [{ customId: \"a\", value: \"hello world\" }],\n * });\n * const results = await job.wait().then(() => job.collect());\n * for (const r of results) {\n * console.log(r.customId, r.embedding?.length);\n * }\n */\nconst submitEmbeddings = async (\n options: BatchEmbeddingsOptions\n): Promise<BatchJob> => {\n if (options.requests.length === 0) {\n throw new BatchworkError(EMPTY_REQUESTS_MESSAGE);\n }\n\n const resolved = resolveModel(options.model);\n if (!EMBEDDING_PROVIDERS.has(resolved.provider)) {\n throw unsupportedEmbeddingProvider(resolved.provider);\n }\n const credentials = pickCredentials(options);\n const limits = resolveBatchLimits(options.limits);\n const adapter = getAdapter(resolved.provider);\n\n const built = await buildEmbeddingBodies(\n resolved,\n options.requests,\n credentials,\n limits\n );\n const snapshot = await adapter.submit({\n built,\n credentials,\n endpoint: built[0]?.endpoint ?? \"\",\n limits,\n metadata: options.metadata,\n modelId: resolved.modelId,\n });\n\n return new BatchJob(adapter, credentials, snapshot);\n};\n\n/**\n * Submit a batch of image-generation requests to the model's provider and\n * return a handle. Each request's `prompt` produces one or more images,\n * correlated by `customId` via {@link BatchJob.results}. Supported for OpenAI\n * and Google; other providers throw {@link UnsupportedProviderError}.\n *\n * @example\n * const job = await batch.images({\n * model: openai.image(\"gpt-image-2\"),\n * requests: [{ customId: \"a\", prompt: \"a red bicycle\" }],\n * });\n * const results = await job.wait().then(() => job.collect());\n * for (const r of results) {\n * console.log(r.customId, r.images?.length);\n * }\n */\nconst submitImages = async (options: BatchImageOptions): Promise<BatchJob> => {\n if (options.requests.length === 0) {\n throw new BatchworkError(EMPTY_REQUESTS_MESSAGE);\n }\n\n const resolved = resolveModel(options.model);\n if (!IMAGE_PROVIDERS.has(resolved.provider)) {\n throw unsupportedImageProvider(resolved.provider);\n }\n const credentials = pickCredentials(options);\n const limits = resolveBatchLimits(options.limits);\n const adapter = getAdapter(resolved.provider);\n\n const built = await buildImageBodies(\n resolved,\n options.requests,\n options.defaults,\n credentials,\n limits\n );\n const snapshot = await adapter.submit({\n built,\n credentials,\n endpoint: built[0]?.endpoint ?? \"\",\n limits,\n metadata: options.metadata,\n modelId: resolved.modelId,\n });\n\n return new BatchJob(adapter, credentials, snapshot);\n};\n\n/**\n * Submit a batch of requests and return a {@link BatchJob} handle.\n *\n * Callable directly as a shorthand for text/chat batches, with one method per\n * modality:\n *\n * - `batch()` / {@link batch.text} — text & chat completions\n * - {@link batch.embeddings} — embedding vectors\n * - {@link batch.images} — image generation\n *\n * @example\n * const job = await batch({\n * model: openai(\"gpt-5.5\"),\n * requests: [{ customId: \"a\", prompt: \"Say hi\" }],\n * });\n */\nexport const batch = Object.assign(submitText, {\n /** Submit a batch of embedding requests. */\n embeddings: submitEmbeddings,\n /** Submit a batch of image-generation requests. */\n images: submitImages,\n /** Submit a batch of text/chat requests. Equivalent to calling `batch()`. */\n text: submitText,\n});\n\n/**\n * @deprecated Use {@link batch.embeddings} instead. Kept as a standalone alias\n * for backward compatibility; it will be removed in a future major.\n */\nexport const batchEmbeddings = submitEmbeddings;\n\n/**\n * @deprecated Use {@link batch.images} instead. Kept as a standalone alias for\n * backward compatibility; it will be removed in a future major.\n */\nexport const batchImages = submitImages;\n\n/**\n * Rehydrate a {@link BatchJob} for an existing batch id (e.g. one persisted\n * after submission). Identify the provider with `provider` or `model`.\n */\nexport const getBatch = async (ref: BatchRef): Promise<BatchJob> => {\n const adapter = getAdapter(providerFromRef(ref));\n const credentials = pickCredentials(ref);\n const snapshot = await adapter.retrieve(ref.id, credentials);\n return new BatchJob(adapter, credentials, snapshot);\n};\n\n/** Stream the results of an existing batch by id, without a handle. */\nexport const getBatchResults = (ref: BatchRef): AsyncGenerator<BatchResult> => {\n const adapter = getAdapter(providerFromRef(ref));\n return adapter.results(ref.id, pickCredentials(ref));\n};\n\n/** Request cancellation of an existing batch by id. */\nexport const cancelBatch = async (ref: BatchRef): Promise<void> => {\n const adapter = getAdapter(providerFromRef(ref));\n await adapter.cancel(ref.id, pickCredentials(ref));\n};\n"
8
- ],
9
- "mappings": ";;;;;;;;;;;;;;;AAqDA,IAAM,kBAAkB;AAGxB,IAAM,sBAGF;AAAA,EACF,WAAW,EAAE,OAAO,aAAa,WAAW,oBAAoB;AAAA,EAChE,QAAQ,EAAE,OAAO,iBAAiB,WAAW,iBAAiB;AAAA,EAC9D,MAAM,EAAE,OAAO,QAAQ,WAAW,eAAe;AAAA,EACjD,SAAS,EAAE,OAAO,WAAW,WAAW,kBAAkB;AAAA,EAC1D,QAAQ,EAAE,OAAO,U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