@ai-sdk/openai 2.1.0-beta.5 → 2.1.0-beta.6
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.js +34 -20
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +34 -20
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +33 -19
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +33 -19
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2109,26 +2109,40 @@ async function convertToOpenAIResponsesInput({
|
|
|
2109
2109
|
});
|
|
2110
2110
|
const reasoningId = providerOptions == null ? void 0 : providerOptions.itemId;
|
|
2111
2111
|
if (reasoningId != null) {
|
|
2112
|
-
const
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
if (existingReasoningMessage === void 0) {
|
|
2123
|
-
reasoningMessages[reasoningId] = {
|
|
2124
|
-
type: "reasoning",
|
|
2125
|
-
id: reasoningId,
|
|
2126
|
-
encrypted_content: providerOptions == null ? void 0 : providerOptions.reasoningEncryptedContent,
|
|
2127
|
-
summary: summaryParts
|
|
2128
|
-
};
|
|
2129
|
-
input.push(reasoningMessages[reasoningId]);
|
|
2112
|
+
const reasoningMessage = reasoningMessages[reasoningId];
|
|
2113
|
+
if (store) {
|
|
2114
|
+
if (reasoningMessage === void 0) {
|
|
2115
|
+
input.push({ type: "item_reference", id: reasoningId });
|
|
2116
|
+
reasoningMessages[reasoningId] = {
|
|
2117
|
+
type: "reasoning",
|
|
2118
|
+
id: reasoningId,
|
|
2119
|
+
summary: []
|
|
2120
|
+
};
|
|
2121
|
+
}
|
|
2130
2122
|
} else {
|
|
2131
|
-
|
|
2123
|
+
const summaryParts = [];
|
|
2124
|
+
if (part.text.length > 0) {
|
|
2125
|
+
summaryParts.push({
|
|
2126
|
+
type: "summary_text",
|
|
2127
|
+
text: part.text
|
|
2128
|
+
});
|
|
2129
|
+
} else if (reasoningMessage !== void 0) {
|
|
2130
|
+
warnings.push({
|
|
2131
|
+
type: "other",
|
|
2132
|
+
message: `Cannot append empty reasoning part to existing reasoning sequence. Skipping reasoning part: ${JSON.stringify(part)}.`
|
|
2133
|
+
});
|
|
2134
|
+
}
|
|
2135
|
+
if (reasoningMessage === void 0) {
|
|
2136
|
+
reasoningMessages[reasoningId] = {
|
|
2137
|
+
type: "reasoning",
|
|
2138
|
+
id: reasoningId,
|
|
2139
|
+
encrypted_content: providerOptions == null ? void 0 : providerOptions.reasoningEncryptedContent,
|
|
2140
|
+
summary: summaryParts
|
|
2141
|
+
};
|
|
2142
|
+
input.push(reasoningMessages[reasoningId]);
|
|
2143
|
+
} else {
|
|
2144
|
+
reasoningMessage.summary.push(...summaryParts);
|
|
2145
|
+
}
|
|
2132
2146
|
}
|
|
2133
2147
|
} else {
|
|
2134
2148
|
warnings.push({
|
|
@@ -3905,7 +3919,7 @@ var openaiTranscriptionResponseSchema = z18.object({
|
|
|
3905
3919
|
});
|
|
3906
3920
|
|
|
3907
3921
|
// src/version.ts
|
|
3908
|
-
var VERSION = true ? "2.1.0-beta.
|
|
3922
|
+
var VERSION = true ? "2.1.0-beta.6" : "0.0.0-test";
|
|
3909
3923
|
|
|
3910
3924
|
// src/openai-provider.ts
|
|
3911
3925
|
function createOpenAI(options = {}) {
|