@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.
@@ -13,7 +13,7 @@ declare const openaiLanguageModelChatOptions: _ai_sdk_provider_utils.LazySchema<
13
13
  store?: boolean | undefined;
14
14
  metadata?: Record<string, string> | undefined;
15
15
  prediction?: Record<string, any> | undefined;
16
- serviceTier?: "default" | "auto" | "flex" | "priority" | undefined;
16
+ serviceTier?: "default" | "auto" | "flex" | "priority" | "fast" | undefined;
17
17
  strictJsonSchema?: boolean | undefined;
18
18
  textVerbosity?: "low" | "medium" | "high" | undefined;
19
19
  promptCacheKey?: string | undefined;
@@ -13,7 +13,7 @@ declare const openaiLanguageModelChatOptions: _ai_sdk_provider_utils.LazySchema<
13
13
  store?: boolean | undefined;
14
14
  metadata?: Record<string, string> | undefined;
15
15
  prediction?: Record<string, any> | undefined;
16
- serviceTier?: "default" | "auto" | "flex" | "priority" | undefined;
16
+ serviceTier?: "default" | "auto" | "flex" | "priority" | "fast" | undefined;
17
17
  strictJsonSchema?: boolean | undefined;
18
18
  textVerbosity?: "low" | "medium" | "high" | undefined;
19
19
  promptCacheKey?: string | undefined;
@@ -774,11 +774,12 @@ var openaiLanguageModelChatOptions = (0, import_provider_utils4.lazySchema)(
774
774
  * Project settings. Unless otherwise configured, the Project will use 'default'.
775
775
  * - 'flex': 50% cheaper processing at the cost of increased latency. Only available for o3 and o4-mini models.
776
776
  * - 'priority': Higher-speed processing with predictably low latency at premium cost. Available for Enterprise customers.
777
+ * - 'fast': OpenAI's newer name for the 'priority' tier. Interchangeable with it.
777
778
  * - 'default': The request will be processed with the standard pricing and performance for the selected model.
778
779
  *
779
780
  * @default 'auto'
780
781
  */
781
- serviceTier: import_v43.z.enum(["auto", "flex", "priority", "default"]).optional(),
782
+ serviceTier: import_v43.z.enum(["auto", "flex", "priority", "fast", "default"]).optional(),
782
783
  /**
783
784
  * Whether to use strict JSON schema validation.
784
785
  *
@@ -1078,7 +1079,7 @@ var OpenAIChatLanguageModel = class {
1078
1079
  });
1079
1080
  baseArgs.service_tier = void 0;
1080
1081
  }
1081
- if (openaiOptions.serviceTier === "priority" && !modelCapabilities.supportsPriorityProcessing) {
1082
+ if ((openaiOptions.serviceTier === "priority" || openaiOptions.serviceTier === "fast") && !modelCapabilities.supportsPriorityProcessing) {
1082
1083
  warnings.push({
1083
1084
  type: "unsupported",
1084
1085
  feature: "serviceTier",
@@ -3136,10 +3137,10 @@ async function convertToOpenAIResponsesInput({
3136
3137
  }
3137
3138
  break;
3138
3139
  }
3139
- if (hasPreviousResponseId && store && id != null) {
3140
+ const isProviderDefinedToolCall = hasLocalShellTool && resolvedToolName === "local_shell" || hasShellTool && resolvedToolName === "shell" || hasApplyPatchTool && resolvedToolName === "apply_patch" || ((_m = customProviderToolNames == null ? void 0 : customProviderToolNames.has(resolvedToolName)) != null ? _m : false);
3141
+ if (hasPreviousResponseId && store && id != null && isProviderDefinedToolCall) {
3140
3142
  break;
3141
3143
  }
3142
- const isProviderDefinedToolCall = hasLocalShellTool && resolvedToolName === "local_shell" || hasShellTool && resolvedToolName === "shell" || hasApplyPatchTool && resolvedToolName === "apply_patch" || ((_m = customProviderToolNames == null ? void 0 : customProviderToolNames.has(resolvedToolName)) != null ? _m : false);
3143
3144
  if (store && id != null && isProviderDefinedToolCall) {
3144
3145
  input.push({ type: "item_reference", id });
3145
3146
  break;
@@ -4744,10 +4745,11 @@ var openaiLanguageModelResponsesOptionsSchema = (0, import_provider_utils26.lazy
4744
4745
  * Service tier for the request.
4745
4746
  * Set to 'flex' for 50% cheaper processing at the cost of increased latency (available for o3, o4-mini, and gpt-5 models).
4746
4747
  * 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).
4748
+ * Set to 'fast' for the same tier as 'priority' (OpenAI's newer name for it).
4747
4749
  *
4748
4750
  * Defaults to 'auto'.
4749
4751
  */
4750
- serviceTier: import_v419.z.enum(["auto", "flex", "priority", "default"]).nullish(),
4752
+ serviceTier: import_v419.z.enum(["auto", "flex", "priority", "fast", "default"]).nullish(),
4751
4753
  /**
4752
4754
  * Whether to store the generation. Defaults to `true`.
4753
4755
  */
@@ -5738,7 +5740,7 @@ var OpenAIResponsesLanguageModel = class {
5738
5740
  });
5739
5741
  delete baseArgs.service_tier;
5740
5742
  }
5741
- if ((openaiOptions == null ? void 0 : openaiOptions.serviceTier) === "priority" && !modelCapabilities.supportsPriorityProcessing) {
5743
+ if (((openaiOptions == null ? void 0 : openaiOptions.serviceTier) === "priority" || (openaiOptions == null ? void 0 : openaiOptions.serviceTier) === "fast") && !modelCapabilities.supportsPriorityProcessing) {
5742
5744
  warnings.push({
5743
5745
  type: "unsupported",
5744
5746
  feature: "serviceTier",