@ai-sdk/gladia 3.0.0-beta.3 → 3.0.0-beta.31

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,243 @@
1
1
  # @ai-sdk/gladia
2
2
 
3
+ ## 3.0.0-beta.31
4
+
5
+ ### Major Changes
6
+
7
+ - 04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols
8
+
9
+ For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases.
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies [08d2129]
14
+ - @ai-sdk/provider-utils@5.0.0-beta.30
15
+
16
+ ## 3.0.0-beta.30
17
+
18
+ ### Patch Changes
19
+
20
+ - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles
21
+ - Updated dependencies [9bd6512]
22
+ - Updated dependencies [258c093]
23
+ - Updated dependencies [b6783da]
24
+ - @ai-sdk/provider-utils@5.0.0-beta.29
25
+ - @ai-sdk/provider@4.0.0-beta.14
26
+
27
+ ## 3.0.0-beta.29
28
+
29
+ ### Patch Changes
30
+
31
+ - 9f0e36c: trigger release for all packages after provenance setup
32
+ - Updated dependencies [9f0e36c]
33
+ - @ai-sdk/provider@4.0.0-beta.13
34
+ - @ai-sdk/provider-utils@5.0.0-beta.28
35
+
36
+ ## 3.0.0-beta.28
37
+
38
+ ### Patch Changes
39
+
40
+ - Updated dependencies [785fe16]
41
+ - Updated dependencies [67df0a0]
42
+ - Updated dependencies [befb78c]
43
+ - Updated dependencies [0458559]
44
+ - Updated dependencies [5852c0a]
45
+ - Updated dependencies [fc92055]
46
+ - @ai-sdk/provider-utils@5.0.0-beta.27
47
+
48
+ ## 3.0.0-beta.27
49
+
50
+ ### Patch Changes
51
+
52
+ - Updated dependencies [2e98477]
53
+ - @ai-sdk/provider-utils@5.0.0-beta.26
54
+
55
+ ## 3.0.0-beta.26
56
+
57
+ ### Patch Changes
58
+
59
+ - Updated dependencies [eea8d98]
60
+ - @ai-sdk/provider-utils@5.0.0-beta.25
61
+
62
+ ## 3.0.0-beta.25
63
+
64
+ ### Patch Changes
65
+
66
+ - Updated dependencies [f807e45]
67
+ - @ai-sdk/provider-utils@5.0.0-beta.24
68
+
69
+ ## 3.0.0-beta.24
70
+
71
+ ### Patch Changes
72
+
73
+ - Updated dependencies [350ea38]
74
+ - @ai-sdk/provider-utils@5.0.0-beta.23
75
+
76
+ ## 3.0.0-beta.23
77
+
78
+ ### Patch Changes
79
+
80
+ - Updated dependencies [083947b]
81
+ - @ai-sdk/provider-utils@5.0.0-beta.22
82
+
83
+ ## 3.0.0-beta.22
84
+
85
+ ### Patch Changes
86
+
87
+ - Updated dependencies [add1126]
88
+ - @ai-sdk/provider-utils@5.0.0-beta.21
89
+
90
+ ## 3.0.0-beta.21
91
+
92
+ ### Patch Changes
93
+
94
+ - b3976a2: Add workflow serialization support to all provider models.
95
+
96
+ **`@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.
97
+
98
+ **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.
99
+
100
+ All provider model classes now include `WORKFLOW_SERIALIZE` and `WORKFLOW_DESERIALIZE` static methods, enabling them to cross workflow step boundaries without serialization errors.
101
+
102
+ - Updated dependencies [b3976a2]
103
+ - Updated dependencies [ff5eba1]
104
+ - @ai-sdk/provider-utils@5.0.0-beta.20
105
+ - @ai-sdk/provider@4.0.0-beta.12
106
+
107
+ ## 3.0.0-beta.20
108
+
109
+ ### Major Changes
110
+
111
+ - ef992f8: Remove CommonJS exports from all packages. All packages are now ESM-only (`"type": "module"`). Consumers using `require()` must switch to ESM `import` syntax.
112
+
113
+ ### Patch Changes
114
+
115
+ - Updated dependencies [ef992f8]
116
+ - @ai-sdk/provider@4.0.0-beta.11
117
+ - @ai-sdk/provider-utils@5.0.0-beta.19
118
+
119
+ ## 3.0.0-beta.19
120
+
121
+ ### Patch Changes
122
+
123
+ - Updated dependencies [90e2d8a]
124
+ - @ai-sdk/provider-utils@5.0.0-beta.18
125
+
126
+ ## 3.0.0-beta.18
127
+
128
+ ### Patch Changes
129
+
130
+ - Updated dependencies [3ae1786]
131
+ - @ai-sdk/provider-utils@5.0.0-beta.17
132
+
133
+ ## 3.0.0-beta.17
134
+
135
+ ### Patch Changes
136
+
137
+ - Updated dependencies [176466a]
138
+ - @ai-sdk/provider@4.0.0-beta.10
139
+ - @ai-sdk/provider-utils@5.0.0-beta.16
140
+
141
+ ## 3.0.0-beta.16
142
+
143
+ ### Patch Changes
144
+
145
+ - Updated dependencies [e311194]
146
+ - @ai-sdk/provider@4.0.0-beta.9
147
+ - @ai-sdk/provider-utils@5.0.0-beta.15
148
+
149
+ ## 3.0.0-beta.15
150
+
151
+ ### Patch Changes
152
+
153
+ - Updated dependencies [34bd95d]
154
+ - Updated dependencies [008271d]
155
+ - @ai-sdk/provider@4.0.0-beta.8
156
+ - @ai-sdk/provider-utils@5.0.0-beta.14
157
+
158
+ ## 3.0.0-beta.14
159
+
160
+ ### Patch Changes
161
+
162
+ - Updated dependencies [b0c2869]
163
+ - Updated dependencies [7e26e81]
164
+ - @ai-sdk/provider-utils@5.0.0-beta.13
165
+
166
+ ## 3.0.0-beta.13
167
+
168
+ ### Patch Changes
169
+
170
+ - Updated dependencies [46d1149]
171
+ - @ai-sdk/provider-utils@5.0.0-beta.12
172
+
173
+ ## 3.0.0-beta.12
174
+
175
+ ### Patch Changes
176
+
177
+ - Updated dependencies [6fd51c0]
178
+ - @ai-sdk/provider-utils@5.0.0-beta.11
179
+ - @ai-sdk/provider@4.0.0-beta.7
180
+
181
+ ## 3.0.0-beta.11
182
+
183
+ ### Patch Changes
184
+
185
+ - Updated dependencies [c29a26f]
186
+ - @ai-sdk/provider-utils@5.0.0-beta.10
187
+ - @ai-sdk/provider@4.0.0-beta.6
188
+
189
+ ## 3.0.0-beta.10
190
+
191
+ ### Patch Changes
192
+
193
+ - 38fc777: Add AI Gateway hint to provider READMEs
194
+
195
+ ## 3.0.0-beta.9
196
+
197
+ ### Patch Changes
198
+
199
+ - Updated dependencies [2e17091]
200
+ - @ai-sdk/provider-utils@5.0.0-beta.9
201
+
202
+ ## 3.0.0-beta.8
203
+
204
+ ### Patch Changes
205
+
206
+ - Updated dependencies [986c6fd]
207
+ - Updated dependencies [493295c]
208
+ - @ai-sdk/provider-utils@5.0.0-beta.8
209
+
210
+ ## 3.0.0-beta.7
211
+
212
+ ### Patch Changes
213
+
214
+ - Updated dependencies [1f509d4]
215
+ - @ai-sdk/provider-utils@5.0.0-beta.7
216
+ - @ai-sdk/provider@4.0.0-beta.5
217
+
218
+ ## 3.0.0-beta.6
219
+
220
+ ### Patch Changes
221
+
222
+ - Updated dependencies [3887c70]
223
+ - @ai-sdk/provider-utils@5.0.0-beta.6
224
+ - @ai-sdk/provider@4.0.0-beta.4
225
+
226
+ ## 3.0.0-beta.5
227
+
228
+ ### Patch Changes
229
+
230
+ - Updated dependencies [776b617]
231
+ - @ai-sdk/provider-utils@5.0.0-beta.5
232
+ - @ai-sdk/provider@4.0.0-beta.3
233
+
234
+ ## 3.0.0-beta.4
235
+
236
+ ### Patch Changes
237
+
238
+ - Updated dependencies [61753c3]
239
+ - @ai-sdk/provider-utils@5.0.0-beta.4
240
+
3
241
  ## 3.0.0-beta.3
4
242
 
5
243
  ### Patch Changes
@@ -226,13 +464,13 @@
226
464
  Before
227
465
 
228
466
  ```ts
