@ai-sdk/gladia 3.0.0-beta.2 → 3.0.0-beta.21

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,164 @@
1
1
  # @ai-sdk/gladia
2
2
 
3
+ ## 3.0.0-beta.21
4
+
5
+ ### Patch Changes
6
+
7
+ - b3976a2: Add workflow serialization support to all provider models.
8
+
9
+ **`@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.
10
+
11
+ **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.
12
+
13
+ All provider model classes now include `WORKFLOW_SERIALIZE` and `WORKFLOW_DESERIALIZE` static methods, enabling them to cross workflow step boundaries without serialization errors.
14
+
15
+ - Updated dependencies [b3976a2]
16
+ - Updated dependencies [ff5eba1]
17
+ - @ai-sdk/provider-utils@5.0.0-beta.20
18
+ - @ai-sdk/provider@4.0.0-beta.12
19
+
20
+ ## 3.0.0-beta.20
21
+
22
+ ### Major Changes
23
+
24
+ - ef992f8: Remove CommonJS exports from all packages. All packages are now ESM-only (`"type": "module"`). Consumers using `require()` must switch to ESM `import` syntax.
25
+
26
+ ### Patch Changes
27
+
28
+ - Updated dependencies [ef992f8]
29
+ - @ai-sdk/provider@4.0.0-beta.11
30
+ - @ai-sdk/provider-utils@5.0.0-beta.19
31
+
32
+ ## 3.0.0-beta.19
33
+
34
+ ### Patch Changes
35
+
36
+ - Updated dependencies [90e2d8a]
37
+ - @ai-sdk/provider-utils@5.0.0-beta.18
38
+
39
+ ## 3.0.0-beta.18
40
+
41
+ ### Patch Changes
42
+
43
+ - Updated dependencies [3ae1786]
44
+ - @ai-sdk/provider-utils@5.0.0-beta.17
45
+
46
+ ## 3.0.0-beta.17
47
+
48
+ ### Patch Changes
49
+
50
+ - Updated dependencies [176466a]
51
+ - @ai-sdk/provider@4.0.0-beta.10
52
+ - @ai-sdk/provider-utils@5.0.0-beta.16
53
+
54
+ ## 3.0.0-beta.16
55
+
56
+ ### Patch Changes
57
+
58
+ - Updated dependencies [e311194]
59
+ - @ai-sdk/provider@4.0.0-beta.9
60
+ - @ai-sdk/provider-utils@5.0.0-beta.15
61
+
62
+ ## 3.0.0-beta.15
63
+
64
+ ### Patch Changes
65
+
66
+ - Updated dependencies [34bd95d]
67
+ - Updated dependencies [008271d]
68
+ - @ai-sdk/provider@4.0.0-beta.8
69
+ - @ai-sdk/provider-utils@5.0.0-beta.14
70
+
71
+ ## 3.0.0-beta.14
72
+
73
+ ### Patch Changes
74
+
75
+ - Updated dependencies [b0c2869]
76
+ - Updated dependencies [7e26e81]
77
+ - @ai-sdk/provider-utils@5.0.0-beta.13
78
+
79
+ ## 3.0.0-beta.13
80
+
81
+ ### Patch Changes
82
+
83
+ - Updated dependencies [46d1149]
84
+ - @ai-sdk/provider-utils@5.0.0-beta.12
85
+
86
+ ## 3.0.0-beta.12
87
+
88
+ ### Patch Changes
89
+
90
+ - Updated dependencies [6fd51c0]
91
+ - @ai-sdk/provider-utils@5.0.0-beta.11
92
+ - @ai-sdk/provider@4.0.0-beta.7
93
+
94
+ ## 3.0.0-beta.11
95
+
96
+ ### Patch Changes
97
+
98
+ - Updated dependencies [c29a26f]
99
+ - @ai-sdk/provider-utils@5.0.0-beta.10
100
+ - @ai-sdk/provider@4.0.0-beta.6
101
+
102
+ ## 3.0.0-beta.10
103
+
104
+ ### Patch Changes
105
+
106
+ - 38fc777: Add AI Gateway hint to provider READMEs
107
+
108
+ ## 3.0.0-beta.9
109
+
110
+ ### Patch Changes
111
+
112
+ - Updated dependencies [2e17091]
113
+ - @ai-sdk/provider-utils@5.0.0-beta.9
114
+
115
+ ## 3.0.0-beta.8
116
+
117
+ ### Patch Changes
118
+
119
+ - Updated dependencies [986c6fd]
120
+ - Updated dependencies [493295c]
121
+ - @ai-sdk/provider-utils@5.0.0-beta.8
122
+
123
+ ## 3.0.0-beta.7
124
+
125
+ ### Patch Changes
126
+
127
+ - Updated dependencies [1f509d4]
128
+ - @ai-sdk/provider-utils@5.0.0-beta.7
129
+ - @ai-sdk/provider@4.0.0-beta.5
130
+
131
+ ## 3.0.0-beta.6
132
+
133
+ ### Patch Changes
134
+
135
+ - Updated dependencies [3887c70]
136
+ - @ai-sdk/provider-utils@5.0.0-beta.6
137
+ - @ai-sdk/provider@4.0.0-beta.4
138
+
139
+ ## 3.0.0-beta.5
140
+
141
+ ### Patch Changes
142
+
143
+ - Updated dependencies [776b617]
144
+ - @ai-sdk/provider-utils@5.0.0-beta.5
145
+ - @ai-sdk/provider@4.0.0-beta.3
146
+
147
+ ## 3.0.0-beta.4
148
+
149
+ ### Patch Changes
150
+
151
+ - Updated dependencies [61753c3]
152
+ - @ai-sdk/provider-utils@5.0.0-beta.4
153
+
154
+ ## 3.0.0-beta.3
155
+
156
+ ### Patch Changes
157
+
158
+ - Updated dependencies [f7d4f01]
159
+ - @ai-sdk/provider-utils@5.0.0-beta.3
160
+ - @ai-sdk/provider@4.0.0-beta.2
161
+
3
162
  ## 3.0.0-beta.2
4
163
 
5
164
  ### Patch Changes
@@ -218,13 +377,13 @@
218
377
  Before
219
378
 
220
379
  ```ts
