@ai-sdk/openai 3.0.0-beta.44 → 3.0.0-beta.46
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 +14 -0
- package/dist/index.js +12 -23
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -23
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +11 -22
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +11 -22
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @ai-sdk/openai
|
|
2
2
|
|
|
3
|
+
## 3.0.0-beta.46
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [af3780b]
|
|
8
|
+
- @ai-sdk/provider@3.0.0-beta.14
|
|
9
|
+
- @ai-sdk/provider-utils@4.0.0-beta.29
|
|
10
|
+
|
|
11
|
+
## 3.0.0-beta.45
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- fd47df5: fix(openai): revised_prompt sometimes returns null, causing errors
|
|
16
|
+
|
|
3
17
|
## 3.0.0-beta.44
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -1658,7 +1658,7 @@ var openaiImageResponseSchema = (0, import_provider_utils12.lazySchema)(
|
|
|
1658
1658
|
data: import_v48.z.array(
|
|
1659
1659
|
import_v48.z.object({
|
|
1660
1660
|
b64_json: import_v48.z.string(),
|
|
1661
|
-
revised_prompt: import_v48.z.string().
|
|
1661
|
+
revised_prompt: import_v48.z.string().nullish()
|
|
1662
1662
|
})
|
|
1663
1663
|
)
|
|
1664
1664
|
})
|
|
@@ -3371,8 +3371,7 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
3371
3371
|
toolName: "image_generation",
|
|
3372
3372
|
result: {
|
|
3373
3373
|
result: part.result
|
|
3374
|
-
}
|
|
3375
|
-
providerExecuted: true
|
|
3374
|
+
}
|
|
3376
3375
|
});
|
|
3377
3376
|
break;
|
|
3378
3377
|
}
|
|
@@ -3463,8 +3462,7 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
3463
3462
|
type: "tool-result",
|
|
3464
3463
|
toolCallId: part.id,
|
|
3465
3464
|
toolName: webSearchToolName != null ? webSearchToolName : "web_search",
|
|
3466
|
-
result: mapWebSearchOutput(part.action)
|
|
3467
|
-
providerExecuted: true
|
|
3465
|
+
result: mapWebSearchOutput(part.action)
|
|
3468
3466
|
});
|
|
3469
3467
|
break;
|
|
3470
3468
|
}
|
|
@@ -3483,8 +3481,7 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
3483
3481
|
result: {
|
|
3484
3482
|
type: "computer_use_tool_result",
|
|
3485
3483
|
status: part.status || "completed"
|
|
3486
|
-
}
|
|
3487
|
-
providerExecuted: true
|
|
3484
|
+
}
|
|
3488
3485
|
});
|
|
3489
3486
|
break;
|
|
3490
3487
|
}
|
|
@@ -3509,8 +3506,7 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
3509
3506
|
score: result.score,
|
|
3510
3507
|
text: result.text
|
|
3511
3508
|
}))) != null ? _n : null
|
|
3512
|
-
}
|
|
3513
|
-
providerExecuted: true
|
|
3509
|
+
}
|
|
3514
3510
|
});
|
|
3515
3511
|
break;
|
|
3516
3512
|
}
|
|
@@ -3531,8 +3527,7 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
3531
3527
|
toolName: "code_interpreter",
|
|
3532
3528
|
result: {
|
|
3533
3529
|
outputs: part.outputs
|
|
3534
|
-
}
|
|
3535
|
-
providerExecuted: true
|
|
3530
|
+
}
|
|
3536
3531
|
});
|
|
3537
3532
|
break;
|
|
3538
3533
|
}
|
|
@@ -3756,8 +3751,7 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
3756
3751
|
type: "tool-result",
|
|
3757
3752
|
toolCallId: value.item.id,
|
|
3758
3753
|
toolName: "web_search",
|
|
3759
|
-
result: mapWebSearchOutput(value.item.action)
|
|
3760
|
-
providerExecuted: true
|
|
3754
|
+
result: mapWebSearchOutput(value.item.action)
|
|
3761
3755
|
});
|
|
3762
3756
|
} else if (value.item.type === "computer_call") {
|
|
3763
3757
|
ongoingToolCalls[value.output_index] = void 0;
|
|
@@ -3779,8 +3773,7 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
3779
3773
|
result: {
|
|
3780
3774
|
type: "computer_use_tool_result",
|
|
3781
3775
|
status: value.item.status || "completed"
|
|
3782
|
-
}
|
|
3783
|
-
providerExecuted: true
|
|
3776
|
+
}
|
|
3784
3777
|
});
|
|
3785
3778
|
} else if (value.item.type === "file_search_call") {
|
|
3786
3779
|
ongoingToolCalls[value.output_index] = void 0;
|
|
@@ -3797,8 +3790,7 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
3797
3790
|
score: result.score,
|
|
3798
3791
|
text: result.text
|
|
3799
3792
|
}))) != null ? _c : null
|
|
3800
|
-
}
|
|
3801
|
-
providerExecuted: true
|
|
3793
|
+
}
|
|
3802
3794
|
});
|
|
3803
3795
|
} else if (value.item.type === "code_interpreter_call") {
|
|
3804
3796
|
ongoingToolCalls[value.output_index] = void 0;
|
|
@@ -3808,8 +3800,7 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
3808
3800
|
toolName: "code_interpreter",
|
|
3809
3801
|
result: {
|
|
3810
3802
|
outputs: value.item.outputs
|
|
3811
|
-
}
|
|
3812
|
-
providerExecuted: true
|
|
3803
|
+
}
|
|
3813
3804
|
});
|
|
3814
3805
|
} else if (value.item.type === "image_generation_call") {
|
|
3815
3806
|
controller.enqueue({
|
|
@@ -3818,8 +3809,7 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
3818
3809
|
toolName: "image_generation",
|
|
3819
3810
|
result: {
|
|
3820
3811
|
result: value.item.result
|
|
3821
|
-
}
|
|
3822
|
-
providerExecuted: true
|
|
3812
|
+
}
|
|
3823
3813
|
});
|
|
3824
3814
|
} else if (value.item.type === "local_shell_call") {
|
|
3825
3815
|
ongoingToolCalls[value.output_index] = void 0;
|
|
@@ -3884,7 +3874,6 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
3884
3874
|
result: {
|
|
3885
3875
|
result: value.partial_image_b64
|
|
3886
3876
|
},
|
|
3887
|
-
providerExecuted: true,
|
|
3888
3877
|
preliminary: true
|
|
3889
3878
|
});
|
|
3890
3879
|
} else if (isResponseCodeInterpreterCallCodeDeltaChunk(value)) {
|
|
@@ -4495,7 +4484,7 @@ var OpenAITranscriptionModel = class {
|
|
|
4495
4484
|
};
|
|
4496
4485
|
|
|
4497
4486
|
// src/version.ts
|
|
4498
|
-
var VERSION = true ? "3.0.0-beta.
|
|
4487
|
+
var VERSION = true ? "3.0.0-beta.46" : "0.0.0-test";
|
|
4499
4488
|
|
|
4500
4489
|
// src/openai-provider.ts
|
|
4501
4490
|
function createOpenAI(options = {}) {
|