@openrouter/sdk 1.5.130 → 1.5.131
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/createguardrailrequest.d.ts +5 -0
- package/esm/models/createguardrailrequest.js +2 -0
- package/esm/models/guardrail.d.ts +4 -0
- package/esm/models/guardrail.js +2 -0
- package/esm/models/guardrailmodelavailabilitypolicyauthoringconfig.d.ts +2 -0
- package/esm/models/guardrailmodelavailabilitypolicyauthoringconfig.js +2 -0
- package/esm/models/guardrailmodelavailabilitypolicyconfig.d.ts +1 -0
- package/esm/models/guardrailmodelavailabilitypolicyconfig.js +2 -0
- package/esm/models/updateguardrailrequest.d.ts +5 -0
- package/esm/models/updateguardrailrequest.js +2 -0
- package/jsr.json +1 -1
- package/package.json +4 -4
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.131";
|
|
53
53
|
readonly genVersion: "2.960.8";
|
|
54
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.5.
|
|
54
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.5.131 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.131",
|
|
29
29
|
genVersion: "2.960.8",
|
|
30
|
-
userAgent: "speakeasy-sdk/typescript 1.5.
|
|
30
|
+
userAgent: "speakeasy-sdk/typescript 1.5.131 2.960.8 1.0.0 @openrouter/sdk",
|
|
31
31
|
};
|
|
32
32
|
//# sourceMappingURL=config.js.map
|
|
@@ -4,6 +4,10 @@ import { ContentFilterEntry, ContentFilterEntry$Outbound } from "./contentfilter
|
|
|
4
4
|
import { GuardrailDataRegion } from "./guardraildataregion.js";
|
|
5
5
|
import { GuardrailInterval } from "./guardrailinterval.js";
|
|
6
6
|
export type CreateGuardrailRequest = {
|
|
7
|
+
/**
|
|
8
|
+
* Whether requests may use provisional providers, whose security practices have not been reviewed by OpenRouter. false excludes them. true and null never override an account that excludes them. Inherits the account setting when not provided.
|
|
9
|
+
*/
|
|
10
|
+
allowProvisionalProviders?: boolean | null | undefined;
|
|
7
11
|
/**
|
|
8
12
|
* Whether ZDR-only requests to google/* models may also use Safety Retention endpoints, which may retain prompts and responses from any request, only to prevent abuse, and do not use them for training. false allows only ZDR endpoints. A guardrail can only be more restrictive than the account setting. Inherits the account setting when not provided.
|
|
9
13
|
*/
|
|
@@ -109,6 +113,7 @@ export type CreateGuardrailRequest = {
|
|
|
109
113
|
};
|
|
110
114
|
/** @internal */
|
|
111
115
|
export type CreateGuardrailRequest$Outbound = {
|
|
116
|
+
allow_provisional_providers?: boolean | null | undefined;
|
|
112
117
|
allow_safety_retention_google?: boolean | null | undefined;
|
|
113
118
|
allow_safety_retention_other?: boolean | null | undefined;
|
|
114
119
|
allowed_data_regions?: Array<string> | null | undefined;
|
|
@@ -9,6 +9,7 @@ import { GuardrailDataRegion$outboundSchema, } from "./guardraildataregion.js";
|
|
|
9
9
|
import { GuardrailInterval$outboundSchema, } from "./guardrailinterval.js";
|
|
10
10
|
/** @internal */
|
|
11
11
|
export const CreateGuardrailRequest$outboundSchema = z.object({
|
|
12
|
+
allowProvisionalProviders: z.nullable(z.boolean()).optional(),
|
|
12
13
|
allowSafetyRetentionGoogle: z.nullable(z.boolean()).optional(),
|
|
13
14
|
allowSafetyRetentionOther: z.nullable(z.boolean()).optional(),
|
|
14
15
|
allowedDataRegions: z.nullable(z.array(GuardrailDataRegion$outboundSchema))
|
|
@@ -38,6 +39,7 @@ export const CreateGuardrailRequest$outboundSchema = z.object({
|
|
|
38
39
|
workspaceId: z.string().optional(),
|
|
39
40
|
}).transform((v) => {
|
|
40
41
|
return remap$(v, {
|
|
42
|
+
allowProvisionalProviders: "allow_provisional_providers",
|
|
41
43
|
allowSafetyRetentionGoogle: "allow_safety_retention_google",
|
|
42
44
|
allowSafetyRetentionOther: "allow_safety_retention_other",
|
|
43
45
|
allowedDataRegions: "allowed_data_regions",
|
|
@@ -6,6 +6,10 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
|
6
6
|
import { GuardrailDataRegion } from "./guardraildataregion.js";
|
|
7
7
|
import { GuardrailInterval } from "./guardrailinterval.js";
|
|
8
8
|
export type Guardrail = {
|
|
9
|
+
/**
|
|
10
|
+
* Whether requests may use provisional providers, whose security practices have not been reviewed by OpenRouter. false excludes them. true and null never override an account that excludes them. Inherits the account setting when not provided.
|
|
11
|
+
*/
|
|
12
|
+
allowProvisionalProviders?: boolean | null | undefined;
|
|
9
13
|
/**
|
|
10
14
|
* Whether ZDR-only requests to google/* models may also use Safety Retention endpoints, which may retain prompts and responses from any request, only to prevent abuse, and do not use them for training. false allows only ZDR endpoints. A guardrail can only be more restrictive than the account setting. Inherits the account setting when not provided.
|
|
11
15
|
*/
|
package/esm/models/guardrail.js
CHANGED
|
@@ -10,6 +10,7 @@ import { GuardrailDataRegion$inboundSchema, } from "./guardraildataregion.js";
|
|
|
10
10
|
import { GuardrailInterval$inboundSchema, } from "./guardrailinterval.js";
|
|
11
11
|
/** @internal */
|
|
12
12
|
export const Guardrail$inboundSchema = z.object({
|
|
13
|
+
allow_provisional_providers: z.nullable(z.boolean()).optional(),
|
|
13
14
|
allow_safety_retention_google: z.nullable(z.boolean()).optional(),
|
|
14
15
|
allow_safety_retention_other: z.nullable(z.boolean()).optional(),
|
|
15
16
|
allowed_data_regions: z.nullable(z.array(GuardrailDataRegion$inboundSchema))
|
|
@@ -42,6 +43,7 @@ export const Guardrail$inboundSchema = z.object({
|
|
|
42
43
|
workspace_id: z.nullable(z.string()),
|
|
43
44
|
}).transform((v) => {
|
|
44
45
|
return remap$(v, {
|
|
46
|
+
"allow_provisional_providers": "allowProvisionalProviders",
|
|
45
47
|
"allow_safety_retention_google": "allowSafetyRetentionGoogle",
|
|
46
48
|
"allow_safety_retention_other": "allowSafetyRetentionOther",
|
|
47
49
|
"allowed_data_regions": "allowedDataRegions",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
2
|
export type GuardrailModelAvailabilityPolicyAuthoringConfig = {
|
|
3
|
+
allowProvisionalProviders?: boolean | null | undefined;
|
|
3
4
|
allowSafetyRetentionGoogle?: boolean | null | undefined;
|
|
4
5
|
allowSafetyRetentionOther?: boolean | null | undefined;
|
|
5
6
|
allowedDataRegions?: Array<string> | null | undefined;
|
|
@@ -24,6 +25,7 @@ export type GuardrailModelAvailabilityPolicyAuthoringConfig = {
|
|
|
24
25
|
};
|
|
25
26
|
/** @internal */
|
|
26
27
|
export type GuardrailModelAvailabilityPolicyAuthoringConfig$Outbound = {
|
|
28
|
+
allow_provisional_providers?: boolean | null | undefined;
|
|
27
29
|
allow_safety_retention_google?: boolean | null | undefined;
|
|
28
30
|
allow_safety_retention_other?: boolean | null | undefined;
|
|
29
31
|
allowed_data_regions?: Array<string> | null | undefined;
|
|
@@ -5,6 +5,7 @@ import * as z from "zod/v4";
|
|
|
5
5
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
6
6
|
/** @internal */
|
|
7
7
|
export const GuardrailModelAvailabilityPolicyAuthoringConfig$outboundSchema = z.object({
|
|
8
|
+
allowProvisionalProviders: z.nullable(z.boolean()).optional(),
|
|
8
9
|
allowSafetyRetentionGoogle: z.nullable(z.boolean()).optional(),
|
|
9
10
|
allowSafetyRetentionOther: z.nullable(z.boolean()).optional(),
|
|
10
11
|
allowedDataRegions: z.nullable(z.array(z.string())).optional(),
|
|
@@ -28,6 +29,7 @@ export const GuardrailModelAvailabilityPolicyAuthoringConfig$outboundSchema = z.
|
|
|
28
29
|
requireEuDataRegion: z.nullable(z.boolean()).optional(),
|
|
29
30
|
}).transform((v) => {
|
|
30
31
|
return remap$(v, {
|
|
32
|
+
allowProvisionalProviders: "allow_provisional_providers",
|
|
31
33
|
allowSafetyRetentionGoogle: "allow_safety_retention_google",
|
|
32
34
|
allowSafetyRetentionOther: "allow_safety_retention_other",
|
|
33
35
|
allowedDataRegions: "allowed_data_regions",
|
|
@@ -2,6 +2,7 @@ import * as z from "zod/v4";
|
|
|
2
2
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
3
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
4
|
export type GuardrailModelAvailabilityPolicyConfig = {
|
|
5
|
+
allowProvisionalProviders?: boolean | null | undefined;
|
|
5
6
|
allowSafetyRetentionGoogle?: boolean | null | undefined;
|
|
6
7
|
allowSafetyRetentionOther?: boolean | null | undefined;
|
|
7
8
|
allowedDataRegions?: Array<string> | null | undefined;
|
|
@@ -6,6 +6,7 @@ import { remap as remap$ } from "../lib/primitives.js";
|
|
|
6
6
|
import { safeParse } from "../lib/schemas.js";
|
|
7
7
|
/** @internal */
|
|
8
8
|
export const GuardrailModelAvailabilityPolicyConfig$inboundSchema = z.object({
|
|
9
|
+
allow_provisional_providers: z.nullable(z.boolean()).optional(),
|
|
9
10
|
allow_safety_retention_google: z.nullable(z.boolean()).optional(),
|
|
10
11
|
allow_safety_retention_other: z.nullable(z.boolean()).optional(),
|
|
11
12
|
allowed_data_regions: z.nullable(z.array(z.string())).optional(),
|
|
@@ -29,6 +30,7 @@ export const GuardrailModelAvailabilityPolicyConfig$inboundSchema = z.object({
|
|
|
29
30
|
require_eu_data_region: z.nullable(z.boolean()).optional(),
|
|
30
31
|
}).transform((v) => {
|
|
31
32
|
return remap$(v, {
|
|
33
|
+
"allow_provisional_providers": "allowProvisionalProviders",
|
|
32
34
|
"allow_safety_retention_google": "allowSafetyRetentionGoogle",
|
|
33
35
|
"allow_safety_retention_other": "allowSafetyRetentionOther",
|
|
34
36
|
"allowed_data_regions": "allowedDataRegions",
|
|
@@ -4,6 +4,10 @@ import { ContentFilterEntry, ContentFilterEntry$Outbound } from "./contentfilter
|
|
|
4
4
|
import { GuardrailDataRegion } from "./guardraildataregion.js";
|
|
5
5
|
import { GuardrailInterval } from "./guardrailinterval.js";
|
|
6
6
|
export type UpdateGuardrailRequest = {
|
|
7
|
+
/**
|
|
8
|
+
* Whether requests may use provisional providers, whose security practices have not been reviewed by OpenRouter. false excludes them. true and null never override an account that excludes them. Inherits the account setting when not provided.
|
|
9
|
+
*/
|
|
10
|
+
allowProvisionalProviders?: boolean | null | undefined;
|
|
7
11
|
/**
|
|
8
12
|
* Whether ZDR-only requests to google/* models may also use Safety Retention endpoints, which may retain prompts and responses from any request, only to prevent abuse, and do not use them for training. false allows only ZDR endpoints. A guardrail can only be more restrictive than the account setting. Inherits the account setting when not provided.
|
|
9
13
|
*/
|
|
@@ -105,6 +109,7 @@ export type UpdateGuardrailRequest = {
|
|
|
105
109
|
};
|
|
106
110
|
/** @internal */
|
|
107
111
|
export type UpdateGuardrailRequest$Outbound = {
|
|
112
|
+
allow_provisional_providers?: boolean | null | undefined;
|
|
108
113
|
allow_safety_retention_google?: boolean | null | undefined;
|
|
109
114
|
allow_safety_retention_other?: boolean | null | undefined;
|
|
110
115
|
allowed_data_regions?: Array<string> | null | undefined;
|
|
@@ -9,6 +9,7 @@ import { GuardrailDataRegion$outboundSchema, } from "./guardraildataregion.js";
|
|
|
9
9
|
import { GuardrailInterval$outboundSchema, } from "./guardrailinterval.js";
|
|
10
10
|
/** @internal */
|
|
11
11
|
export const UpdateGuardrailRequest$outboundSchema = z.object({
|
|
12
|
+
allowProvisionalProviders: z.nullable(z.boolean()).optional(),
|
|
12
13
|
allowSafetyRetentionGoogle: z.nullable(z.boolean()).optional(),
|
|
13
14
|
allowSafetyRetentionOther: z.nullable(z.boolean()).optional(),
|
|
14
15
|
allowedDataRegions: z.nullable(z.array(GuardrailDataRegion$outboundSchema))
|
|
@@ -37,6 +38,7 @@ export const UpdateGuardrailRequest$outboundSchema = z.object({
|
|
|
37
38
|
resetInterval: z.nullable(GuardrailInterval$outboundSchema).optional(),
|
|
38
39
|
}).transform((v) => {
|
|
39
40
|
return remap$(v, {
|
|
41
|
+
allowProvisionalProviders: "allow_provisional_providers",
|
|
40
42
|
allowSafetyRetentionGoogle: "allow_safety_retention_google",
|
|
41
43
|
allowSafetyRetentionOther: "allow_safety_retention_other",
|
|
42
44
|
allowedDataRegions: "allowed_data_regions",
|
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.131",
|
|
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
|
-
"compile": "node --max-old-space-size=8192 ./node_modules/typescript/bin/tsc && node scripts/unbarrel-imports.js",
|
|
77
76
|
"test": "vitest --run --project unit",
|
|
77
|
+
"test:e2e": "vitest --run --project e2e",
|
|
78
78
|
"postinstall": "node scripts/check-types.js || true",
|
|
79
79
|
"prepare": "npm run build",
|
|
80
|
-
"test:e2e": "vitest --run --project e2e",
|
|
81
80
|
"test:transit": "exit 0",
|
|
82
81
|
"test:watch": "vitest --watch --project unit",
|
|
83
82
|
"typecheck": "tsc --noEmit",
|
|
84
|
-
"typecheck:transit": "exit 0"
|
|
83
|
+
"typecheck:transit": "exit 0",
|
|
84
|
+
"compile": "node --max-old-space-size=8192 ./node_modules/typescript/bin/tsc && node scripts/unbarrel-imports.js"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
87
|
|