@openrouter/sdk 1.2.70 → 1.2.71

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.
@@ -50,8 +50,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
50
50
  export declare const SDK_METADATA: {
51
51
  readonly language: "typescript";
52
52
  readonly openapiDocVersion: "1.0.0";
53
- readonly sdkVersion: "1.2.70";
53
+ readonly sdkVersion: "1.2.71";
54
54
  readonly genVersion: "2.914.0";
55
- readonly userAgent: "speakeasy-sdk/typescript 1.2.70 2.914.0 1.0.0 @openrouter/sdk";
55
+ readonly userAgent: "speakeasy-sdk/typescript 1.2.71 2.914.0 1.0.0 @openrouter/sdk";
56
56
  };
57
57
  //# sourceMappingURL=config.d.ts.map
package/esm/lib/config.js CHANGED
@@ -29,8 +29,8 @@ export function serverURLFromOptions(options) {
29
29
  export const SDK_METADATA = {
30
30
  language: "typescript",
31
31
  openapiDocVersion: "1.0.0",
32
- sdkVersion: "1.2.70",
32
+ sdkVersion: "1.2.71",
33
33
  genVersion: "2.914.0",
34
- userAgent: "speakeasy-sdk/typescript 1.2.70 2.914.0 1.0.0 @openrouter/sdk",
34
+ userAgent: "speakeasy-sdk/typescript 1.2.71 2.914.0 1.0.0 @openrouter/sdk",
35
35
  };
36
36
  //# sourceMappingURL=config.js.map
@@ -144,6 +144,10 @@ export type ImageGenerationRequest = {
144
144
  * If true, partial images are streamed as SSE events as they become available. Only supported by providers with native streaming (currently OpenAI). Non-streaming providers ignore this flag and return a buffered response.
145
145
  */
146
146
  stream?: boolean | undefined;
147
+ /**
148
+ * A stable identifier for your end-users. Used to help detect and prevent abuse. Never sent to providers verbatim: for providers whose data policy requires user IDs, it is folded into a hashed, per-account upstream user identifier.
149
+ */
150
+ user?: string | undefined;
147
151
  };
148
152
  /** @internal */
149
153
  export declare const ImageGenerationRequestAspectRatio$outboundSchema: z.ZodType<string, ImageGenerationRequestAspectRatio>;
@@ -171,6 +175,7 @@ export type ImageGenerationRequest$Outbound = {
171
175
  seed?: number | undefined;
172
176
  size?: string | undefined;
173
177
  stream?: boolean | undefined;
178
+ user?: string | undefined;
174
179
  };
175
180
  /** @internal */
176
181
  export declare const ImageGenerationRequest$outboundSchema: z.ZodType<ImageGenerationRequest$Outbound, ImageGenerationRequest>;
@@ -95,6 +95,7 @@ export const ImageGenerationRequest$outboundSchema = z.object({
95
95
  seed: z.int().optional(),
96
96
  size: z.string().optional(),
97
97
  stream: z.boolean().optional(),
98
+ user: z.string().optional(),
98
99
  }).transform((v) => {
99
100
  return remap$(v, {
100
101
  aspectRatio: "aspect_ratio",
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@openrouter/sdk",
5
- "version": "1.2.70",
5
+ "version": "1.2.71",
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.2.70",
3
+ "version": "1.2.71",
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:e2e": "vitest --run --project e2e",
77
+ "test:transit": "exit 0",
78
+ "compile": "tsc",
76
79
  "postinstall": "node scripts/check-types.js || true",
80
+ "test": "vitest --run --project unit",
77
81
  "test:watch": "vitest --watch --project unit",
78
82
  "typecheck": "tsc --noEmit",
79
- "compile": "tsc",
80
- "prepare": "npm run build",
81
- "test": "vitest --run --project unit",
82
- "test:e2e": "vitest --run --project e2e",
83
- "test:transit": "exit 0",
84
- "typecheck:transit": "exit 0"
83
+ "typecheck:transit": "exit 0",
84
+ "prepare": "npm run build"
85
85
  },
86
86
  "peerDependencies": {},
87
87
  "devDependencies": {