@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/dist/internal/index.js
CHANGED
|
@@ -2171,7 +2171,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
2171
2171
|
store,
|
|
2172
2172
|
hasLocalShellTool = false
|
|
2173
2173
|
}) {
|
|
2174
|
-
var _a, _b, _c, _d
|
|
2174
|
+
var _a, _b, _c, _d;
|
|
2175
2175
|
const input = [];
|
|
2176
2176
|
const warnings = [];
|
|
2177
2177
|
for (const { role, content } of prompt) {
|
|
@@ -2252,10 +2252,15 @@ async function convertToOpenAIResponsesInput({
|
|
|
2252
2252
|
for (const part of content) {
|
|
2253
2253
|
switch (part.type) {
|
|
2254
2254
|
case "text": {
|
|
2255
|
+
const id = (_b = (_a = part.providerOptions) == null ? void 0 : _a.openai) == null ? void 0 : _b.itemId;
|
|
2256
|
+
if (store && id != null) {
|
|
2257
|
+
input.push({ type: "item_reference", id });
|
|
2258
|
+
break;
|
|
2259
|
+
}
|
|
2255
2260
|
input.push({
|
|
2256
2261
|
role: "assistant",
|
|
2257
2262
|
content: [{ type: "output_text", text: part.text }],
|
|
2258
|
-
id
|
|
2263
|
+
id
|
|
2259
2264
|
});
|
|
2260
2265
|
break;
|
|
2261
2266
|
}
|
|
@@ -2264,6 +2269,11 @@ async function convertToOpenAIResponsesInput({
|
|
|
2264
2269
|
if (part.providerExecuted) {
|
|
2265
2270
|
break;
|
|
2266
2271
|
}
|
|
2272
|
+
const id = (_d = (_c = part.providerOptions) == null ? void 0 : _c.openai) == null ? void 0 : _d.itemId;
|
|
2273
|
+
if (store && id != null) {
|
|
2274
|
+
input.push({ type: "item_reference", id });
|
|
2275
|
+
break;
|
|
2276
|
+
}
|
|
2267
2277
|
if (hasLocalShellTool && part.toolName === "local_shell") {
|
|
2268
2278
|
const parsedInput = await (0, import_provider_utils20.validateTypes)({
|
|
2269
2279
|
value: part.input,
|
|
@@ -2272,7 +2282,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
2272
2282
|
input.push({
|
|
2273
2283
|
type: "local_shell_call",
|
|
2274
2284
|
call_id: part.toolCallId,
|
|
2275
|
-
id
|
|
2285
|
+
id,
|
|
2276
2286
|
action: {
|
|
2277
2287
|
type: "exec",
|
|
2278
2288
|
command: parsedInput.action.command,
|
|
@@ -2289,7 +2299,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
2289
2299
|
call_id: part.toolCallId,
|
|
2290
2300
|
name: part.toolName,
|
|
2291
2301
|
arguments: JSON.stringify(part.input),
|
|
2292
|
-
id
|
|
2302
|
+
id
|
|
2293
2303
|
});
|
|
2294
2304
|
break;
|
|
2295
2305
|
}
|