@ai-sdk/openai 2.0.17 → 2.0.18

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @ai-sdk/openai
2
2
 
3
+ ## 2.0.18
4
+
5
+ ### Patch Changes
6
+
7
+ - 5e47d00: Support Responses API input_file file_url passthrough for PDFs.
8
+
9
+ This adds:
10
+
11
+ - file_url variant to OpenAIResponses user content
12
+ - PDF URL mapping to input_file with file_url in Responses converter
13
+ - PDF URL support in supportedUrls to avoid auto-download
14
+
3
15
  ## 2.0.17
4
16
 
5
17
  ### 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
- throw new import_provider6.UnsupportedFunctionalityError({
1907
- functionality: "PDF file parts with URLs"
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;