@openrouter/sdk 1.5.132 → 1.5.134
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 +4 -0
- package/esm/models/byokkey.js +2 -0
- package/esm/models/createbyokkeyrequest.d.ts +5 -0
- package/esm/models/createbyokkeyrequest.js +2 -0
- package/esm/models/jevrouterplugin.d.ts +3 -0
- package/esm/models/updatebyokkeyrequest.d.ts +5 -0
- package/esm/models/updatebyokkeyrequest.js +2 -0
- package/jsr.json +1 -1
- package/package.json +6 -6
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.134";
|
|
53
53
|
readonly genVersion: "2.960.8";
|
|
54
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.5.
|
|
54
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.5.134 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.134",
|
|
29
29
|
genVersion: "2.960.8",
|
|
30
|
-
userAgent: "speakeasy-sdk/typescript 1.5.
|
|
30
|
+
userAgent: "speakeasy-sdk/typescript 1.5.134 2.960.8 1.0.0 @openrouter/sdk",
|
|
31
31
|
};
|
|
32
32
|
//# sourceMappingURL=config.js.map
|
package/esm/models/byokkey.d.ts
CHANGED
|
@@ -52,6 +52,10 @@ export type BYOKKey = {
|
|
|
52
52
|
* 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.
|
|
53
53
|
*/
|
|
54
54
|
isByokOnly: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Whether requests for the models this credential covers run only on exclusive credentials covering that model: never on another provider, a non-exclusive key, or OpenRouter's shared capacity. Every exclusive credential that covers the model and is eligible for the request may serve it, so two exclusive credentials with overlapping models share those models. Only credentials eligible for the request (its API key and member restrictions) count, so a request no exclusive credential is eligible for uses normal routing. A request for a model that an eligible exclusive credential covers returns a 404 when none of those credentials can serve it. The covered models are `allowed_models` when non-empty; with no or an empty `allowed_models`, an OpenAI, Anthropic, or Google credential covers every closed-weight model by that lab (for example every `openai/*` model except open-weight models such as `openai/gpt-oss-120b`, which stay on normal routing unless listed), and other providers must set a non-empty `allowed_models`. Only valid on non-fallback credentials.
|
|
57
|
+
*/
|
|
58
|
+
isExclusive: boolean;
|
|
55
59
|
/**
|
|
56
60
|
* 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`.
|
|
57
61
|
*/
|
package/esm/models/byokkey.js
CHANGED
|
@@ -27,6 +27,7 @@ export const BYOKKey$inboundSchema = z.object({
|
|
|
27
27
|
disabled: z.boolean(),
|
|
28
28
|
id: z.string(),
|
|
29
29
|
is_byok_only: z.boolean(),
|
|
30
|
+
is_exclusive: z.boolean(),
|
|
30
31
|
is_fallback: z.boolean(),
|
|
31
32
|
is_required: z.boolean(),
|
|
32
33
|
label: z.string(),
|
|
@@ -43,6 +44,7 @@ export const BYOKKey$inboundSchema = z.object({
|
|
|
43
44
|
"declared_region": "declaredRegion",
|
|
44
45
|
"declared_zdr": "declaredZdr",
|
|
45
46
|
"is_byok_only": "isByokOnly",
|
|
47
|
+
"is_exclusive": "isExclusive",
|
|
46
48
|
"is_fallback": "isFallback",
|
|
47
49
|
"is_required": "isRequired",
|
|
48
50
|
"sort_order": "sortOrder",
|
|
@@ -42,6 +42,10 @@ export type CreateBYOKKeyRequest = {
|
|
|
42
42
|
* 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`.
|
|
43
43
|
*/
|
|
44
44
|
isByokOnly?: boolean | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* Whether requests for the models this credential covers run only on exclusive credentials covering that model: never on another provider, a non-exclusive key, or OpenRouter's shared capacity. Every exclusive credential that covers the model and is eligible for the request may serve it, so two exclusive credentials with overlapping models share those models. Only credentials eligible for the request (its API key and member restrictions) count, so a request no exclusive credential is eligible for uses normal routing. A request for a model that an eligible exclusive credential covers returns a 404 when none of those credentials can serve it. The covered models are `allowed_models` when non-empty; with no or an empty `allowed_models`, an OpenAI, Anthropic, or Google credential covers every closed-weight model by that lab (for example every `openai/*` model except open-weight models such as `openai/gpt-oss-120b`, which stay on normal routing unless listed), and other providers must set a non-empty `allowed_models`. Only valid on non-fallback credentials. Defaults to `false`.
|
|
47
|
+
*/
|
|
48
|
+
isExclusive?: boolean | undefined;
|
|
45
49
|
/**
|
|
46
50
|
* 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`.
|
|
47
51
|
*/
|
|
@@ -78,6 +82,7 @@ export type CreateBYOKKeyRequest$Outbound = {
|
|
|
78
82
|
declared_zdr?: boolean | null | undefined;
|
|
79
83
|
disabled?: boolean | undefined;
|
|
80
84
|
is_byok_only?: boolean | undefined;
|
|
85
|
+
is_exclusive?: boolean | undefined;
|
|
81
86
|
is_fallback?: boolean | undefined;
|
|
82
87
|
is_required?: boolean | undefined;
|
|
83
88
|
key: string;
|
|
@@ -25,6 +25,7 @@ export const CreateBYOKKeyRequest$outboundSchema = z.object({
|
|
|
25
25
|
declaredZdr: z.nullable(z.boolean()).optional(),
|
|
26
26
|
disabled: z.boolean().optional(),
|
|
27
27
|
isByokOnly: z.boolean().optional(),
|
|
28
|
+
isExclusive: z.boolean().optional(),
|
|
28
29
|
isFallback: z.boolean().optional(),
|
|
29
30
|
isRequired: z.boolean().optional(),
|
|
30
31
|
key: z.string(),
|
|
@@ -39,6 +40,7 @@ export const CreateBYOKKeyRequest$outboundSchema = z.object({
|
|
|
39
40
|
declaredRegion: "declared_region",
|
|
40
41
|
declaredZdr: "declared_zdr",
|
|
41
42
|
isByokOnly: "is_byok_only",
|
|
43
|
+
isExclusive: "is_exclusive",
|
|
42
44
|
isFallback: "is_fallback",
|
|
43
45
|
isRequired: "is_required",
|
|
44
46
|
workspaceId: "workspace_id",
|
|
@@ -12,6 +12,9 @@ export type JevRouterPlugin = {
|
|
|
12
12
|
* Remove these models from the router. Each entry is a model slug or a wildcard pattern (e.g. "xiaomi/*"). A `~author/family-latest` alias matches every revision of that family. Up to 1024 patterns, each at most 1024 characters, with 65536 total characters across all patterns. Applied after `models`, so an excluded pattern always wins over an included one; when the lists leave no model the request can use, it fails with 404 rather than routing outside them.
|
|
13
13
|
*/
|
|
14
14
|
excludedModels?: Array<string> | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* The decisions router plugin. A request may also send `decisions-router`, an alias that configures the same plugin; responses and pipeline stages report it as `jev-router`.
|
|
17
|
+
*/
|
|
15
18
|
id: "jev-router";
|
|
16
19
|
/**
|
|
17
20
|
* Restrict the router to these models. Each entry is a model slug or a wildcard pattern (e.g. "anthropic/*"), matched against the current pool; models outside the pool are ignored. A `~author/family-latest` alias matches every revision of that family. Up to 1024 patterns, each at most 1024 characters, with 65536 total characters across all patterns. When omitted or empty, every model in the pool is a candidate; when no pool model matches, the list is ignored and the whole pool is used (`excluded_models` still apply). When no entry matches any catalog model, for example a misspelled slug, the request fails with 404 instead. `allowed_models` is an alias; entries from both fields are combined.
|
|
@@ -41,6 +41,10 @@ export type UpdateBYOKKeyRequest = {
|
|
|
41
41
|
* 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.
|
|
42
42
|
*/
|
|
43
43
|
isByokOnly?: boolean | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* Whether requests for the models this credential covers run only on exclusive credentials covering that model: never on another provider, a non-exclusive key, or OpenRouter's shared capacity. Every exclusive credential that covers the model and is eligible for the request may serve it, so two exclusive credentials with overlapping models share those models. Only credentials eligible for the request (its API key and member restrictions) count, so a request no exclusive credential is eligible for uses normal routing. A request for a model that an eligible exclusive credential covers returns a 404 when none of those credentials can serve it. The covered models are `allowed_models` when non-empty; with no or an empty `allowed_models`, an OpenAI, Anthropic, or Google credential covers every closed-weight model by that lab (for example every `openai/*` model except open-weight models such as `openai/gpt-oss-120b`, which stay on normal routing unless listed), and other providers must set a non-empty `allowed_models`. Only valid on non-fallback credentials. Omit to leave the stored value unchanged.
|
|
46
|
+
*/
|
|
47
|
+
isExclusive?: boolean | undefined;
|
|
44
48
|
/**
|
|
45
49
|
* 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.
|
|
46
50
|
*/
|
|
@@ -69,6 +73,7 @@ export type UpdateBYOKKeyRequest$Outbound = {
|
|
|
69
73
|
declared_zdr?: boolean | null | undefined;
|
|
70
74
|
disabled?: boolean | undefined;
|
|
71
75
|
is_byok_only?: boolean | undefined;
|
|
76
|
+
is_exclusive?: boolean | undefined;
|
|
72
77
|
is_fallback?: boolean | undefined;
|
|
73
78
|
is_required?: boolean | undefined;
|
|
74
79
|
key?: string | undefined;
|
|
@@ -24,6 +24,7 @@ export const UpdateBYOKKeyRequest$outboundSchema = z.object({
|
|
|
24
24
|
declaredZdr: z.nullable(z.boolean()).optional(),
|
|
25
25
|
disabled: z.boolean().optional(),
|
|
26
26
|
isByokOnly: z.boolean().optional(),
|
|
27
|
+
isExclusive: z.boolean().optional(),
|
|
27
28
|
isFallback: z.boolean().optional(),
|
|
28
29
|
isRequired: z.boolean().optional(),
|
|
29
30
|
key: z.string().optional(),
|
|
@@ -36,6 +37,7 @@ export const UpdateBYOKKeyRequest$outboundSchema = z.object({
|
|
|
36
37
|
declaredRegion: "declared_region",
|
|
37
38
|
declaredZdr: "declared_zdr",
|
|
38
39
|
isByokOnly: "is_byok_only",
|
|
40
|
+
isExclusive: "is_exclusive",
|
|
39
41
|
isFallback: "is_fallback",
|
|
40
42
|
isRequired: "is_required",
|
|
41
43
|
});
|
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.134",
|
|
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": [
|
|
@@ -73,15 +73,15 @@
|
|
|
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
|
-
"
|
|
76
|
+
"compile": "node --max-old-space-size=8192 ./node_modules/typescript/bin/tsc && node scripts/unbarrel-imports.js",
|
|
77
|
+
"test": "vitest --run --project unit",
|
|
77
78
|
"test:e2e": "vitest --run --project e2e",
|
|
78
79
|
"test:transit": "exit 0",
|
|
79
|
-
"typecheck:transit": "exit 0",
|
|
80
|
-
"test": "vitest --run --project unit",
|
|
81
80
|
"test:watch": "vitest --watch --project unit",
|
|
82
81
|
"typecheck": "tsc --noEmit",
|
|
83
|
-
"
|
|
84
|
-
"postinstall": "node scripts/check-types.js || true"
|
|
82
|
+
"typecheck:transit": "exit 0",
|
|
83
|
+
"postinstall": "node scripts/check-types.js || true",
|
|
84
|
+
"prepare": "npm run build"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
87
|
|