@ai-sdk/openai 2.0.23 → 2.0.24

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,13 @@
1
1
  # @ai-sdk/openai
2
2
 
3
+ ## 2.0.24
4
+
5
+ ### Patch Changes
6
+
7
+ - ad57512: fix(provider/openai): safe practice to include filename and fileExtension to avoid `experimental_transcribe` fails with valid Buffer
8
+ - Updated dependencies [99964ed]
9
+ - @ai-sdk/provider-utils@3.0.8
10
+
3
11
  ## 2.0.23
4
12
 
5
13
  ### Patch Changes
package/dist/index.js CHANGED
@@ -3499,7 +3499,12 @@ var OpenAITranscriptionModel = class {
3499
3499
  const formData = new FormData();
3500
3500
  const blob = audio instanceof Uint8Array ? new Blob([audio]) : new Blob([(0, import_provider_utils14.convertBase64ToUint8Array)(audio)]);
3501
3501
  formData.append("model", this.modelId);
3502
- formData.append("file", new File([blob], "audio", { type: mediaType }));
3502
+ const fileExtension = (0, import_provider_utils14.mediaTypeToExtension)(mediaType);
3503
+ formData.append(
3504
+ "file",
3505
+ new File([blob], "audio", { type: mediaType }),
3506
+ `audio.${fileExtension}`
3507
+ );
3503
3508
  if (openAIOptions) {
3504
3509
  const transcriptionModelOptions = {
3505
3510
  include: openAIOptions.include,