@openrouter/sdk 1.5.86 → 1.5.87

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.5.86";
53
+ readonly sdkVersion: "1.5.87";
54
54
  readonly genVersion: "2.950.13";
55
- readonly userAgent: "speakeasy-sdk/typescript 1.5.86 2.950.13 1.0.0 @openrouter/sdk";
55
+ readonly userAgent: "speakeasy-sdk/typescript 1.5.87 2.950.13 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.5.86",
32
+ sdkVersion: "1.5.87",
33
33
  genVersion: "2.950.13",
34
- userAgent: "speakeasy-sdk/typescript 1.5.86 2.950.13 1.0.0 @openrouter/sdk",
34
+ userAgent: "speakeasy-sdk/typescript 1.5.87 2.950.13 1.0.0 @openrouter/sdk",
35
35
  };
36
36
  //# sourceMappingURL=config.js.map
@@ -17,7 +17,7 @@ export declare const BYOKKeyDeclaredRegion: {
17
17
  export type BYOKKeyDeclaredRegion = OpenEnum<typeof BYOKKeyDeclaredRegion>;
18
18
  export type BYOKKey = {
19
19
  /**
20
- * Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` means no restriction. A workspace-scoped management key can only name API keys in its own workspace.
20
+ * Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` means no restriction. Keys newly added to a credential pinned to a workspace must be in that workspace; a listed key that has since moved to another workspace stays listed.
21
21
  */
22
22
  allowedApiKeyHashes: Array<string> | null;
23
23
  /**
@@ -15,7 +15,7 @@ export declare const CreateBYOKKeyRequestDeclaredRegion: {
15
15
  export type CreateBYOKKeyRequestDeclaredRegion = OpenEnum<typeof CreateBYOKKeyRequestDeclaredRegion>;
16
16
  export type CreateBYOKKeyRequest = {
17
17
  /**
18
- * Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` means no restriction. Must contain at least one hash if provided. Hashes that do not belong to your account return a 400; for a workspace-scoped management key, so do hashes of API keys outside its own workspace.
18
+ * Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` means no restriction. Must contain at least one hash if provided. Hashes that do not belong to your account return a 400; for a credential pinned to a workspace, so do hashes of API keys outside that workspace.
19
19
  */
20
20
  allowedApiKeyHashes?: Array<string> | null | undefined;
21
21
  /**
@@ -30,7 +30,7 @@ export declare const CreateObservabilityDestinationRequestType: {
30
30
  export type CreateObservabilityDestinationRequestType = OpenEnum<typeof CreateObservabilityDestinationRequestType>;
31
31
  export type CreateObservabilityDestinationRequest = {
32
32
  /**
33
- * Optional allowlist of OpenRouter API key hashes whose traffic is forwarded. `null` or omitted means all keys. Must contain at least one hash if provided. A workspace-scoped management key can only name API keys in its own workspace; any other hash returns 400.
33
+ * Optional allowlist of OpenRouter API key hashes whose traffic is forwarded. `null` or omitted means all keys. Must contain at least one hash if provided. Every hash must belong to an API key in the destination's workspace; any other hash returns 400.
34
34
  */
35
35
  apiKeyHashes?: Array<string> | null | undefined;
36
36
  /**
@@ -14,7 +14,7 @@ export declare const UpdateBYOKKeyRequestDeclaredRegion: {
14
14
  export type UpdateBYOKKeyRequestDeclaredRegion = OpenEnum<typeof UpdateBYOKKeyRequestDeclaredRegion>;
15
15
  export type UpdateBYOKKeyRequest = {
16
16
  /**
17
- * Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` clears the restriction. Must contain at least one hash if provided. Hashes that do not belong to your account return a 400; for a workspace-scoped management key, so do hashes of API keys outside its own workspace.
17
+ * Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` clears the restriction. Must contain at least one hash if provided. Hashes that do not belong to your account return a 400; for a credential pinned to a workspace, so do hashes of API keys outside that workspace, unless the credential already lists them (a listed key that has since moved to another workspace stays listed and can be written back).
18
18
  */
19
19
  allowedApiKeyHashes?: Array<string> | null | undefined;
20
20
  /**
@@ -3,7 +3,7 @@ import { ObservabilityDataRegionInput } from "./observabilitydataregioninput.js"
3
3
  import { ObservabilityFilterRulesConfigNullable, ObservabilityFilterRulesConfigNullable$Outbound } from "./observabilityfilterrulesconfignullable.js";
4
4
  export type UpdateObservabilityDestinationRequest = {
5
5
  /**
6
- * Optional allowlist of OpenRouter API key hashes. `null` clears the filter (all keys). Omitting leaves the current value, including any API key from another workspace that an organization-scoped key attached. Must contain at least one hash if provided. A workspace-scoped management key can only name API keys in its own workspace; any other hash returns 400.
6
+ * Optional allowlist of OpenRouter API key hashes. `null` clears the filter (all keys). Omitting leaves the current value. Must contain at least one hash if provided. Every hash must belong to an API key in the destination's workspace; any other hash returns 400. A hash the destination already lists is kept even if that key has since moved to another workspace, so an already-listed hash can always be written back.
7
7
  */
8
8
  apiKeyHashes?: Array<string> | null | undefined;
9
9
  /**
@@ -5,7 +5,7 @@ import { InputReference, InputReference$Outbound } from "./inputreference.js";
5
5
  import { ProviderName } from "./providername.js";
6
6
  import { TraceConfig, TraceConfig$Outbound } from "./traceconfig.js";
7
7
  /**
8
- * Aspect ratio of the generated video
8
+ * Aspect ratio of the generated video. Omit it to use the model default, which on models with adaptive aspect ratio (e.g. BytePlus Seedance) follows the input image or video.
9
9
  */
10
10
  export declare const VideoGenerationRequestAspectRatio: {
11
11
  readonly OneHundredAndSixtyNine: "16:9";
@@ -19,7 +19,7 @@ export declare const VideoGenerationRequestAspectRatio: {
19
19
  readonly NineHundredAndTwentyOne: "9:21";
20
20
  };
21
21
  /**
22
- * Aspect ratio of the generated video
22
+ * Aspect ratio of the generated video. Omit it to use the model default, which on models with adaptive aspect ratio (e.g. BytePlus Seedance) follows the input image or video.
23
23
  */
24
24
  export type VideoGenerationRequestAspectRatio = OpenEnum<typeof VideoGenerationRequestAspectRatio>;
25
25
  export type VideoGenerationRequestIgnore = ProviderName | string;
@@ -535,7 +535,7 @@ export declare const VideoGenerationRequestResolution: {
535
535
  export type VideoGenerationRequestResolution = OpenEnum<typeof VideoGenerationRequestResolution>;
536
536
  export type VideoGenerationRequest = {
537
537
  /**
538
- * Aspect ratio of the generated video
538
+ * Aspect ratio of the generated video. Omit it to use the model default, which on models with adaptive aspect ratio (e.g. BytePlus Seedance) follows the input image or video.
539
539
  */
540
540
  aspectRatio?: VideoGenerationRequestAspectRatio | undefined;
541
541
  /**
@@ -547,7 +547,7 @@ export type VideoGenerationRequest = {
547
547
  */
548
548
  creativity?: number | undefined;
549
549
  /**
550
- * Duration of the generated video in seconds
550
+ * Duration of the generated video in seconds, or -1 to let the provider choose the length (e.g. following an input video). -1 is only accepted by models that list it in supported_durations.
551
551
  */
552
552
  duration?: number | undefined;
553
553
  /**
@@ -10,7 +10,7 @@ import { InputReference$outboundSchema, } from "./inputreference.js";
10
10
  import { ProviderName$outboundSchema } from "./providername.js";
11
11
  import { TraceConfig$outboundSchema, } from "./traceconfig.js";
12
12
  /**
13
- * Aspect ratio of the generated video
13
+ * Aspect ratio of the generated video. Omit it to use the model default, which on models with adaptive aspect ratio (e.g. BytePlus Seedance) follows the input image or video.
14
14
  */
15
15
  export const VideoGenerationRequestAspectRatio = {
16
16
  OneHundredAndSixtyNine: "16:9",
@@ -165,7 +165,7 @@ export type VideoModel = {
165
165
  */
166
166
  supportedAspectRatios: Array<SupportedAspectRatio> | null;
167
167
  /**
168
- * Supported video durations in seconds
168
+ * Supported video durations in seconds. -1 means the model accepts duration -1 and chooses the length itself.
169
169
  */
170
170
  supportedDurations: Array<number> | null;
171
171
  /**
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@openrouter/sdk",
5
- "version": "1.5.86",
5
+ "version": "1.5.87",
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.86",
3
+ "version": "1.5.87",
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
- "provenance": true,
25
- "access": "public"
24
+ "access": "public",
25
+ "provenance": true
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 && node scripts/unbarrel-imports.js",
75
75
  "prepublishOnly": "npm run build",
76
- "typecheck": "tsc --noEmit",
77
- "postinstall": "node scripts/check-types.js || true",
78
- "test:transit": "exit 0",
79
- "typecheck:transit": "exit 0",
80
76
  "compile": "tsc && node scripts/unbarrel-imports.js",
81
77
  "prepare": "npm run build",
78
+ "test:transit": "exit 0",
79
+ "test:watch": "vitest --watch --project unit",
80
+ "typecheck": "tsc --noEmit",
81
+ "typecheck:transit": "exit 0",
82
+ "postinstall": "node scripts/check-types.js || true",
82
83
  "test": "vitest --run --project unit",
83
- "test:e2e": "vitest --run --project e2e",
84
- "test:watch": "vitest --watch --project unit"
84
+ "test:e2e": "vitest --run --project e2e"
85
85
  },
86
86
  "peerDependencies": {
87
87