@ai-sdk/openai 3.0.133 → 3.0.135
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.d.mts +232 -216
- package/dist/internal/index.d.ts +232 -216
- package/dist/internal/index.js +10 -2
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +9 -2
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +5 -5
- package/src/responses/openai-responses-language-model.ts +16 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @ai-sdk/openai
|
|
2
2
|
|
|
3
|
+
## 3.0.135
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [28252da]
|
|
8
|
+
- @ai-sdk/provider-utils@4.0.63
|
|
9
|
+
|
|
10
|
+
## 3.0.134
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- 84a2231: fix(openai): report unfinished web searches as tool errors
|
|
15
|
+
- 84a2231: Report failed and incomplete web searches as tool errors instead of successful tool results in OpenAI Responses API calls.
|
|
16
|
+
|
|
3
17
|
## 3.0.133
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -6657,7 +6657,7 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
6657
6657
|
toolName: toolNameMapping.toCustomToolName(
|
|
6658
6658
|
webSearchToolName != null ? webSearchToolName : "web_search"
|
|
6659
6659
|
),
|
|
6660
|
-
|
|
6660
|
+
...mapWebSearchResult(part)
|
|
6661
6661
|
});
|
|
6662
6662
|
break;
|
|
6663
6663
|
}
|
|
@@ -7261,7 +7261,7 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
7261
7261
|
toolName: toolNameMapping.toCustomToolName(
|
|
7262
7262
|
webSearchToolName != null ? webSearchToolName : "web_search"
|
|
7263
7263
|
),
|
|
7264
|
-
|
|
7264
|
+
...mapWebSearchResult(value.item)
|
|
7265
7265
|
});
|
|
7266
7266
|
} else if (value.item.type === "computer_call") {
|
|
7267
7267
|
ongoingToolCalls[value.output_index] = void 0;
|
|
@@ -7943,6 +7943,12 @@ function isErrorChunk(chunk) {
|
|
|
7943
7943
|
function isResponseOutputChunk(chunk) {
|
|
7944
7944
|
return !(chunk.type === "response.created" || chunk.type === "response.failed" || chunk.type === "error" || chunk.type === "unknown_chunk");
|
|
7945
7945
|
}
|
|
7946
|
+
function mapWebSearchResult({
|
|
7947
|
+
action,
|
|
7948
|
+
status
|
|
7949
|
+
}) {
|
|
7950
|
+
return status === "completed" ? { result: mapWebSearchOutput(action) } : { isError: true, result: { status } };
|
|
7951
|
+
}
|
|
7946
7952
|
function mapWebSearchOutput(action) {
|
|
7947
7953
|
var _a2;
|
|
7948
7954
|
if (action == null) {
|
|
@@ -8334,7 +8340,7 @@ var OpenAITranscriptionModel = class {
|
|
|
8334
8340
|
};
|
|
8335
8341
|
|
|
8336
8342
|
// src/version.ts
|
|
8337
|
-
var VERSION = true ? "3.0.
|
|
8343
|
+
var VERSION = true ? "3.0.135" : "0.0.0-test";
|
|
8338
8344
|
|
|
8339
8345
|
// src/openai-provider.ts
|
|
8340
8346
|
function createOpenAI(options = {}) {
|