@ai-sdk/openai 3.0.92 → 3.0.94

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.
@@ -725,11 +725,12 @@ var openaiLanguageModelChatOptions = lazySchema2(
725
725
  * Project settings. Unless otherwise configured, the Project will use 'default'.
726
726
  * - 'flex': 50% cheaper processing at the cost of increased latency. Only available for o3 and o4-mini models.
727
727
  * - 'priority': Higher-speed processing with predictably low latency at premium cost. Available for Enterprise customers.
728
+ * - 'fast': OpenAI's newer name for the 'priority' tier. Interchangeable with it.
728
729
  * - 'default': The request will be processed with the standard pricing and performance for the selected model.
729
730
  *
730
731
  * @default 'auto'
731
732
  */
732
- serviceTier: z3.enum(["auto", "flex", "priority", "default"]).optional(),
733
+ serviceTier: z3.enum(["auto", "flex", "priority", "fast", "default"]).optional(),
733
734
  /**
734
735
  * Whether to use strict JSON schema validation.
735
736
  *
@@ -1031,7 +1032,7 @@ var OpenAIChatLanguageModel = class {
1031
1032
  });
1032
1033
  baseArgs.service_tier = void 0;
1033
1034
  }
1034
- if (openaiOptions.serviceTier === "priority" && !modelCapabilities.supportsPriorityProcessing) {
1035
+ if ((openaiOptions.serviceTier === "priority" || openaiOptions.serviceTier === "fast") && !modelCapabilities.supportsPriorityProcessing) {
1035
1036
  warnings.push({
1036
1037
  type: "unsupported",
1037
1038
  feature: "serviceTier",
@@ -3178,10 +3179,10 @@ async function convertToOpenAIResponsesInput({
3178
3179
  }
3179
3180
  break;
3180
3181
  }
3181
- if (hasPreviousResponseId && store && id != null) {
3182
+ const isProviderDefinedToolCall = hasLocalShellTool && resolvedToolName === "local_shell" || hasShellTool && resolvedToolName === "shell" || hasApplyPatchTool && resolvedToolName === "apply_patch" || ((_m = customProviderToolNames == null ? void 0 : customProviderToolNames.has(resolvedToolName)) != null ? _m : false);
3183
+ if (hasPreviousResponseId && store && id != null && isProviderDefinedToolCall) {
3182
3184
  break;
3183
3185
  }
3184
- const isProviderDefinedToolCall = hasLocalShellTool && resolvedToolName === "local_shell" || hasShellTool && resolvedToolName === "shell" || hasApplyPatchTool && resolvedToolName === "apply_patch" || ((_m = customProviderToolNames == null ? void 0 : customProviderToolNames.has(resolvedToolName)) != null ? _m : false);
3185
3186
  if (store && id != null && isProviderDefinedToolCall) {
3186
3187
  input.push({ type: "item_reference", id });
3187
3188
  break;
@@ -4792,10 +4793,11 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema17(
4792
4793
  * Service tier for the request.
4793
4794
  * Set to 'flex' for 50% cheaper processing at the cost of increased latency (available for o3, o4-mini, and gpt-5 models).
4794
4795
  * Set to 'priority' for faster processing with Enterprise access (available for gpt-4, gpt-5, gpt-5-mini, o3, o4-mini; gpt-5-nano is not supported).
4796
+ * Set to 'fast' for the same tier as 'priority' (OpenAI's newer name for it).
4795
4797
  *
4796
4798
  * Defaults to 'auto'.
4797
4799
  */
4798
- serviceTier: z19.enum(["auto", "flex", "priority", "default"]).nullish(),
4800
+ serviceTier: z19.enum(["auto", "flex", "priority", "fast", "default"]).nullish(),
4799
4801
  /**
4800
4802
  * Whether to store the generation. Defaults to `true`.
4801
4803
  */
@@ -5816,7 +5818,7 @@ var OpenAIResponsesLanguageModel = class {
5816
5818
  });
5817
5819
  delete baseArgs.service_tier;
5818
5820
  }
5819
- if ((openaiOptions == null ? void 0 : openaiOptions.serviceTier) === "priority" && !modelCapabilities.supportsPriorityProcessing) {
5821
+ if (((openaiOptions == null ? void 0 : openaiOptions.serviceTier) === "priority" || (openaiOptions == null ? void 0 : openaiOptions.serviceTier) === "fast") && !modelCapabilities.supportsPriorityProcessing) {
5820
5822
  warnings.push({
5821
5823
  type: "unsupported",
5822
5824
  feature: "serviceTier",