@ai-sdk/openai 2.0.17 → 2.0.19
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 +19 -0
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -4
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +6 -4
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +6 -4
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @ai-sdk/openai
|
|
2
2
|
|
|
3
|
+
## 2.0.19
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [0857788]
|
|
8
|
+
- @ai-sdk/provider-utils@3.0.5
|
|
9
|
+
|
|
10
|
+
## 2.0.18
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- 5e47d00: Support Responses API input_file file_url passthrough for PDFs.
|
|
15
|
+
|
|
16
|
+
This adds:
|
|
17
|
+
|
|
18
|
+
- file_url variant to OpenAIResponses user content
|
|
19
|
+
- PDF URL mapping to input_file with file_url in Responses converter
|
|
20
|
+
- PDF URL support in supportedUrls to avoid auto-download
|
|
21
|
+
|
|
3
22
|
## 2.0.17
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -1903,9 +1903,10 @@ async function convertToOpenAIResponsesMessages({
|
|
|
1903
1903
|
};
|
|
1904
1904
|
} else if (part.mediaType === "application/pdf") {
|
|
1905
1905
|
if (part.data instanceof URL) {
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1906
|
+
return {
|
|
1907
|
+
type: "input_file",
|
|
1908
|
+
file_url: part.data.toString()
|
|
1909
|
+
};
|
|
1909
1910
|
}
|
|
1910
1911
|
return {
|
|
1911
1912
|
type: "input_file",
|
|
@@ -2180,7 +2181,8 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
2180
2181
|
constructor(modelId, config) {
|
|
2181
2182
|
this.specificationVersion = "v2";
|
|
2182
2183
|
this.supportedUrls = {
|
|
2183
|
-
"image/*": [/^https?:\/\/.*$/]
|
|
2184
|
+
"image/*": [/^https?:\/\/.*$/],
|
|
2185
|
+
"application/pdf": [/^https?:\/\/.*$/]
|
|
2184
2186
|
};
|
|
2185
2187
|
this.modelId = modelId;
|
|
2186
2188
|
this.config = config;
|