@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 +6 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +8 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -3
- package/dist/index.mjs.map +1 -1
- package/docs/index.mdx +3 -1
- package/package.json +1 -1
- package/src/chat/openai-compatible-chat-language-model.ts +5 -1
- package/src/chat/openai-compatible-chat-options.ts +4 -1
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**
|
|
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
|
@@ -275,7 +275,11 @@ export class OpenAICompatibleChatLanguageModel implements LanguageModelV3 {
|
|
|
275
275
|
),
|
|
276
276
|
),
|
|
277
277
|
|
|
278
|
-
reasoning_effort
|
|
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().
|
|
18
|
+
reasoningEffort: z.string().nullish(),
|
|
16
19
|
|
|
17
20
|
/**
|
|
18
21
|
* Controls the verbosity of the generated text. Defaults to `medium`.
|