@ai-sdk/openai 3.0.0-beta.69 → 3.0.0-beta.71

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.
@@ -528,7 +528,10 @@ function prepareChatTools({
528
528
  });
529
529
  break;
530
530
  default:
531
- toolWarnings.push({ type: "unsupported-tool", tool });
531
+ toolWarnings.push({
532
+ type: "unsupported",
533
+ feature: `tool type: ${tool.type}`
534
+ });
532
535
  break;
533
536
  }
534
537
  }
@@ -598,15 +601,12 @@ var OpenAIChatLanguageModel = class {
598
601
  })) != null ? _a : {};
599
602
  const structuredOutputs = (_b = openaiOptions.structuredOutputs) != null ? _b : true;
600
603
  if (topK != null) {
601
- warnings.push({
602
- type: "unsupported-setting",
603
- setting: "topK"
604
- });
604
+ warnings.push({ type: "unsupported", feature: "topK" });
605
605
  }
606
606
  if ((responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null && !structuredOutputs) {
607
607
  warnings.push({
608
- type: "unsupported-setting",
609
- setting: "responseFormat",
608
+ type: "unsupported",
609
+ feature: "responseFormat",
610
610
  details: "JSON response format schema is only supported with structuredOutputs"
611
611
  });
612
612
  }
@@ -663,32 +663,32 @@ var OpenAIChatLanguageModel = class {
663
663
  if (baseArgs.temperature != null) {
664
664
  baseArgs.temperature = void 0;
665
665
  warnings.push({
666
- type: "unsupported-setting",
667
- setting: "temperature",
666
+ type: "unsupported",
667
+ feature: "temperature",
668
668
  details: "temperature is not supported for reasoning models"
669
669
  });
670
670
  }
671
671
  if (baseArgs.top_p != null) {
672
672
  baseArgs.top_p = void 0;
673
673
  warnings.push({
674
- type: "unsupported-setting",
675
- setting: "topP",
674
+ type: "unsupported",
675
+ feature: "topP",
676
676
  details: "topP is not supported for reasoning models"
677
677
  });
678
678
  }
679
679
  if (baseArgs.frequency_penalty != null) {
680
680
  baseArgs.frequency_penalty = void 0;
681
681
  warnings.push({
682
- type: "unsupported-setting",
683
- setting: "frequencyPenalty",
682
+ type: "unsupported",
683
+ feature: "frequencyPenalty",
684
684
  details: "frequencyPenalty is not supported for reasoning models"
685
685
  });
686
686
  }
687
687
  if (baseArgs.presence_penalty != null) {
688
688
  baseArgs.presence_penalty = void 0;
689
689
  warnings.push({
690
- type: "unsupported-setting",
691
- setting: "presencePenalty",
690
+ type: "unsupported",
691
+ feature: "presencePenalty",
692
692
  details: "presencePenalty is not supported for reasoning models"
693
693
  });
694
694
  }
@@ -723,24 +723,24 @@ var OpenAIChatLanguageModel = class {
723
723
  if (baseArgs.temperature != null) {
724
724
  baseArgs.temperature = void 0;
725
725
  warnings.push({
726
- type: "unsupported-setting",
727
- setting: "temperature",
726
+ type: "unsupported",
727
+ feature: "temperature",
728
728
  details: "temperature is not supported for the search preview models and has been removed."
729
729
  });
730
730
  }
731
731
  }
732
732
  if (openaiOptions.serviceTier === "flex" && !supportsFlexProcessing(this.modelId)) {
733
733
  warnings.push({
734
- type: "unsupported-setting",
735
- setting: "serviceTier",
734
+ type: "unsupported",
735
+ feature: "serviceTier",
736
736
  details: "flex processing is only available for o3, o4-mini, and gpt-5 models"
737
737
  });
738
738
  baseArgs.service_tier = void 0;
739
739
  }
740
740
  if (openaiOptions.serviceTier === "priority" && !supportsPriorityProcessing(this.modelId)) {
741
741
  warnings.push({
742
- type: "unsupported-setting",
743
- setting: "serviceTier",
742
+ type: "unsupported",
743
+ feature: "serviceTier",
744
744
  details: "priority processing is only available for supported models (gpt-4, gpt-5, gpt-5-mini, o3, o4-mini) and requires Enterprise access. gpt-5-nano is not supported"
745
745
  });
746
746
  baseArgs.service_tier = void 0;
@@ -1336,18 +1336,18 @@ var OpenAICompletionLanguageModel = class {
1336
1336
  })
1337
1337
  };
1338
1338
  if (topK != null) {
1339
- warnings.push({ type: "unsupported-setting", setting: "topK" });
1339
+ warnings.push({ type: "unsupported", feature: "topK" });
1340
1340
  }
1341
1341
  if (tools == null ? void 0 : tools.length) {
1342
- warnings.push({ type: "unsupported-setting", setting: "tools" });
1342
+ warnings.push({ type: "unsupported", feature: "tools" });
1343
1343
  }
1344
1344
  if (toolChoice != null) {
1345
- warnings.push({ type: "unsupported-setting", setting: "toolChoice" });
1345
+ warnings.push({ type: "unsupported", feature: "toolChoice" });
1346
1346
  }
1347
1347
  if (responseFormat != null && responseFormat.type !== "text") {
1348
1348
  warnings.push({
1349
- type: "unsupported-setting",
1350
- setting: "responseFormat",
1349
+ type: "unsupported",
1350
+ feature: "responseFormat",
1351
1351
  details: "JSON response format is not supported."
1352
1352
  });
1353
1353
  }
@@ -1700,13 +1700,13 @@ var OpenAIImageModel = class {
1700
1700
  const warnings = [];
1701
1701
  if (aspectRatio != null) {
1702
1702
  warnings.push({
1703
- type: "unsupported-setting",
1704
- setting: "aspectRatio",
1703
+ type: "unsupported",
1704
+ feature: "aspectRatio",
1705
1705
  details: "This model does not support aspect ratio. Use `size` instead."
1706
1706
  });
1707
1707
  }
1708
1708
  if (seed != null) {
1709
- warnings.push({ type: "unsupported-setting", setting: "seed" });
1709
+ warnings.push({ type: "unsupported", feature: "seed" });
1710
1710
  }
1711
1711
  const currentDate = (_c = (_b = (_a = this.config._internal) == null ? void 0 : _a.currentDate) == null ? void 0 : _b.call(_a)) != null ? _c : /* @__PURE__ */ new Date();
1712
1712
  const { value: response, responseHeaders } = await postJsonToApi4({
@@ -2057,8 +2057,8 @@ var OpenAISpeechModel = class {
2057
2057
  requestBody.response_format = outputFormat;
2058
2058
  } else {
2059
2059
  warnings.push({
2060
- type: "unsupported-setting",
2061
- setting: "outputFormat",
2060
+ type: "unsupported",
2061
+ feature: "outputFormat",
2062
2062
  details: `Unsupported output format: ${outputFormat}. Using mp3 instead.`
2063
2063
  });
2064
2064
  }
@@ -2074,8 +2074,8 @@ var OpenAISpeechModel = class {
2074
2074
  }
2075
2075
  if (language) {
2076
2076
  warnings.push({
2077
- type: "unsupported-setting",
2078
- setting: "language",
2077
+ type: "unsupported",
2078
+ feature: "language",
2079
2079
  details: `OpenAI speech models do not support language selection. Language parameter "${language}" was ignored.`
2080
2080
  });
2081
2081
  }
@@ -3685,7 +3685,10 @@ async function prepareResponsesTools({
3685
3685
  break;
3686
3686
  }
3687
3687
  default:
3688
- toolWarnings.push({ type: "unsupported-tool", tool });
3688
+ toolWarnings.push({
3689
+ type: "unsupported",
3690
+ feature: `function tool ${tool}`
3691
+ });
3689
3692
  break;
3690
3693
  }
3691
3694
  }
@@ -3746,25 +3749,19 @@ var OpenAIResponsesLanguageModel = class {
3746
3749
  const warnings = [];
3747
3750
  const modelConfig = getResponsesModelConfig(this.modelId);
3748
3751
  if (topK != null) {
3749
- warnings.push({ type: "unsupported-setting", setting: "topK" });
3752
+ warnings.push({ type: "unsupported", feature: "topK" });
3750
3753
  }
3751
3754
  if (seed != null) {
3752
- warnings.push({ type: "unsupported-setting", setting: "seed" });
3755
+ warnings.push({ type: "unsupported", feature: "seed" });
3753
3756
  }
3754
3757
  if (presencePenalty != null) {
3755
- warnings.push({
3756
- type: "unsupported-setting",
3757
- setting: "presencePenalty"
3758
- });
3758
+ warnings.push({ type: "unsupported", feature: "presencePenalty" });
3759
3759
  }
3760
3760
  if (frequencyPenalty != null) {
3761
- warnings.push({
3762
- type: "unsupported-setting",
3763
- setting: "frequencyPenalty"
3764
- });
3761
+ warnings.push({ type: "unsupported", feature: "frequencyPenalty" });
3765
3762
  }
3766
3763
  if (stopSequences != null) {
3767
- warnings.push({ type: "unsupported-setting", setting: "stopSequences" });
3764
+ warnings.push({ type: "unsupported", feature: "stopSequences" });
3768
3765
  }
3769
3766
  const openaiOptions = await parseProviderOptions7({
3770
3767
  provider: "openai",
@@ -3773,8 +3770,8 @@ var OpenAIResponsesLanguageModel = class {
3773
3770
  });
3774
3771
  if ((openaiOptions == null ? void 0 : openaiOptions.conversation) && (openaiOptions == null ? void 0 : openaiOptions.previousResponseId)) {
3775
3772
  warnings.push({
3776
- type: "unsupported-setting",
3777
- setting: "conversation",
3773
+ type: "unsupported",
3774
+ feature: "conversation",
3778
3775
  details: "conversation and previousResponseId cannot be used together"
3779
3776
  });
3780
3777
  }
@@ -3871,47 +3868,47 @@ var OpenAIResponsesLanguageModel = class {
3871
3868
  if (baseArgs.temperature != null) {
3872
3869
  baseArgs.temperature = void 0;
3873
3870
  warnings.push({
3874
- type: "unsupported-setting",
3875
- setting: "temperature",
3871
+ type: "unsupported",
3872
+ feature: "temperature",
3876
3873
  details: "temperature is not supported for reasoning models"
3877
3874
  });
3878
3875
  }
3879
3876
  if (baseArgs.top_p != null) {
3880
3877
  baseArgs.top_p = void 0;
3881
3878
  warnings.push({
3882
- type: "unsupported-setting",
3883
- setting: "topP",
3879
+ type: "unsupported",
3880
+ feature: "topP",
3884
3881
  details: "topP is not supported for reasoning models"
3885
3882
  });
3886
3883
  }
3887
3884
  } else {
3888
3885
  if ((openaiOptions == null ? void 0 : openaiOptions.reasoningEffort) != null) {
3889
3886
  warnings.push({
3890
- type: "unsupported-setting",
3891
- setting: "reasoningEffort",
3887
+ type: "unsupported",
3888
+ feature: "reasoningEffort",
3892
3889
  details: "reasoningEffort is not supported for non-reasoning models"
3893
3890
  });
3894
3891
  }
3895
3892
  if ((openaiOptions == null ? void 0 : openaiOptions.reasoningSummary) != null) {
3896
3893
  warnings.push({
3897
- type: "unsupported-setting",
3898
- setting: "reasoningSummary",
3894
+ type: "unsupported",
3895
+ feature: "reasoningSummary",
3899
3896
  details: "reasoningSummary is not supported for non-reasoning models"
3900
3897
  });
3901
3898
  }
3902
3899
  }
3903
3900
  if ((openaiOptions == null ? void 0 : openaiOptions.serviceTier) === "flex" && !modelConfig.supportsFlexProcessing) {
3904
3901
  warnings.push({
3905
- type: "unsupported-setting",
3906
- setting: "serviceTier",
3902
+ type: "unsupported",
3903
+ feature: "serviceTier",
3907
3904
  details: "flex processing is only available for o3, o4-mini, and gpt-5 models"
3908
3905
  });
3909
3906
  delete baseArgs.service_tier;
3910
3907
  }
3911
3908
  if ((openaiOptions == null ? void 0 : openaiOptions.serviceTier) === "priority" && !modelConfig.supportsPriorityProcessing) {
3912
3909
  warnings.push({
3913
- type: "unsupported-setting",
3914
- setting: "serviceTier",
3910
+ type: "unsupported",
3911
+ feature: "serviceTier",
3915
3912
  details: "priority processing is only available for supported models (gpt-4, gpt-5, gpt-5-mini, o3, o4-mini) and requires Enterprise access. gpt-5-nano is not supported"
3916
3913
  });
3917
3914
  delete baseArgs.service_tier;