@ai-sdk/openai 2.0.49 → 2.0.50
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 +15 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -5
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +14 -4
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +14 -4
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -2120,7 +2120,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
2120
2120
|
store,
|
|
2121
2121
|
hasLocalShellTool = false
|
|
2122
2122
|
}) {
|
|
2123
|
-
var _a, _b, _c, _d
|
|
2123
|
+
var _a, _b, _c, _d;
|
|
2124
2124
|
const input = [];
|
|
2125
2125
|
const warnings = [];
|
|
2126
2126
|
for (const { role, content } of prompt) {
|
|
@@ -2201,10 +2201,15 @@ async function convertToOpenAIResponsesInput({
|
|
|
2201
2201
|
for (const part of content) {
|
|
2202
2202
|
switch (part.type) {
|
|
2203
2203
|
case "text": {
|
|
2204
|
+
const id = (_b = (_a = part.providerOptions) == null ? void 0 : _a.openai) == null ? void 0 : _b.itemId;
|
|
2205
|
+
if (store && id != null) {
|
|
2206
|
+
input.push({ type: "item_reference", id });
|
|
2207
|
+
break;
|
|
2208
|
+
}
|
|
2204
2209
|
input.push({
|
|
2205
2210
|
role: "assistant",
|
|
2206
2211
|
content: [{ type: "output_text", text: part.text }],
|
|
2207
|
-
id
|
|
2212
|
+
id
|
|
2208
2213
|
});
|
|
2209
2214
|
break;
|
|
2210
2215
|
}
|
|
@@ -2213,6 +2218,11 @@ async function convertToOpenAIResponsesInput({
|
|
|
2213
2218
|
if (part.providerExecuted) {
|
|
2214
2219
|
break;
|
|
2215
2220
|
}
|
|
2221
|
+
const id = (_d = (_c = part.providerOptions) == null ? void 0 : _c.openai) == null ? void 0 : _d.itemId;
|
|
2222
|
+
if (store && id != null) {
|
|
2223
|
+
input.push({ type: "item_reference", id });
|
|
2224
|
+
break;
|
|
2225
|
+
}
|
|
2216
2226
|
if (hasLocalShellTool && part.toolName === "local_shell") {
|
|
2217
2227
|
const parsedInput = await (0, import_provider_utils20.validateTypes)({
|
|
2218
2228
|
value: part.input,
|
|
@@ -2221,7 +2231,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
2221
2231
|
input.push({
|
|
2222
2232
|
type: "local_shell_call",
|
|
2223
2233
|
call_id: part.toolCallId,
|
|
2224
|
-
id
|
|
2234
|
+
id,
|
|
2225
2235
|
action: {
|
|
2226
2236
|
type: "exec",
|
|
2227
2237
|
command: parsedInput.action.command,
|
|
@@ -2238,7 +2248,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
2238
2248
|
call_id: part.toolCallId,
|
|
2239
2249
|
name: part.toolName,
|
|
2240
2250
|
arguments: JSON.stringify(part.input),
|
|
2241
|
-
id
|
|
2251
|
+
id
|
|
2242
2252
|
});
|
|
2243
2253
|
break;
|
|
2244
2254
|
}
|
|
@@ -4414,7 +4424,7 @@ var OpenAITranscriptionModel = class {
|
|
|
4414
4424
|
};
|
|
4415
4425
|
|
|
4416
4426
|
// src/version.ts
|
|
4417
|
-
var VERSION = true ? "2.0.
|
|
4427
|
+
var VERSION = true ? "2.0.50" : "0.0.0-test";
|
|
4418
4428
|
|
|
4419
4429
|
// src/openai-provider.ts
|
|
4420
4430
|
function createOpenAI(options = {}) {
|