@ai-sdk/openai 3.0.0-beta.62 → 3.0.0-beta.63
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 +6 -0
- package/dist/index.js +18 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18 -7
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +17 -6
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +17 -6
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -4027,6 +4027,7 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
4027
4027
|
const logprobs = [];
|
|
4028
4028
|
let responseId = null;
|
|
4029
4029
|
const ongoingToolCalls = {};
|
|
4030
|
+
const ongoingAnnotations = [];
|
|
4030
4031
|
let hasFunctionCall = false;
|
|
4031
4032
|
const activeReasoning = {};
|
|
4032
4033
|
let serviceTier;
|
|
@@ -4135,6 +4136,7 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
4135
4136
|
providerExecuted: true
|
|
4136
4137
|
});
|
|
4137
4138
|
} else if (value.item.type === "message") {
|
|
4139
|
+
ongoingAnnotations.splice(0, ongoingAnnotations.length);
|
|
4138
4140
|
controller.enqueue({
|
|
4139
4141
|
type: "text-start",
|
|
4140
4142
|
id: value.item.id,
|
|
@@ -4160,7 +4162,7 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
4160
4162
|
}
|
|
4161
4163
|
});
|
|
4162
4164
|
}
|
|
4163
|
-
} else if (isResponseOutputItemDoneChunk(value)) {
|
|
4165
|
+
} else if (isResponseOutputItemDoneChunk(value) && value.item.type !== "message") {
|
|
4164
4166
|
if (value.item.type === "function_call") {
|
|
4165
4167
|
ongoingToolCalls[value.output_index] = void 0;
|
|
4166
4168
|
hasFunctionCall = true;
|
|
@@ -4315,11 +4317,6 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
4315
4317
|
openai: { itemId: value.item.id }
|
|
4316
4318
|
}
|
|
4317
4319
|
});
|
|
4318
|
-
} else if (value.item.type === "message") {
|
|
4319
|
-
controller.enqueue({
|
|
4320
|
-
type: "text-end",
|
|
4321
|
-
id: value.item.id
|
|
4322
|
-
});
|
|
4323
4320
|
} else if (value.item.type === "reasoning") {
|
|
4324
4321
|
const activeReasoningPart = activeReasoning[value.item.id];
|
|
4325
4322
|
const summaryPartIndices = Object.entries(
|
|
@@ -4476,6 +4473,7 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
4476
4473
|
serviceTier = value.response.service_tier;
|
|
4477
4474
|
}
|
|
4478
4475
|
} else if (isResponseAnnotationAddedChunk(value)) {
|
|
4476
|
+
ongoingAnnotations.push(value.annotation);
|
|
4479
4477
|
if (value.annotation.type === "url_citation") {
|
|
4480
4478
|
controller.enqueue({
|
|
4481
4479
|
type: "source",
|
|
@@ -4532,6 +4530,19 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
4532
4530
|
}
|
|
4533
4531
|
});
|
|
4534
4532
|
}
|
|
4533
|
+
} else if (isResponseOutputItemDoneChunk(value) && value.item.type === "message") {
|
|
4534
|
+
controller.enqueue({
|
|
4535
|
+
type: "text-end",
|
|
4536
|
+
id: value.item.id,
|
|
4537
|
+
providerMetadata: {
|
|
4538
|
+
openai: {
|
|
4539
|
+
itemId: value.item.id,
|
|
4540
|
+
...ongoingAnnotations.length > 0 && {
|
|
4541
|
+
annotations: ongoingAnnotations
|
|
4542
|
+
}
|
|
4543
|
+
}
|
|
4544
|
+
}
|
|
4545
|
+
});
|
|
4535
4546
|
} else if (isErrorChunk(value)) {
|
|
4536
4547
|
controller.enqueue({ type: "error", error: value });
|
|
4537
4548
|
}
|
|
@@ -4978,7 +4989,7 @@ var OpenAITranscriptionModel = class {
|
|
|
4978
4989
|
};
|
|
4979
4990
|
|
|
4980
4991
|
// src/version.ts
|
|
4981
|
-
var VERSION = true ? "3.0.0-beta.
|
|
4992
|
+
var VERSION = true ? "3.0.0-beta.63" : "0.0.0-test";
|
|
4982
4993
|
|
|
4983
4994
|
// src/openai-provider.ts
|
|
4984
4995
|
function createOpenAI(options = {}) {
|