@openrouter/sdk 1.5.130 → 1.5.132

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.
@@ -13,7 +13,7 @@ import { Result } from "../types/fp.js";
13
13
  * Delete a SCIM group mapping
14
14
  *
15
15
  * @remarks
16
- * Delete a SCIM group-to-workspace mapping. For an `admin` mapping, `keep_members=true` returns `403` and leaves the mapping in place — preserving members as workspace admins is dashboard-only. [Management key](/docs/guides/overview/auth/management-api-keys) required.
16
+ * Delete a SCIM group-to-workspace mapping. For an `admin` mapping, `keep_members=true` returns `403` and leaves the mapping in place — preserving members as workspace admins is dashboard-only. Deleting a mapping that has guardrail policies attached returns `403`; remove those policies in the dashboard first. [Management key](/docs/guides/overview/auth/management-api-keys) required.
17
17
  */
18
18
  export declare function scimDelete(client: OpenRouterCore, request: operations.DeleteScimGroupMappingRequest, options?: RequestOptions): APIPromise<Result<models.DeleteScimGroupMappingResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
19
19
  //# sourceMappingURL=scimDelete.d.ts.map
@@ -16,7 +16,7 @@ import { APIPromise } from "../types/async.js";
16
16
  * Delete a SCIM group mapping
17
17
  *
18
18
  * @remarks
19
- * Delete a SCIM group-to-workspace mapping. For an `admin` mapping, `keep_members=true` returns `403` and leaves the mapping in place — preserving members as workspace admins is dashboard-only. [Management key](/docs/guides/overview/auth/management-api-keys) required.
19
+ * Delete a SCIM group-to-workspace mapping. For an `admin` mapping, `keep_members=true` returns `403` and leaves the mapping in place — preserving members as workspace admins is dashboard-only. Deleting a mapping that has guardrail policies attached returns `403`; remove those policies in the dashboard first. [Management key](/docs/guides/overview/auth/management-api-keys) required.
20
20
  */
21
21
  export function scimDelete(client, request, options) {
22
22
  return new APIPromise($do(client, request, options));
@@ -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.130";
52
+ readonly sdkVersion: "1.5.132";
53
53
  readonly genVersion: "2.960.8";
54
- readonly userAgent: "speakeasy-sdk/typescript 1.5.130 2.960.8 1.0.0 @openrouter/sdk";
54
+ readonly userAgent: "speakeasy-sdk/typescript 1.5.132 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.130",
28
+ sdkVersion: "1.5.132",
29
29
  genVersion: "2.960.8",
30
- userAgent: "speakeasy-sdk/typescript 1.5.130 2.960.8 1.0.0 @openrouter/sdk",
30
+ userAgent: "speakeasy-sdk/typescript 1.5.132 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
  */
@@ -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/esm/sdk/scim.d.ts CHANGED
@@ -23,7 +23,7 @@ export declare class Scim extends ClientSDK {
23
23
  * Delete a SCIM group mapping
24
24
  *
25
25
  * @remarks
26
- * Delete a SCIM group-to-workspace mapping. For an `admin` mapping, `keep_members=true` returns `403` and leaves the mapping in place — preserving members as workspace admins is dashboard-only. [Management key](/docs/guides/overview/auth/management-api-keys) required.
26
+ * Delete a SCIM group-to-workspace mapping. For an `admin` mapping, `keep_members=true` returns `403` and leaves the mapping in place — preserving members as workspace admins is dashboard-only. Deleting a mapping that has guardrail policies attached returns `403`; remove those policies in the dashboard first. [Management key](/docs/guides/overview/auth/management-api-keys) required.
27
27
  */
28
28
  delete(request: operations.DeleteScimGroupMappingRequest, options?: RequestOptions): Promise<models.DeleteScimGroupMappingResponse>;
29
29
  /**
package/esm/sdk/scim.js CHANGED
@@ -35,7 +35,7 @@ export class Scim extends ClientSDK {
35
35
  * Delete a SCIM group mapping
36
36
  *
37
37
  * @remarks
38
- * Delete a SCIM group-to-workspace mapping. For an `admin` mapping, `keep_members=true` returns `403` and leaves the mapping in place — preserving members as workspace admins is dashboard-only. [Management key](/docs/guides/overview/auth/management-api-keys) required.
38
+ * Delete a SCIM group-to-workspace mapping. For an `admin` mapping, `keep_members=true` returns `403` and leaves the mapping in place — preserving members as workspace admins is dashboard-only. Deleting a mapping that has guardrail policies attached returns `403`; remove those policies in the dashboard first. [Management key](/docs/guides/overview/auth/management-api-keys) required.
39
39
  */
40
40
  async delete(request, options) {
41
41
  return unwrapAsync(scimDelete(this, request, options));
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@openrouter/sdk",
5
- "version": "1.5.130",
5
+ "version": "1.5.132",
6
6
  "exports": {
7
7
  ".": "./src/index.ts",
8
8
  "./models/errors": "./src/models/errors/index.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openrouter/sdk",
3
- "version": "1.5.130",
3
+ "version": "1.5.132",
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
- "test": "vitest --run --project unit",
78
- "postinstall": "node scripts/check-types.js || true",
79
76
  "prepare": "npm run build",
80
77
  "test:e2e": "vitest --run --project e2e",
81
78
  "test:transit": "exit 0",
79
+ "typecheck:transit": "exit 0",
80
+ "test": "vitest --run --project unit",
82
81
  "test:watch": "vitest --watch --project unit",
83
82
  "typecheck": "tsc --noEmit",
84
- "typecheck:transit": "exit 0"
83
+ "compile": "node --max-old-space-size=8192 ./node_modules/typescript/bin/tsc && node scripts/unbarrel-imports.js",
84
+ "postinstall": "node scripts/check-types.js || true"
85
85
  },
86
86
  "peerDependencies": {
87
87