@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.
@@ -255,7 +255,7 @@ var openaiProviderOptions = z.object({
255
255
  /**
256
256
  * Reasoning effort for reasoning models. Defaults to `medium`.
257
257
  */
258
- reasoningEffort: z.enum(["low", "medium", "high"]).optional(),
258
+ reasoningEffort: z.enum(["minimal", "low", "medium", "high"]).optional(),
259
259
  /**
260
260
  * Maximum number of completion tokens to generate. Useful for reasoning models.
261
261
  */
@@ -292,7 +292,12 @@ var openaiProviderOptions = z.object({
292
292
  *
293
293
  * @default false
294
294
  */
295
- strictJsonSchema: z.boolean().optional()
295
+ strictJsonSchema: z.boolean().optional(),
296
+ /**
297
+ * Controls the verbosity of the model's responses.
298
+ * Lower values will result in more concise responses, while higher values will result in more verbose responses.
299
+ */
300
+ textVerbosity: z.enum(["low", "medium", "high"]).optional()
296
301
  });
297
302
 
298
303
  // src/openai-error.ts
@@ -575,6 +580,7 @@ var OpenAIChatLanguageModel = class {
575
580
  } : { type: "json_object" } : void 0,
576
581
  stop: stopSequences,
577
582
  seed,
583
+ verbosity: openaiOptions.textVerbosity,
578
584
  // openai specific settings:
579
585
  // TODO remove in next major version; we auto-map maxOutputTokens now
580
586
  max_completion_tokens: openaiOptions.maxCompletionTokens,
@@ -2123,7 +2129,7 @@ async function convertToOpenAIResponsesMessages({
2123
2129
  return {
2124
2130
  type: "input_image",
2125
2131
  ...part.data instanceof URL ? { image_url: part.data.toString() } : typeof part.data === "string" && part.data.startsWith("file-") ? { file_id: part.data } : {
2126
- image_url: `data:${mediaType};base64,${part.data}`
2132
+ image_url: `data:${mediaType};base64,${convertToBase642(part.data)}`
2127
2133
  },
2128
2134
  detail: (_b2 = (_a2 = part.providerOptions) == null ? void 0 : _a2.openai) == null ? void 0 : _b2.imageDetail
2129
2135
  };