@ai-sdk/openai 3.0.0-beta.68 → 3.0.0-beta.69

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
+ ## 3.0.0-beta.69
4
+
5
+ ### Patch Changes
6
+
7
+ - 1d0de66: refactoring(provider/openai): simplify code
8
+
3
9
  ## 3.0.0-beta.68
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -4166,8 +4166,21 @@ var OpenAIResponsesLanguageModel = class {
4166
4166
  }
4167
4167
  });
4168
4168
  }
4169
- } else if (isResponseOutputItemDoneChunk(value) && value.item.type !== "message") {
4170
- if (value.item.type === "function_call") {
4169
+ } else if (isResponseOutputItemDoneChunk(value)) {
4170
+ if (value.item.type === "message") {
4171
+ controller.enqueue({
4172
+ type: "text-end",
4173
+ id: value.item.id,
4174
+ providerMetadata: {
4175
+ [providerKey]: {
4176
+ itemId: value.item.id,
4177
+ ...ongoingAnnotations.length > 0 && {
4178
+ annotations: ongoingAnnotations
4179
+ }
4180
+ }
4181
+ }
4182
+ });
4183
+ } else if (value.item.type === "function_call") {
4171
4184
  ongoingToolCalls[value.output_index] = void 0;
4172
4185
  hasFunctionCall = true;
4173
4186
  controller.enqueue({
@@ -4536,19 +4549,6 @@ var OpenAIResponsesLanguageModel = class {
4536
4549
  }
4537
4550
  });
4538
4551
  }
4539
- } else if (isResponseOutputItemDoneChunk(value) && value.item.type === "message") {
4540
- controller.enqueue({
4541
- type: "text-end",
4542
- id: value.item.id,
4543
- providerMetadata: {
4544
- [providerKey]: {
4545
- itemId: value.item.id,
4546
- ...ongoingAnnotations.length > 0 && {
4547
- annotations: ongoingAnnotations
4548
- }
4549
- }
4550
- }
4551
- });
4552
4552
  } else if (isErrorChunk(value)) {
4553
4553
  controller.enqueue({ type: "error", error: value });
4554
4554
  }
@@ -4995,7 +4995,7 @@ var OpenAITranscriptionModel = class {
4995
4995
  };
4996
4996
 
4997
4997
  // src/version.ts
4998
- var VERSION = true ? "3.0.0-beta.68" : "0.0.0-test";
4998
+ var VERSION = true ? "3.0.0-beta.69" : "0.0.0-test";
4999
4999
 
5000
5000
  // src/openai-provider.ts
5001
5001
  function createOpenAI(options = {}) {