@ai-sdk/openai 4.0.25 → 4.0.26

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
+ ## 4.0.26
4
+
5
+ ### Patch Changes
6
+
7
+ - f7c4a38: Serialize file upload expiry settings in the multipart field shape accepted by OpenAI.
8
+ - Updated dependencies [fa95504]
9
+ - @ai-sdk/provider-utils@5.0.17
10
+
3
11
  ## 4.0.25
4
12
 
5
13
  ### Patch Changes
package/dist/index.js CHANGED
@@ -2114,7 +2114,11 @@ var OpenAIFiles = class {
2114
2114
  }
2115
2115
  formData.append("purpose", (_a = openaiOptions == null ? void 0 : openaiOptions.purpose) != null ? _a : "assistants");
2116
2116
  if ((openaiOptions == null ? void 0 : openaiOptions.expiresAfter) != null) {
2117
- formData.append("expires_after", String(openaiOptions.expiresAfter));
2117
+ formData.append("expires_after[anchor]", "created_at");
2118
+ formData.append(
2119
+ "expires_after[seconds]",
2120
+ String(openaiOptions.expiresAfter)
2121
+ );
2118
2122
  }
2119
2123
  const { value: response } = await postFormDataToApi({
2120
2124
  url: `${this.config.baseURL}/files`,
@@ -9503,7 +9507,7 @@ var OpenAISkills = class {
9503
9507
  };
9504
9508
 
9505
9509
  // src/version.ts
9506
- var VERSION = true ? "4.0.25" : "0.0.0-test";
9510
+ var VERSION = true ? "4.0.26" : "0.0.0-test";
9507
9511
 
9508
9512
  // src/openai-provider.ts
9509
9513
  function createOpenAI(options = {}) {