@ai-sdk/huggingface 1.0.0-beta.4 → 1.0.0-beta.40

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,332 @@
1
1
  # @ai-sdk/huggingface
2
2
 
3
+ ## 1.0.0-beta.40
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [dce03c4]
8
+ - @ai-sdk/provider-utils@4.0.0-beta.43
9
+ - @ai-sdk/provider@3.0.0-beta.24
10
+ - @ai-sdk/openai-compatible@2.0.0-beta.44
11
+
12
+ ## 1.0.0-beta.39
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies [3ed5519]
17
+ - @ai-sdk/provider-utils@4.0.0-beta.42
18
+ - @ai-sdk/openai-compatible@2.0.0-beta.43
19
+
20
+ ## 1.0.0-beta.38
21
+
22
+ ### Patch Changes
23
+
24
+ - Updated dependencies [1bd7d32]
25
+ - @ai-sdk/openai-compatible@2.0.0-beta.42
26
+ - @ai-sdk/provider-utils@4.0.0-beta.41
27
+ - @ai-sdk/provider@3.0.0-beta.23
28
+
29
+ ## 1.0.0-beta.37
30
+
31
+ ### Patch Changes
32
+
33
+ - 544d4e8: chore(specification): rename v3 provider defined tool to provider tool
34
+ - Updated dependencies [544d4e8]
35
+ - @ai-sdk/openai-compatible@2.0.0-beta.41
36
+ - @ai-sdk/provider-utils@4.0.0-beta.40
37
+ - @ai-sdk/provider@3.0.0-beta.22
38
+
39
+ ## 1.0.0-beta.36
40
+
41
+ ### Patch Changes
42
+
43
+ - Updated dependencies [954c356]
44
+ - @ai-sdk/provider-utils@4.0.0-beta.39
45
+ - @ai-sdk/provider@3.0.0-beta.21
46
+ - @ai-sdk/openai-compatible@2.0.0-beta.40
47
+
48
+ ## 1.0.0-beta.35
49
+
50
+ ### Patch Changes
51
+
52
+ - Updated dependencies [03849b0]
53
+ - @ai-sdk/provider-utils@4.0.0-beta.38
54
+ - @ai-sdk/openai-compatible@2.0.0-beta.39
55
+
56
+ ## 1.0.0-beta.34
57
+
58
+ ### Patch Changes
59
+
60
+ - 457318b: chore(provider,ai): switch to SharedV3Warning and unified warnings
61
+ - Updated dependencies [457318b]
62
+ - @ai-sdk/openai-compatible@2.0.0-beta.38
63
+ - @ai-sdk/provider@3.0.0-beta.20
64
+ - @ai-sdk/provider-utils@4.0.0-beta.37
65
+
66
+ ## 1.0.0-beta.33
67
+
68
+ ### Patch Changes
69
+
70
+ - 8d9e8ad: chore(provider): remove generics from EmbeddingModelV3
71
+
72
+ Before
73
+
74
+ ```ts
75
+ model.textEmbeddingModel('my-model-id');
76
+ ```
77
+
78
+ After
79
+
80
+ ```ts
81
+ model.embeddingModel('my-model-id');
82
+ ```
83
+
84
+ - Updated dependencies [8d9e8ad]
85
+ - @ai-sdk/openai-compatible@2.0.0-beta.37
86
+ - @ai-sdk/provider@3.0.0-beta.19
87
+ - @ai-sdk/provider-utils@4.0.0-beta.36
88
+
89
+ ## 1.0.0-beta.32
90
+
91
+ ### Patch Changes
92
+
93
+ - Updated dependencies [10d819b]
94
+ - @ai-sdk/provider@3.0.0-beta.18
95
+ - @ai-sdk/openai-compatible@2.0.0-beta.36
96
+ - @ai-sdk/provider-utils@4.0.0-beta.35
97
+
98
+ ## 1.0.0-beta.31
99
+
100
+ ### Patch Changes
101
+
102
+ - Updated dependencies [db913bd]
103
+ - @ai-sdk/provider@3.0.0-beta.17
104
+ - @ai-sdk/openai-compatible@2.0.0-beta.35
105
+ - @ai-sdk/provider-utils@4.0.0-beta.34
106
+
107
+ ## 1.0.0-beta.30
108
+
109
+ ### Patch Changes
110
+
111
+ - 1bbce64: extract reasoning content
112
+
113
+ ## 1.0.0-beta.29
114
+
115
+ ### Patch Changes
116
+
117
+ - Updated dependencies [b681d7d]
118
+ - @ai-sdk/provider@3.0.0-beta.16
119
+ - @ai-sdk/openai-compatible@2.0.0-beta.34
120
+ - @ai-sdk/provider-utils@4.0.0-beta.33
121
+
122
+ ## 1.0.0-beta.28
123
+
124
+ ### Patch Changes
125
+
126
+ - Updated dependencies [32d8dbb]
127
+ - @ai-sdk/provider-utils@4.0.0-beta.32
128
+ - @ai-sdk/openai-compatible@2.0.0-beta.33
129
+
130
+ ## 1.0.0-beta.27
131
+
132
+ ### Patch Changes
133
+
134
+ - Updated dependencies [bb36798]
135
+ - @ai-sdk/provider@3.0.0-beta.15
136
+ - @ai-sdk/openai-compatible@2.0.0-beta.32
137
+ - @ai-sdk/provider-utils@4.0.0-beta.31
138
+
139
+ ## 1.0.0-beta.26
140
+
141
+ ### Patch Changes
142
+
143
+ - Updated dependencies [4f16c37]
144
+ - @ai-sdk/provider-utils@4.0.0-beta.30
145
+ - @ai-sdk/openai-compatible@2.0.0-beta.31
146
+
147
+ ## 1.0.0-beta.25
148
+
149
+ ### Patch Changes
150
+
151
+ - Updated dependencies [af3780b]
152
+ - @ai-sdk/provider@3.0.0-beta.14
153
+ - @ai-sdk/openai-compatible@2.0.0-beta.30
154
+ - @ai-sdk/provider-utils@4.0.0-beta.29
155
+
156
+ ## 1.0.0-beta.24
157
+
158
+ ### Patch Changes
159
+
160
+ - Updated dependencies [016b111]
161
+ - @ai-sdk/provider-utils@4.0.0-beta.28
162
+ - @ai-sdk/openai-compatible@2.0.0-beta.29
163
+
164
+ ## 1.0.0-beta.23
165
+
166
+ ### Patch Changes
167
+
168
+ - Updated dependencies [37c58a0]
169
+ - @ai-sdk/provider@3.0.0-beta.13
170
+ - @ai-sdk/openai-compatible@2.0.0-beta.28
171
+ - @ai-sdk/provider-utils@4.0.0-beta.27
172
+
173
+ ## 1.0.0-beta.22
174
+
175
+ ### Patch Changes
176
+
177
+ - Updated dependencies [d1bdadb]
178
+ - @ai-sdk/provider@3.0.0-beta.12
179
+ - @ai-sdk/openai-compatible@2.0.0-beta.27
180
+ - @ai-sdk/provider-utils@4.0.0-beta.26
181
+
182
+ ## 1.0.0-beta.21
183
+
184
+ ### Patch Changes
185
+
186
+ - Updated dependencies [4c44a5b]
187
+ - @ai-sdk/provider@3.0.0-beta.11
188
+ - @ai-sdk/openai-compatible@2.0.0-beta.26
189
+ - @ai-sdk/provider-utils@4.0.0-beta.25
190
+
191
+ ## 1.0.0-beta.20
192
+
193
+ ### Patch Changes
194
+
195
+ - 0c3b58b: fix(provider): add specificationVersion to ProviderV3
196
+ - Updated dependencies [0c3b58b]
197
+ - @ai-sdk/openai-compatible@2.0.0-beta.25
198
+ - @ai-sdk/provider@3.0.0-beta.10
199
+ - @ai-sdk/provider-utils@4.0.0-beta.24
200
+
201
+ ## 1.0.0-beta.19
202
+
203
+ ### Patch Changes
204
+
205
+ - Updated dependencies [a755db5]
206
+ - @ai-sdk/provider@3.0.0-beta.9
207
+ - @ai-sdk/openai-compatible@2.0.0-beta.24
208
+ - @ai-sdk/provider-utils@4.0.0-beta.23
209
+
210
+ ## 1.0.0-beta.18
211
+
212
+ ### Patch Changes
213
+
214
+ - Updated dependencies [58920e0]
215
+ - @ai-sdk/provider-utils@4.0.0-beta.22
216
+ - @ai-sdk/openai-compatible@2.0.0-beta.23
217
+
218
+ ## 1.0.0-beta.17
219
+
220
+ ### Patch Changes
221
+
222
+ - Updated dependencies [293a6b7]
223
+ - @ai-sdk/provider-utils@4.0.0-beta.21
224
+ - @ai-sdk/openai-compatible@2.0.0-beta.22
225
+
226
+ ## 1.0.0-beta.16
227
+
228
+ ### Patch Changes
229
+
230
+ - Updated dependencies [fca786b]
231
+ - @ai-sdk/provider-utils@4.0.0-beta.20
232
+ - @ai-sdk/openai-compatible@2.0.0-beta.21
233
+
234
+ ## 1.0.0-beta.15
235
+
236
+ ### Patch Changes
237
+
238
+ - Updated dependencies [3794514]
239
+ - @ai-sdk/provider-utils@4.0.0-beta.19
240
+ - @ai-sdk/provider@3.0.0-beta.8
241
+ - @ai-sdk/openai-compatible@2.0.0-beta.20
242
+
243
+ ## 1.0.0-beta.14
244
+
245
+ ### Patch Changes
246
+
247
+ - Updated dependencies [81d4308]
248
+ - @ai-sdk/provider@3.0.0-beta.7
249
+ - @ai-sdk/openai-compatible@2.0.0-beta.19
250
+ - @ai-sdk/provider-utils@4.0.0-beta.18
251
+
252
+ ## 1.0.0-beta.13
253
+
254
+ ### Patch Changes
255
+
256
+ - Updated dependencies [703459a]
257
+ - @ai-sdk/provider-utils@4.0.0-beta.17
258
+ - @ai-sdk/openai-compatible@2.0.0-beta.18
259
+
260
+ ## 1.0.0-beta.12
261
+
262
+ ### Patch Changes
263
+
264
+ - Updated dependencies [b689220]
265
+ - @ai-sdk/openai-compatible@2.0.0-beta.17
266
+
267
+ ## 1.0.0-beta.11
268
+
269
+ ### Patch Changes
270
+
271
+ - Updated dependencies [6306603]
272
+ - @ai-sdk/provider-utils@4.0.0-beta.16
273
+ - @ai-sdk/openai-compatible@2.0.0-beta.16
274
+
275
+ ## 1.0.0-beta.10
276
+
277
+ ### Patch Changes
278
+
279
+ - Updated dependencies [f0b2157]
280
+ - @ai-sdk/provider-utils@4.0.0-beta.15
281
+ - @ai-sdk/openai-compatible@2.0.0-beta.15
282
+
283
+ ## 1.0.0-beta.9
284
+
285
+ ### Patch Changes
286
+
287
+ - Updated dependencies [3b1d015]
288
+ - @ai-sdk/provider-utils@4.0.0-beta.14
289
+ - @ai-sdk/openai-compatible@2.0.0-beta.14
290
+
291
+ ## 1.0.0-beta.8
292
+
293
+ ### Patch Changes
294
+
295
+ - Updated dependencies [d116b4b]
296
+ - @ai-sdk/provider-utils@4.0.0-beta.13
297
+ - @ai-sdk/openai-compatible@2.0.0-beta.13
298
+
299
+ ## 1.0.0-beta.7
300
+
301
+ ### Patch Changes
302
+
303
+ - Updated dependencies [7e32fea]
304
+ - @ai-sdk/provider-utils@4.0.0-beta.12
305
+ - @ai-sdk/openai-compatible@2.0.0-beta.12
306
+
307
+ ## 1.0.0-beta.6
308
+
309
+ ### Patch Changes
310
+
311
+ - 95f65c2: chore: use import \* from zod/v4
312
+ - Updated dependencies [95f65c2]
313
+ - Updated dependencies [95f65c2]
314
+ - @ai-sdk/openai-compatible@2.0.0-beta.11
315
+ - @ai-sdk/provider-utils@4.0.0-beta.11
316
+
317
+ ## 1.0.0-beta.5
318
+
319
+ ### Major Changes
320
+
321
+ - dee8b05: ai SDK 6 beta
322
+
323
+ ### Patch Changes
324
+
325
+ - Updated dependencies [dee8b05]
326
+ - @ai-sdk/openai-compatible@2.0.0-beta.10
327
+ - @ai-sdk/provider@3.0.0-beta.6
328
+ - @ai-sdk/provider-utils@4.0.0-beta.10
329
+
3
330
  ## 1.0.0-beta.4
