@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/docs/index.mdx CHANGED
@@ -17,6 +17,7 @@ We provide detailed documentation for the following OpenAI compatible providers:
17
17
  - [Heroku](/providers/openai-compatible-providers/heroku)
18
18
  - [Clarifai](/providers/openai-compatible-providers/clarifai)
19
19
  - [NEAR AI Cloud](/providers/openai-compatible-providers/nearai)
20
+ - [Synthorai](/providers/openai-compatible-providers/synthorai)
20
21
 
21
22
  The general setup and provider instance creation is the same for all of these providers.
22
23
 
@@ -437,9 +438,11 @@ The following provider options are available for chat models via `providerOption
437
438
  A unique identifier representing your end-user, which can help the provider to
438
439
  monitor and detect abuse.
439
440
 
440
- - **reasoningEffort** _string_
441
+ - **reasoningEffort** _string | null_
441
442
 
442
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.
443
446
 
444
447
  - **textVerbosity** _string_
445
448
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/openai-compatible",
3
- "version": "2.0.87",
3
+ "version": "2.0.89",
4
4
  "license": "Apache-2.0",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",
@@ -37,7 +37,7 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "@ai-sdk/provider": "3.0.19",
40
- "@ai-sdk/provider-utils": "4.0.62"
40
+ "@ai-sdk/provider-utils": "4.0.63"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@types/node": "20.17.24",
@@ -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`.