@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.
@@ -2221,9 +2221,10 @@ async function convertToOpenAIResponsesMessages({
2221
2221
  };
2222
2222
  } else if (part.mediaType === "application/pdf") {
2223
2223
  if (part.data instanceof URL) {
2224
- throw new UnsupportedFunctionalityError4({
2225
- functionality: "PDF file parts with URLs"
2226
- });
2224
+ return {
2225
+ type: "input_file",
2226
+ file_url: part.data.toString()
2227
+ };
2227
2228
  }
2228
2229
  return {
2229
2230
  type: "input_file",
@@ -2519,7 +2520,8 @@ var OpenAIResponsesLanguageModel = class {
2519
2520
  constructor(modelId, config) {
2520
2521
  this.specificationVersion = "v2";
2521
2522
  this.supportedUrls = {
2522
- "image/*": [/^https?:\/\/.*$/]
2523
+ "image/*": [/^https?:\/\/.*$/],
2524
+ "application/pdf": [/^https?:\/\/.*$/]
2523
2525
  };
2524
2526
  this.modelId = modelId;
2525
2527
  this.config = config;