4
331
 
5
332
  ### Patch Changes
package/dist/index.js CHANGED
@@ -120,10 +120,7 @@ async function convertToHuggingFaceResponsesMessages({
120
120
  break;
121
121
  }
122
122
  case "tool": {
123
- warnings.push({
124
- type: "unsupported-setting",
125
- setting: "tool messages"
126
- });
123
+ warnings.push({ type: "unsupported", feature: "tool messages" });
127
124
  break;
128
125
  }
129
126
  default: {
@@ -174,10 +171,10 @@ function prepareResponsesTools({
174
171
  parameters: tool.inputSchema
175
172
  });
176
173
  break;
177
- case "provider-defined":
174
+ case "provider":
178
175
  toolWarnings.push({
179
- type: "unsupported-tool",
180
- tool
176
+ type: "unsupported",
177
+ feature: `provider-defined tool ${tool.id}`
181
178
  });
182
179
  break;
183
180
  default: {
@@ -247,25 +244,19 @@ var HuggingFaceResponsesLanguageModel = class {
247
244
  var _a, _b;
248
245
  const warnings = [];
249
246
  if (topK != null) {
250
- warnings.push({ type: "unsupported-setting", setting: "topK" });
247
+ warnings.push({ type: "unsupported", feature: "topK" });
251
248
  }
252
249
  if (seed != null) {
253
- warnings.push({ type: "unsupported-setting", setting: "seed" });
250
+ warnings.push({ type: "unsupported", feature: "seed" });
254
251
  }
255
252
  if (presencePenalty != null) {
256
- warnings.push({
257
- type: "unsupported-setting",
258
- setting: "presencePenalty"
259
- });
253
+ warnings.push({ type: "unsupported", feature: "presencePenalty" });
260
254
  }
261
255
  if (frequencyPenalty != null) {
262
- warnings.push({
263
- type: "unsupported-setting",
264
- setting: "frequencyPenalty"
265
- });
256
+ warnings.push({ type: "unsupported", feature: "frequencyPenalty" });
266
257
  }
267
258
  if (stopSequences != null) {
268
- warnings.push({ type: "unsupported-setting", setting: "stopSequences" });
259
+ warnings.push({ type: "unsupported", feature: "stopSequences" });
269
260
  }
270
261
  const { input, warnings: messageWarnings } = await convertToHuggingFaceResponsesMessages({
271
262
  prompt
@@ -306,7 +297,14 @@ var HuggingFaceResponsesLanguageModel = class {
306
297
  metadata: huggingfaceOptions == null ? void 0 : huggingfaceOptions.metadata,
307
298
  instructions: huggingfaceOptions == null ? void 0 : huggingfaceOptions.instructions,
308
299
  ...preparedTools && { tools: preparedTools },
309
- ...preparedToolChoice && { tool_choice: preparedToolChoice }
300
+ ...preparedToolChoice && { tool_choice: preparedToolChoice },
301
+ ...(huggingfaceOptions == null ? void 0 : huggingfaceOptions.reasoningEffort) != null && {
302
+ reasoning: {
303
+ ...(huggingfaceOptions == null ? void 0 : huggingfaceOptions.reasoningEffort) != null && {
304
+ effort: huggingfaceOptions.reasoningEffort
305
+ }
306
+ }
307
+ }
310
308
  };
311
309
  return { args: baseArgs, warnings };
312
310
  }
@@ -375,6 +373,20 @@ var HuggingFaceResponsesLanguageModel = class {
375
373
  }
376
374
  break;
377
375
  }
376
+ case "reasoning": {
377
+ for (const contentPart of part.content) {
378
+ content.push({
379
+ type: "reasoning",
380
+ text: contentPart.text,
381
+ providerMetadata: {
382
+ huggingface: {
383
+ itemId: part.id
384
+ }
385
+ }
386
+ });
387
+ }
388
+ break;
389
+ }
378
390
  case "mcp_call": {
379
391
  content.push({
380
392
  type: "tool-call",
@@ -388,8 +400,7 @@ var HuggingFaceResponsesLanguageModel = class {
388
400
  type: "tool-result",
389
401
  toolCallId: part.id,
390
402
  toolName: part.name,
391
- result: part.output,
392
- providerExecuted: true
403
+ result: part.output
393
404
  });
394
405
  }
395
406
  break;
@@ -407,8 +418,7 @@ var HuggingFaceResponsesLanguageModel = class {
407
418
  type: "tool-result",
408
419
  toolCallId: part.id,
409
420
  toolName: "list_tools",
410
- result: { tools: part.tools },
411
- providerExecuted: true
421
+ result: { tools: part.tools }
412
422
  });
413
423
  }
414
424
  break;
@@ -529,6 +539,16 @@ var HuggingFaceResponsesLanguageModel = class {
529
539
  id: value.item.call_id,
530
540
  toolName: value.item.name
531
541
  });
542
+ } else if (value.item.type === "reasoning") {
543
+ controller.enqueue({
544
+ type: "reasoning-start",
545
+ id: value.item.id,
546
+ providerMetadata: {
547
+ huggingface: {
548
+ itemId: value.item.id
549
+ }
550
+ }
551
+ });
532
552
  }
533
553
  return;
534
554
  }
