@ai-sdk/deepgram 3.0.0-beta.9 → 3.0.0-canary.33

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,214 @@
1
1
  # @ai-sdk/deepgram
2
2
 
3
+ ## 3.0.0-canary.33
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [5463d0d]
8
+ - @ai-sdk/provider-utils@5.0.0-canary.32
9
+ - @ai-sdk/provider@4.0.0-canary.16
10
+
11
+ ## 3.0.0-canary.32
12
+
13
+ ### Patch Changes
14
+
15
+ - 0c4c275: trigger initial canary release
16
+ - Updated dependencies [0c4c275]
17
+ - @ai-sdk/provider-utils@5.0.0-canary.31
18
+ - @ai-sdk/provider@4.0.0-canary.15
19
+
20
+ ## 3.0.0-beta.31
21
+
22
+ ### Major Changes
23
+
24
+ - 04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols
25
+
26
+ For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases.
27
+
28
+ ### Patch Changes
29
+
30
+ - Updated dependencies [08d2129]
31
+ - @ai-sdk/provider-utils@5.0.0-beta.30
32
+
33
+ ## 3.0.0-beta.30
34
+
35
+ ### Patch Changes
36
+
37
+ - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles
38
+ - Updated dependencies [9bd6512]
39
+ - Updated dependencies [258c093]
40
+ - Updated dependencies [b6783da]
41
+ - @ai-sdk/provider-utils@5.0.0-beta.29
42
+ - @ai-sdk/provider@4.0.0-beta.14
43
+
44
+ ## 3.0.0-beta.29
45
+
46
+ ### Patch Changes
47
+
48
+ - 9f0e36c: trigger release for all packages after provenance setup
49
+ - Updated dependencies [9f0e36c]
50
+ - @ai-sdk/provider@4.0.0-beta.13
51
+ - @ai-sdk/provider-utils@5.0.0-beta.28
52
+
53
+ ## 3.0.0-beta.28
54
+
55
+ ### Patch Changes
56
+
57
+ - Updated dependencies [785fe16]
58
+ - Updated dependencies [67df0a0]
59
+ - Updated dependencies [befb78c]
60
+ - Updated dependencies [0458559]
61
+ - Updated dependencies [5852c0a]
62
+ - Updated dependencies [fc92055]
63
+ - @ai-sdk/provider-utils@5.0.0-beta.27
64
+
65
+ ## 3.0.0-beta.27
66
+
67
+ ### Patch Changes
68
+
69
+ - Updated dependencies [2e98477]
70
+ - @ai-sdk/provider-utils@5.0.0-beta.26
71
+
72
+ ## 3.0.0-beta.26
73
+
74
+ ### Patch Changes
75
+
76
+ - Updated dependencies [eea8d98]
77
+ - @ai-sdk/provider-utils@5.0.0-beta.25
78
+
79
+ ## 3.0.0-beta.25
80
+
81
+ ### Patch Changes
82
+
83
+ - Updated dependencies [f807e45]
84
+ - @ai-sdk/provider-utils@5.0.0-beta.24
85
+
86
+ ## 3.0.0-beta.24
87
+
88
+ ### Patch Changes
89
+
90
+ - Updated dependencies [350ea38]
91
+ - @ai-sdk/provider-utils@5.0.0-beta.23
92
+
93
+ ## 3.0.0-beta.23
94
+
95
+ ### Patch Changes
96
+
97
+ - Updated dependencies [083947b]
98
+ - @ai-sdk/provider-utils@5.0.0-beta.22
99
+
100
+ ## 3.0.0-beta.22
101
+
102
+ ### Patch Changes
103
+
104
+ - Updated dependencies [add1126]
105
+ - @ai-sdk/provider-utils@5.0.0-beta.21
106
+
107
+ ## 3.0.0-beta.21
108
+
109
+ ### Patch Changes
110
+
111
+ - b3976a2: Add workflow serialization support to all provider models.
112
+
113
+ **`@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.
114
+
115
+ **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.
116
+
117
+ All provider model classes now include `WORKFLOW_SERIALIZE` and `WORKFLOW_DESERIALIZE` static methods, enabling them to cross workflow step boundaries without serialization errors.
118
+
119
+ - Updated dependencies [b3976a2]
120
+ - Updated dependencies [ff5eba1]
121
+ - @ai-sdk/provider-utils@5.0.0-beta.20
122
+ - @ai-sdk/provider@4.0.0-beta.12
123
+
124
+ ## 3.0.0-beta.20
125
+
126
+ ### Major Changes
127
+
128
+ - ef992f8: Remove CommonJS exports from all packages. All packages are now ESM-only (`"type": "module"`). Consumers using `require()` must switch to ESM `import` syntax.
129
+
130
+ ### Patch Changes
131
+
132
+ - Updated dependencies [ef992f8]
133
+ - @ai-sdk/provider@4.0.0-beta.11
134
+ - @ai-sdk/provider-utils@5.0.0-beta.19
135
+
136
+ ## 3.0.0-beta.19
137
+
138
+ ### Patch Changes
139
+
140
+ - Updated dependencies [90e2d8a]
141
+ - @ai-sdk/provider-utils@5.0.0-beta.18
142
+
143
+ ## 3.0.0-beta.18
144
+
145
+ ### Patch Changes
146
+
147
+ - Updated dependencies [3ae1786]
148
+ - @ai-sdk/provider-utils@5.0.0-beta.17
149
+
150
+ ## 3.0.0-beta.17
151
+
152
+ ### Patch Changes
153
+
154
+ - Updated dependencies [176466a]
155
+ - @ai-sdk/provider@4.0.0-beta.10
156
+ - @ai-sdk/provider-utils@5.0.0-beta.16
157
+
158
+ ## 3.0.0-beta.16
159
+
160
+ ### Patch Changes
161
+
162
+ - Updated dependencies [e311194]
163
+ - @ai-sdk/provider@4.0.0-beta.9
164
+ - @ai-sdk/provider-utils@5.0.0-beta.15
165
+
166
+ ## 3.0.0-beta.15
167
+
168
+ ### Patch Changes
169
+
170
+ - Updated dependencies [34bd95d]
171
+ - Updated dependencies [008271d]
172
+ - @ai-sdk/provider@4.0.0-beta.8
173
+ - @ai-sdk/provider-utils@5.0.0-beta.14
174
+
175
+ ## 3.0.0-beta.14
176
+
177
+ ### Patch Changes
178
+
179
+ - Updated dependencies [b0c2869]
180
+ - Updated dependencies [7e26e81]
181
+ - @ai-sdk/provider-utils@5.0.0-beta.13
182
+
183
+ ## 3.0.0-beta.13
184
+
185
+ ### Patch Changes
186
+
187
+ - Updated dependencies [46d1149]
188
+ - @ai-sdk/provider-utils@5.0.0-beta.12
189
+
190
+ ## 3.0.0-beta.12
191
+
192
+ ### Patch Changes
193
+
194
+ - Updated dependencies [6fd51c0]
195
+ - @ai-sdk/provider-utils@5.0.0-beta.11
196
+ - @ai-sdk/provider@4.0.0-beta.7
197
+
198
+ ## 3.0.0-beta.11
199
+
200
+ ### Patch Changes
201
+
202
+ - Updated dependencies [c29a26f]
203
+ - @ai-sdk/provider-utils@5.0.0-beta.10
204
+ - @ai-sdk/provider@4.0.0-beta.6
205
+
206
+ ## 3.0.0-beta.10
207
+
208
+ ### Patch Changes
209
+
210
+ - 38fc777: Add AI Gateway hint to provider READMEs
211
+
3
212
  ## 3.0.0-beta.9
4
213
 
5
214
  ### Patch Changes
package/README.md CHANGED
@@ -3,6 +3,8 @@
3
3
  The **[Deepgram provider](https://ai-sdk.dev/providers/ai-sdk-providers/deepgram)** for the [AI SDK](https://ai-sdk.dev/docs)
4
4
  contains transcription model support for the Deepgram transcription API and speech model support for the Deepgram text-to-speech API.
5
5
 
6
+ > **Deploying to Vercel?** With Vercel's AI Gateway you can access Deepgram (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 Deepgram provider is available in the `@ai-sdk/deepgram` module. You can install it with
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, SpeechModelV4 } 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 DeepgramConfig = {
@@ -8,34 +9,13 @@ type DeepgramConfig = {
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
 
16
17
  type DeepgramTranscriptionModelId = 'base' | 'base-general' | 'base-meeting' | 'base-phonecall' | 'base-finance' | 'base-conversationalai' | 'base-voicemail' | 'base-video' | 'enhanced' | 'enhanced-general' | 'enhanced-meeting' | 'enhanced-phonecall' | 'enhanced-finance' | 'nova' | 'nova-general' | 'nova-phonecall' | 'nova-medical' | 'nova-2' | 'nova-2-general' | 'nova-2-meeting' | 'nova-2-phonecall' | 'nova-2-finance' | 'nova-2-conversationalai' | 'nova-2-voicemail' | 'nova-2-video' | 'nova-2-medical' | 'nova-2-drivethru' | 'nova-2-automotive' | 'nova-2-atc' | 'nova-3' | 'nova-3-general' | 'nova-3-medical' | (string & {});
17
18
 
18
- declare const deepgramTranscriptionModelOptionsSchema: z.ZodObject<{
19
- language: z.ZodOptional<z.ZodNullable<z.ZodString>>;
20
- detectLanguage: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
21
- smartFormat: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
22
- punctuate: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
23
- paragraphs: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
24
- summarize: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<"v2">, z.ZodLiteral<false>]>>>;
25
- topics: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
26
- intents: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
27
- sentiment: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
28
- detectEntities: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
29
- redact: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>>;
30
- replace: z.ZodOptional<z.ZodNullable<z.ZodString>>;
31
- search: z.ZodOptional<z.ZodNullable<z.ZodString>>;
32
- keyterm: z.ZodOptional<z.ZodNullable<z.ZodString>>;
33
- diarize: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
34
- utterances: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
35
- uttSplit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
36
- fillerWords: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
37
- }, z.core.$strip>;
38
- type DeepgramTranscriptionModelOptions = z.infer<typeof deepgramTranscriptionModelOptionsSchema>;
39
19
  interface DeepgramTranscriptionModelConfig extends DeepgramConfig {
40
20
  _internal?: {
41
21
  currentDate?: () => Date;
@@ -46,6 +26,14 @@ declare class DeepgramTranscriptionModel implements TranscriptionModelV4 {
46
26
  private readonly config;
47
27
  readonly specificationVersion = "v4";
48
28
  get provider(): string;
29
+ static [WORKFLOW_SERIALIZE](model: DeepgramTranscriptionModel): {
30
+ modelId: string;
31
+ config: _ai_sdk_provider.JSONObject;
32
+ };
33
+ static [WORKFLOW_DESERIALIZE](options: {
34
+ modelId: DeepgramTranscriptionModelId;
35
+ config: DeepgramTranscriptionModelConfig;
36
+ }): DeepgramTranscriptionModel;
49
37
  constructor(modelId: DeepgramTranscriptionModelId, config: DeepgramTranscriptionModelConfig);
50
38
  private getArgs;
51
39
  doGenerate(options: Parameters<TranscriptionModelV4['doGenerate']>[0]): Promise<Awaited<ReturnType<TranscriptionModelV4['doGenerate']>>>;
@@ -94,20 +82,6 @@ declare function createDeepgram(options?: DeepgramProviderSettings): DeepgramPro
94
82
  */
95
83
  declare const deepgram: DeepgramProvider;
96
84
 
97
- declare const deepgramSpeechModelOptionsSchema: z.ZodObject<{
98
- bitRate: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>;
99
- container: z.ZodOptional<z.ZodNullable<z.ZodString>>;
100
- encoding: z.ZodOptional<z.ZodNullable<z.ZodString>>;
101
- sampleRate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
102
- callback: z.ZodOptional<z.ZodNullable<z.ZodString>>;
103
- callbackMethod: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
104
- POST: "POST";
105
- PUT: "PUT";
106
- }>>>;
107
- mipOptOut: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
108
- tag: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>>;
109
- }, z.core.$strip>;
110
- type DeepgramSpeechModelOptions = z.infer<typeof deepgramSpeechModelOptionsSchema>;
111
85
  interface DeepgramSpeechModelConfig extends DeepgramConfig {
112
86
  _internal?: {
113
87
  currentDate?: () => Date;
@@ -118,11 +92,56 @@ declare class DeepgramSpeechModel implements SpeechModelV4 {
118
92
  private readonly config;
119
93
  readonly specificationVersion = "v4";
120
94
  get provider(): string;
95
+ static [WORKFLOW_SERIALIZE](model: DeepgramSpeechModel): {
96
+ modelId: string;
97
+ config: _ai_sdk_provider.JSONObject;
98
+ };
99
+ static [WORKFLOW_DESERIALIZE](options: {
100
+ modelId: DeepgramSpeechModelId;
101
+ config: DeepgramSpeechModelConfig;
102
+ }): DeepgramSpeechModel;
121
103
  constructor(modelId: DeepgramSpeechModelId, config: DeepgramSpeechModelConfig);
122
104
  private getArgs;
123
105
  doGenerate(options: Parameters<SpeechModelV4['doGenerate']>[0]): Promise<Awaited<ReturnType<SpeechModelV4['doGenerate']>>>;
124
106
  }
125
107
 
108
+ declare const deepgramSpeechModelOptionsSchema: z.ZodObject<{
109
+ bitRate: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>;
110
+ container: z.ZodOptional<z.ZodNullable<z.ZodString>>;
111
+ encoding: z.ZodOptional<z.ZodNullable<z.ZodString>>;
112
+ sampleRate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
113
+ callback: z.ZodOptional<z.ZodNullable<z.ZodString>>;
114
+ callbackMethod: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
115
+ POST: "POST";
116
+ PUT: "PUT";
117
+ }>>>;
118
+ mipOptOut: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
119
+ tag: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>>;
120
+ }, z.core.$strip>;
121
+ type DeepgramSpeechModelOptions = z.infer<typeof deepgramSpeechModelOptionsSchema>;
122
+
123
+ declare const deepgramTranscriptionModelOptionsSchema: z.ZodObject<{
124
+ language: z.ZodOptional<z.ZodNullable<z.ZodString>>;
125
+ detectLanguage: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
126
+ smartFormat: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
127
+ punctuate: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
128
+ paragraphs: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
129
+ summarize: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<"v2">, z.ZodLiteral<false>]>>>;
130
+ topics: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
131
+ intents: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
132
+ sentiment: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
133
+ detectEntities: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
134
+ redact: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>>;
135
+ replace: z.ZodOptional<z.ZodNullable<z.ZodString>>;
136
+ search: z.ZodOptional<z.ZodNullable<z.ZodString>>;
137
+ keyterm: z.ZodOptional<z.ZodNullable<z.ZodString>>;
138
+ diarize: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
139
+ utterances: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
140
+ uttSplit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
141
+ fillerWords: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
142
+ }, z.core.$strip>;
143
+ type DeepgramTranscriptionModelOptions = z.infer<typeof deepgramTranscriptionModelOptionsSchema>;
144
+
126
145
  declare const VERSION: string;
127
146
 
128
147
  export { type DeepgramProvider, type DeepgramProviderSettings, type DeepgramSpeechModelOptions as DeepgramSpeechCallOptions, DeepgramSpeechModel, type DeepgramSpeechModelId, type DeepgramSpeechModelOptions, type DeepgramTranscriptionModelOptions, VERSION, createDeepgram, deepgram };