@ai-sdk/openai 4.0.0-canary.45 → 4.0.0-canary.46

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,11 @@
1
1
  # @ai-sdk/openai
2
2
 
3
+ ## 4.0.0-canary.46
4
+
5
+ ### Patch Changes
6
+
7
+ - cd9c311: fix(openai, openai-compatible): only send null content for assistant messages with tool calls
8
+
3
9
  ## 4.0.0-canary.45
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -271,7 +271,7 @@ function convertToOpenAIChatMessages({
271
271
  }
272
272
  messages.push({
273
273
  role: "assistant",
274
- content: text || null,
274
+ content: toolCalls.length > 0 ? text || null : text,
275
275
  tool_calls: toolCalls.length > 0 ? toolCalls : void 0
276
276
  });
277
277
  break;
@@ -7227,7 +7227,7 @@ var OpenAISkills = class {
7227
7227
  };
7228
7228
 
7229
7229
  // src/version.ts
7230
- var VERSION = true ? "4.0.0-canary.45" : "0.0.0-test";
7230
+ var VERSION = true ? "4.0.0-canary.46" : "0.0.0-test";
7231
7231
 
7232
7232
  // src/openai-provider.ts
7233
7233
  function createOpenAI(options = {}) {