@@ -572,6 +592,21 @@ var HuggingFaceResponsesLanguageModel = class {
572
592
  }
573
593
  return;
574
594
  }
595
+ if (isReasoningDeltaChunk(value)) {
596
+ controller.enqueue({
597
+ type: "reasoning-delta",
598
+ id: value.item_id,
599
+ delta: value.delta
600
+ });
601
+ return;
602
+ }
603
+ if (isReasoningEndChunk(value)) {
604
+ controller.enqueue({
605
+ type: "reasoning-end",
606
+ id: value.item_id
607
+ });
608
+ return;
609
+ }
575
610
  if (isTextDeltaChunk(value)) {
576
611
  controller.enqueue({
577
612
  type: "text-delta",
@@ -603,8 +638,65 @@ var HuggingFaceResponsesLanguageModel = class {
603
638
  var huggingfaceResponsesProviderOptionsSchema = import_v42.z.object({
604
639
  metadata: import_v42.z.record(import_v42.z.string(), import_v42.z.string()).optional(),
605
640
  instructions: import_v42.z.string().optional(),
606
- strictJsonSchema: import_v42.z.boolean().optional()
641
+ strictJsonSchema: import_v42.z.boolean().optional(),
642
+ reasoningEffort: import_v42.z.string().optional()
607
643
  });
644
+ var huggingfaceResponsesOutputSchema = import_v42.z.discriminatedUnion("type", [
645
+ import_v42.z.object({
646
+ type: import_v42.z.literal("message"),
647
+ id: import_v42.z.string(),
648
+ role: import_v42.z.string().optional(),
649
+ status: import_v42.z.string().optional(),
650
+ content: import_v42.z.array(
651
+ import_v42.z.object({
652
+ type: import_v42.z.literal("output_text"),
653
+ text: import_v42.z.string(),
654
+ annotations: import_v42.z.array(import_v42.z.any()).optional()
655
+ })
656
+ )
657
+ }),
658
+ import_v42.z.object({
659
+ type: import_v42.z.literal("reasoning"),
660
+ id: import_v42.z.string(),
661
+ status: import_v42.z.string().optional(),
662
+ content: import_v42.z.array(
663
+ import_v42.z.object({
664
+ type: import_v42.z.literal("reasoning_text"),
665
+ text: import_v42.z.string()
666
+ })
667
+ ),
668
+ summary: import_v42.z.array(
669
+ import_v42.z.object({
670
+ type: import_v42.z.literal("reasoning_summary"),
671
+ text: import_v42.z.string()
672
+ }).optional()
673
+ ).optional()
674
+ }),
675
+ import_v42.z.object({
676
+ type: import_v42.z.literal("function_call"),
677
+ id: import_v42.z.string(),
678
+ call_id: import_v42.z.string(),
679
+ name: import_v42.z.string(),
680
+ arguments: import_v42.z.string(),
681
+ output: import_v42.z.string().optional(),
682
+ status: import_v42.z.string().optional()
683
+ }),
684
+ import_v42.z.object({
685
+ type: import_v42.z.literal("mcp_call"),
686
+ id: import_v42.z.string(),
687
+ name: import_v42.z.string(),
688
+ arguments: import_v42.z.string(),
689
+ output: import_v42.z.string().optional(),
690
+ status: import_v42.z.string().optional()
691
+ }),
692
+ import_v42.z.object({
693
+ type: import_v42.z.literal("mcp_list_tools"),
694
+ id: import_v42.z.string(),
695
+ server_label: import_v42.z.string(),
696
+ tools: import_v42.z.array(import_v42.z.any()).optional(),
697
+ status: import_v42.z.string().optional()
698
+ })
699
+ ]);
608
700
  var huggingfaceResponsesResponseSchema = import_v42.z.object({
609
701
  id: import_v42.z.string(),
610
702
  model: import_v42.z.string(),
@@ -633,7 +725,7 @@ var huggingfaceResponsesResponseSchema = import_v42.z.object({
633
725
  }).optional(),
634
726
  total_tokens: import_v42.z.number()
635
727
  }).nullable().optional(),
636
- output: import_v42.z.array(import_v42.z.any()),
728
+ output: import_v42.z.array(huggingfaceResponsesOutputSchema),
637
729
  output_text: import_v42.z.string().nullable().optional()
638
730
  });
639
731
  var responseOutputItemAddedSchema = import_v42.z.object({
@@ -647,6 +739,13 @@ var responseOutputItemAddedSchema = import_v42.z.object({
647
739
  status: import_v42.z.string().optional(),
648
740
  content: import_v42.z.array(import_v42.z.any()).optional()
649
741
  }),
742
+ import_v42.z.object({
743
+ type: import_v42.z.literal("reasoning"),
744
+ id: import_v42.z.string(),
745
+ status: import_v42.z.string().optional(),
746
+ content: import_v42.z.array(import_v42.z.any()).optional(),
747
+ summary: import_v42.z.array(import_v42.z.any()).optional()
748
+ }),
650
749
  import_v42.z.object({
651
750
  type: import_v42.z.literal("mcp_list_tools"),
652
751
  id: import_v42.z.string(),
@@ -710,6 +809,13 @@ var responseOutputItemDoneSchema = import_v42.z.object({
710
809
  arguments: import_v42.z.string(),
711
810
  output: import_v42.z.string().optional(),
712
811
  error: import_v42.z.string().optional()
812
+ }),
813
+ import_v42.z.object({
814
+ type: import_v42.z.literal("reasoning"),
815
+ id: import_v42.z.string(),
816
+ status: import_v42.z.string().optional(),
817
+ content: import_v42.z.array(import_v42.z.any()).optional(),
818
+ summary: import_v42.z.array(import_v42.z.any()).optional()
713
819
  })
714
820
  ]),
715
821
  sequence_number: import_v42.z.number()
@@ -722,6 +828,22 @@ var textDeltaChunkSchema = import_v42.z.object({
722
828
  delta: import_v42.z.string(),
723
829
  sequence_number: import_v42.z.number()
724
830
  });
831
+ var reasoningTextDeltaChunkSchema = import_v42.z.object({
832
+ type: import_v42.z.literal("response.reasoning_text.delta"),
833
+ item_id: import_v42.z.string(),
834
+ output_index: import_v42.z.number(),
835
+ content_index: import_v42.z.number(),
836
+ delta: import_v42.z.string(),
837
+ sequence_number: import_v42.z.number()
838
+ });
839
+ var reasoningTextEndChunkSchema = import_v42.z.object({
840
+ type: import_v42.z.literal("response.reasoning_text.done"),
841
+ item_id: import_v42.z.string(),
842
+ output_index: import_v42.z.number(),
843
+ content_index: import_v42.z.number(),
844
+ text: import_v42.z.string(),
845
+ sequence_number: import_v42.z.number()
846
+ });
725
847
  var responseCompletedChunkSchema = import_v42.z.object({
726
848
  type: import_v42.z.literal("response.completed"),
727
849
  response: huggingfaceResponsesResponseSchema,
@@ -740,6 +862,8 @@ var responseCreatedChunkSchema = import_v42.z.object({
740
862
  var huggingfaceResponsesChunkSchema = import_v42.z.union([
741
863
  responseOutputItemAddedSchema,
742
864
  responseOutputItemDoneSchema,
865
+ reasoningTextDeltaChunkSchema,
866
+ reasoningTextEndChunkSchema,
743
867
  textDeltaChunkSchema,
744
868
  responseCompletedChunkSchema,
745
869
  responseCreatedChunkSchema,
@@ -755,6 +879,12 @@ function isResponseOutputItemDoneChunk(chunk) {
755
879
  function isTextDeltaChunk(chunk) {
756
880
  return chunk.type === "response.output_text.delta";
757
881
  }
882
+ function isReasoningDeltaChunk(chunk) {
883
+ return chunk.type === "response.reasoning_text.delta";
884
+ }
885
+ function isReasoningEndChunk(chunk) {
886
+ return chunk.type === "response.reasoning_text.done";
887
+ }
758
888
  function isResponseCompletedChunk(chunk) {
759
889
  return chunk.type === "response.completed";
760
890
  }
@@ -785,12 +915,13 @@ function createHuggingFace(options = {}) {
785
915
  });
786
916
  };
787
917
  const provider = (modelId) => createResponsesModel(modelId);
918
+ provider.specificationVersion = "v3";
788
919
  provider.languageModel = createResponsesModel;
789
920
  provider.responses = createResponsesModel;
790
- provider.textEmbeddingModel = (modelId) => {
921
+ provider.embeddingModel = (modelId) => {
791
922
  throw new import_provider3.NoSuchModelError({
792
923
  modelId,
793
- modelType: "textEmbeddingModel",
924
+ modelType: "embeddingModel",
794
925
  message: "Hugging Face Responses API does not support text embeddings. Use the Hugging Face Inference API directly for embeddings."
795
926
  });
796
927
  };