@ai-sdk/openai 3.0.0-beta.26 → 3.0.0-beta.27
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 +16 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -6
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +15 -5
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +15 -5
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -2179,7 +2179,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
2179
2179
|
store,
|
|
2180
2180
|
hasLocalShellTool = false
|
|
2181
2181
|
}) {
|
|
2182
|
-
var _a, _b, _c, _d, _e
|
|
2182
|
+
var _a, _b, _c, _d, _e;
|
|
2183
2183
|
const input = [];
|
|
2184
2184
|
const warnings = [];
|
|
2185
2185
|
for (const { role, content } of prompt) {
|
|
@@ -2260,10 +2260,15 @@ async function convertToOpenAIResponsesInput({
|
|
|
2260
2260
|
for (const part of content) {
|
|
2261
2261
|
switch (part.type) {
|
|
2262
2262
|
case "text": {
|
|
2263
|
+
const id = (_b = (_a = part.providerOptions) == null ? void 0 : _a.openai) == null ? void 0 : _b.itemId;
|
|
2264
|
+
if (store && id != null) {
|
|
2265
|
+
input.push({ type: "item_reference", id });
|
|
2266
|
+
break;
|
|
2267
|
+
}
|
|
2263
2268
|
input.push({
|
|
2264
2269
|
role: "assistant",
|
|
2265
2270
|
content: [{ type: "output_text", text: part.text }],
|
|
2266
|
-
id
|
|
2271
|
+
id
|
|
2267
2272
|
});
|
|
2268
2273
|
break;
|
|
2269
2274
|
}
|
|
@@ -2272,6 +2277,11 @@ async function convertToOpenAIResponsesInput({
|
|
|
2272
2277
|
if (part.providerExecuted) {
|
|
2273
2278
|
break;
|
|
2274
2279
|
}
|
|
2280
|
+
const id = (_d = (_c = part.providerOptions) == null ? void 0 : _c.openai) == null ? void 0 : _d.itemId;
|
|
2281
|
+
if (store && id != null) {
|
|
2282
|
+
input.push({ type: "item_reference", id });
|
|
2283
|
+
break;
|
|
2284
|
+
}
|
|
2275
2285
|
if (hasLocalShellTool && part.toolName === "local_shell") {
|
|
2276
2286
|
const parsedInput = await validateTypes({
|
|
2277
2287
|
value: part.input,
|
|
@@ -2280,7 +2290,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
2280
2290
|
input.push({
|
|
2281
2291
|
type: "local_shell_call",
|
|
2282
2292
|
call_id: part.toolCallId,
|
|
2283
|
-
id
|
|
2293
|
+
id,
|
|
2284
2294
|
action: {
|
|
2285
2295
|
type: "exec",
|
|
2286
2296
|
command: parsedInput.action.command,
|
|
@@ -2297,7 +2307,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
2297
2307
|
call_id: part.toolCallId,
|
|
2298
2308
|
name: part.toolName,
|
|
2299
2309
|
arguments: JSON.stringify(part.input),
|
|
2300
|
-
id
|
|
2310
|
+
id
|
|
2301
2311
|
});
|
|
2302
2312
|
break;
|
|
2303
2313
|
}
|
|
@@ -2390,7 +2400,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
2390
2400
|
contentValue = output.value;
|
|
2391
2401
|
break;
|
|
2392
2402
|
case "execution-denied":
|
|
2393
|
-
contentValue = (
|
|
2403
|
+
contentValue = (_e = output.reason) != null ? _e : "Tool execution denied.";
|
|
2394
2404
|
break;
|
|
2395
2405
|
case "json":
|
|
2396
2406
|
case "error-json":
|
|
@@ -4505,7 +4515,7 @@ var OpenAITranscriptionModel = class {
|
|
|
4505
4515
|
};
|
|
4506
4516
|
|
|
4507
4517
|
// src/version.ts
|
|
4508
|
-
var VERSION = true ? "3.0.0-beta.
|
|
4518
|
+
var VERSION = true ? "3.0.0-beta.27" : "0.0.0-test";
|
|
4509
4519
|
|
|
4510
4520
|
// src/openai-provider.ts
|
|
4511
4521
|
function createOpenAI(options = {}) {
|