@openrouter/sdk 1.0.6 → 1.0.8

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.0.6";
52
+ readonly sdkVersion: "1.0.8";
53
53
  readonly genVersion: "2.914.0";
54
- readonly userAgent: "speakeasy-sdk/typescript 1.0.6 2.914.0 1.0.0 @openrouter/sdk";
54
+ readonly userAgent: "speakeasy-sdk/typescript 1.0.8 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.0.6",
29
+ sdkVersion: "1.0.8",
30
30
  genVersion: "2.914.0",
31
- userAgent: "speakeasy-sdk/typescript 1.0.6 2.914.0 1.0.0 @openrouter/sdk",
31
+ userAgent: "speakeasy-sdk/typescript 1.0.8 2.914.0 1.0.0 @openrouter/sdk",
32
32
  };
33
33
  //# sourceMappingURL=config.js.map
@@ -5,7 +5,7 @@ export type AutoBetaRouterPlugin = {
5
5
  */
6
6
  allowedModels?: Array<string> | undefined;
7
7
  /**
8
- * Balances routing between cost and quality on a 0-10 scale. The auto-beta-router ranks models for the classified task type by community spend share, then filters candidates by their average cost per generation for that task. Higher values favor cheaper models: 10 keeps only models around the cheapest 10th percentile, while 0 permits models up to the 90th percentile for cost. Defaults to 7.
8
+ * Balances routing between cost and quality on a 0-10 scale. The auto-beta-router ranks models for the classified task type by community spend share, then filters candidates by their average cost per generation for that task. Higher values favor cheaper models: 10 keeps only models around the cheapest 10th percentile, while 0 permits models up to the 90th percentile for cost. Defaults to 9.
9
9
  */
10
10
  costQualityTradeoff?: number | undefined;
11
11
  /**
@@ -267,7 +267,7 @@ export type ChatRequest = {
267
267
  */
268
268
  trace?: TraceConfig | undefined;
269
269
  /**
270
- * Unique user identifier
270
+ * Per-end-user identifier for abuse isolation. Use a stable ID, hash, or pseudonym. When a provider requires a user identity, OpenRouter folds it into the hashed identity sent upstream and never forwards it raw. If omitted, requests use an account-level identity, so provider policy blocks can affect the whole account.
271
271
  */
272
272
  user?: string | undefined;
273
273
  };
@@ -209,6 +209,9 @@ export type ResponsesRequest = {
209
209
  * Configuration for reasoning mode in the response
210
210
  */
211
211
  reasoning?: ReasoningConfig | null | undefined;
212
+ /**
213
+ * Recommended per-end-user identifier for abuse isolation. Use a stable ID, hash, or pseudonym. When a provider requires a user identity, OpenRouter folds it into the hashed identity sent upstream and never forwards it raw. If omitted, requests use an account-level identity, so provider policy blocks can affect the whole account.
214
+ */
212
215
  safetyIdentifier?: string | null | undefined;
213
216
  serviceTier?: ResponsesRequestServiceTier | null | undefined;
214
217
  /**
@@ -10,6 +10,10 @@ export type Workspace = {
10
10
  * User ID of the workspace creator
11
11
  */
12
12
  createdBy: string | null;
13
+ /**
14
+ * Deterministic ID of the workspace's implicitly-created default guardrail
15
+ */
16
+ defaultGuardrailId: string;
13
17
  /**
14
18
  * Default image model for this workspace
15
19
  */
@@ -9,6 +9,7 @@ import { safeParse } from "../lib/schemas.js";
9
9
  export const Workspace$inboundSchema = z.object({
10
10
  created_at: z.string(),
11
11
  created_by: z.nullable(z.string()),
12
+ default_guardrail_id: z.string(),
12
13
  default_image_model: z.nullable(z.string()),
13
14
  default_provider_sort: z.nullable(z.string()),
14
15
  default_text_model: z.nullable(z.string()),
@@ -26,6 +27,7 @@ export const Workspace$inboundSchema = z.object({
26
27
  return remap$(v, {
27
28
  "created_at": "createdAt",
28
29
  "created_by": "createdBy",
30
+ "default_guardrail_id": "defaultGuardrailId",
29
31
  "default_image_model": "defaultImageModel",
30
32
  "default_provider_sort": "defaultProviderSort",
31
33
  "default_text_model": "defaultTextModel",
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@openrouter/sdk",
5
- "version": "1.0.6",
5
+ "version": "1.0.8",
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.0.6",
3
+ "version": "1.0.8",
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
- "access": "public",
25
- "provenance": true
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
- "test": "vitest --run --project unit",
77
- "test:e2e": "vitest --run --project e2e",
76
+ "test:transit": "exit 0",
77
+ "compile": "tsc",
78
+ "prepare": "npm run build",
78
79
  "test:watch": "vitest --watch --project unit",
79
80
  "typecheck": "tsc --noEmit",
80
81
  "typecheck:transit": "exit 0",
81
- "test:transit": "exit 0",
82
- "compile": "tsc",
83
82
  "postinstall": "node scripts/check-types.js || true",
84
- "prepare": "npm run build"
83
+ "test": "vitest --run --project unit",
84
+ "test:e2e": "vitest --run --project e2e"
85
85
  },
86
86
  "peerDependencies": {},
87
87
  "devDependencies": {