@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/docs/index.mdx CHANGED
@@ -438,9 +438,11 @@ The following provider options are available for chat models via `providerOption
438
438
  A unique identifier representing your end-user, which can help the provider to
439
439
  monitor and detect abuse.
440
440
 
441
- - **reasoningEffort** _string_
441
+ - **reasoningEffort** _string | null_
442
442
 
443
443
  Reasoning effort for reasoning models. The exact values depend on the provider.
444
+ Set to `null` to send `"reasoning_effort": null` for providers that distinguish
445
+ an explicit `null` from an omitted field.
444
446
 
445
447
  - **textVerbosity** _string_
446
448
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/openai-compatible",
3
- "version": "2.0.88",
3
+ "version": "2.0.89",
4
4
  "license": "Apache-2.0",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",
@@ -275,7 +275,11 @@ export class OpenAICompatibleChatLanguageModel implements LanguageModelV3 {
275
275
  ),
276
276
  ),
277
277
 
278
- reasoning_effort: compatibleOptions.reasoningEffort,
278
+ // Preserve explicit null and avoid overwriting a raw reasoning_effort
279
+ // provider option when reasoningEffort is unset.
280
+ ...(compatibleOptions.reasoningEffort !== undefined
281
+ ? { reasoning_effort: compatibleOptions.reasoningEffort }
282
+ : {}),
279
283
  verbosity: compatibleOptions.textVerbosity,
280
284
 
281
285
  // messages:
@@ -11,8 +11,11 @@ export const openaiCompatibleLanguageModelChatOptions = z.object({
11
11
 
12
12
  /**
13
13
  * Reasoning effort for reasoning models. Defaults to `medium`.
14
+ *
15
+ * Set to `null` to send `"reasoning_effort": null`, for providers that treat
16
+ * an explicit `null` differently from an omitted field.
14
17
  */
15
- reasoningEffort: z.string().optional(),
18
+ reasoningEffort: z.string().nullish(),
16
19
 
17
20
  /**
18
21
  * Controls the verbosity of the generated text. Defaults to `medium`.