@ai-sdk/openai 3.0.113 → 3.0.115
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 +13 -0
- package/dist/index.js +22 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +22 -3
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +21 -2
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +21 -2
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +4 -4
- package/src/responses/convert-to-openai-responses-input.ts +28 -0
- package/src/responses/openai-responses-api.ts +10 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @ai-sdk/openai
|
|
2
2
|
|
|
3
|
+
## 3.0.115
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [82e18b0]
|
|
8
|
+
- @ai-sdk/provider-utils@4.0.52
|
|
9
|
+
|
|
10
|
+
## 3.0.114
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- e53d917: fix(openai): preserve provider file references in Responses tool results
|
|
15
|
+
|
|
3
16
|
## 3.0.113
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -3153,7 +3153,7 @@ async function convertFunctionToolResultOutput({
|
|
|
3153
3153
|
return convertScalarOutput(JSON.stringify(output.value));
|
|
3154
3154
|
case "content":
|
|
3155
3155
|
return output.value.map((item) => {
|
|
3156
|
-
var _a3, _b, _c, _d, _e;
|
|
3156
|
+
var _a3, _b, _c, _d, _e, _f, _g;
|
|
3157
3157
|
const promptCacheBreakpoint2 = getPromptCacheBreakpoint2(
|
|
3158
3158
|
item.providerOptions,
|
|
3159
3159
|
providerOptionsName
|
|
@@ -3188,10 +3188,29 @@ async function convertFunctionToolResultOutput({
|
|
|
3188
3188
|
}
|
|
3189
3189
|
};
|
|
3190
3190
|
}
|
|
3191
|
+
case "file-id": {
|
|
3192
|
+
return {
|
|
3193
|
+
type: "input_file",
|
|
3194
|
+
file_id: typeof item.fileId === "string" ? item.fileId : item.fileId[providerOptionsName],
|
|
3195
|
+
...promptCacheBreakpoint2 != null && {
|
|
3196
|
+
prompt_cache_breakpoint: promptCacheBreakpoint2
|
|
3197
|
+
}
|
|
3198
|
+
};
|
|
3199
|
+
}
|
|
3200
|
+
case "image-file-id": {
|
|
3201
|
+
return {
|
|
3202
|
+
type: "input_image",
|
|
3203
|
+
file_id: typeof item.fileId === "string" ? item.fileId : item.fileId[providerOptionsName],
|
|
3204
|
+
detail: (_f = (_e = item.providerOptions) == null ? void 0 : _e[providerOptionsName]) == null ? void 0 : _f.imageDetail,
|
|
3205
|
+
...promptCacheBreakpoint2 != null && {
|
|
3206
|
+
prompt_cache_breakpoint: promptCacheBreakpoint2
|
|
3207
|
+
}
|
|
3208
|
+
};
|
|
3209
|
+
}
|
|
3191
3210
|
case "file-data": {
|
|
3192
3211
|
return {
|
|
3193
3212
|
type: "input_file",
|
|
3194
|
-
filename: (
|
|
3213
|
+
filename: (_g = item.filename) != null ? _g : "data",
|
|
3195
3214
|
file_data: `data:${item.mediaType};base64,${item.data}`,
|
|
3196
3215
|
...promptCacheBreakpoint2 != null && {
|
|
3197
3216
|
prompt_cache_breakpoint: promptCacheBreakpoint2
|
|
@@ -8110,7 +8129,7 @@ var OpenAITranscriptionModel = class {
|
|
|
8110
8129
|
};
|
|
8111
8130
|
|
|
8112
8131
|
// src/version.ts
|
|
8113
|
-
var VERSION = true ? "3.0.
|
|
8132
|
+
var VERSION = true ? "3.0.115" : "0.0.0-test";
|
|
8114
8133
|
|
|
8115
8134
|
// src/openai-provider.ts
|
|
8116
8135
|
function createOpenAI(options = {}) {
|