@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/dist/index.mjs CHANGED
@@ -1924,9 +1924,10 @@ async function convertToOpenAIResponsesMessages({
1924
1924
  };
1925
1925
  } else if (part.mediaType === "application/pdf") {
1926
1926
  if (part.data instanceof URL) {
1927
- throw new UnsupportedFunctionalityError4({
1928
- functionality: "PDF file parts with URLs"
1929
- });
1927
+ return {
1928
+ type: "input_file",
1929
+ file_url: part.data.toString()
1930
+ };
1930
1931
  }
1931
1932
  return {
1932
1933
  type: "input_file",
@@ -2203,7 +2204,8 @@ var OpenAIResponsesLanguageModel = class {
2203
2204
  constructor(modelId, config) {
2204
2205
  this.specificationVersion = "v2";
2205
2206
  this.supportedUrls = {
2206
- "image/*": [/^https?:\/\/.*$/]
2207
+ "image/*": [/^https?:\/\/.*$/],
2208
+ "application/pdf": [/^https?:\/\/.*$/]
2207
2209
  };
2208
2210
  this.modelId = modelId;
2209
2211
  this.config = config;