@ai-sdk/openai 2.0.55 → 2.0.57

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,18 @@
1
1
  # @ai-sdk/openai
2
2
 
3
+ ## 2.0.57
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [949718b]
8
+ - @ai-sdk/provider-utils@3.0.14
9
+
10
+ ## 2.0.56
11
+
12
+ ### Patch Changes
13
+
14
+ - b82d23b: feat(openai): preserve file_id when converting file citations
15
+
3
16
  ## 2.0.55
4
17
 
5
18
  ### Patch Changes
package/dist/index.js CHANGED
@@ -3398,7 +3398,14 @@ var OpenAIResponsesLanguageModel = class {
3398
3398
  id: (_i = (_h = (_g = this.config).generateId) == null ? void 0 : _h.call(_g)) != null ? _i : (0, import_provider_utils24.generateId)(),
3399
3399
  mediaType: "text/plain",
3400
3400
  title: (_k = (_j = annotation.quote) != null ? _j : annotation.filename) != null ? _k : "Document",
3401
- filename: (_l = annotation.filename) != null ? _l : annotation.file_id
3401
+ filename: (_l = annotation.filename) != null ? _l : annotation.file_id,
3402
+ ...annotation.file_id ? {
3403
+ providerMetadata: {
3404
+ openai: {
3405
+ fileId: annotation.file_id
3406
+ }
3407
+ }
3408
+ } : {}
3402
3409
  });
3403
3410
  }
3404
3411
  }
@@ -3976,7 +3983,14 @@ var OpenAIResponsesLanguageModel = class {
3976
3983
  id: (_s = (_r = (_q = self.config).generateId) == null ? void 0 : _r.call(_q)) != null ? _s : (0, import_provider_utils24.generateId)(),
3977
3984
  mediaType: "text/plain",
3978
3985
  title: (_u = (_t = value.annotation.quote) != null ? _t : value.annotation.filename) != null ? _u : "Document",
3979
- filename: (_v = value.annotation.filename) != null ? _v : value.annotation.file_id
3986
+ filename: (_v = value.annotation.filename) != null ? _v : value.annotation.file_id,
3987
+ ...value.annotation.file_id ? {
3988
+ providerMetadata: {
3989
+ openai: {
3990
+ fileId: value.annotation.file_id
3991
+ }
3992
+ }
3993
+ } : {}
3980
3994
  });
3981
3995
  }
3982
3996
  } else if (isErrorChunk(value)) {
@@ -4443,7 +4457,7 @@ var OpenAITranscriptionModel = class {
4443
4457
  };
4444
4458
 
4445
4459
  // src/version.ts
4446
- var VERSION = true ? "2.0.55" : "0.0.0-test";
4460
+ var VERSION = true ? "2.0.57" : "0.0.0-test";
4447
4461
 
4448
4462
  // src/openai-provider.ts
4449
4463
  function createOpenAI(options = {}) {