@openrouter/sdk 1.1.14 → 1.1.16

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.
@@ -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.1.14";
52
+ readonly sdkVersion: "1.1.16";
53
53
  readonly genVersion: "2.914.0";
54
- readonly userAgent: "speakeasy-sdk/typescript 1.1.14 2.914.0 1.0.0 @openrouter/sdk";
54
+ readonly userAgent: "speakeasy-sdk/typescript 1.1.16 2.914.0 1.0.0 @openrouter/sdk";
55
55
  };
56
56
  //# sourceMappingURL=config.d.ts.map
package/esm/lib/config.js CHANGED
@@ -26,8 +26,8 @@ export function serverURLFromOptions(options) {
26
26
  export const SDK_METADATA = {
27
27
  language: "typescript",
28
28
  openapiDocVersion: "1.0.0",
29
- sdkVersion: "1.1.14",
29
+ sdkVersion: "1.1.16",
30
30
  genVersion: "2.914.0",
31
- userAgent: "speakeasy-sdk/typescript 1.1.14 2.914.0 1.0.0 @openrouter/sdk",
31
+ userAgent: "speakeasy-sdk/typescript 1.1.16 2.914.0 1.0.0 @openrouter/sdk",
32
32
  };
33
33
  //# sourceMappingURL=config.js.map
@@ -23,6 +23,18 @@ export type CreateGuardrailRequest = {
23
23
  * Description of the guardrail
24
24
  */
25
25
  description?: string | null | undefined;
26
+ /**
27
+ * Whether this guardrail allows free endpoints that publish prompts.
28
+ */
29
+ enableFreeModelPublication?: boolean | null | undefined;
30
+ /**
31
+ * Whether this guardrail allows free endpoints that train on request data.
32
+ */
33
+ enableFreeModelTraining?: boolean | null | undefined;
34
+ /**
35
+ * Whether this guardrail allows paid endpoints that train on request data.
36
+ */
37
+ enablePaidModelTraining?: boolean | null | undefined;
26
38
  /**
27
39
  * Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, enforce_zdr_xai, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request.
28
40
  *
@@ -85,6 +97,9 @@ export type CreateGuardrailRequest$Outbound = {
85
97
  content_filter_builtins?: Array<ContentFilterBuiltinEntryInput$Outbound> | null | undefined;
86
98
  content_filters?: Array<ContentFilterEntry$Outbound> | null | undefined;
87
99
  description?: string | null | undefined;
100
+ enable_free_model_publication?: boolean | null | undefined;
101
+ enable_free_model_training?: boolean | null | undefined;
102
+ enable_paid_model_training?: boolean | null | undefined;
88
103
  enforce_zdr?: boolean | null | undefined;
89
104
  enforce_zdr_anthropic?: boolean | null | undefined;
90
105
  enforce_zdr_google?: boolean | null | undefined;
@@ -15,6 +15,9 @@ export const CreateGuardrailRequest$outboundSchema = z.object({
15
15
  contentFilters: z.nullable(z.array(ContentFilterEntry$outboundSchema))
16
16
  .optional(),
17
17
  description: z.nullable(z.string()).optional(),
18
+ enableFreeModelPublication: z.nullable(z.boolean()).optional(),
19
+ enableFreeModelTraining: z.nullable(z.boolean()).optional(),
20
+ enablePaidModelTraining: z.nullable(z.boolean()).optional(),
18
21
  enforceZdr: z.nullable(z.boolean()).optional(),
19
22
  enforceZdrAnthropic: z.nullable(z.boolean()).optional(),
20
23
  enforceZdrGoogle: z.nullable(z.boolean()).optional(),
@@ -34,6 +37,9 @@ export const CreateGuardrailRequest$outboundSchema = z.object({
34
37
  allowedProviders: "allowed_providers",
35
38
  contentFilterBuiltins: "content_filter_builtins",
36
39
  contentFilters: "content_filters",
40
+ enableFreeModelPublication: "enable_free_model_publication",
41
+ enableFreeModelTraining: "enable_free_model_training",
42
+ enablePaidModelTraining: "enable_paid_model_training",
37
43
  enforceZdr: "enforce_zdr",
38
44
  enforceZdrAnthropic: "enforce_zdr_anthropic",
39
45
  enforceZdrGoogle: "enforce_zdr_google",
@@ -20,14 +20,15 @@ export declare const ApiType: {
20
20
  */
21
21
  export type ApiType = OpenEnum<typeof ApiType>;
22
22
  /**
23
- * The data region this generation was routed through. 'europe' for EU-routed requests, 'global' otherwise.
23
+ * The data region this generation was routed through: 'global', 'europe', or 'us'.
24
24
  */
25
25
  export declare const DataRegion: {
26
26
  readonly Global: "global";
27
27
  readonly Europe: "europe";
28
+ readonly Us: "us";
28
29
  };
29
30
  /**
30
- * The data region this generation was routed through. 'europe' for EU-routed requests, 'global' otherwise.
31
+ * The data region this generation was routed through: 'global', 'europe', or 'us'.
31
32
  */
32
33
  export type DataRegion = OpenEnum<typeof DataRegion>;
33
34
  /**
@@ -55,7 +56,7 @@ export type GenerationResponseData = {
55
56
  */
56
57
  createdAt: string;
57
58
  /**
58
- * The data region this generation was routed through. 'europe' for EU-routed requests, 'global' otherwise.
59
+ * The data region this generation was routed through: 'global', 'europe', or 'us'.
59
60
  */
60
61
  dataRegion: DataRegion;
61
62
  /**
@@ -20,11 +20,12 @@ export const ApiType = {
20
20
  Image: "image",
21
21
  };
22
22
  /**
23
- * The data region this generation was routed through. 'europe' for EU-routed requests, 'global' otherwise.
23
+ * The data region this generation was routed through: 'global', 'europe', or 'us'.
24
24
  */
25
25
  export const DataRegion = {
26
26
  Global: "global",
27
27
  Europe: "europe",
28
+ Us: "us",
28
29
  };
29
30
  /** @internal */
30
31
  export const ApiType$inboundSchema = openEnums
@@ -29,6 +29,18 @@ export type Guardrail = {
29
29
  * Description of the guardrail
30
30
  */
31
31
  description?: string | null | undefined;
32
+ /**
33
+ * Whether this guardrail allows free endpoints that publish prompts.
34
+ */
35
+ enableFreeModelPublication?: boolean | null | undefined;
36
+ /**
37
+ * Whether this guardrail allows free endpoints that train on request data.
38
+ */
39
+ enableFreeModelTraining?: boolean | null | undefined;
40
+ /**
41
+ * Whether this guardrail allows paid endpoints that train on request data.
42
+ */
43
+ enablePaidModelTraining?: boolean | null | undefined;
32
44
  /**
33
45
  * Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, enforce_zdr_xai, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request.
34
46
  *
@@ -17,6 +17,9 @@ export const Guardrail$inboundSchema = z.object({
17
17
  .optional(),
18
18
  created_at: z.string(),
19
19
  description: z.nullable(z.string()).optional(),
20
+ enable_free_model_publication: z.nullable(z.boolean()).optional(),
21
+ enable_free_model_training: z.nullable(z.boolean()).optional(),
22
+ enable_paid_model_training: z.nullable(z.boolean()).optional(),
20
23
  enforce_zdr: z.nullable(z.boolean()).optional(),
21
24
  enforce_zdr_anthropic: z.nullable(z.boolean()).optional(),
22
25
  enforce_zdr_google: z.nullable(z.boolean()).optional(),
@@ -39,6 +42,9 @@ export const Guardrail$inboundSchema = z.object({
39
42
  "content_filter_builtins": "contentFilterBuiltins",
40
43
  "content_filters": "contentFilters",
41
44
  "created_at": "createdAt",
45
+ "enable_free_model_publication": "enableFreeModelPublication",
46
+ "enable_free_model_training": "enableFreeModelTraining",
47
+ "enable_paid_model_training": "enablePaidModelTraining",
42
48
  "enforce_zdr": "enforceZdr",
43
49
  "enforce_zdr_anthropic": "enforceZdrAnthropic",
44
50
  "enforce_zdr_google": "enforceZdrGoogle",
@@ -23,6 +23,18 @@ export type UpdateGuardrailRequest = {
23
23
  * New description for the guardrail
24
24
  */
25
25
  description?: string | null | undefined;
26
+ /**
27
+ * Whether this guardrail allows free endpoints that publish prompts.
28
+ */
29
+ enableFreeModelPublication?: boolean | null | undefined;
30
+ /**
31
+ * Whether this guardrail allows free endpoints that train on request data.
32
+ */
33
+ enableFreeModelTraining?: boolean | null | undefined;
34
+ /**
35
+ * Whether this guardrail allows paid endpoints that train on request data.
36
+ */
37
+ enablePaidModelTraining?: boolean | null | undefined;
26
38
  /**
27
39
  * Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, enforce_zdr_xai, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request.
28
40
  *
@@ -81,6 +93,9 @@ export type UpdateGuardrailRequest$Outbound = {
81
93
  content_filter_builtins?: Array<ContentFilterBuiltinEntryInput$Outbound> | null | undefined;
82
94
  content_filters?: Array<ContentFilterEntry$Outbound> | null | undefined;
83
95
  description?: string | null | undefined;
96
+ enable_free_model_publication?: boolean | null | undefined;
97
+ enable_free_model_training?: boolean | null | undefined;
98
+ enable_paid_model_training?: boolean | null | undefined;
84
99
  enforce_zdr?: boolean | null | undefined;
85
100
  enforce_zdr_anthropic?: boolean | null | undefined;
86
101
  enforce_zdr_google?: boolean | null | undefined;
@@ -15,6 +15,9 @@ export const UpdateGuardrailRequest$outboundSchema = z.object({
15
15
  contentFilters: z.nullable(z.array(ContentFilterEntry$outboundSchema))
16
16
  .optional(),
17
17
  description: z.nullable(z.string()).optional(),
18
+ enableFreeModelPublication: z.nullable(z.boolean()).optional(),
19
+ enableFreeModelTraining: z.nullable(z.boolean()).optional(),
20
+ enablePaidModelTraining: z.nullable(z.boolean()).optional(),
18
21
  enforceZdr: z.nullable(z.boolean()).optional(),
19
22
  enforceZdrAnthropic: z.nullable(z.boolean()).optional(),
20
23
  enforceZdrGoogle: z.nullable(z.boolean()).optional(),
@@ -33,6 +36,9 @@ export const UpdateGuardrailRequest$outboundSchema = z.object({
33
36
  allowedProviders: "allowed_providers",
34
37
  contentFilterBuiltins: "content_filter_builtins",
35
38
  contentFilters: "content_filters",
39
+ enableFreeModelPublication: "enable_free_model_publication",
40
+ enableFreeModelTraining: "enable_free_model_training",
41
+ enablePaidModelTraining: "enable_paid_model_training",
36
42
  enforceZdr: "enforce_zdr",
37
43
  enforceZdrAnthropic: "enforce_zdr_anthropic",
38
44
  enforceZdrGoogle: "enforce_zdr_google",
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@openrouter/sdk",
5
- "version": "1.1.14",
5
+ "version": "1.1.16",
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.1.14",
3
+ "version": "1.1.16",
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,14 +73,14 @@
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
- "typecheck": "tsc --noEmit",
77
+ "test:e2e": "vitest --run --project e2e",
79
78
  "compile": "tsc",
79
+ "postinstall": "node scripts/check-types.js || true",
80
80
  "prepare": "npm run build",
81
- "test:e2e": "vitest --run --project e2e",
82
81
  "test:transit": "exit 0",
83
82
  "test:watch": "vitest --watch --project unit",
83
+ "typecheck": "tsc --noEmit",
84
84
  "typecheck:transit": "exit 0"
85
85
  },
86
86
  "peerDependencies": {},