@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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @ai-sdk/openai
2
2
 
3
+ ## 2.0.86
4
+
5
+ ### Patch Changes
6
+
7
+ - a909bcf: fix(openai); fix url_citation schema in chat api
8
+
3
9
  ## 2.0.85
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -303,10 +303,12 @@ var openaiChatResponseSchema = (0, import_provider_utils3.lazyValidator)(
303
303
  annotations: import_v42.z.array(
304
304
  import_v42.z.object({
305
305
  type: import_v42.z.literal("url_citation"),
306
- start_index: import_v42.z.number(),
307
- end_index: import_v42.z.number(),
308
- url: import_v42.z.string(),
309
- title: import_v42.z.string()
306
+ url_citation: import_v42.z.object({
307
+ start_index: import_v42.z.number(),
308
+ end_index: import_v42.z.number(),
309
+ url: import_v42.z.string(),
310
+ title: import_v42.z.string()
311
+ })
310
312
  })
311
313
  ).nullish()
312
314
  }),
@@ -370,10 +372,12 @@ var openaiChatChunkSchema = (0, import_provider_utils3.lazyValidator)(
370
372
  annotations: import_v42.z.array(
371
373
  import_v42.z.object({
372
374
  type: import_v42.z.literal("url_citation"),
373
- start_index: import_v42.z.number(),
374
- end_index: import_v42.z.number(),
375
- url: import_v42.z.string(),
376
- title: import_v42.z.string()
375
+ url_citation: import_v42.z.object({
376
+ start_index: import_v42.z.number(),
377
+ end_index: import_v42.z.number(),
378
+ url: import_v42.z.string(),
379
+ title: import_v42.z.string()
380
+ })
377
381
  })
378
382
  ).nullish()
379
383
  }).nullish(),
@@ -827,8 +831,8 @@ var OpenAIChatLanguageModel = class {
827
831
  type: "source",
828
832
  sourceType: "url",
829
833
  id: (0, import_provider_utils5.generateId)(),
830
- url: annotation.url,
831
- title: annotation.title
834
+ url: annotation.url_citation.url,
835
+ title: annotation.url_citation.title
832
836
  });
833
837
  }
834
838
  const completionTokenDetails = (_d = response.usage) == null ? void 0 : _d.completion_tokens_details;
@@ -1057,8 +1061,8 @@ var OpenAIChatLanguageModel = class {
1057
1061
  type: "source",
1058
1062
  sourceType: "url",
1059
1063
  id: (0, import_provider_utils5.generateId)(),
1060
- url: annotation.url,
1061
- title: annotation.title
1064
+ url: annotation.url_citation.url,
1065
+ title: annotation.url_citation.title
1062
1066
  });
1063
1067
  }
1064
1068
  }
@@ -4559,7 +4563,7 @@ var OpenAITranscriptionModel = class {
4559
4563
  };
4560
4564
 
4561
4565
  // src/version.ts
4562
- var VERSION = true ? "2.0.85" : "0.0.0-test";
4566
+ var VERSION = true ? "2.0.86" : "0.0.0-test";
4563
4567
 
4564
4568
  // src/openai-provider.ts
4565
4569
  function createOpenAI(options = {}) {