@ai-sdk/openai 2.0.137 → 2.0.139
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 +14 -0
- package/dist/index.js +9 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -3
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +8 -2
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +8 -2
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -4249,7 +4249,7 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
4249
4249
|
type: "tool-result",
|
|
4250
4250
|
toolCallId: part.id,
|
|
4251
4251
|
toolName: webSearchToolName != null ? webSearchToolName : "web_search",
|
|
4252
|
-
|
|
4252
|
+
...mapWebSearchResult(part),
|
|
4253
4253
|
providerExecuted: true
|
|
4254
4254
|
});
|
|
4255
4255
|
break;
|
|
@@ -4581,7 +4581,7 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
4581
4581
|
type: "tool-result",
|
|
4582
4582
|
toolCallId: value.item.id,
|
|
4583
4583
|
toolName: webSearchToolName != null ? webSearchToolName : "web_search",
|
|
4584
|
-
|
|
4584
|
+
...mapWebSearchResult(value.item),
|
|
4585
4585
|
providerExecuted: true
|
|
4586
4586
|
});
|
|
4587
4587
|
} else if (value.item.type === "computer_call") {
|
|
@@ -4910,6 +4910,12 @@ function isResponseAnnotationAddedChunk(chunk) {
|
|
|
4910
4910
|
function isErrorChunk(chunk) {
|
|
4911
4911
|
return chunk.type === "error";
|
|
4912
4912
|
}
|
|
4913
|
+
function mapWebSearchResult({
|
|
4914
|
+
action,
|
|
4915
|
+
status
|
|
4916
|
+
}) {
|
|
4917
|
+
return status === "completed" ? { result: mapWebSearchOutput(action) } : { isError: true, result: { status } };
|
|
4918
|
+
}
|
|
4913
4919
|
function mapWebSearchOutput(action) {
|
|
4914
4920
|
var _a2;
|
|
4915
4921
|
if (action == null) {
|
|
@@ -5330,7 +5336,7 @@ var OpenAITranscriptionModel = class {
|
|
|
5330
5336
|
};
|
|
5331
5337
|
|
|
5332
5338
|
// src/version.ts
|
|
5333
|
-
var VERSION = true ? "2.0.
|
|
5339
|
+
var VERSION = true ? "2.0.139" : "0.0.0-test";
|
|
5334
5340
|
|
|
5335
5341
|
// src/openai-provider.ts
|
|
5336
5342
|
function createOpenAI(options = {}) {
|