@openrouter/sdk 1.2.112 → 1.2.114
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/byokkey.d.ts +9 -1
- package/esm/models/byokkey.js +4 -0
- package/esm/models/createbyokkeyrequest.d.ts +11 -1
- package/esm/models/createbyokkeyrequest.js +4 -0
- package/esm/models/imagegenerationrequest.d.ts +2 -0
- package/esm/models/imagegenerationrequest.js +2 -0
- package/esm/models/updatebyokkeyrequest.d.ts +11 -1
- package/esm/models/updatebyokkeyrequest.js +4 -0
- package/jsr.json +1 -1
- package/package.json +6 -6
package/esm/lib/config.d.ts
CHANGED
|
@@ -50,8 +50,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
|
|
|
50
50
|
export declare const SDK_METADATA: {
|
|
51
51
|
readonly language: "typescript";
|
|
52
52
|
readonly openapiDocVersion: "1.0.0";
|
|
53
|
-
readonly sdkVersion: "1.2.
|
|
53
|
+
readonly sdkVersion: "1.2.114";
|
|
54
54
|
readonly genVersion: "2.914.0";
|
|
55
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.2.
|
|
55
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.2.114 2.914.0 1.0.0 @openrouter/sdk";
|
|
56
56
|
};
|
|
57
57
|
//# sourceMappingURL=config.d.ts.map
|
package/esm/lib/config.js
CHANGED
|
@@ -29,8 +29,8 @@ export function serverURLFromOptions(options) {
|
|
|
29
29
|
export const SDK_METADATA = {
|
|
30
30
|
language: "typescript",
|
|
31
31
|
openapiDocVersion: "1.0.0",
|
|
32
|
-
sdkVersion: "1.2.
|
|
32
|
+
sdkVersion: "1.2.114",
|
|
33
33
|
genVersion: "2.914.0",
|
|
34
|
-
userAgent: "speakeasy-sdk/typescript 1.2.
|
|
34
|
+
userAgent: "speakeasy-sdk/typescript 1.2.114 2.914.0 1.0.0 @openrouter/sdk",
|
|
35
35
|
};
|
|
36
36
|
//# sourceMappingURL=config.js.map
|
package/esm/models/byokkey.d.ts
CHANGED
|
@@ -28,9 +28,17 @@ export type BYOKKey = {
|
|
|
28
28
|
*/
|
|
29
29
|
id: string;
|
|
30
30
|
/**
|
|
31
|
-
* Whether this
|
|
31
|
+
* Whether OpenRouter's shared endpoints on this provider are removed for every model, including models outside `allowed_models` and after all of your keys for the provider fail. The provider is skipped instead of spending OpenRouter credits. Only valid on non-fallback credentials.
|
|
32
|
+
*/
|
|
33
|
+
isByokOnly: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Whether this credential is treated as a fallback — used only after non-fallback keys for the same provider have been tried. Cannot be combined with `is_byok_only`.
|
|
32
36
|
*/
|
|
33
37
|
isFallback: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Whether OpenRouter's shared endpoints on this provider are removed for the models this credential applies to (its `allowed_models`, or every model when `null`). Requests for those models run only on your keys; models outside the allowlist may still fall back to shared capacity on this provider.
|
|
40
|
+
*/
|
|
41
|
+
isRequired: boolean;
|
|
34
42
|
/**
|
|
35
43
|
* Short masked snippet of the key (e.g. the first/last few characters) used to identify it in the UI.
|
|
36
44
|
*/
|
package/esm/models/byokkey.js
CHANGED
|
@@ -14,7 +14,9 @@ export const BYOKKey$inboundSchema = z.object({
|
|
|
14
14
|
created_at: z.string(),
|
|
15
15
|
disabled: z.boolean(),
|
|
16
16
|
id: z.string(),
|
|
17
|
+
is_byok_only: z.boolean(),
|
|
17
18
|
is_fallback: z.boolean(),
|
|
19
|
+
is_required: z.boolean(),
|
|
18
20
|
label: z.string(),
|
|
19
21
|
name: z.nullable(z.string()).optional(),
|
|
20
22
|
provider: BYOKProviderSlug$inboundSchema,
|
|
@@ -26,7 +28,9 @@ export const BYOKKey$inboundSchema = z.object({
|
|
|
26
28
|
"allowed_models": "allowedModels",
|
|
27
29
|
"allowed_user_ids": "allowedUserIds",
|
|
28
30
|
"created_at": "createdAt",
|
|
31
|
+
"is_byok_only": "isByokOnly",
|
|
29
32
|
"is_fallback": "isFallback",
|
|
33
|
+
"is_required": "isRequired",
|
|
30
34
|
"sort_order": "sortOrder",
|
|
31
35
|
"workspace_id": "workspaceId",
|
|
32
36
|
});
|
|
@@ -18,9 +18,17 @@ export type CreateBYOKKeyRequest = {
|
|
|
18
18
|
*/
|
|
19
19
|
disabled?: boolean | undefined;
|
|
20
20
|
/**
|
|
21
|
-
* Whether this
|
|
21
|
+
* Whether OpenRouter's shared endpoints on this provider are removed for every model, including models outside `allowed_models` and after all of your keys for the provider fail. The provider is skipped instead of spending OpenRouter credits. Only valid on non-fallback credentials. Defaults to `false`.
|
|
22
|
+
*/
|
|
23
|
+
isByokOnly?: boolean | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Whether this credential is treated as a fallback — used only after non-fallback keys for the same provider have been tried. Cannot be combined with `is_byok_only`.
|
|
22
26
|
*/
|
|
23
27
|
isFallback?: boolean | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Whether OpenRouter's shared endpoints on this provider are removed for the models this credential applies to (its `allowed_models`, or every model when `null`). Requests for those models run only on your keys; models outside the allowlist may still fall back to shared capacity on this provider. Defaults to `false`.
|
|
30
|
+
*/
|
|
31
|
+
isRequired?: boolean | undefined;
|
|
24
32
|
/**
|
|
25
33
|
* The raw provider API key or credential. This value is encrypted at rest and never returned in API responses.
|
|
26
34
|
*/
|
|
@@ -44,7 +52,9 @@ export type CreateBYOKKeyRequest$Outbound = {
|
|
|
44
52
|
allowed_models?: Array<string> | null | undefined;
|
|
45
53
|
allowed_user_ids?: Array<string> | null | undefined;
|
|
46
54
|
disabled?: boolean | undefined;
|
|
55
|
+
is_byok_only?: boolean | undefined;
|
|
47
56
|
is_fallback?: boolean | undefined;
|
|
57
|
+
is_required?: boolean | undefined;
|
|
48
58
|
key: string;
|
|
49
59
|
name?: string | null | undefined;
|
|
50
60
|
provider: string;
|
|
@@ -11,7 +11,9 @@ export const CreateBYOKKeyRequest$outboundSchema = z.object({
|
|
|
11
11
|
allowedModels: z.nullable(z.array(z.string())).optional(),
|
|
12
12
|
allowedUserIds: z.nullable(z.array(z.string())).optional(),
|
|
13
13
|
disabled: z.boolean().optional(),
|
|
14
|
+
isByokOnly: z.boolean().optional(),
|
|
14
15
|
isFallback: z.boolean().optional(),
|
|
16
|
+
isRequired: z.boolean().optional(),
|
|
15
17
|
key: z.string(),
|
|
16
18
|
name: z.nullable(z.string()).optional(),
|
|
17
19
|
provider: BYOKProviderSlug$outboundSchema,
|
|
@@ -21,7 +23,9 @@ export const CreateBYOKKeyRequest$outboundSchema = z.object({
|
|
|
21
23
|
allowedApiKeyHashes: "allowed_api_key_hashes",
|
|
22
24
|
allowedModels: "allowed_models",
|
|
23
25
|
allowedUserIds: "allowed_user_ids",
|
|
26
|
+
isByokOnly: "is_byok_only",
|
|
24
27
|
isFallback: "is_fallback",
|
|
28
|
+
isRequired: "is_required",
|
|
25
29
|
workspaceId: "workspace_id",
|
|
26
30
|
});
|
|
27
31
|
});
|
|
@@ -66,6 +66,8 @@ export declare const ImageGenerationRequestQuality: {
|
|
|
66
66
|
readonly Low: "low";
|
|
67
67
|
readonly Medium: "medium";
|
|
68
68
|
readonly High: "high";
|
|
69
|
+
readonly Xhigh: "xhigh";
|
|
70
|
+
readonly Max: "max";
|
|
69
71
|
};
|
|
70
72
|
/**
|
|
71
73
|
* Rendering quality. Providers without a quality knob ignore this.
|
|
@@ -17,9 +17,17 @@ export type UpdateBYOKKeyRequest = {
|
|
|
17
17
|
*/
|
|
18
18
|
disabled?: boolean | undefined;
|
|
19
19
|
/**
|
|
20
|
-
* Whether this
|
|
20
|
+
* Whether OpenRouter's shared endpoints on this provider are removed for every model, including models outside `allowed_models` and after all of your keys for the provider fail. The provider is skipped instead of spending OpenRouter credits. Only valid on non-fallback credentials. Omit to leave the stored value unchanged.
|
|
21
|
+
*/
|
|
22
|
+
isByokOnly?: boolean | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Whether this credential is treated as a fallback — used only after non-fallback keys for the same provider have been tried. Cannot be combined with `is_byok_only`. Omit to leave the stored value unchanged.
|
|
21
25
|
*/
|
|
22
26
|
isFallback?: boolean | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Whether OpenRouter's shared endpoints on this provider are removed for the models this credential applies to (its `allowed_models`, or every model when `null`). Requests for those models run only on your keys; models outside the allowlist may still fall back to shared capacity on this provider. Omit to leave the stored value unchanged.
|
|
29
|
+
*/
|
|
30
|
+
isRequired?: boolean | undefined;
|
|
23
31
|
/**
|
|
24
32
|
* A new raw provider API key to rotate the credential in-place. The previous key material is overwritten and the masked label is regenerated. Encrypted at rest and never returned in API responses.
|
|
25
33
|
*/
|
|
@@ -35,7 +43,9 @@ export type UpdateBYOKKeyRequest$Outbound = {
|
|
|
35
43
|
allowed_models?: Array<string> | null | undefined;
|
|
36
44
|
allowed_user_ids?: Array<string> | null | undefined;
|
|
37
45
|
disabled?: boolean | undefined;
|
|
46
|
+
is_byok_only?: boolean | undefined;
|
|
38
47
|
is_fallback?: boolean | undefined;
|
|
48
|
+
is_required?: boolean | undefined;
|
|
39
49
|
key?: string | undefined;
|
|
40
50
|
name?: string | null | undefined;
|
|
41
51
|
};
|
|
@@ -10,7 +10,9 @@ export const UpdateBYOKKeyRequest$outboundSchema = z.object({
|
|
|
10
10
|
allowedModels: z.nullable(z.array(z.string())).optional(),
|
|
11
11
|
allowedUserIds: z.nullable(z.array(z.string())).optional(),
|
|
12
12
|
disabled: z.boolean().optional(),
|
|
13
|
+
isByokOnly: z.boolean().optional(),
|
|
13
14
|
isFallback: z.boolean().optional(),
|
|
15
|
+
isRequired: z.boolean().optional(),
|
|
14
16
|
key: z.string().optional(),
|
|
15
17
|
name: z.nullable(z.string()).optional(),
|
|
16
18
|
}).transform((v) => {
|
|
@@ -18,7 +20,9 @@ export const UpdateBYOKKeyRequest$outboundSchema = z.object({
|
|
|
18
20
|
allowedApiKeyHashes: "allowed_api_key_hashes",
|
|
19
21
|
allowedModels: "allowed_models",
|
|
20
22
|
allowedUserIds: "allowed_user_ids",
|
|
23
|
+
isByokOnly: "is_byok_only",
|
|
21
24
|
isFallback: "is_fallback",
|
|
25
|
+
isRequired: "is_required",
|
|
22
26
|
});
|
|
23
27
|
});
|
|
24
28
|
export function updateBYOKKeyRequestToJSON(updateBYOKKeyRequest) {
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openrouter/sdk",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.114",
|
|
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,15 +73,15 @@
|
|
|
73
73
|
"lint": "eslint --cache --max-warnings=0 src",
|
|
74
74
|
"build": "tsc",
|
|
75
75
|
"prepublishOnly": "npm run build",
|
|
76
|
-
"postinstall": "node scripts/check-types.js || true",
|
|
77
76
|
"test": "vitest --run --project unit",
|
|
78
77
|
"test:e2e": "vitest --run --project e2e",
|
|
79
78
|
"test:transit": "exit 0",
|
|
80
|
-
"test:watch": "vitest --watch --project unit",
|
|
81
79
|
"typecheck": "tsc --noEmit",
|
|
82
80
|
"compile": "tsc",
|
|
83
81
|
"prepare": "npm run build",
|
|
84
|
-
"
|
|
82
|
+
"test:watch": "vitest --watch --project unit",
|
|
83
|
+
"typecheck:transit": "exit 0",
|
|
84
|
+
"postinstall": "node scripts/check-types.js || true"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {},
|
|
87
87
|
"devDependencies": {
|