@ai-sdk/openai 2.0.7 → 2.0.8
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 +7 -0
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -2
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +6 -0
- package/dist/internal/index.d.ts +6 -0
- package/dist/internal/index.js +8 -2
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +8 -2
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -9,6 +9,7 @@ declare const openaiProviderOptions: z.ZodObject<{
|
|
|
9
9
|
parallelToolCalls: z.ZodOptional<z.ZodBoolean>;
|
|
10
10
|
user: z.ZodOptional<z.ZodString>;
|
|
11
11
|
reasoningEffort: z.ZodOptional<z.ZodEnum<{
|
|
12
|
+
minimal: "minimal";
|
|
12
13
|
low: "low";
|
|
13
14
|
medium: "medium";
|
|
14
15
|
high: "high";
|
|
@@ -24,6 +25,11 @@ declare const openaiProviderOptions: z.ZodObject<{
|
|
|
24
25
|
priority: "priority";
|
|
25
26
|
}>>;
|
|
26
27
|
strictJsonSchema: z.ZodOptional<z.ZodBoolean>;
|
|
28
|
+
textVerbosity: z.ZodOptional<z.ZodEnum<{
|
|
29
|
+
low: "low";
|
|
30
|
+
medium: "medium";
|
|
31
|
+
high: "high";
|
|
32
|
+
}>>;
|
|
27
33
|
}, z.core.$strip>;
|
|
28
34
|
type OpenAIProviderOptions = z.infer<typeof openaiProviderOptions>;
|
|
29
35
|
|
package/dist/internal/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ declare const openaiProviderOptions: z.ZodObject<{
|
|
|
9
9
|
parallelToolCalls: z.ZodOptional<z.ZodBoolean>;
|
|
10
10
|
user: z.ZodOptional<z.ZodString>;
|
|
11
11
|
reasoningEffort: z.ZodOptional<z.ZodEnum<{
|
|
12
|
+
minimal: "minimal";
|
|
12
13
|
low: "low";
|
|
13
14
|
medium: "medium";
|
|
14
15
|
high: "high";
|
|
@@ -24,6 +25,11 @@ declare const openaiProviderOptions: z.ZodObject<{
|
|
|
24
25
|
priority: "priority";
|
|
25
26
|
}>>;
|
|
26
27
|
strictJsonSchema: z.ZodOptional<z.ZodBoolean>;
|
|
28
|
+
textVerbosity: z.ZodOptional<z.ZodEnum<{
|
|
29
|
+
low: "low";
|
|
30
|
+
medium: "medium";
|
|
31
|
+
high: "high";
|
|
32
|
+
}>>;
|
|
27
33
|
}, z.core.$strip>;
|
|
28
34
|
type OpenAIProviderOptions = z.infer<typeof openaiProviderOptions>;
|
|
29
35
|
|
package/dist/internal/index.js
CHANGED
|
@@ -281,7 +281,7 @@ var openaiProviderOptions = import_v4.z.object({
|
|
|
281
281
|
/**
|
|
282
282
|
* Reasoning effort for reasoning models. Defaults to `medium`.
|
|
283
283
|
*/
|
|
284
|
-
reasoningEffort: import_v4.z.enum(["low", "medium", "high"]).optional(),
|
|
284
|
+
reasoningEffort: import_v4.z.enum(["minimal", "low", "medium", "high"]).optional(),
|
|
285
285
|
/**
|
|
286
286
|
* Maximum number of completion tokens to generate. Useful for reasoning models.
|
|
287
287
|
*/
|
|
@@ -318,7 +318,12 @@ var openaiProviderOptions = import_v4.z.object({
|
|
|
318
318
|
*
|
|
319
319
|
* @default false
|
|
320
320
|
*/
|
|
321
|
-
strictJsonSchema: import_v4.z.boolean().optional()
|
|
321
|
+
strictJsonSchema: import_v4.z.boolean().optional(),
|
|
322
|
+
/**
|
|
323
|
+
* Controls the verbosity of the model's responses.
|
|
324
|
+
* Lower values will result in more concise responses, while higher values will result in more verbose responses.
|
|
325
|
+
*/
|
|
326
|
+
textVerbosity: import_v4.z.enum(["low", "medium", "high"]).optional()
|
|
322
327
|
});
|
|
323
328
|
|
|
324
329
|
// src/openai-error.ts
|
|
@@ -599,6 +604,7 @@ var OpenAIChatLanguageModel = class {
|
|
|
599
604
|
} : { type: "json_object" } : void 0,
|
|
600
605
|
stop: stopSequences,
|
|
601
606
|
seed,
|
|
607
|
+
verbosity: openaiOptions.textVerbosity,
|
|
602
608
|
// openai specific settings:
|
|
603
609
|
// TODO remove in next major version; we auto-map maxOutputTokens now
|
|
604
610
|
max_completion_tokens: openaiOptions.maxCompletionTokens,
|