@ai-sdk/openai-compatible 2.0.87 → 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/dist/index.mjs CHANGED
@@ -330,8 +330,11 @@ var openaiCompatibleLanguageModelChatOptions = z2.object({
330
330
  user: z2.string().optional(),
331
331
  /**
332
332
  * Reasoning effort for reasoning models. Defaults to `medium`.
333
+ *
334
+ * Set to `null` to send `"reasoning_effort": null`, for providers that treat
335
+ * an explicit `null` differently from an omitted field.
333
336
  */
334
- reasoningEffort: z2.string().optional(),
337
+ reasoningEffort: z2.string().nullish(),
335
338
  /**
336
339
  * Controls the verbosity of the generated text. Defaults to `medium`.
337
340
  */
@@ -541,7 +544,9 @@ var OpenAICompatibleChatLanguageModel = class {
541
544
  ).includes(key)
542
545
  )
543
546
  ),
544
- reasoning_effort: compatibleOptions.reasoningEffort,
547
+ // Preserve explicit null and avoid overwriting a raw reasoning_effort
548
+ // provider option when reasoningEffort is unset.
549
+ ...compatibleOptions.reasoningEffort !== void 0 ? { reasoning_effort: compatibleOptions.reasoningEffort } : {},
545
550
  verbosity: compatibleOptions.textVerbosity,
546
551
  // messages:
547
552
  messages: convertToOpenAICompatibleChatMessages(prompt),
@@ -1816,7 +1821,7 @@ import {
1816
1821
  } from "@ai-sdk/provider-utils";
1817
1822
 
1818
1823
  // src/version.ts
1819
- var VERSION = true ? "2.0.87" : "0.0.0-test";
1824
+ var VERSION = true ? "2.0.89" : "0.0.0-test";
1820
1825
 
1821
1826
  // src/openai-compatible-provider.ts
1822
1827
  function createOpenAICompatible(options) {