@openrouter/sdk 1.5.105 → 1.5.107
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/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/autorouterplugin.d.ts +3 -3
- package/esm/models/autorouterplugin.js +1 -1
- package/esm/models/jevrouterplugin.d.ts +1 -1
- package/esm/models/videogenerationrequest.d.ts +3 -1
- package/esm/models/videogenerationrequest.js +2 -0
- package/esm/models/videomodel.d.ts +16 -0
- package/esm/models/videomodel.js +16 -0
- package/jsr.json +1 -1
- package/package.json +5 -5
package/esm/lib/config.d.ts
CHANGED
|
@@ -49,8 +49,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
|
|
|
49
49
|
export declare const SDK_METADATA: {
|
|
50
50
|
readonly language: "typescript";
|
|
51
51
|
readonly openapiDocVersion: "1.0.0";
|
|
52
|
-
readonly sdkVersion: "1.5.
|
|
52
|
+
readonly sdkVersion: "1.5.107";
|
|
53
53
|
readonly genVersion: "2.960.8";
|
|
54
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.5.
|
|
54
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.5.107 2.960.8 1.0.0 @openrouter/sdk";
|
|
55
55
|
};
|
|
56
56
|
//# sourceMappingURL=config.d.ts.map
|
package/esm/lib/config.js
CHANGED
|
@@ -25,8 +25,8 @@ export function serverURLFromOptions(options) {
|
|
|
25
25
|
export const SDK_METADATA = {
|
|
26
26
|
language: "typescript",
|
|
27
27
|
openapiDocVersion: "1.0.0",
|
|
28
|
-
sdkVersion: "1.5.
|
|
28
|
+
sdkVersion: "1.5.107",
|
|
29
29
|
genVersion: "2.960.8",
|
|
30
|
-
userAgent: "speakeasy-sdk/typescript 1.5.
|
|
30
|
+
userAgent: "speakeasy-sdk/typescript 1.5.107 2.960.8 1.0.0 @openrouter/sdk",
|
|
31
31
|
};
|
|
32
32
|
//# sourceMappingURL=config.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
2
|
import { OpenEnum } from "../types/enums.js";
|
|
3
3
|
/**
|
|
4
|
-
* Named cost/quality setting. Tiers select cost-percentile bands: low = [0, 20), medium = [20, 40), high = [40, 60), xhigh = [60, 80), and max = [80, 100]. Takes precedence over the deprecated numeric cost_quality_tradeoff when both are provided.
|
|
4
|
+
* Named cost/quality setting. Tiers select cost-percentile bands: low = [0, 20), medium = [20, 40), high = [40, 60), xhigh = [60, 80), and max = [80, 100]. Takes precedence over the deprecated numeric cost_quality_tradeoff when both are provided. On openrouter/auto-code, low and high pick a cheaper or stronger version of the Auto Code policy (xhigh and max count as high), and medium, or a version that is not available, runs on the default Auto Code policy.
|
|
5
5
|
*/
|
|
6
6
|
export declare const AutoRouterPluginCostTier: {
|
|
7
7
|
readonly Low: "low";
|
|
@@ -11,7 +11,7 @@ export declare const AutoRouterPluginCostTier: {
|
|
|
11
11
|
readonly Max: "max";
|
|
12
12
|
};
|
|
13
13
|
/**
|
|
14
|
-
* Named cost/quality setting. Tiers select cost-percentile bands: low = [0, 20), medium = [20, 40), high = [40, 60), xhigh = [60, 80), and max = [80, 100]. Takes precedence over the deprecated numeric cost_quality_tradeoff when both are provided.
|
|
14
|
+
* Named cost/quality setting. Tiers select cost-percentile bands: low = [0, 20), medium = [20, 40), high = [40, 60), xhigh = [60, 80), and max = [80, 100]. Takes precedence over the deprecated numeric cost_quality_tradeoff when both are provided. On openrouter/auto-code, low and high pick a cheaper or stronger version of the Auto Code policy (xhigh and max count as high), and medium, or a version that is not available, runs on the default Auto Code policy.
|
|
15
15
|
*/
|
|
16
16
|
export type AutoRouterPluginCostTier = OpenEnum<typeof AutoRouterPluginCostTier>;
|
|
17
17
|
export type AutoRouterPlugin = {
|
|
@@ -26,7 +26,7 @@ export type AutoRouterPlugin = {
|
|
|
26
26
|
*/
|
|
27
27
|
costQualityTradeoff?: number | undefined;
|
|
28
28
|
/**
|
|
29
|
-
* Named cost/quality setting. Tiers select cost-percentile bands: low = [0, 20), medium = [20, 40), high = [40, 60), xhigh = [60, 80), and max = [80, 100]. Takes precedence over the deprecated numeric cost_quality_tradeoff when both are provided.
|
|
29
|
+
* Named cost/quality setting. Tiers select cost-percentile bands: low = [0, 20), medium = [20, 40), high = [40, 60), xhigh = [60, 80), and max = [80, 100]. Takes precedence over the deprecated numeric cost_quality_tradeoff when both are provided. On openrouter/auto-code, low and high pick a cheaper or stronger version of the Auto Code policy (xhigh and max count as high), and medium, or a version that is not available, runs on the default Auto Code policy.
|
|
30
30
|
*/
|
|
31
31
|
costTier?: AutoRouterPluginCostTier | undefined;
|
|
32
32
|
/**
|
|
@@ -5,7 +5,7 @@ import * as z from "zod/v4";
|
|
|
5
5
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
6
6
|
import * as openEnums from "../types/enums.js";
|
|
7
7
|
/**
|
|
8
|
-
* Named cost/quality setting. Tiers select cost-percentile bands: low = [0, 20), medium = [20, 40), high = [40, 60), xhigh = [60, 80), and max = [80, 100]. Takes precedence over the deprecated numeric cost_quality_tradeoff when both are provided.
|
|
8
|
+
* Named cost/quality setting. Tiers select cost-percentile bands: low = [0, 20), medium = [20, 40), high = [40, 60), xhigh = [60, 80), and max = [80, 100]. Takes precedence over the deprecated numeric cost_quality_tradeoff when both are provided. On openrouter/auto-code, low and high pick a cheaper or stronger version of the Auto Code policy (xhigh and max count as high), and medium, or a version that is not available, runs on the default Auto Code policy.
|
|
9
9
|
*/
|
|
10
10
|
export const AutoRouterPluginCostTier = {
|
|
11
11
|
Low: "low",
|
|
@@ -5,7 +5,7 @@ export type JevRouterPlugin = {
|
|
|
5
5
|
*/
|
|
6
6
|
allowedModels?: Array<string> | undefined;
|
|
7
7
|
/**
|
|
8
|
-
* Select low, medium, high, or a cost tier configured by the operator. Overrides the live-config tier and replaces the shared routing policy with that tier. Omit to use the live configuration. Model exclusions and the router kill switch still apply.
|
|
8
|
+
* Select low, medium, high, or a cost tier configured by the operator. Overrides the live-config tier and replaces the shared routing policy with that tier. Omit to use the live configuration. On openrouter/auto-code, low and high (or auto-code-low and auto-code-high) pick a cheaper or stronger version of the Auto Code policy (xhigh and max count as high), and every other value, or a version that is not available, runs on the default Auto Code policy. Model exclusions and the router kill switch still apply.
|
|
9
9
|
*/
|
|
10
10
|
costTier?: string | undefined;
|
|
11
11
|
/**
|
|
@@ -17,6 +17,8 @@ export declare const VideoGenerationRequestAspectRatio: {
|
|
|
17
17
|
readonly TwentyThree: "2:3";
|
|
18
18
|
readonly TwoHundredAndNineteen: "21:9";
|
|
19
19
|
readonly NineHundredAndTwentyOne: "9:21";
|
|
20
|
+
readonly TwentyOne: "2:1";
|
|
21
|
+
readonly FiftyTwo: "5:2";
|
|
20
22
|
};
|
|
21
23
|
/**
|
|
22
24
|
* Aspect ratio of the generated video. Omit it to use the model default, which on models with adaptive aspect ratio (e.g. BytePlus Seedance) follows the input image or video.
|
|
@@ -592,7 +594,7 @@ export type VideoGenerationRequest = {
|
|
|
592
594
|
*/
|
|
593
595
|
frameImages?: Array<FrameImage> | undefined;
|
|
594
596
|
/**
|
|
595
|
-
* Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set.
|
|
597
|
+
* Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set. When neither is set, some providers (such as xAI) apply their own default and generate audio, so send false to request a silent video. Some models always include audio and ignore false.
|
|
596
598
|
*/
|
|
597
599
|
generateAudio?: boolean | undefined;
|
|
598
600
|
/**
|
|
@@ -21,6 +21,8 @@ export const VideoGenerationRequestAspectRatio = {
|
|
|
21
21
|
TwentyThree: "2:3",
|
|
22
22
|
TwoHundredAndNineteen: "21:9",
|
|
23
23
|
NineHundredAndTwentyOne: "9:21",
|
|
24
|
+
TwentyOne: "2:1",
|
|
25
|
+
FiftyTwo: "5:2",
|
|
24
26
|
};
|
|
25
27
|
/**
|
|
26
28
|
* Data collection setting. If no available model provider meets the requirement, your request will return an error.
|
|
@@ -12,6 +12,8 @@ export declare const SupportedAspectRatio: {
|
|
|
12
12
|
readonly TwentyThree: "2:3";
|
|
13
13
|
readonly TwoHundredAndNineteen: "21:9";
|
|
14
14
|
readonly NineHundredAndTwentyOne: "9:21";
|
|
15
|
+
readonly TwentyOne: "2:1";
|
|
16
|
+
readonly FiftyTwo: "5:2";
|
|
15
17
|
};
|
|
16
18
|
export type SupportedAspectRatio = OpenEnum<typeof SupportedAspectRatio>;
|
|
17
19
|
export declare const SupportedFrameImage: {
|
|
@@ -48,6 +50,7 @@ export declare const SupportedSize: {
|
|
|
48
50
|
readonly SixHundredAndFortyx360: "640x360";
|
|
49
51
|
readonly SixHundredAndFortyx480: "640x480";
|
|
50
52
|
readonly SixHundredAndFortyx640: "640x640";
|
|
53
|
+
readonly SevenHundredAndTwentyx360: "720x360";
|
|
51
54
|
readonly SevenHundredAndTwentyx480: "720x480";
|
|
52
55
|
readonly SevenHundredAndTwentyx720: "720x720";
|
|
53
56
|
readonly SevenHundredAndTwentyx960: "720x960";
|
|
@@ -64,6 +67,8 @@ export declare const SupportedSize: {
|
|
|
64
67
|
readonly EightHundredAndFortyx360: "840x360";
|
|
65
68
|
readonly EightHundredAndFiftyFourx480: "854x480";
|
|
66
69
|
readonly EightHundredAndSixtyFourx496: "864x496";
|
|
70
|
+
readonly NineHundredAndSixtyx480: "960x480";
|
|
71
|
+
readonly NineHundredx360: "900x360";
|
|
67
72
|
readonly NineHundredAndSixtyx720: "960x720";
|
|
68
73
|
readonly NineHundredAndSixtyx960: "960x960";
|
|
69
74
|
readonly NineHundredAndNinetyTwox432: "992x432";
|
|
@@ -77,8 +82,10 @@ export declare const SupportedSize: {
|
|
|
77
82
|
readonly OneThousandOneHundredAndTwelvex834: "1112x834";
|
|
78
83
|
readonly OneThousandOneHundredAndTwentyx480: "1120x480";
|
|
79
84
|
readonly OneThousandOneHundredAndFiftyTwox768: "1152x768";
|
|
85
|
+
readonly OneThousandTwoHundredx480: "1200x480";
|
|
80
86
|
readonly OneThousandTwoHundredAndEightyx720: "1280x720";
|
|
81
87
|
readonly OneThousandThreeHundredAndSixtySixx768: "1366x768";
|
|
88
|
+
readonly OneThousandFourHundredAndFortyx720: "1440x720";
|
|
82
89
|
readonly OneThousandFourHundredAndFortyx1080: "1440x1080";
|
|
83
90
|
readonly OneThousandFourHundredAndFortyx1440: "1440x1440";
|
|
84
91
|
readonly OneThousandFourHundredAndFortyx1920: "1440x1920";
|
|
@@ -86,11 +93,15 @@ export declare const SupportedSize: {
|
|
|
86
93
|
readonly OneThousandFourHundredAndFortyx2560: "1440x2560";
|
|
87
94
|
readonly OneThousandFourHundredAndFortyx3360: "1440x3360";
|
|
88
95
|
readonly OneThousandFourHundredAndSeventyx630: "1470x630";
|
|
96
|
+
readonly OneThousandFiveHundredAndThirtySixx768: "1536x768";
|
|
89
97
|
readonly OneThousandSixHundredAndTwentyx1080: "1620x1080";
|
|
90
98
|
readonly OneThousandSixHundredAndEightyx720: "1680x720";
|
|
91
99
|
readonly OneThousandSevenHundredAndNinetyTwox768: "1792x768";
|
|
100
|
+
readonly OneThousandEightHundredx720: "1800x720";
|
|
101
|
+
readonly OneThousandNineHundredAndTwentyx768: "1920x768";
|
|
92
102
|
readonly OneThousandNineHundredAndTwentyx1080: "1920x1080";
|
|
93
103
|
readonly OneThousandNineHundredAndTwentyx1440: "1920x1440";
|
|
104
|
+
readonly TwoThousandOneHundredAndSixtyx1080: "2160x1080";
|
|
94
105
|
readonly TwoThousandOneHundredAndSixtyx1440: "2160x1440";
|
|
95
106
|
readonly TwoThousandOneHundredAndSixtyx2160: "2160x2160";
|
|
96
107
|
readonly TwoThousandOneHundredAndSixtyx2880: "2160x2880";
|
|
@@ -99,11 +110,16 @@ export declare const SupportedSize: {
|
|
|
99
110
|
readonly TwoThousandOneHundredAndSixtyx5040: "2160x5040";
|
|
100
111
|
readonly TwoThousandFiveHundredAndTwentyx1080: "2520x1080";
|
|
101
112
|
readonly TwoThousandFiveHundredAndSixtyx1440: "2560x1440";
|
|
113
|
+
readonly TwoThousandEightHundredAndEightyx1440: "2880x1440";
|
|
114
|
+
readonly TwoThousandSevenHundredx1080: "2700x1080";
|
|
102
115
|
readonly TwoThousandEightHundredAndEightyx2160: "2880x2160";
|
|
103
116
|
readonly ThreeThousandTwoHundredAndFortyx2160: "3240x2160";
|
|
104
117
|
readonly ThreeThousandThreeHundredAndSixtyx1440: "3360x1440";
|
|
118
|
+
readonly ThreeThousandSixHundredx1440: "3600x1440";
|
|
105
119
|
readonly ThreeThousandEightHundredAndFortyx2160: "3840x2160";
|
|
120
|
+
readonly FourThousandThreeHundredAndTwentyx2160: "4320x2160";
|
|
106
121
|
readonly FiveThousandAndFortyx2160: "5040x2160";
|
|
122
|
+
readonly FiveThousandFourHundredx2160: "5400x2160";
|
|
107
123
|
};
|
|
108
124
|
export type SupportedSize = OpenEnum<typeof SupportedSize>;
|
|
109
125
|
/**
|
package/esm/models/videomodel.js
CHANGED
|
@@ -15,6 +15,8 @@ export const SupportedAspectRatio = {
|
|
|
15
15
|
TwentyThree: "2:3",
|
|
16
16
|
TwoHundredAndNineteen: "21:9",
|
|
17
17
|
NineHundredAndTwentyOne: "9:21",
|
|
18
|
+
TwentyOne: "2:1",
|
|
19
|
+
FiftyTwo: "5:2",
|
|
18
20
|
};
|
|
19
21
|
export const SupportedFrameImage = {
|
|
20
22
|
FirstFrame: "first_frame",
|
|
@@ -48,6 +50,7 @@ export const SupportedSize = {
|
|
|
48
50
|
SixHundredAndFortyx360: "640x360",
|
|
49
51
|
SixHundredAndFortyx480: "640x480",
|
|
50
52
|
SixHundredAndFortyx640: "640x640",
|
|
53
|
+
SevenHundredAndTwentyx360: "720x360",
|
|
51
54
|
SevenHundredAndTwentyx480: "720x480",
|
|
52
55
|
SevenHundredAndTwentyx720: "720x720",
|
|
53
56
|
SevenHundredAndTwentyx960: "720x960",
|
|
@@ -64,6 +67,8 @@ export const SupportedSize = {
|
|
|
64
67
|
EightHundredAndFortyx360: "840x360",
|
|
65
68
|
EightHundredAndFiftyFourx480: "854x480",
|
|
66
69
|
EightHundredAndSixtyFourx496: "864x496",
|
|
70
|
+
NineHundredAndSixtyx480: "960x480",
|
|
71
|
+
NineHundredx360: "900x360",
|
|
67
72
|
NineHundredAndSixtyx720: "960x720",
|
|
68
73
|
NineHundredAndSixtyx960: "960x960",
|
|
69
74
|
NineHundredAndNinetyTwox432: "992x432",
|
|
@@ -77,8 +82,10 @@ export const SupportedSize = {
|
|
|
77
82
|
OneThousandOneHundredAndTwelvex834: "1112x834",
|
|
78
83
|
OneThousandOneHundredAndTwentyx480: "1120x480",
|
|
79
84
|
OneThousandOneHundredAndFiftyTwox768: "1152x768",
|
|
85
|
+
OneThousandTwoHundredx480: "1200x480",
|
|
80
86
|
OneThousandTwoHundredAndEightyx720: "1280x720",
|
|
81
87
|
OneThousandThreeHundredAndSixtySixx768: "1366x768",
|
|
88
|
+
OneThousandFourHundredAndFortyx720: "1440x720",
|
|
82
89
|
OneThousandFourHundredAndFortyx1080: "1440x1080",
|
|
83
90
|
OneThousandFourHundredAndFortyx1440: "1440x1440",
|
|
84
91
|
OneThousandFourHundredAndFortyx1920: "1440x1920",
|
|
@@ -86,11 +93,15 @@ export const SupportedSize = {
|
|
|
86
93
|
OneThousandFourHundredAndFortyx2560: "1440x2560",
|
|
87
94
|
OneThousandFourHundredAndFortyx3360: "1440x3360",
|
|
88
95
|
OneThousandFourHundredAndSeventyx630: "1470x630",
|
|
96
|
+
OneThousandFiveHundredAndThirtySixx768: "1536x768",
|
|
89
97
|
OneThousandSixHundredAndTwentyx1080: "1620x1080",
|
|
90
98
|
OneThousandSixHundredAndEightyx720: "1680x720",
|
|
91
99
|
OneThousandSevenHundredAndNinetyTwox768: "1792x768",
|
|
100
|
+
OneThousandEightHundredx720: "1800x720",
|
|
101
|
+
OneThousandNineHundredAndTwentyx768: "1920x768",
|
|
92
102
|
OneThousandNineHundredAndTwentyx1080: "1920x1080",
|
|
93
103
|
OneThousandNineHundredAndTwentyx1440: "1920x1440",
|
|
104
|
+
TwoThousandOneHundredAndSixtyx1080: "2160x1080",
|
|
94
105
|
TwoThousandOneHundredAndSixtyx1440: "2160x1440",
|
|
95
106
|
TwoThousandOneHundredAndSixtyx2160: "2160x2160",
|
|
96
107
|
TwoThousandOneHundredAndSixtyx2880: "2160x2880",
|
|
@@ -99,11 +110,16 @@ export const SupportedSize = {
|
|
|
99
110
|
TwoThousandOneHundredAndSixtyx5040: "2160x5040",
|
|
100
111
|
TwoThousandFiveHundredAndTwentyx1080: "2520x1080",
|
|
101
112
|
TwoThousandFiveHundredAndSixtyx1440: "2560x1440",
|
|
113
|
+
TwoThousandEightHundredAndEightyx1440: "2880x1440",
|
|
114
|
+
TwoThousandSevenHundredx1080: "2700x1080",
|
|
102
115
|
TwoThousandEightHundredAndEightyx2160: "2880x2160",
|
|
103
116
|
ThreeThousandTwoHundredAndFortyx2160: "3240x2160",
|
|
104
117
|
ThreeThousandThreeHundredAndSixtyx1440: "3360x1440",
|
|
118
|
+
ThreeThousandSixHundredx1440: "3600x1440",
|
|
105
119
|
ThreeThousandEightHundredAndFortyx2160: "3840x2160",
|
|
120
|
+
FourThousandThreeHundredAndTwentyx2160: "4320x2160",
|
|
106
121
|
FiveThousandAndFortyx2160: "5040x2160",
|
|
122
|
+
FiveThousandFourHundredx2160: "5400x2160",
|
|
107
123
|
};
|
|
108
124
|
/** @internal */
|
|
109
125
|
export const SupportedAspectRatio$inboundSchema = openEnums.inboundSchema(SupportedAspectRatio);
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openrouter/sdk",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.107",
|
|
4
4
|
"author": "OpenRouter",
|
|
5
5
|
"description": "The OpenRouter TypeScript SDK is a type-safe toolkit for building AI applications with access to 400+ language models through a unified API.",
|
|
6
6
|
"keywords": [
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"license": "Apache-2.0",
|
|
22
22
|
"packageManager": "pnpm@10.22.0",
|
|
23
23
|
"publishConfig": {
|
|
24
|
-
"
|
|
25
|
-
"
|
|
24
|
+
"provenance": true,
|
|
25
|
+
"access": "public"
|
|
26
26
|
},
|
|
27
27
|
"type": "module",
|
|
28
28
|
"main": "./esm/index.js",
|
|
@@ -73,13 +73,13 @@
|
|
|
73
73
|
"lint": "eslint --cache --max-warnings=0 src",
|
|
74
74
|
"build": "node --max-old-space-size=8192 ./node_modules/typescript/bin/tsc && node scripts/unbarrel-imports.js",
|
|
75
75
|
"prepublishOnly": "npm run build",
|
|
76
|
+
"compile": "node --max-old-space-size=8192 ./node_modules/typescript/bin/tsc && node scripts/unbarrel-imports.js",
|
|
76
77
|
"postinstall": "node scripts/check-types.js || true",
|
|
77
78
|
"test": "vitest --run --project unit",
|
|
78
79
|
"test:e2e": "vitest --run --project e2e",
|
|
80
|
+
"test:transit": "exit 0",
|
|
79
81
|
"typecheck:transit": "exit 0",
|
|
80
|
-
"compile": "node --max-old-space-size=8192 ./node_modules/typescript/bin/tsc && node scripts/unbarrel-imports.js",
|
|
81
82
|
"prepare": "npm run build",
|
|
82
|
-
"test:transit": "exit 0",
|
|
83
83
|
"test:watch": "vitest --watch --project unit",
|
|
84
84
|
"typecheck": "tsc --noEmit"
|
|
85
85
|
},
|