@ai-sdk/gladia 3.0.0-beta.5 → 3.0.0-beta.50

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/CHANGELOG.md CHANGED
@@ -1,5 +1,381 @@
1
1
  # @ai-sdk/gladia
2
2
 
3
+ ## 3.0.0-beta.50
4
+
5
+ ### Patch Changes
6
+
7
+ - b8396f0: trigger initial beta release
8
+ - Updated dependencies [b8396f0]
9
+ - @ai-sdk/provider-utils@5.0.0-beta.49
10
+ - @ai-sdk/provider@4.0.0-beta.19
11
+
12
+ ## 3.0.0-canary.49
13
+
14
+ ### Patch Changes
15
+
16
+ - aeda373: fix: only send provider credentials to same-origin response-supplied URLs
17
+
18
+ Several provider clients followed a URL taken from the provider's API response (a polling/status URL or a final media URL such as `polling_url`, `urls.get`, `result_url`, `result.sample`, or `video.uri`) and reused the authenticated headers — or appended `?key=<API_KEY>` — on that request. Because the host of the response-supplied URL was never validated, the long-lived API key was sent to whatever host the response named (a CDN in the benign case, or an attacker-chosen host if the provider response was tampered with), allowing credential exfiltration.
19
+
20
+ A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and the affected fetches in `@ai-sdk/black-forest-labs`, `@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`, `@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the followed URL is same-origin with the provider's configured API origin. Requests to a foreign origin are made without the credential.
21
+
22
+ - Updated dependencies [aeda373]
23
+ - Updated dependencies [375fdd7]
24
+ - Updated dependencies [b4507d5]
25
+ - @ai-sdk/provider-utils@5.0.0-canary.48
26
+
27
+ ## 3.0.0-canary.48
28
+
29
+ ### Patch Changes
30
+
31
+ - Updated dependencies [bae5e2b]
32
+ - @ai-sdk/provider-utils@5.0.0-canary.47
33
+
34
+ ## 3.0.0-canary.47
35
+
36
+ ### Patch Changes
37
+
38
+ - Updated dependencies [ce769dd]
39
+ - @ai-sdk/provider@4.0.0-canary.18
40
+ - @ai-sdk/provider-utils@5.0.0-canary.46
41
+
42
+ ## 3.0.0-canary.46
43
+
44
+ ### Patch Changes
45
+
46
+ - Updated dependencies [ee798eb]
47
+ - Updated dependencies [daf6637]
48
+ - @ai-sdk/provider-utils@5.0.0-canary.45
49
+
50
+ ## 3.0.0-canary.45
51
+
52
+ ### Patch Changes
53
+
54
+ - Updated dependencies [6c93e36]
55
+ - Updated dependencies [f617ac2]
56
+ - @ai-sdk/provider-utils@5.0.0-canary.44
57
+
58
+ ## 3.0.0-canary.44
59
+
60
+ ### Patch Changes
61
+
62
+ - 7fc6bd6: Raise minimum supported Node.js version to 22. Supported versions: 22, 24, and 26.
63
+ - Updated dependencies [7fc6bd6]
64
+ - @ai-sdk/provider-utils@5.0.0-canary.43
65
+ - @ai-sdk/provider@4.0.0-canary.17
66
+
67
+ ## 3.0.0-canary.43
68
+
69
+ ### Patch Changes
70
+
71
+ - Updated dependencies [a6617c5]
72
+ - @ai-sdk/provider-utils@5.0.0-canary.42
73
+
74
+ ## 3.0.0-canary.42
75
+
76
+ ### Patch Changes
77
+
78
+ - Updated dependencies [28dfa06]
79
+ - Updated dependencies [e93fa91]
80
+ - @ai-sdk/provider-utils@5.0.0-canary.41
81
+
82
+ ## 3.0.0-canary.41
83
+
84
+ ### Patch Changes
85
+
86
+ - Updated dependencies [a7de9c9]
87
+ - @ai-sdk/provider-utils@5.0.0-canary.40
88
+
89
+ ## 3.0.0-canary.40
90
+
91
+ ### Patch Changes
92
+
93
+ - Updated dependencies [105f95b]
94
+ - @ai-sdk/provider-utils@5.0.0-canary.39
95
+
96
+ ## 3.0.0-canary.39
97
+
98
+ ### Patch Changes
99
+
100
+ - Updated dependencies [ca446f8]
101
+ - @ai-sdk/provider-utils@5.0.0-canary.38
102
+
103
+ ## 3.0.0-canary.38
104
+
105
+ ### Patch Changes
106
+
107
+ - Updated dependencies [d848405]
108
+ - @ai-sdk/provider-utils@5.0.0-canary.37
109
+
110
+ ## 3.0.0-canary.37
111
+
112
+ ### Patch Changes
113
+
114
+ - Updated dependencies [ca39020]
115
+ - @ai-sdk/provider-utils@5.0.0-canary.36
116
+
117
+ ## 3.0.0-canary.36
118
+
119
+ ### Patch Changes
120
+
121
+ - Updated dependencies [f634bac]
122
+ - @ai-sdk/provider-utils@5.0.0-canary.35
123
+
124
+ ## 3.0.0-canary.35
125
+
126
+ ### Patch Changes
127
+
128
+ - Updated dependencies [69254e0]
129
+ - Updated dependencies [3015fc3]
130
+ - @ai-sdk/provider-utils@5.0.0-canary.34
131
+
132
+ ## 3.0.0-canary.34
133
+
134
+ ### Patch Changes
135
+
136
+ - Updated dependencies [2427d88]
137
+ - @ai-sdk/provider-utils@5.0.0-canary.33
138
+
139
+ ## 3.0.0-canary.33
140
+
141
+ ### Patch Changes
142
+
143
+ - Updated dependencies [5463d0d]
144
+ - @ai-sdk/provider-utils@5.0.0-canary.32
145
+ - @ai-sdk/provider@4.0.0-canary.16
146
+
147
+ ## 3.0.0-canary.32
148
+
149
+ ### Patch Changes
150
+
151
+ - 0c4c275: trigger initial canary release
152
+ - Updated dependencies [0c4c275]
153
+ - @ai-sdk/provider-utils@5.0.0-canary.31
154
+ - @ai-sdk/provider@4.0.0-canary.15
155
+
156
+ ## 3.0.0-beta.31
157
+
158
+ ### Major Changes
159
+
160
+ - 04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols
161
+
162
+ For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases.
163
+
164
+ ### Patch Changes
165
+
166
+ - Updated dependencies [08d2129]
167
+ - @ai-sdk/provider-utils@5.0.0-beta.30
168
+
169
+ ## 3.0.0-beta.30
170
+
171
+ ### Patch Changes
172
+
173
+ - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles
174
+ - Updated dependencies [9bd6512]
175
+ - Updated dependencies [258c093]
176
+ - Updated dependencies [b6783da]
177
+ - @ai-sdk/provider-utils@5.0.0-beta.29
178
+ - @ai-sdk/provider@4.0.0-beta.14
179
+
180
+ ## 3.0.0-beta.29
181
+
182
+ ### Patch Changes
183
+
184
+ - 9f0e36c: trigger release for all packages after provenance setup
185
+ - Updated dependencies [9f0e36c]
186
+ - @ai-sdk/provider@4.0.0-beta.13
187
+ - @ai-sdk/provider-utils@5.0.0-beta.28
188
+
189
+ ## 3.0.0-beta.28
190
+
191
+ ### Patch Changes
192
+
193
+ - Updated dependencies [785fe16]
194
+ - Updated dependencies [67df0a0]
195
+ - Updated dependencies [befb78c]
196
+ - Updated dependencies [0458559]
197
+ - Updated dependencies [5852c0a]
198
+ - Updated dependencies [fc92055]
199
+ - @ai-sdk/provider-utils@5.0.0-beta.27
200
+
201
+ ## 3.0.0-beta.27
202
+
203
+ ### Patch Changes
204
+
205
+ - Updated dependencies [2e98477]
206
+ - @ai-sdk/provider-utils@5.0.0-beta.26
207
+
208
+ ## 3.0.0-beta.26
209
+
210
+ ### Patch Changes
211
+
212
+ - Updated dependencies [eea8d98]
213
+ - @ai-sdk/provider-utils@5.0.0-beta.25
214
+
215
+ ## 3.0.0-beta.25
216
+
217
+ ### Patch Changes
218
+
219
+ - Updated dependencies [f807e45]
220
+ - @ai-sdk/provider-utils@5.0.0-beta.24
221
+
222
+ ## 3.0.0-beta.24
223
+
224
+ ### Patch Changes
225
+
226
+ - Updated dependencies [350ea38]
227
+ - @ai-sdk/provider-utils@5.0.0-beta.23
228
+
229
+ ## 3.0.0-beta.23
230
+
231
+ ### Patch Changes
232
+
233
+ - Updated dependencies [083947b]
234
+ - @ai-sdk/provider-utils@5.0.0-beta.22
235
+
236
+ ## 3.0.0-beta.22
237
+
238
+ ### Patch Changes
239
+
240
+ - Updated dependencies [add1126]
241
+ - @ai-sdk/provider-utils@5.0.0-beta.21
242
+
243
+ ## 3.0.0-beta.21
244
+
245
+ ### Patch Changes
246
+
247
+ - b3976a2: Add workflow serialization support to all provider models.
248
+
249
+ **`@ai-sdk/provider-utils`:** New `serializeModel()` helper that extracts only serializable properties from a model instance, filtering out functions and objects containing functions. Third-party provider authors can use this to add workflow support to their own models.
250
+
251
+ **All providers:** `headers` is now optional in provider config types. This is non-breaking — existing code that passes `headers` continues to work. Custom provider implementations that construct model configs manually can now omit `headers`, which is useful when models are deserialized from a workflow step boundary where auth is provided separately.
252
+
253
+ All provider model classes now include `WORKFLOW_SERIALIZE` and `WORKFLOW_DESERIALIZE` static methods, enabling them to cross workflow step boundaries without serialization errors.
254
+
255
+ - Updated dependencies [b3976a2]
256
+ - Updated dependencies [ff5eba1]
257
+ - @ai-sdk/provider-utils@5.0.0-beta.20
258
+ - @ai-sdk/provider@4.0.0-beta.12
259
+
260
+ ## 3.0.0-beta.20
261
+
262
+ ### Major Changes
263
+
264
+ - ef992f8: Remove CommonJS exports from all packages. All packages are now ESM-only (`"type": "module"`). Consumers using `require()` must switch to ESM `import` syntax.
265
+
266
+ ### Patch Changes
267
+
268
+ - Updated dependencies [ef992f8]
269
+ - @ai-sdk/provider@4.0.0-beta.11
270
+ - @ai-sdk/provider-utils@5.0.0-beta.19
271
+
272
+ ## 3.0.0-beta.19
273
+
274
+ ### Patch Changes
275
+
276
+ - Updated dependencies [90e2d8a]
277
+ - @ai-sdk/provider-utils@5.0.0-beta.18
278
+
279
+ ## 3.0.0-beta.18
280
+
281
+ ### Patch Changes
282
+
283
+ - Updated dependencies [3ae1786]
284
+ - @ai-sdk/provider-utils@5.0.0-beta.17
285
+
286
+ ## 3.0.0-beta.17
287
+
288
+ ### Patch Changes
289
+
290
+ - Updated dependencies [176466a]
291
+ - @ai-sdk/provider@4.0.0-beta.10
292
+ - @ai-sdk/provider-utils@5.0.0-beta.16
293
+
294
+ ## 3.0.0-beta.16
295
+
296
+ ### Patch Changes
297
+
298
+ - Updated dependencies [e311194]
299
+ - @ai-sdk/provider@4.0.0-beta.9
300
+ - @ai-sdk/provider-utils@5.0.0-beta.15
301
+
302
+ ## 3.0.0-beta.15
303
+
304
+ ### Patch Changes
305
+
306
+ - Updated dependencies [34bd95d]
307
+ - Updated dependencies [008271d]
308
+ - @ai-sdk/provider@4.0.0-beta.8
309
+ - @ai-sdk/provider-utils@5.0.0-beta.14
310
+
311
+ ## 3.0.0-beta.14
312
+
313
+ ### Patch Changes
314
+
315
+ - Updated dependencies [b0c2869]
316
+ - Updated dependencies [7e26e81]
317
+ - @ai-sdk/provider-utils@5.0.0-beta.13
318
+
319
+ ## 3.0.0-beta.13
320
+
321
+ ### Patch Changes
322
+
323
+ - Updated dependencies [46d1149]
324
+ - @ai-sdk/provider-utils@5.0.0-beta.12
325
+
326
+ ## 3.0.0-beta.12
327
+
328
+ ### Patch Changes
329
+
330
+ - Updated dependencies [6fd51c0]
331
+ - @ai-sdk/provider-utils@5.0.0-beta.11
332
+ - @ai-sdk/provider@4.0.0-beta.7
333
+
334
+ ## 3.0.0-beta.11
335
+
336
+ ### Patch Changes
337
+
338
+ - Updated dependencies [c29a26f]
339
+ - @ai-sdk/provider-utils@5.0.0-beta.10
340
+ - @ai-sdk/provider@4.0.0-beta.6
341
+
342
+ ## 3.0.0-beta.10
343
+
344
+ ### Patch Changes
345
+
346
+ - 38fc777: Add AI Gateway hint to provider READMEs
347
+
348
+ ## 3.0.0-beta.9
349
+
350
+ ### Patch Changes
351
+
352
+ - Updated dependencies [2e17091]
353
+ - @ai-sdk/provider-utils@5.0.0-beta.9
354
+
355
+ ## 3.0.0-beta.8
356
+
357
+ ### Patch Changes
358
+
359
+ - Updated dependencies [986c6fd]
360
+ - Updated dependencies [493295c]
361
+ - @ai-sdk/provider-utils@5.0.0-beta.8
362
+
363
+ ## 3.0.0-beta.7
364
+
365
+ ### Patch Changes
366
+
367
+ - Updated dependencies [1f509d4]
368
+ - @ai-sdk/provider-utils@5.0.0-beta.7
369
+ - @ai-sdk/provider@4.0.0-beta.5
370
+
371
+ ## 3.0.0-beta.6
372
+
373
+ ### Patch Changes
374
+
375
+ - Updated dependencies [3887c70]
376
+ - @ai-sdk/provider-utils@5.0.0-beta.6
377
+ - @ai-sdk/provider@4.0.0-beta.4
378
+
3
379
  ## 3.0.0-beta.5
4
380
 
5
381
  ### Patch Changes
@@ -241,13 +617,13 @@
241
617
  Before
242
618
 
243
619
  ```ts
