@ai-sdk/openai 4.0.0-beta.74 → 4.0.0-beta.75
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/03-openai.mdx
CHANGED
|
@@ -298,7 +298,7 @@ The following OpenAI-specific metadata may be returned:
|
|
|
298
298
|
|
|
299
299
|
#### Reasoning Output
|
|
300
300
|
|
|
301
|
-
For reasoning models like `gpt-5`, you can enable reasoning summaries to see the model's thought process. Different models support different summarizers—for example, `o4-mini` supports detailed summaries. Set `reasoningSummary: "auto"` to automatically receive the richest level available.
|
|
301
|
+
For reasoning models like `gpt-5`, you can enable reasoning summaries to see the model's thought process. Different models support different summarizers—for example, `o4-mini` supports detailed summaries. Set `reasoningSummary: "auto"` to automatically receive the richest level available. When `reasoningEffort` is set to a value other than `'none'`, the OpenAI Responses provider defaults `reasoningSummary` to `'detailed'`; set `reasoningSummary: null` to omit reasoning summaries.
|
|
302
302
|
|
|
303
303
|
```ts highlight="8-9,16"
|
|
304
304
|
import {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-sdk/openai",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.75",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@ai-sdk/provider": "
|
|
39
|
-
"@ai-sdk/provider
|
|
38
|
+
"@ai-sdk/provider-utils": "5.0.0-beta.49",
|
|
39
|
+
"@ai-sdk/provider": "4.0.0-beta.19"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@types/node": "22.19.19",
|
|
@@ -198,6 +198,12 @@ export class OpenAIResponsesLanguageModel implements LanguageModelV4 {
|
|
|
198
198
|
const resolvedReasoningEffort =
|
|
199
199
|
openaiOptions?.reasoningEffort ??
|
|
200
200
|
(isCustomReasoning(reasoning) ? reasoning : undefined);
|
|
201
|
+
const resolvedReasoningSummary =
|
|
202
|
+
openaiOptions?.reasoningSummary !== undefined
|
|
203
|
+
? openaiOptions.reasoningSummary
|
|
204
|
+
: resolvedReasoningEffort != null && resolvedReasoningEffort !== 'none'
|
|
205
|
+
? 'detailed'
|
|
206
|
+
: undefined;
|
|
201
207
|
|
|
202
208
|
const isReasoningModel =
|
|
203
209
|
openaiOptions?.forceReasoning ?? modelCapabilities.isReasoningModel;
|
|
@@ -377,13 +383,13 @@ export class OpenAIResponsesLanguageModel implements LanguageModelV4 {
|
|
|
377
383
|
// model-specific settings:
|
|
378
384
|
...(isReasoningModel &&
|
|
379
385
|
(resolvedReasoningEffort != null ||
|
|
380
|
-
|
|
386
|
+
resolvedReasoningSummary != null) && {
|
|
381
387
|
reasoning: {
|
|
382
388
|
...(resolvedReasoningEffort != null && {
|
|
383
389
|
effort: resolvedReasoningEffort,
|
|
384
390
|
}),
|
|
385
|
-
...(
|
|
386
|
-
summary:
|
|
391
|
+
...(resolvedReasoningSummary != null && {
|
|
392
|
+
summary: resolvedReasoningSummary,
|
|
387
393
|
}),
|
|
388
394
|
},
|
|
389
395
|
}),
|