@ai-sdk/openai 3.0.92 → 3.0.93

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/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @ai-sdk/openai
2
2
 
3
+ ## 3.0.93
4
+
5
+ ### Patch Changes
6
+
7
+ - f471a1c: Accept `serviceTier: 'fast'` on OpenAI chat and responses models. OpenAI renamed priority processing to Fast mode and accepts `service_tier: 'fast'` and `'priority'` interchangeably, so `'fast'` is now passed through verbatim and gated on the same model capability as `'priority'`.
8
+ - Updated dependencies [2171d15]
9
+ - @ai-sdk/provider@3.0.15
10
+ - @ai-sdk/provider-utils@4.0.44
11
+
3
12
  ## 3.0.92
4
13
 
5
14
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -14,7 +14,7 @@ declare const openaiLanguageModelChatOptions: _ai_sdk_provider_utils.LazySchema<
14
14
  store?: boolean | undefined;
15
15
  metadata?: Record<string, string> | undefined;
16
16
  prediction?: Record<string, any> | undefined;
17
- serviceTier?: "default" | "auto" | "flex" | "priority" | undefined;
17
+ serviceTier?: "default" | "auto" | "flex" | "priority" | "fast" | undefined;
18
18
  strictJsonSchema?: boolean | undefined;
19
19
  textVerbosity?: "low" | "medium" | "high" | undefined;
20
20
  promptCacheKey?: string | undefined;
@@ -1096,7 +1096,7 @@ declare const openaiLanguageModelResponsesOptionsSchema: _ai_sdk_provider_utils.
1096
1096
  reasoningContext?: "auto" | "current_turn" | "all_turns" | undefined;
1097
1097
  reasoningSummary?: string | null | undefined;
1098
1098
  safetyIdentifier?: string | null | undefined;
1099
- serviceTier?: "default" | "auto" | "flex" | "priority" | null | undefined;
1099
+ serviceTier?: "default" | "auto" | "flex" | "priority" | "fast" | null | undefined;
1100
1100
  store?: boolean | null | undefined;
1101
1101
  passThroughUnsupportedFiles?: boolean | undefined;
1102
1102
  strictJsonSchema?: boolean | null | undefined;
package/dist/index.d.ts CHANGED
@@ -14,7 +14,7 @@ declare const openaiLanguageModelChatOptions: _ai_sdk_provider_utils.LazySchema<
14
14
  store?: boolean | undefined;
15
15
  metadata?: Record<string, string> | undefined;
16
16
  prediction?: Record<string, any> | undefined;
17
- serviceTier?: "default" | "auto" | "flex" | "priority" | undefined;
17
+ serviceTier?: "default" | "auto" | "flex" | "priority" | "fast" | undefined;
18
18
  strictJsonSchema?: boolean | undefined;
19
19
  textVerbosity?: "low" | "medium" | "high" | undefined;
20
20
  promptCacheKey?: string | undefined;
@@ -1096,7 +1096,7 @@ declare const openaiLanguageModelResponsesOptionsSchema: _ai_sdk_provider_utils.
1096
1096
  reasoningContext?: "auto" | "current_turn" | "all_turns" | undefined;
1097
1097
  reasoningSummary?: string | null | undefined;
1098
1098
  safetyIdentifier?: string | null | undefined;
1099
- serviceTier?: "default" | "auto" | "flex" | "priority" | null | undefined;
1099
+ serviceTier?: "default" | "auto" | "flex" | "priority" | "fast" | null | undefined;
1100
1100
  store?: boolean | null | undefined;
1101
1101
  passThroughUnsupportedFiles?: boolean | undefined;
1102
1102
  strictJsonSchema?: boolean | null | undefined;
package/dist/index.js CHANGED
@@ -739,11 +739,12 @@ var openaiLanguageModelChatOptions = (0, import_provider_utils4.lazySchema)(
739
739
  * Project settings. Unless otherwise configured, the Project will use 'default'.
740
740
  * - 'flex': 50% cheaper processing at the cost of increased latency. Only available for o3 and o4-mini models.
741
741
  * - 'priority': Higher-speed processing with predictably low latency at premium cost. Available for Enterprise customers.
742
+ * - 'fast': OpenAI's newer name for the 'priority' tier. Interchangeable with it.
742
743
  * - 'default': The request will be processed with the standard pricing and performance for the selected model.
743
744
  *
744
745
  * @default 'auto'
745
746
  */
746
- serviceTier: import_v43.z.enum(["auto", "flex", "priority", "default"]).optional(),
747
+ serviceTier: import_v43.z.enum(["auto", "flex", "priority", "fast", "default"]).optional(),
747
748
  /**
748
749
  * Whether to use strict JSON schema validation.
749
750
  *
@@ -1043,7 +1044,7 @@ var OpenAIChatLanguageModel = class {
1043
1044
  });
1044
1045
  baseArgs.service_tier = void 0;
1045
1046
  }
1046
- if (openaiOptions.serviceTier === "priority" && !modelCapabilities.supportsPriorityProcessing) {
1047
+ if ((openaiOptions.serviceTier === "priority" || openaiOptions.serviceTier === "fast") && !modelCapabilities.supportsPriorityProcessing) {
1047
1048
  warnings.push({
1048
1049
  type: "unsupported",
1049
1050
  feature: "serviceTier",
@@ -4798,10 +4799,11 @@ var openaiLanguageModelResponsesOptionsSchema = (0, import_provider_utils28.lazy
4798
4799
  * Service tier for the request.
4799
4800
  * Set to 'flex' for 50% cheaper processing at the cost of increased latency (available for o3, o4-mini, and gpt-5 models).
4800
4801
  * 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).
4802
+ * Set to 'fast' for the same tier as 'priority' (OpenAI's newer name for it).
4801
4803
  *
4802
4804
  * Defaults to 'auto'.
4803
4805
  */
4804
- serviceTier: import_v423.z.enum(["auto", "flex", "priority", "default"]).nullish(),
4806
+ serviceTier: import_v423.z.enum(["auto", "flex", "priority", "fast", "default"]).nullish(),
4805
4807
  /**
4806
4808
  * Whether to store the generation. Defaults to `true`.
4807
4809
  */
@@ -5468,7 +5470,7 @@ var OpenAIResponsesLanguageModel = class {
5468
5470
  });
5469
5471
  delete baseArgs.service_tier;
5470
5472
  }
5471
- if ((openaiOptions == null ? void 0 : openaiOptions.serviceTier) === "priority" && !modelCapabilities.supportsPriorityProcessing) {
5473
+ if (((openaiOptions == null ? void 0 : openaiOptions.serviceTier) === "priority" || (openaiOptions == null ? void 0 : openaiOptions.serviceTier) === "fast") && !modelCapabilities.supportsPriorityProcessing) {
5472
5474
  warnings.push({
5473
5475
  type: "unsupported",
5474
5476
  feature: "serviceTier",
@@ -7353,7 +7355,7 @@ var OpenAITranscriptionModel = class {
7353
7355
  };
7354
7356
 
7355
7357
  // src/version.ts
7356
- var VERSION = true ? "3.0.92" : "0.0.0-test";
7358
+ var VERSION = true ? "3.0.93" : "0.0.0-test";
7357
7359
 
7358
7360
  // src/openai-provider.ts
7359
7361
  function createOpenAI(options = {}) {