244
- model.textEmbeddingModel('my-model-id');
620
+ model.textEmbeddingModel("my-model-id");
245
621
  ```
246
622
 
247
623
  After
248
624
 
249
625
  ```ts
250
- model.embeddingModel('my-model-id');
626
+ model.embeddingModel("my-model-id");
251
627
  ```
252
628
 
253
629
  - 95f65c2: chore: use import \* from zod/v4
@@ -447,13 +823,13 @@
447
823
  Before
448
824
 
449
825
  ```ts
450
- model.textEmbeddingModel('my-model-id');
826
+ model.textEmbeddingModel("my-model-id");
451
827
  ```
452
828
 
453
829
  After
454
830
 
455
831
  ```ts
456
- model.embeddingModel('my-model-id');
832
+ model.embeddingModel("my-model-id");
457
833
  ```
458
834
 
459
835
  - Updated dependencies [8d9e8ad]
package/README.md CHANGED
@@ -3,6 +3,8 @@
3
3
  The **[Gladia provider](https://ai-sdk.dev/providers/ai-sdk-providers/assemblyai)** for the [AI SDK](https://ai-sdk.dev/docs)
4
4
  contains transcription model support for the Gladia transcription API.
5
5
 
6
+ > **Deploying to Vercel?** With Vercel's AI Gateway you can access Gladia (and hundreds of models from other providers) — no additional packages, API keys, or extra cost. [Get started with AI Gateway](https://vercel.com/ai-gateway).
7
+
6
8
  ## Setup
7
9
 
8
10
  The Gladia provider is available in the `@ai-sdk/gladia` module. You can install it with
@@ -31,7 +33,7 @@ import { gladia } from '@ai-sdk/gladia';
31
33
 
32
34
  ```ts
