@ai-sdk/openai 2.0.85 → 2.0.86

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
@@ -295,10 +295,12 @@ var openaiChatResponseSchema = lazyValidator(
295
295
  annotations: z2.array(
296
296
  z2.object({
297
297
  type: z2.literal("url_citation"),
298
- start_index: z2.number(),
299
- end_index: z2.number(),
300
- url: z2.string(),
301
- title: z2.string()
298
+ url_citation: z2.object({
299
+ start_index: z2.number(),
300
+ end_index: z2.number(),
301
+ url: z2.string(),
302
+ title: z2.string()
303
+ })
302
304
  })
303
305
  ).nullish()
304
306
  }),
@@ -362,10 +364,12 @@ var openaiChatChunkSchema = lazyValidator(
362
364
  annotations: z2.array(
363
365
  z2.object({
364
366
  type: z2.literal("url_citation"),
365
- start_index: z2.number(),
366
- end_index: z2.number(),
367
- url: z2.string(),
368
- title: z2.string()
367
+ url_citation: z2.object({
368
+ start_index: z2.number(),
369
+ end_index: z2.number(),
370
+ url: z2.string(),
371
+ title: z2.string()
372
+ })
369
373
  })
370
374
  ).nullish()
371
375
  }).nullish(),
@@ -824,8 +828,8 @@ var OpenAIChatLanguageModel = class {
824
828
  type: "source",
825
829
  sourceType: "url",
826
830
  id: generateId(),
827
- url: annotation.url,
828
- title: annotation.title
831
+ url: annotation.url_citation.url,
832
+ title: annotation.url_citation.title
829
833
  });
830
834
  }
831
835
  const completionTokenDetails = (_d = response.usage) == null ? void 0 : _d.completion_tokens_details;
@@ -1054,8 +1058,8 @@ var OpenAIChatLanguageModel = class {
1054
1058
  type: "source",
1055
1059
  sourceType: "url",
1056
1060
  id: generateId(),
1057
- url: annotation.url,
1058
- title: annotation.title
1061
+ url: annotation.url_citation.url,
1062
+ title: annotation.url_citation.title
1059
1063
  });
1060
1064
  }
1061
1065
  }
@@ -4650,7 +4654,7 @@ var OpenAITranscriptionModel = class {
4650
4654
  };
4651
4655
 
4652
4656
  // src/version.ts
4653
- var VERSION = true ? "2.0.85" : "0.0.0-test";
4657
+ var VERSION = true ? "2.0.86" : "0.0.0-test";
4654
4658
 
4655
4659
  // src/openai-provider.ts
4656
4660
  function createOpenAI(options = {}) {