@ai-sdk/openai-compatible 2.0.88 → 2.0.89

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,11 @@
1
1
  # @ai-sdk/openai-compatible
2
2
 
3
+ ## 2.0.89
4
+
5
+ ### Patch Changes
6
+
7
+ - 03066cf: fix(openai-compatible): send `reasoningEffort: null` as `"reasoning_effort": null`, and stop an unset `reasoningEffort` from overwriting a raw `reasoning_effort` provider option
8
+
3
9
  ## 2.0.88
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -21,7 +21,7 @@ type ProviderErrorStructure<T> = {
21
21
  type OpenAICompatibleChatModelId = string;
22
22
  declare const openaiCompatibleLanguageModelChatOptions: z.ZodObject<{
23
23
  user: z.ZodOptional<z.ZodString>;
24
- reasoningEffort: z.ZodOptional<z.ZodString>;
24
+ reasoningEffort: z.ZodOptional<z.ZodNullable<z.ZodString>>;
25
25
  textVerbosity: z.ZodOptional<z.ZodString>;
26
26
  strictJsonSchema: z.ZodOptional<z.ZodBoolean>;
27
27
  }, z.core.$strip>;
package/dist/index.d.ts CHANGED
@@ -21,7 +21,7 @@ type ProviderErrorStructure<T> = {
21
21
  type OpenAICompatibleChatModelId = string;
22
22
  declare const openaiCompatibleLanguageModelChatOptions: z.ZodObject<{
23
23
  user: z.ZodOptional<z.ZodString>;
24
- reasoningEffort: z.ZodOptional<z.ZodString>;
24
+ reasoningEffort: z.ZodOptional<z.ZodNullable<z.ZodString>>;
25
25
  textVerbosity: z.ZodOptional<z.ZodString>;
26
26
  strictJsonSchema: z.ZodOptional<z.ZodBoolean>;
27
27
  }, z.core.$strip>;
package/dist/index.js CHANGED
@@ -343,8 +343,11 @@ var openaiCompatibleLanguageModelChatOptions = import_v42.z.object({
343
343
  user: import_v42.z.string().optional(),
344
344
  /**
345
345
  * Reasoning effort for reasoning models. Defaults to `medium`.
346
+ *
347
+ * Set to `null` to send `"reasoning_effort": null`, for providers that treat
348
+ * an explicit `null` differently from an omitted field.
346
349
  */
347
- reasoningEffort: import_v42.z.string().optional(),
350
+ reasoningEffort: import_v42.z.string().nullish(),
348
351
  /**
349
352
  * Controls the verbosity of the generated text. Defaults to `medium`.
350
353
  */
@@ -552,7 +555,9 @@ var OpenAICompatibleChatLanguageModel = class {
552
555
  ).includes(key)
553
556
  )
554
557
  ),
555
- reasoning_effort: compatibleOptions.reasoningEffort,
558
+ // Preserve explicit null and avoid overwriting a raw reasoning_effort
559
+ // provider option when reasoningEffort is unset.
560
+ ...compatibleOptions.reasoningEffort !== void 0 ? { reasoning_effort: compatibleOptions.reasoningEffort } : {},
556
561
  verbosity: compatibleOptions.textVerbosity,
557
562
  // messages:
558
563
  messages: convertToOpenAICompatibleChatMessages(prompt),
@@ -1780,7 +1785,7 @@ async function fileToBlob(file) {
1780
1785
  var import_provider_utils8 = require("@ai-sdk/provider-utils");
1781
1786
 
1782
1787
  // src/version.ts
1783
- var VERSION = true ? "2.0.88" : "0.0.0-test";
1788
+ var VERSION = true ? "2.0.89" : "0.0.0-test";
1784
1789
 
1785
1790
  // src/openai-compatible-provider.ts
1786
1791
  function createOpenAICompatible(options) {