@ai-sdk/hume 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/hume
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
package/README.md CHANGED
@@ -3,6 +3,8 @@
3
3
  The **[Hume provider](https://ai-sdk.dev/providers/ai-sdk-providers/hume)** for the [AI SDK](https://ai-sdk.dev/docs)
4
4
  contains support for the Hume API.
5
5
 
6
+ > **Deploying to Vercel?** With Vercel's AI Gateway you can access Hume (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 Hume provider is available in the `@ai-sdk/hume` module. You can install it with
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
- import { SpeechModelV3, 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 { SpeechModelV4, 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 HumeConfig = {
@@ -8,60 +9,42 @@ type HumeConfig = {
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
- declare const humeSpeechModelOptionsSchema: z.ZodObject<{
17
- context: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodObject<{
18
- generationId: z.ZodString;
19
- }, z.core.$strip>, z.ZodObject<{
20
- utterances: z.ZodArray<z.ZodObject<{
21
- text: z.ZodString;
22
- description: z.ZodOptional<z.ZodString>;
23
- speed: z.ZodOptional<z.ZodNumber>;
24
- trailingSilence: z.ZodOptional<z.ZodNumber>;
25
- voice: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
26
- id: z.ZodString;
27
- provider: z.ZodOptional<z.ZodEnum<{
28
- HUME_AI: "HUME_AI";
29
- CUSTOM_VOICE: "CUSTOM_VOICE";
30
- }>>;
31
- }, z.core.$strip>, z.ZodObject<{
32
- name: z.ZodString;
33
- provider: z.ZodOptional<z.ZodEnum<{
34
- HUME_AI: "HUME_AI";
35
- CUSTOM_VOICE: "CUSTOM_VOICE";
36
- }>>;
37
- }, z.core.$strip>]>>;
38
- }, z.core.$strip>>;
39
- }, z.core.$strip>]>>>;
40
- }, z.core.$strip>;
41
- type HumeSpeechModelOptions = z.infer<typeof humeSpeechModelOptionsSchema>;
42
17
  interface HumeSpeechModelConfig extends HumeConfig {
43
18
  _internal?: {
44
19
  currentDate?: () => Date;
45
20
  };
46
21
  }
47
- declare class HumeSpeechModel implements SpeechModelV3 {
22
+ declare class HumeSpeechModel implements SpeechModelV4 {
48
23
  readonly modelId: '';
49
24
  private readonly config;
50
- readonly specificationVersion = "v3";
25
+ readonly specificationVersion = "v4";
51
26
  get provider(): string;
27
+ static [WORKFLOW_SERIALIZE](model: HumeSpeechModel): {
28
+ modelId: string;
29
+ config: _ai_sdk_provider.JSONObject;
30
+ };
31
+ static [WORKFLOW_DESERIALIZE](options: {
32
+ modelId: '';
33
+ config: HumeSpeechModelConfig;
34
+ }): HumeSpeechModel;
52
35
  constructor(modelId: '', config: HumeSpeechModelConfig);
53
36
  private getArgs;
54
- doGenerate(options: Parameters<SpeechModelV3['doGenerate']>[0]): Promise<Awaited<ReturnType<SpeechModelV3['doGenerate']>>>;
37
+ doGenerate(options: Parameters<SpeechModelV4['doGenerate']>[0]): Promise<Awaited<ReturnType<SpeechModelV4['doGenerate']>>>;
55
38
  }
56
39
 
57
- interface HumeProvider extends Pick<ProviderV3, 'speechModel'> {
40
+ interface HumeProvider extends ProviderV4 {
58
41
  (settings?: {}): {
59
42
  speech: HumeSpeechModel;
60
43
  };
61
44
  /**
62
45
  * Creates a model for speech synthesis.
63
46
  */
64
- speech(): SpeechModelV3;
47
+ speech(): SpeechModelV4;
65
48
  }
66
49
  interface HumeProviderSettings {
67
50
  /**
@@ -87,6 +70,33 @@ declare function createHume(options?: HumeProviderSettings): HumeProvider;
87
70
  */
88
71
  declare const hume: HumeProvider;
89
72
 
73
+ declare const humeSpeechModelOptionsSchema: z.ZodObject<{
74
+ context: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodObject<{
75
+ generationId: z.ZodString;
76
+ }, z.core.$strip>, z.ZodObject<{
77
+ utterances: z.ZodArray<z.ZodObject<{
78
+ text: z.ZodString;
79
+ description: z.ZodOptional<z.ZodString>;
80
+ speed: z.ZodOptional<z.ZodNumber>;
81
+ trailingSilence: z.ZodOptional<z.ZodNumber>;
82
+ voice: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
83
+ id: z.ZodString;
84
+ provider: z.ZodOptional<z.ZodEnum<{
85
+ HUME_AI: "HUME_AI";
86
+ CUSTOM_VOICE: "CUSTOM_VOICE";
87
+ }>>;
88
+ }, z.core.$strip>, z.ZodObject<{
89
+ name: z.ZodString;
90
+ provider: z.ZodOptional<z.ZodEnum<{
91
+ HUME_AI: "HUME_AI";
92
+ CUSTOM_VOICE: "CUSTOM_VOICE";
93
+ }>>;
94
+ }, z.core.$strip>]>>;
95
+ }, z.core.$strip>>;
96
+ }, z.core.$strip>]>>>;
97
+ }, z.core.$strip>;
98
+ type HumeSpeechModelOptions = z.infer<typeof humeSpeechModelOptionsSchema>;
99
+
90
100
  declare const VERSION: string;
91
101
 
92
102
  export { type HumeProvider, type HumeProviderSettings, type HumeSpeechModelOptions, VERSION, createHume, hume };
package/dist/index.js CHANGED
@@ -1,110 +1,96 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/index.ts
21
- var index_exports = {};
22
- __export(index_exports, {
23
- VERSION: () => VERSION,
24
- createHume: () => createHume,
25
- hume: () => hume
26
- });
27
- module.exports = __toCommonJS(index_exports);
28
-
29
1
  // src/hume-provider.ts
30
- var import_provider_utils3 = require("@ai-sdk/provider-utils");
2
+ import {
3
+ NoSuchModelError
4
+ } from "@ai-sdk/provider";
5
+ import {
6
+ loadApiKey,
7
+ withUserAgentSuffix
8
+ } from "@ai-sdk/provider-utils";
31
9
 
32
10
  // src/hume-speech-model.ts
33
- var import_provider_utils2 = require("@ai-sdk/provider-utils");
34
- var import_v42 = require("zod/v4");
11
+ import {
12
+ combineHeaders,
13
+ createBinaryResponseHandler,
14
+ parseProviderOptions,
15
+ postJsonToApi,
16
+ serializeModelOptions,
17
+ WORKFLOW_SERIALIZE,
18
+ WORKFLOW_DESERIALIZE
19
+ } from "@ai-sdk/provider-utils";
35
20
 
36
21
  // src/hume-error.ts
37
- var import_v4 = require("zod/v4");
38
- var import_provider_utils = require("@ai-sdk/provider-utils");
39
- var humeErrorDataSchema = import_v4.z.object({
40
- error: import_v4.z.object({
41
- message: import_v4.z.string(),
42
- code: import_v4.z.number()
22
+ import { z } from "zod/v4";
23
+ import { createJsonErrorResponseHandler } from "@ai-sdk/provider-utils";
24
+ var humeErrorDataSchema = z.object({
25
+ error: z.object({
26
+ message: z.string(),
27
+ code: z.number()
43
28
  })
44
29
  });
45
- var humeFailedResponseHandler = (0, import_provider_utils.createJsonErrorResponseHandler)({
30
+ var humeFailedResponseHandler = createJsonErrorResponseHandler({
46
31
  errorSchema: humeErrorDataSchema,
47
32
  errorToMessage: (data) => data.error.message
48
33
  });
49
34
 
50
- // src/hume-speech-model.ts
51
- var humeSpeechModelOptionsSchema = import_v42.z.object({
35
+ // src/hume-speech-model-options.ts
36
+ import { z as z2 } from "zod/v4";
37
+ var humeSpeechModelOptionsSchema = z2.object({
52
38
  /**
53
39
  * Context for the speech synthesis request.
54
40
  * Can be either a generationId for retrieving a previous generation,
55
41
  * or a list of utterances to synthesize.
56
42
  */
57
- context: import_v42.z.object({
43
+ context: z2.object({
58
44
  /**
59
45
  * ID of a previously generated speech synthesis to retrieve.
60
46
  */
61
- generationId: import_v42.z.string()
47
+ generationId: z2.string()
62
48
  }).or(
63
- import_v42.z.object({
49
+ z2.object({
64
50
  /**
65
51
  * List of utterances to synthesize into speech.
66
52
  */
67
- utterances: import_v42.z.array(
68
- import_v42.z.object({
53
+ utterances: z2.array(
54
+ z2.object({
69
55
  /**
70
56
  * The text content to convert to speech.
71
57
  */
72
- text: import_v42.z.string(),
58
+ text: z2.string(),
73
59
  /**
74
60
  * Optional description or instructions for how the text should be spoken.
75
61
  */
76
- description: import_v42.z.string().optional(),
62
+ description: z2.string().optional(),
77
63
  /**
78
64
  * Optional speech rate multiplier.
79
65
  */
80
- speed: import_v42.z.number().optional(),
66
+ speed: z2.number().optional(),
81
67
  /**
82
68
  * Optional duration of silence to add after the utterance in seconds.
83
69
  */
84
- trailingSilence: import_v42.z.number().optional(),
70
+ trailingSilence: z2.number().optional(),
85
71
  /**
86
72
  * Voice configuration for the utterance.
87
73
  * Can be specified by ID or name.
88
74
  */
89
- voice: import_v42.z.object({
75
+ voice: z2.object({
90
76
  /**
91
77
  * ID of the voice to use.
92
78
  */
93
- id: import_v42.z.string(),
79
+ id: z2.string(),
94
80
  /**
95
81
  * Provider of the voice, either Hume's built-in voices or a custom voice.
96
82
  */
97
- provider: import_v42.z.enum(["HUME_AI", "CUSTOM_VOICE"]).optional()
83
+ provider: z2.enum(["HUME_AI", "CUSTOM_VOICE"]).optional()
98
84
  }).or(
99
- import_v42.z.object({
85
+ z2.object({
100
86
  /**
101
87
  * Name of the voice to use.
102
88
  */
103
- name: import_v42.z.string(),
89
+ name: z2.string(),
104
90
  /**
105
91
  * Provider of the voice, either Hume's built-in voices or a custom voice.
106
92
  */
107
- provider: import_v42.z.enum(["HUME_AI", "CUSTOM_VOICE"]).optional()
93
+ provider: z2.enum(["HUME_AI", "CUSTOM_VOICE"]).optional()
108
94
  })
109
95
  ).optional()
110
96
  })
@@ -112,15 +98,26 @@ var humeSpeechModelOptionsSchema = import_v42.z.object({
112
98
  })
113
99
  ).nullish()
114
100
  });
115
- var HumeSpeechModel = class {
101
+
102
+ // src/hume-speech-model.ts
103
+ var HumeSpeechModel = class _HumeSpeechModel {
116
104
  constructor(modelId, config) {
117
105
  this.modelId = modelId;
118
106
  this.config = config;
119
- this.specificationVersion = "v3";
107
+ this.specificationVersion = "v4";
120
108
  }
121
109
  get provider() {
122
110
  return this.config.provider;
123
111
  }
112
+ static [WORKFLOW_SERIALIZE](model) {
113
+ return serializeModelOptions({
114
+ modelId: model.modelId,
115
+ config: model.config
116
+ });
117
+ }
118
+ static [WORKFLOW_DESERIALIZE](options) {
119
+ return new _HumeSpeechModel(options.modelId, options.config);
120
+ }
124
121
  async getArgs({
125
122
  text,
126
123
  voice = "d8ab67c6-953d-4bd8-9370-8fa53a0f1453",
@@ -131,7 +128,7 @@ var HumeSpeechModel = class {
131
128
  providerOptions
132
129
  }) {
133
130
  const warnings = [];
134
- const humeOptions = await (0, import_provider_utils2.parseProviderOptions)({
131
+ const humeOptions = await parseProviderOptions({
135
132
  provider: "hume",
136
133
  providerOptions,
137
134
  schema: humeSpeechModelOptionsSchema
@@ -200,22 +197,22 @@ var HumeSpeechModel = class {
200
197
  };
201
198
  }
202
199
  async doGenerate(options) {
203
- var _a, _b, _c;
200
+ var _a, _b, _c, _d, _e;
204
201
  const currentDate = (_c = (_b = (_a = this.config._internal) == null ? void 0 : _a.currentDate) == null ? void 0 : _b.call(_a)) != null ? _c : /* @__PURE__ */ new Date();
205
202
  const { requestBody, warnings } = await this.getArgs(options);
206
203
  const {
207
204
  value: audio,
208
205
  responseHeaders,
209
206
  rawValue: rawResponse
210
- } = await (0, import_provider_utils2.postJsonToApi)({
207
+ } = await postJsonToApi({
211
208
  url: this.config.url({
212
209
  path: "/v0/tts/file",
213
210
  modelId: this.modelId
214
211
  }),
215
- headers: (0, import_provider_utils2.combineHeaders)(this.config.headers(), options.headers),
212
+ headers: combineHeaders((_e = (_d = this.config).headers) == null ? void 0 : _e.call(_d), options.headers),
216
213
  body: requestBody,
217
214
  failedResponseHandler: humeFailedResponseHandler,
218
- successfulResponseHandler: (0, import_provider_utils2.createBinaryResponseHandler)(),
215
+ successfulResponseHandler: createBinaryResponseHandler(),
219
216
  abortSignal: options.abortSignal,
220
217
  fetch: this.config.fetch
221
218
  });
@@ -236,13 +233,13 @@ var HumeSpeechModel = class {
236
233
  };
237
234
 
238
235
  // src/version.ts
239
- var VERSION = true ? "3.0.0-beta.3" : "0.0.0-test";
236
+ var VERSION = true ? "3.0.0-beta.31" : "0.0.0-test";
240
237
 
241
238
  // src/hume-provider.ts
242
239
  function createHume(options = {}) {
243
- const getHeaders = () => (0, import_provider_utils3.withUserAgentSuffix)(
240
+ const getHeaders = () => withUserAgentSuffix(
244
241
  {
245
- "X-Hume-Api-Key": (0, import_provider_utils3.loadApiKey)({
242
+ "X-Hume-Api-Key": loadApiKey({
246
243
  apiKey: options.apiKey,
247
244
  environmentVariableName: "HUME_API_KEY",
248
245
  description: "Hume"
@@ -262,15 +259,36 @@ function createHume(options = {}) {
262
259
  speech: createSpeechModel()
263
260
  };
264
261
  };
262
+ provider.specificationVersion = "v4";
265
263
  provider.speech = createSpeechModel;
266
264
  provider.speechModel = createSpeechModel;
265
+ provider.languageModel = (modelId) => {
266
+ throw new NoSuchModelError({
267
+ modelId,
268
+ modelType: "languageModel",
269
+ message: "Hume does not provide language models"
270
+ });
271
+ };
272
+ provider.embeddingModel = (modelId) => {
273
+ throw new NoSuchModelError({
274
+ modelId,
275
+ modelType: "embeddingModel",
276
+ message: "Hume does not provide embedding models"
277
+ });
278
+ };
279
+ provider.imageModel = (modelId) => {
280
+ throw new NoSuchModelError({
281
+ modelId,
282
+ modelType: "imageModel",
283
+ message: "Hume does not provide image models"
284
+ });
285
+ };
267
286
  return provider;
268
287
  }
269
288
  var hume = createHume();
270
- // Annotate the CommonJS export names for ESM import in node:
271
- 0 && (module.exports = {
289
+ export {
272
290
  VERSION,
273
291
  createHume,
274
292
  hume
275
- });
293
+ };
276
294
  //# sourceMappingURL=index.js.map