@openrouter/sdk 1.5.9 → 1.5.10
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.
package/esm/lib/config.d.ts
CHANGED
|
@@ -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.
|
|
53
|
+
readonly sdkVersion: "1.5.10";
|
|
54
54
|
readonly genVersion: "2.948.4";
|
|
55
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.5.
|
|
55
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.5.10 2.948.4 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.
|
|
32
|
+
sdkVersion: "1.5.10",
|
|
33
33
|
genVersion: "2.948.4",
|
|
34
|
-
userAgent: "speakeasy-sdk/typescript 1.5.
|
|
34
|
+
userAgent: "speakeasy-sdk/typescript 1.5.10 2.948.4 1.0.0 @openrouter/sdk",
|
|
35
35
|
};
|
|
36
36
|
//# sourceMappingURL=config.js.map
|
|
@@ -1,15 +1,48 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
|
+
import { OpenEnum } from "../types/enums.js";
|
|
2
3
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
4
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
5
|
import { ObservabilityDataRegion } from "./observabilitydataregion.js";
|
|
5
6
|
import { ObservabilityFilterRulesConfig } from "./observabilityfilterrulesconfig.js";
|
|
7
|
+
/**
|
|
8
|
+
* IAM role: OpenRouter assumes a role in your AWS account with short-lived STS credentials, so you don't share long-lived keys.
|
|
9
|
+
*/
|
|
10
|
+
export declare const AuthMode: {
|
|
11
|
+
readonly AccessKeys: "access_keys";
|
|
12
|
+
readonly IamRole: "iam_role";
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* IAM role: OpenRouter assumes a role in your AWS account with short-lived STS credentials, so you don't share long-lived keys.
|
|
16
|
+
*/
|
|
17
|
+
export type AuthMode = OpenEnum<typeof AuthMode>;
|
|
18
|
+
/**
|
|
19
|
+
* The object storage service that hosts the bucket. AWS S3 supports IAM role authentication; the other providers use access keys.
|
|
20
|
+
*/
|
|
21
|
+
export declare const ProviderEnum: {
|
|
22
|
+
readonly Aws: "aws";
|
|
23
|
+
readonly CloudflareR2: "cloudflare_r2";
|
|
24
|
+
readonly Gcs: "gcs";
|
|
25
|
+
readonly Other: "other";
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* The object storage service that hosts the bucket. AWS S3 supports IAM role authentication; the other providers use access keys.
|
|
29
|
+
*/
|
|
30
|
+
export type ProviderEnum = OpenEnum<typeof ProviderEnum>;
|
|
6
31
|
export type ObservabilityS3DestinationConfig = {
|
|
7
|
-
accessKeyId
|
|
32
|
+
accessKeyId?: string | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* IAM role: OpenRouter assumes a role in your AWS account with short-lived STS credentials, so you don't share long-lived keys.
|
|
35
|
+
*/
|
|
36
|
+
authMode: AuthMode;
|
|
8
37
|
bucketName: string;
|
|
9
38
|
/**
|
|
10
39
|
* Only for S3-compatible services like Cloudflare R2 (https://account-id.r2.cloudflarestorage.com) or MinIO. Leave blank for standard AWS S3.
|
|
11
40
|
*/
|
|
12
41
|
endpoint?: string | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Generated by OpenRouter when you save. Require it as sts:ExternalId in your role's trust policy.
|
|
44
|
+
*/
|
|
45
|
+
externalId?: string | undefined;
|
|
13
46
|
/**
|
|
14
47
|
* Custom HTTP headers to include in requests to this destination.
|
|
15
48
|
*/
|
|
@@ -21,8 +54,19 @@ export type ObservabilityS3DestinationConfig = {
|
|
|
21
54
|
*/
|
|
22
55
|
pathTemplate: string;
|
|
23
56
|
prefix: string;
|
|
57
|
+
/**
|
|
58
|
+
* The object storage service that hosts the bucket. AWS S3 supports IAM role authentication; the other providers use access keys.
|
|
59
|
+
*/
|
|
60
|
+
provider?: ProviderEnum | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* Required for IAM role authentication. With access keys, AWS S3 detects the bucket region when you leave this blank.
|
|
63
|
+
*/
|
|
24
64
|
region?: string | undefined;
|
|
25
|
-
|
|
65
|
+
/**
|
|
66
|
+
* The IAM role in your account that OpenRouter assumes. Its trust policy must allow sts:AssumeRole from arn:aws:iam::536697249728:role/openrouter-broadcast-exporter and require the external ID below, and its permissions must allow s3:PutObject on the bucket and prefix (plus kms:GenerateDataKey for SSE-KMS buckets).
|
|
67
|
+
*/
|
|
68
|
+
roleArn?: string | undefined;
|
|
69
|
+
secretAccessKey?: string | undefined;
|
|
26
70
|
sessionToken?: string | undefined;
|
|
27
71
|
};
|
|
28
72
|
export type ObservabilityS3Destination = {
|
|
@@ -90,6 +134,10 @@ export type ObservabilityS3Destination = {
|
|
|
90
134
|
workspaceId: string;
|
|
91
135
|
};
|
|
92
136
|
/** @internal */
|
|
137
|
+
export declare const AuthMode$inboundSchema: z.ZodType<AuthMode, unknown>;
|
|
138
|
+
/** @internal */
|
|
139
|
+
export declare const ProviderEnum$inboundSchema: z.ZodType<ProviderEnum, unknown>;
|
|
140
|
+
/** @internal */
|
|
93
141
|
export declare const ObservabilityS3DestinationConfig$inboundSchema: z.ZodType<ObservabilityS3DestinationConfig, unknown>;
|
|
94
142
|
export declare function observabilityS3DestinationConfigFromJSON(jsonString: string): SafeParseResult<ObservabilityS3DestinationConfig, SDKValidationError>;
|
|
95
143
|
/** @internal */
|
|
@@ -5,18 +5,44 @@
|
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
6
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
7
|
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
import * as openEnums from "../types/enums.js";
|
|
8
9
|
import { ObservabilityDataRegion$inboundSchema, } from "./observabilitydataregion.js";
|
|
9
10
|
import { ObservabilityFilterRulesConfig$inboundSchema, } from "./observabilityfilterrulesconfig.js";
|
|
11
|
+
/**
|
|
12
|
+
* IAM role: OpenRouter assumes a role in your AWS account with short-lived STS credentials, so you don't share long-lived keys.
|
|
13
|
+
*/
|
|
14
|
+
export const AuthMode = {
|
|
15
|
+
AccessKeys: "access_keys",
|
|
16
|
+
IamRole: "iam_role",
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* The object storage service that hosts the bucket. AWS S3 supports IAM role authentication; the other providers use access keys.
|
|
20
|
+
*/
|
|
21
|
+
export const ProviderEnum = {
|
|
22
|
+
Aws: "aws",
|
|
23
|
+
CloudflareR2: "cloudflare_r2",
|
|
24
|
+
Gcs: "gcs",
|
|
25
|
+
Other: "other",
|
|
26
|
+
};
|
|
27
|
+
/** @internal */
|
|
28
|
+
export const AuthMode$inboundSchema = openEnums
|
|
29
|
+
.inboundSchema(AuthMode);
|
|
30
|
+
/** @internal */
|
|
31
|
+
export const ProviderEnum$inboundSchema = openEnums.inboundSchema(ProviderEnum);
|
|
10
32
|
/** @internal */
|
|
11
33
|
export const ObservabilityS3DestinationConfig$inboundSchema = z.object({
|
|
12
|
-
accessKeyId: z.string(),
|
|
34
|
+
accessKeyId: z.string().optional(),
|
|
35
|
+
authMode: AuthMode$inboundSchema.default("access_keys"),
|
|
13
36
|
bucketName: z.string(),
|
|
14
37
|
endpoint: z.string().optional(),
|
|
38
|
+
externalId: z.string().optional(),
|
|
15
39
|
headers: z.record(z.string(), z.string()).optional(),
|
|
16
40
|
pathTemplate: z.string().default("{prefix}/{date}"),
|
|
17
41
|
prefix: z.string().default("openrouter-traces"),
|
|
42
|
+
provider: ProviderEnum$inboundSchema.optional(),
|
|
18
43
|
region: z.string().optional(),
|
|
19
|
-
|
|
44
|
+
roleArn: z.string().optional(),
|
|
45
|
+
secretAccessKey: z.string().optional(),
|
|
20
46
|
sessionToken: z.string().optional(),
|
|
21
47
|
});
|
|
22
48
|
export function observabilityS3DestinationConfigFromJSON(jsonString) {
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openrouter/sdk",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.10",
|
|
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": "tsc && node scripts/unbarrel-imports.js",
|
|
75
75
|
"prepublishOnly": "npm run build",
|
|
76
|
+
"compile": "tsc && node scripts/unbarrel-imports.js",
|
|
77
|
+
"postinstall": "node scripts/check-types.js || true",
|
|
78
|
+
"prepare": "npm run build",
|
|
79
|
+
"test": "vitest --run --project unit",
|
|
76
80
|
"test:e2e": "vitest --run --project e2e",
|
|
77
81
|
"test:transit": "exit 0",
|
|
78
82
|
"test:watch": "vitest --watch --project unit",
|
|
79
83
|
"typecheck": "tsc --noEmit",
|
|
80
|
-
"typecheck:transit": "exit 0"
|
|
81
|
-
"compile": "tsc && node scripts/unbarrel-imports.js",
|
|
82
|
-
"postinstall": "node scripts/check-types.js || true",
|
|
83
|
-
"prepare": "npm run build",
|
|
84
|
-
"test": "vitest --run --project unit"
|
|
84
|
+
"typecheck:transit": "exit 0"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
87
|
|