@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/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -2088,26 +2088,40 @@ async function convertToOpenAIResponsesInput({
|
|
|
2088
2088
|
});
|
|
2089
2089
|
const reasoningId = providerOptions == null ? void 0 : providerOptions.itemId;
|
|
2090
2090
|
if (reasoningId != null) {
|
|
2091
|
-
const
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
if (existingReasoningMessage === void 0) {
|
|
2102
|
-
reasoningMessages[reasoningId] = {
|
|
2103
|
-
type: "reasoning",
|
|
2104
|
-
id: reasoningId,
|
|
2105
|
-
encrypted_content: providerOptions == null ? void 0 : providerOptions.reasoningEncryptedContent,
|
|
2106
|
-
summary: summaryParts
|
|
2107
|
-
};
|
|
2108
|
-
input.push(reasoningMessages[reasoningId]);
|
|
2091
|
+
const reasoningMessage = reasoningMessages[reasoningId];
|
|
2092
|
+
if (store) {
|
|
2093
|
+
if (reasoningMessage === void 0) {
|
|
2094
|
+
input.push({ type: "item_reference", id: reasoningId });
|
|
2095
|
+
reasoningMessages[reasoningId] = {
|
|
2096
|
+
type: "reasoning",
|
|
2097
|
+
id: reasoningId,
|
|
2098
|
+
summary: []
|
|
2099
|
+
};
|
|
2100
|
+
}
|
|
2109
2101
|
} else {
|
|
2110
|
-
|
|
2102
|
+
const summaryParts = [];
|
|
2103
|
+
if (part.text.length > 0) {
|
|
2104
|
+
summaryParts.push({
|
|
2105
|
+
type: "summary_text",
|
|
2106
|
+
text: part.text
|
|
2107
|
+
});
|
|
2108
|
+
} else if (reasoningMessage !== void 0) {
|
|
2109
|
+
warnings.push({
|
|
2110
|
+
type: "other",
|
|
2111
|
+
message: `Cannot append empty reasoning part to existing reasoning sequence. Skipping reasoning part: ${JSON.stringify(part)}.`
|
|
2112
|
+
});
|
|
2113
|
+
}
|
|
2114
|
+
if (reasoningMessage === void 0) {
|
|
2115
|
+
reasoningMessages[reasoningId] = {
|
|
2116
|
+
type: "reasoning",
|
|
2117
|
+
id: reasoningId,
|
|
2118
|
+
encrypted_content: providerOptions == null ? void 0 : providerOptions.reasoningEncryptedContent,
|
|
2119
|
+
summary: summaryParts
|
|
2120
|
+
};
|
|
2121
|
+
input.push(reasoningMessages[reasoningId]);
|
|
2122
|
+
} else {
|
|
2123
|
+
reasoningMessage.summary.push(...summaryParts);
|
|
2124
|
+
}
|
|
2111
2125
|
}
|
|
2112
2126
|
} else {
|
|
2113
2127
|
warnings.push({
|
|
@@ -3870,7 +3884,7 @@ var openaiTranscriptionResponseSchema = import_v418.z.object({
|
|
|
3870
3884
|
});
|
|
3871
3885
|
|
|
3872
3886
|
// src/version.ts
|
|
3873
|
-
var VERSION = true ? "2.1.0-beta.
|
|
3887
|
+
var VERSION = true ? "2.1.0-beta.6" : "0.0.0-test";
|
|
3874
3888
|
|
|
3875
3889
|
// src/openai-provider.ts
|
|
3876
3890
|
function createOpenAI(options = {}) {
|