@ai-sdk/openai 3.0.34 → 3.0.35
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 +17 -0
- package/dist/index.js +21 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +21 -5
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +20 -4
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +20 -4
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/responses/convert-to-openai-responses-input.ts +30 -4
- package/src/responses/openai-responses-api.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @ai-sdk/openai
|
|
2
2
|
|
|
3
|
+
## 3.0.35
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 5e18272: fix(openai): include reasoning parts without itemId when encrypted_content is present
|
|
8
|
+
|
|
9
|
+
When `providerOptions.openai.itemId` is absent on a reasoning content part,
|
|
10
|
+
the converter now uses `encrypted_content` as a fallback instead of silently
|
|
11
|
+
skipping the part with a warning. The OpenAI Responses API accepts reasoning
|
|
12
|
+
items without an `id` when `encrypted_content` is supplied, enabling
|
|
13
|
+
multi-turn reasoning even when item IDs are stripped from provider options.
|
|
14
|
+
|
|
15
|
+
Also makes the `id` field optional on the `OpenAIResponsesReasoning` type to
|
|
16
|
+
reflect that the API does not require it.
|
|
17
|
+
|
|
18
|
+
Fixes #12853
|
|
19
|
+
|
|
3
20
|
## 3.0.34
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -2846,10 +2846,26 @@ async function convertToOpenAIResponsesInput({
|
|
|
2846
2846
|
}
|
|
2847
2847
|
}
|
|
2848
2848
|
} else {
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2849
|
+
const encryptedContent = providerOptions == null ? void 0 : providerOptions.reasoningEncryptedContent;
|
|
2850
|
+
if (encryptedContent != null) {
|
|
2851
|
+
const summaryParts = [];
|
|
2852
|
+
if (part.text.length > 0) {
|
|
2853
|
+
summaryParts.push({
|
|
2854
|
+
type: "summary_text",
|
|
2855
|
+
text: part.text
|
|
2856
|
+
});
|
|
2857
|
+
}
|
|
2858
|
+
input.push({
|
|
2859
|
+
type: "reasoning",
|
|
2860
|
+
encrypted_content: encryptedContent,
|
|
2861
|
+
summary: summaryParts
|
|
2862
|
+
});
|
|
2863
|
+
} else {
|
|
2864
|
+
warnings.push({
|
|
2865
|
+
type: "other",
|
|
2866
|
+
message: `Non-OpenAI reasoning parts are not supported. Skipping reasoning part: ${JSON.stringify(part)}.`
|
|
2867
|
+
});
|
|
2868
|
+
}
|
|
2853
2869
|
}
|
|
2854
2870
|
break;
|
|
2855
2871
|
}
|
|
@@ -6081,7 +6097,7 @@ var OpenAITranscriptionModel = class {
|
|
|
6081
6097
|
};
|
|
6082
6098
|
|
|
6083
6099
|
// src/version.ts
|
|
6084
|
-
var VERSION = true ? "3.0.
|
|
6100
|
+
var VERSION = true ? "3.0.35" : "0.0.0-test";
|
|
6085
6101
|
|
|
6086
6102
|
// src/openai-provider.ts
|
|
6087
6103
|
function createOpenAI(options = {}) {
|