@ai-sdk/openai 4.0.0-beta.16 → 4.0.0-beta.17

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/openai",
3
- "version": "4.0.0-beta.16",
3
+ "version": "4.0.0-beta.17",
4
4
  "license": "Apache-2.0",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",
@@ -740,6 +740,11 @@ export async function convertToOpenAIResponsesInput({
740
740
  filename: item.filename ?? 'data',
741
741
  file_data: `data:${item.mediaType};base64,${item.data}`,
742
742
  };
743
+ case 'file-url':
744
+ return {
745
+ type: 'input_file' as const,
746
+ file_url: item.url,
747
+ };
743
748
  default:
744
749
  warnings.push({
745
750
  type: 'other',
@@ -804,6 +809,13 @@ export async function convertToOpenAIResponsesInput({
804
809
  };
805
810
  }
806
811
 
812
+ case 'file-url': {
813
+ return {
814
+ type: 'input_file' as const,
815
+ file_url: item.url,
816
+ };
817
+ }
818
+
807
819
  default: {
808
820
  warnings.push({
809
821
  type: 'other',
@@ -107,6 +107,7 @@ export type OpenAIResponsesFunctionCallOutput = {
107
107
  | { type: 'input_text'; text: string }
108
108
  | { type: 'input_image'; image_url: string }
109
109
  | { type: 'input_file'; filename: string; file_data: string }
110
+ | { type: 'input_file'; file_url: string }
110
111
  >;
111
112
  };
112
113