33
35
  import { gladia } from '@ai-sdk/gladia';
34
- import { experimental_transcribe as transcribe } from 'ai';
36
+ import { transcribe } from 'ai';
35
37
 
36
38
  const { text } = await transcribe({
37
39
  model: gladia.transcription(),
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
+ import * as _ai_sdk_provider from '@ai-sdk/provider';
1
2
  import { TranscriptionModelV4, ProviderV4 } from '@ai-sdk/provider';
2
- import { FetchFunction } from '@ai-sdk/provider-utils';
3
+ import { FetchFunction, WORKFLOW_SERIALIZE, WORKFLOW_DESERIALIZE } from '@ai-sdk/provider-utils';
3
4
  import { z } from 'zod/v4';
4
5
 
5
6
  type GladiaConfig = {
@@ -8,11 +9,71 @@ type GladiaConfig = {
8
9
  modelId: string;
9
10
  path: string;
10
11
  }) => string;
11
- headers: () => Record<string, string | undefined>;
12
+ headers?: () => Record<string, string | undefined>;
12
13
  fetch?: FetchFunction;
13
14
  generateId?: () => string;
14
15
  };
15
16
 
17
+ interface GladiaTranscriptionModelConfig extends GladiaConfig {
18
+ _internal?: {
19
+ currentDate?: () => Date;
20
+ };
21
+ }
22
+ declare class GladiaTranscriptionModel implements TranscriptionModelV4 {
23
+ readonly modelId: string;
24
+ private readonly config;
25
+ readonly specificationVersion = "v4";
26
+ get provider(): string;
27
+ static [WORKFLOW_SERIALIZE](model: GladiaTranscriptionModel): {
28
+ modelId: string;
29
+ config: _ai_sdk_provider.JSONObject;
30
+ };
31
+ static [WORKFLOW_DESERIALIZE](options: {
32
+ modelId: 'default';
33
+ config: GladiaTranscriptionModelConfig;
34
+ }): GladiaTranscriptionModel;
35
+ constructor(modelId: string, config: GladiaTranscriptionModelConfig);
36
+ private getArgs;
37
+ doGenerate(options: Parameters<TranscriptionModelV4['doGenerate']>[0]): Promise<Awaited<ReturnType<TranscriptionModelV4['doGenerate']>>>;
38
+ }
39
+
40
+ interface GladiaProvider extends ProviderV4 {
41
+ (): {
42
+ transcription: GladiaTranscriptionModel;
43
+ };
44
+ /**
45
+ * Creates a model for transcription.
46
+ */
47
+ transcription(): TranscriptionModelV4;
48
+ /**
49
+ * @deprecated Use `embeddingModel` instead.
50
+ */
51
+ textEmbeddingModel(modelId: string): never;
52
+ }
53
+ interface GladiaProviderSettings {
54
+ /**
55
+ * API key for authenticating requests.
56
+ */
57
+ apiKey?: string;
58
+ /**
59
+ * Custom headers to include in the requests.
60
+ */
61
+ headers?: Record<string, string>;
62
+ /**
63
+ * Custom fetch implementation. You can use it as a middleware to intercept requests,
64
+ * or to provide a custom fetch implementation for e.g. testing.
65
+ */
66
+ fetch?: FetchFunction;
67
+ }
68
+ /**
69
+ * Create a Gladia provider instance.
70
+ */
71
+ declare function createGladia(options?: GladiaProviderSettings): GladiaProvider;
72
+ /**
73
+ * Default Gladia provider instance.
74
+ */
75
+ declare const gladia: GladiaProvider;
76
+
16
77
  declare const gladiaTranscriptionModelOptionsSchema: z.ZodObject<{
17
78
  contextPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
18
79
  customVocabulary: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodBoolean, z.ZodArray<z.ZodAny>]>>>;
@@ -65,8 +126,8 @@ declare const gladiaTranscriptionModelOptionsSchema: z.ZodObject<{
65
126
  translationConfig: z.ZodOptional<z.ZodNullable<z.ZodObject<{
66
127
  targetLanguages: z.ZodArray<z.ZodString>;
67
128
  model: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
68
- base: "base";
69
129
  enhanced: "enhanced";
130
+ base: "base";
70
131
  }>>>;
71
132
  matchOriginalUtterances: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
72
133
  }, z.core.$strip>>>;
@@ -101,57 +162,6 @@ declare const gladiaTranscriptionModelOptionsSchema: z.ZodObject<{
101
162
  punctuationEnhanced: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
102
163
  }, z.core.$strip>;
103
164
  type GladiaTranscriptionModelOptions = z.infer<typeof gladiaTranscriptionModelOptionsSchema>;
104
- interface GladiaTranscriptionModelConfig extends GladiaConfig {
105
- _internal?: {
106
- currentDate?: () => Date;
107
- };
108
- }
109
- declare class GladiaTranscriptionModel implements TranscriptionModelV4 {
110
- readonly modelId: 'default';
111
- private readonly config;
112
- readonly specificationVersion = "v4";
113
- get provider(): string;
114
- constructor(modelId: 'default', config: GladiaTranscriptionModelConfig);
115
- private getArgs;
116
- doGenerate(options: Parameters<TranscriptionModelV4['doGenerate']>[0]): Promise<Awaited<ReturnType<TranscriptionModelV4['doGenerate']>>>;
117
- }
118
-
119
- interface GladiaProvider extends ProviderV4 {
120
- (): {
121
- transcription: GladiaTranscriptionModel;
122
- };
123
- /**
124
- * Creates a model for transcription.
125
- */
126
- transcription(): TranscriptionModelV4;
127
- /**
128
- * @deprecated Use `embeddingModel` instead.
129
- */
130
- textEmbeddingModel(modelId: string): never;
131
- }
132
- interface GladiaProviderSettings {
133
- /**
134
- * API key for authenticating requests.
135
- */
136
- apiKey?: string;
137
- /**
138
- * Custom headers to include in the requests.
139
- */
140
- headers?: Record<string, string>;
141
- /**
142
- * Custom fetch implementation. You can use it as a middleware to intercept requests,
143
- * or to provide a custom fetch implementation for e.g. testing.
144
- */
145
- fetch?: FetchFunction;
146
- }
147
- /**
148
- * Create a Gladia provider instance.
149
- */
150
- declare function createGladia(options?: GladiaProviderSettings): GladiaProvider;
151
- /**
152
- * Default Gladia provider instance.
153
- */
154
- declare const gladia: GladiaProvider;
155
165
 
156
166
  declare const VERSION: string;
157
167