@ai-sdk/openai 2.0.0-canary.16 → 2.0.0-canary.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.
@@ -601,8 +601,9 @@ var OpenAIChatLanguageModel = class {
601
601
  const body = {
602
602
  ...args,
603
603
  stream: true,
604
- // only include stream_options when in strict compatibility mode:
605
- stream_options: this.config.compatibility === "strict" ? { include_usage: true } : void 0
604
+ stream_options: {
605
+ include_usage: true
606
+ }
606
607
  };
607
608
  const { responseHeaders, value: response } = await postJsonToApi({
608
609
  url: this.config.url({
@@ -1187,8 +1188,9 @@ var OpenAICompletionLanguageModel = class {
1187
1188
  const body = {
1188
1189
  ...args,
1189
1190
  stream: true,
1190
- // only include stream_options when in strict compatibility mode:
1191
- stream_options: this.config.compatibility === "strict" ? { include_usage: true } : void 0
1191
+ stream_options: {
1192
+ include_usage: true
1193
+ }
1192
1194
  };
1193
1195
  const { responseHeaders, value: response } = await postJsonToApi2({
1194
1196
  url: this.config.url({
@@ -1428,15 +1430,14 @@ var hasDefaultResponseFormat = /* @__PURE__ */ new Set(["gpt-image-1"]);
1428
1430
 
1429
1431
  // src/openai-image-model.ts
1430
1432
  var OpenAIImageModel = class {
1431
- constructor(modelId, settings, config) {
1433
+ constructor(modelId, config) {
1432
1434
  this.modelId = modelId;
1433
- this.settings = settings;
1434
1435
  this.config = config;
1435
1436
  this.specificationVersion = "v2";
1436
1437
  }
1437
1438
  get maxImagesPerCall() {
1438
- var _a, _b;
1439
- return (_b = (_a = this.settings.maxImagesPerCall) != null ? _a : modelMaxImagesPerCall[this.modelId]) != null ? _b : 1;
1439
+ var _a;
1440
+ return (_a = modelMaxImagesPerCall[this.modelId]) != null ? _a : 1;
1440
1441
  }
1441
1442
  get provider() {
1442
1443
  return this.config.provider;