@llmgateway/ai-sdk-provider 2.3.1 → 2.5.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.d.mts +21 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -2
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +21 -0
- package/dist/internal/index.d.ts +21 -0
- package/dist/internal/index.js +6 -2
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +6 -2
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -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.
|
|
@@ -27,6 +43,11 @@ type LLMGatewaySharedSettings = LLMGatewayProviderOptions & {
|
|
|
27
43
|
* @deprecated use `reasoning` instead
|
|
28
44
|
*/
|
|
29
45
|
includeReasoning?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Reasoning effort level for models that support it.
|
|
48
|
+
* Controls the computational effort applied to reasoning tasks.
|
|
49
|
+
*/
|
|
50
|
+
reasoning_effort?: 'minimal' | 'low' | 'medium' | 'high';
|
|
30
51
|
extraBody?: Record<string, unknown>;
|
|
31
52
|
/**
|
|
32
53
|
* Enable usage accounting to get detailed token usage information.
|
package/dist/internal/index.d.ts
CHANGED
|
@@ -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.
|
|
@@ -27,6 +43,11 @@ type LLMGatewaySharedSettings = LLMGatewayProviderOptions & {
|
|
|
27
43
|
* @deprecated use `reasoning` instead
|
|
28
44
|
*/
|
|
29
45
|
includeReasoning?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Reasoning effort level for models that support it.
|
|
48
|
+
* Controls the computational effort applied to reasoning tasks.
|
|
49
|
+
*/
|
|
50
|
+
reasoning_effort?: 'minimal' | 'low' | 'medium' | 'high';
|
|
30
51
|
extraBody?: Record<string, unknown>;
|
|
31
52
|
/**
|
|
32
53
|
* Enable usage accounting to get detailed token usage information.
|
package/dist/internal/index.js
CHANGED
|
@@ -1362,7 +1362,9 @@ var LLMGatewayChatLanguageModel = class {
|
|
|
1362
1362
|
// LLMGateway specific settings:
|
|
1363
1363
|
include_reasoning: this.settings.includeReasoning,
|
|
1364
1364
|
reasoning: this.settings.reasoning,
|
|
1365
|
-
|
|
1365
|
+
reasoning_effort: this.settings.reasoning_effort,
|
|
1366
|
+
usage: this.settings.usage,
|
|
1367
|
+
image_config: this.settings.image_config
|
|
1366
1368
|
}, this.config.extraBody), this.settings.extraBody);
|
|
1367
1369
|
if ((responseFormat == null ? void 0 : responseFormat.type) === "json") {
|
|
1368
1370
|
if ("schema" in responseFormat && responseFormat.schema) {
|
|
@@ -2074,7 +2076,9 @@ var LLMGatewayCompletionLanguageModel = class {
|
|
|
2074
2076
|
prompt: completionPrompt,
|
|
2075
2077
|
// LLMGateway specific settings:
|
|
2076
2078
|
include_reasoning: this.settings.includeReasoning,
|
|
2077
|
-
reasoning: this.settings.reasoning
|
|
2079
|
+
reasoning: this.settings.reasoning,
|
|
2080
|
+
reasoning_effort: this.settings.reasoning_effort,
|
|
2081
|
+
image_config: this.settings.image_config
|
|
2078
2082
|
}, this.config.extraBody), this.settings.extraBody);
|
|
2079
2083
|
}
|
|
2080
2084
|
async doGenerate(options) {
|