@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/dist/index.mjs CHANGED
@@ -6772,7 +6772,7 @@ var OpenAIResponsesLanguageModel = class {
6772
6772
  toolName: toolNameMapping.toCustomToolName(
6773
6773
  webSearchToolName != null ? webSearchToolName : "web_search"
6774
6774
  ),
6775
- result: mapWebSearchOutput(part.action)
6775
+ ...mapWebSearchResult(part)
6776
6776
  });
6777
6777
  break;
6778
6778
  }
@@ -7376,7 +7376,7 @@ var OpenAIResponsesLanguageModel = class {
7376
7376
  toolName: toolNameMapping.toCustomToolName(
7377
7377
  webSearchToolName != null ? webSearchToolName : "web_search"
7378
7378
  ),
7379
- result: mapWebSearchOutput(value.item.action)
7379
+ ...mapWebSearchResult(value.item)
7380
7380
  });
7381
7381
  } else if (value.item.type === "computer_call") {
7382
7382
  ongoingToolCalls[value.output_index] = void 0;
@@ -8058,6 +8058,12 @@ function isErrorChunk(chunk) {
8058
8058
  function isResponseOutputChunk(chunk) {
8059
8059
  return !(chunk.type === "response.created" || chunk.type === "response.failed" || chunk.type === "error" || chunk.type === "unknown_chunk");
8060
8060
  }
8061
+ function mapWebSearchResult({
8062
+ action,
8063
+ status
8064
+ }) {
8065
+ return status === "completed" ? { result: mapWebSearchOutput(action) } : { isError: true, result: { status } };
8066
+ }
8061
8067
  function mapWebSearchOutput(action) {
8062
8068
  var _a2;
8063
8069
  if (action == null) {
@@ -8467,7 +8473,7 @@ var OpenAITranscriptionModel = class {
8467
8473
  };
8468
8474
 
8469
8475
  // src/version.ts
8470
- var VERSION = true ? "3.0.133" : "0.0.0-test";
8476
+ var VERSION = true ? "3.0.135" : "0.0.0-test";
8471
8477
 
8472
8478
  // src/openai-provider.ts
8473
8479
  function createOpenAI(options = {}) {