221
- model.textEmbeddingModel('my-model-id');
380
+ model.textEmbeddingModel("my-model-id");
222
381
  ```
223
382
 
224
383
  After
225
384
 
226
385
  ```ts
227
- model.embeddingModel('my-model-id');
386
+ model.embeddingModel("my-model-id");
228
387
  ```
229
388
 
230
389
  - 95f65c2: chore: use import \* from zod/v4
@@ -424,13 +583,13 @@
424
583
  Before
425
584
 
426
585
  ```ts
427
- model.textEmbeddingModel('my-model-id');
586
+ model.textEmbeddingModel("my-model-id");
428
587
  ```
429
588
 
430
589
  After
431
590
 
432
591
  ```ts
433
- model.embeddingModel('my-model-id');
592
+ model.embeddingModel("my-model-id");
434
593
  ```
435
594
 
436
595
  - 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,7 +9,7 @@ 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
  };
@@ -106,24 +107,32 @@ interface GladiaTranscriptionModelConfig extends GladiaConfig {
106
107
  currentDate?: () => Date;
107
108
  };
108
109
  }
109
- declare class GladiaTranscriptionModel implements TranscriptionModelV3 {
110
- readonly modelId: 'default';
110
+ declare class GladiaTranscriptionModel implements TranscriptionModelV4 {
111
+ readonly modelId: string;
111
112
  private readonly config;
112
- readonly specificationVersion = "v3";
113
+ readonly specificationVersion = "v4";
113
114
  get provider(): string;
114
- constructor(modelId: 'default', config: GladiaTranscriptionModelConfig);
115
+ static [WORKFLOW_SERIALIZE](model: GladiaTranscriptionModel): {
116
+ modelId: string;
117
+ config: _ai_sdk_provider.JSONObject;
118
+ };
119
+ static [WORKFLOW_DESERIALIZE](options: {
120
+ modelId: 'default';
121
+ config: GladiaTranscriptionModelConfig;
122
+ }): GladiaTranscriptionModel;
123
+ constructor(modelId: string, config: GladiaTranscriptionModelConfig);
115
124
  private getArgs;
116
- doGenerate(options: Parameters<TranscriptionModelV3['doGenerate']>[0]): Promise<Awaited<ReturnType<TranscriptionModelV3['doGenerate']>>>;
125
+ doGenerate(options: Parameters<TranscriptionModelV4['doGenerate']>[0]): Promise<Awaited<ReturnType<TranscriptionModelV4['doGenerate']>>>;
117
126
  }
118
127
 
119
- interface GladiaProvider extends ProviderV3 {
128
+ interface GladiaProvider extends ProviderV4 {
120
129
  (): {
121
130
  transcription: GladiaTranscriptionModel;
122
131
  };
123
132
  /**
124
133
  * Creates a model for transcription.
125
134
  */
126
- transcription(): TranscriptionModelV3;
135
+ transcription(): TranscriptionModelV4;
127
136
  /**
128
137
  * @deprecated Use `embeddingModel` instead.
129
138
  */