@llmgateway/ai-sdk-provider 2.3.1 → 2.4.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.
@@ -16,6 +16,22 @@ type LLMGatewayProviderOptions = {
16
16
  } | {
17
17
  effort: 'high' | 'medium' | 'low';
18
18
  });
19
+ /**
20
+ * Image generation configuration for supported models (e.g., Google's image generation models).
21
+ * Specifies aspect ratio and image resolution for generated images.
22
+ */
23
+ image_config?: {
24
+ /**
25
+ * The aspect ratio of the generated image.
26
+ * Examples: "1:1", "16:9", "4:3", "5:4"
27
+ */
28
+ aspect_ratio?: string;
29
+ /**
30
+ * The resolution of the generated image.
31
+ * Options: "1K" (1024x1024), "2K" (2048x2048), "4K"
32
+ */
33
+ image_size?: string;
34
+ };
19
35
  /**
20
36
  * A unique identifier representing your end-user, which can
21
37
  * help LLMGateway to monitor and detect abuse.
@@ -16,6 +16,22 @@ type LLMGatewayProviderOptions = {
16
16
  } | {
17
17
  effort: 'high' | 'medium' | 'low';
18
18
  });
19
+ /**
20
+ * Image generation configuration for supported models (e.g., Google's image generation models).
21
+ * Specifies aspect ratio and image resolution for generated images.
22
+ */
23
+ image_config?: {
24
+ /**
25
+ * The aspect ratio of the generated image.
26
+ * Examples: "1:1", "16:9", "4:3", "5:4"
27
+ */
28
+ aspect_ratio?: string;
29
+ /**
30
+ * The resolution of the generated image.
31
+ * Options: "1K" (1024x1024), "2K" (2048x2048), "4K"
32
+ */
33
+ image_size?: string;
34
+ };
19
35
  /**
20
36
  * A unique identifier representing your end-user, which can
21
37
  * help LLMGateway to monitor and detect abuse.
@@ -1362,7 +1362,8 @@ var LLMGatewayChatLanguageModel = class {
1362
1362
  // LLMGateway specific settings:
1363
1363
  include_reasoning: this.settings.includeReasoning,
1364
1364
  reasoning: this.settings.reasoning,
1365
- usage: this.settings.usage
1365
+ usage: this.settings.usage,
1366
+ image_config: this.settings.image_config
1366
1367
  }, this.config.extraBody), this.settings.extraBody);
1367
1368
  if ((responseFormat == null ? void 0 : responseFormat.type) === "json") {
1368
1369
  if ("schema" in responseFormat && responseFormat.schema) {
@@ -2074,7 +2075,8 @@ var LLMGatewayCompletionLanguageModel = class {
2074
2075
  prompt: completionPrompt,
2075
2076
  // LLMGateway specific settings:
2076
2077
  include_reasoning: this.settings.includeReasoning,
2077
- reasoning: this.settings.reasoning
2078
+ reasoning: this.settings.reasoning,
2079
+ image_config: this.settings.image_config
2078
2080
  }, this.config.extraBody), this.settings.extraBody);
2079
2081
  }
2080
2082
  async doGenerate(options) {