@ai-sdk/openai 3.0.133 → 3.0.134

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.
@@ -7021,7 +7021,7 @@ var OpenAIResponsesLanguageModel = class {
7021
7021
  toolName: toolNameMapping.toCustomToolName(
7022
7022
  webSearchToolName != null ? webSearchToolName : "web_search"
7023
7023
  ),
7024
- result: mapWebSearchOutput(part.action)
7024
+ ...mapWebSearchResult(part)
7025
7025
  });
7026
7026
  break;
7027
7027
  }
@@ -7625,7 +7625,7 @@ var OpenAIResponsesLanguageModel = class {
7625
7625
  toolName: toolNameMapping.toCustomToolName(
7626
7626
  webSearchToolName != null ? webSearchToolName : "web_search"
7627
7627
  ),
7628
- result: mapWebSearchOutput(value.item.action)
7628
+ ...mapWebSearchResult(value.item)
7629
7629
  });
7630
7630
  } else if (value.item.type === "computer_call") {
7631
7631
  ongoingToolCalls[value.output_index] = void 0;
@@ -8307,6 +8307,12 @@ function isErrorChunk(chunk) {
8307
8307
  function isResponseOutputChunk(chunk) {
8308
8308
  return !(chunk.type === "response.created" || chunk.type === "response.failed" || chunk.type === "error" || chunk.type === "unknown_chunk");
8309
8309
  }
8310
+ function mapWebSearchResult({
8311
+ action,
8312
+ status
8313
+ }) {
8314
+ return status === "completed" ? { result: mapWebSearchOutput(action) } : { isError: true, result: { status } };
8315
+ }
8310
8316
  function mapWebSearchOutput(action) {
8311
8317
  var _a2;
8312
8318
  if (action == null) {
@@ -8364,6 +8370,7 @@ export {
8364
8370
  imageGeneration,
8365
8371
  imageGenerationArgsSchema,
8366
8372
  imageGenerationOutputSchema,
8373
+ mapWebSearchResult,
8367
8374
  modelMaxImagesPerCall,
8368
8375
  openAITranscriptionModelOptions,
8369
8376
  openaiEmbeddingModelOptions,