@ai-sdk/openai 4.0.0-beta.15 → 4.0.0-beta.17
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 +15 -0
- package/dist/index.js +15 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -4
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +14 -3
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +14 -3
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/responses/convert-to-openai-responses-input.ts +13 -1
- package/src/responses/openai-responses-api.ts +1 -0
- package/src/responses/openai-responses-language-model.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @ai-sdk/openai
|
|
2
2
|
|
|
3
|
+
## 4.0.0-beta.17
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 817a1a6: fix(openai): support file-url parts in tool output content
|
|
8
|
+
|
|
9
|
+
## 4.0.0-beta.16
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 1f509d4: fix(ai): force template check on 'kind' param
|
|
14
|
+
- Updated dependencies [1f509d4]
|
|
15
|
+
- @ai-sdk/provider-utils@5.0.0-beta.7
|
|
16
|
+
- @ai-sdk/provider@4.0.0-beta.5
|
|
17
|
+
|
|
3
18
|
## 4.0.0-beta.15
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -3006,7 +3006,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
3006
3006
|
break;
|
|
3007
3007
|
}
|
|
3008
3008
|
case "custom": {
|
|
3009
|
-
if (part.kind === "openai
|
|
3009
|
+
if (part.kind === "openai.compaction") {
|
|
3010
3010
|
const providerOpts = (_n = part.providerOptions) == null ? void 0 : _n[providerOptionsName];
|
|
3011
3011
|
const id = providerOpts == null ? void 0 : providerOpts.itemId;
|
|
3012
3012
|
if (hasConversation && id != null) {
|
|
@@ -3156,6 +3156,11 @@ async function convertToOpenAIResponsesInput({
|
|
|
3156
3156
|
filename: (_a2 = item.filename) != null ? _a2 : "data",
|
|
3157
3157
|
file_data: `data:${item.mediaType};base64,${item.data}`
|
|
3158
3158
|
};
|
|
3159
|
+
case "file-url":
|
|
3160
|
+
return {
|
|
3161
|
+
type: "input_file",
|
|
3162
|
+
file_url: item.url
|
|
3163
|
+
};
|
|
3159
3164
|
default:
|
|
3160
3165
|
warnings.push({
|
|
3161
3166
|
type: "other",
|
|
@@ -3214,6 +3219,12 @@ async function convertToOpenAIResponsesInput({
|
|
|
3214
3219
|
file_data: `data:${item.mediaType};base64,${item.data}`
|
|
3215
3220
|
};
|
|
3216
3221
|
}
|
|
3222
|
+
case "file-url": {
|
|
3223
|
+
return {
|
|
3224
|
+
type: "input_file",
|
|
3225
|
+
file_url: item.url
|
|
3226
|
+
};
|
|
3227
|
+
}
|
|
3217
3228
|
default: {
|
|
3218
3229
|
warnings.push({
|
|
3219
3230
|
type: "other",
|
|
@@ -5364,7 +5375,7 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
5364
5375
|
case "compaction": {
|
|
5365
5376
|
content.push({
|
|
5366
5377
|
type: "custom",
|
|
5367
|
-
kind: "openai
|
|
5378
|
+
kind: "openai.compaction",
|
|
5368
5379
|
providerMetadata: {
|
|
5369
5380
|
[providerOptionsName]: {
|
|
5370
5381
|
type: "compaction",
|
|
@@ -6007,7 +6018,7 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
6007
6018
|
} else if (value.item.type === "compaction") {
|
|
6008
6019
|
controller.enqueue({
|
|
6009
6020
|
type: "custom",
|
|
6010
|
-
kind: "openai
|
|
6021
|
+
kind: "openai.compaction",
|
|
6011
6022
|
providerMetadata: {
|
|
6012
6023
|
[providerOptionsName]: {
|
|
6013
6024
|
type: "compaction",
|
|
@@ -6716,7 +6727,7 @@ var OpenAITranscriptionModel = class {
|
|
|
6716
6727
|
};
|
|
6717
6728
|
|
|
6718
6729
|
// src/version.ts
|
|
6719
|
-
var VERSION = true ? "4.0.0-beta.
|
|
6730
|
+
var VERSION = true ? "4.0.0-beta.17" : "0.0.0-test";
|
|
6720
6731
|
|
|
6721
6732
|
// src/openai-provider.ts
|
|
6722
6733
|
function createOpenAI(options = {}) {
|