@ai-sdk/openai 3.0.0-beta.18 → 3.0.0-beta.20

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.
@@ -14,7 +14,7 @@ declare const openaiChatLanguageModelOptions: _ai_sdk_provider_utils.LazyValidat
14
14
  metadata?: Record<string, string> | undefined;
15
15
  prediction?: Record<string, any> | undefined;
16
16
  structuredOutputs?: boolean | undefined;
17
- serviceTier?: "auto" | "flex" | "priority" | undefined;
17
+ serviceTier?: "default" | "auto" | "flex" | "priority" | undefined;
18
18
  strictJsonSchema?: boolean | undefined;
19
19
  textVerbosity?: "low" | "medium" | "high" | undefined;
20
20
  promptCacheKey?: string | undefined;
@@ -14,7 +14,7 @@ declare const openaiChatLanguageModelOptions: _ai_sdk_provider_utils.LazyValidat
14
14
  metadata?: Record<string, string> | undefined;
15
15
  prediction?: Record<string, any> | undefined;
16
16
  structuredOutputs?: boolean | undefined;
17
- serviceTier?: "auto" | "flex" | "priority" | undefined;
17
+ serviceTier?: "default" | "auto" | "flex" | "priority" | undefined;
18
18
  strictJsonSchema?: boolean | undefined;
19
19
  textVerbosity?: "low" | "medium" | "high" | undefined;
20
20
  promptCacheKey?: string | undefined;
@@ -491,13 +491,15 @@ var openaiChatLanguageModelOptions = (0, import_provider_utils4.lazyValidator)(
491
491
  structuredOutputs: z3.boolean().optional(),
492
492
  /**
493
493
  * Service tier for the request.
494
- * - 'auto': Default service tier
494
+ * - 'auto': Default service tier. The request will be processed with the service tier configured in the
495
+ * Project settings. Unless otherwise configured, the Project will use 'default'.
495
496
  * - 'flex': 50% cheaper processing at the cost of increased latency. Only available for o3 and o4-mini models.
496
497
  * - 'priority': Higher-speed processing with predictably low latency at premium cost. Available for Enterprise customers.
498
+ * - 'default': The request will be processed with the standard pricing and performance for the selected model.
497
499
  *
498
500
  * @default 'auto'
499
501
  */
500
- serviceTier: z3.enum(["auto", "flex", "priority"]).optional(),
502
+ serviceTier: z3.enum(["auto", "flex", "priority", "default"]).optional(),
501
503
  /**
502
504
  * Whether to use strict JSON schema validation.
503
505
  *
@@ -2396,11 +2398,29 @@ async function convertToOpenAIResponsesInput({
2396
2398
  case "execution-denied":
2397
2399
  contentValue = (_j = output.reason) != null ? _j : "Tool execution denied.";
2398
2400
  break;
2399
- case "content":
2400
2401
  case "json":
2401
2402
  case "error-json":
2402
2403
  contentValue = JSON.stringify(output.value);
2403
2404
  break;
2405
+ case "content":
2406
+ contentValue = output.value.map((item) => {
2407
+ switch (item.type) {
2408
+ case "text": {
2409
+ return { type: "input_text", text: item.text };
2410
+ }
2411
+ case "media": {
2412
+ return item.mediaType.startsWith("image/") ? {
2413
+ type: "input_image",
2414
+ image_url: `data:${item.mediaType};base64,${item.data}`
2415
+ } : {
2416
+ type: "input_file",
2417
+ filename: "data",
2418
+ file_data: `data:${item.mediaType};base64,${item.data}`
2419
+ };
2420
+ }
2421
+ }
2422
+ });
2423
+ break;
2404
2424
  }
2405
2425
  input.push({
2406
2426
  type: "function_call_output",
@@ -2961,7 +2981,7 @@ var openaiResponsesProviderOptionsSchema = (0, import_provider_utils22.lazyValid
2961
2981
  reasoningEffort: z15.string().nullish(),
2962
2982
  reasoningSummary: z15.string().nullish(),
2963
2983
  safetyIdentifier: z15.string().nullish(),
2964
- serviceTier: z15.enum(["auto", "flex", "priority"]).nullish(),
2984
+ serviceTier: z15.enum(["auto", "flex", "priority", "default"]).nullish(),
2965
2985
  store: z15.boolean().nullish(),
2966
2986
  strictJsonSchema: z15.boolean().nullish(),
2967
2987
  textVerbosity: z15.enum(["low", "medium", "high"]).nullish(),