@llmgateway/ai-sdk-provider 3.6.0 → 3.7.0

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
@@ -3667,13 +3667,19 @@ var LLMGatewayImageModel = class {
3667
3667
  if (options.aspectRatio != null) {
3668
3668
  body.aspect_ratio = options.aspectRatio;
3669
3669
  }
3670
+ if (options.quality != null) {
3671
+ body.quality = options.quality;
3672
+ }
3673
+ const providerOptions = options.providerOptions || {};
3674
+ const llmgatewayOptions = providerOptions.llmgateway || {};
3675
+ const requestBody = __spreadValues(__spreadValues(__spreadValues(__spreadValues({}, body), this.config.extraBody), this.settings.extraBody), llmgatewayOptions);
3670
3676
  const { value: response, responseHeaders } = await postJsonToApi({
3671
3677
  url: this.config.url({
3672
3678
  path: hasFiles ? "/images/edits" : "/images/generations",
3673
3679
  modelId: this.modelId
3674
3680
  }),
3675
3681
  headers: combineHeaders(this.config.headers(), options.headers),
3676
- body,
3682
+ body: requestBody,
3677
3683
  failedResponseHandler: llmgatewayFailedResponseHandler,
3678
3684
  successfulResponseHandler: createJsonResponseHandler(
3679
3685
  LLMGatewayImageResponseSchema
@@ -3732,7 +3738,8 @@ function createLLMGateway(options = {}) {
3732
3738
  provider: "llmgateway.image",
3733
3739
  url: ({ path }) => `${baseURL}${path}`,
3734
3740
  headers: getHeaders,
3735
- fetch: options.fetch
3741
+ fetch: options.fetch,
3742
+ extraBody: options.extraBody
3736
3743
  });
3737
3744
  const createLanguageModel = (modelId, settings) => {
3738
3745
  if (new.target) {