@ai-sdk/openai 2.0.7 → 2.0.9

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/dist/index.mjs CHANGED
@@ -261,7 +261,7 @@ var openaiProviderOptions = z.object({
261
261
  /**
262
262
  * Reasoning effort for reasoning models. Defaults to `medium`.
263
263
  */
264
- reasoningEffort: z.enum(["low", "medium", "high"]).optional(),
264
+ reasoningEffort: z.enum(["minimal", "low", "medium", "high"]).optional(),
265
265
  /**
266
266
  * Maximum number of completion tokens to generate. Useful for reasoning models.
267
267
  */
@@ -298,7 +298,12 @@ var openaiProviderOptions = z.object({
298
298
  *
299
299
  * @default false
300
300
  */
301
- strictJsonSchema: z.boolean().optional()
301
+ strictJsonSchema: z.boolean().optional(),
302
+ /**
303
+ * Controls the verbosity of the model's responses.
304
+ * Lower values will result in more concise responses, while higher values will result in more verbose responses.
305
+ */
306
+ textVerbosity: z.enum(["low", "medium", "high"]).optional()
302
307
  });
303
308
 
304
309
  // src/openai-error.ts
@@ -581,6 +586,7 @@ var OpenAIChatLanguageModel = class {
581
586
  } : { type: "json_object" } : void 0,
582
587
  stop: stopSequences,
583
588
  seed,
589
+ verbosity: openaiOptions.textVerbosity,
584
590
  // openai specific settings:
585
591
  // TODO remove in next major version; we auto-map maxOutputTokens now
586
592
  max_completion_tokens: openaiOptions.maxCompletionTokens,
@@ -2023,7 +2029,7 @@ async function convertToOpenAIResponsesMessages({
2023
2029
  return {
2024
2030
  type: "input_image",
2025
2031
  ...part.data instanceof URL ? { image_url: part.data.toString() } : typeof part.data === "string" && part.data.startsWith("file-") ? { file_id: part.data } : {
2026
- image_url: `data:${mediaType};base64,${part.data}`
2032
+ image_url: `data:${mediaType};base64,${convertToBase642(part.data)}`
2027
2033
  },
2028
2034
  detail: (_b2 = (_a2 = part.providerOptions) == null ? void 0 : _a2.openai) == null ? void 0 : _b2.imageDetail
2029
2035
  };