229
- model.textEmbeddingModel('my-model-id');
467
+ model.textEmbeddingModel("my-model-id");
230
468
  ```
231
469
 
232
470
  After
233
471
 
234
472
  ```ts
235
- model.embeddingModel('my-model-id');
473
+ model.embeddingModel("my-model-id");
236
474
  ```
237
475
 
238
476
  - 95f65c2: chore: use import \* from zod/v4
@@ -432,13 +670,13 @@
432
670
  Before
433
671
 
434
672
  ```ts
435
- model.textEmbeddingModel('my-model-id');
673
+ model.textEmbeddingModel("my-model-id");
436
674
  ```
437
675
 
438
676
  After
439
677
 
440
678
  ```ts
441
- model.embeddingModel('my-model-id');
679
+ model.embeddingModel("my-model-id");
442
680
  ```
443
681
 
444
682
  - 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
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
- import { TranscriptionModelV3, ProviderV3 } from '@ai-sdk/provider';
2
- import { FetchFunction } from '@ai-sdk/provider-utils';
1
+ import * as _ai_sdk_provider from '@ai-sdk/provider';
2
+ import { TranscriptionModelV4, ProviderV4 } from '@ai-sdk/provider';
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 TranscriptionModelV3 {
110
- readonly modelId: 'default';
111
- private readonly config;
112
- readonly specificationVersion = "v3";
113
- get provider(): string;
114
- constructor(modelId: 'default', config: GladiaTranscriptionModelConfig);
115
- private getArgs;
116
- doGenerate(options: Parameters<TranscriptionModelV3['doGenerate']>[0]): Promise<Awaited<ReturnType<TranscriptionModelV3['doGenerate']>>>;
117
- }
118
-
119
- interface GladiaProvider extends ProviderV3 {
120
- (): {
121
- transcription: GladiaTranscriptionModel;
122
- };
123
- /**
124
- * Creates a model for transcription.
125
- */
126
- transcription(): TranscriptionModelV3;
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