@openrouter/sdk 0.12.32 → 0.12.33
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 +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/endpointinfo.d.ts +0 -2
- package/esm/models/endpointinfo.js +0 -8
- package/esm/models/endpointsmetadata.d.ts +0 -2
- package/esm/models/endpointsmetadata.js +0 -7
- package/esm/models/pipelinestagetype.d.ts +1 -3
- package/esm/models/pipelinestagetype.js +1 -3
- package/esm/models/routerparams.d.ts +0 -1
- package/esm/models/routerparams.js +0 -1
- package/jsr.json +1 -1
- package/package.json +7 -7
package/esm/lib/config.d.ts
CHANGED
|
@@ -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: "0.12.
|
|
52
|
+
readonly sdkVersion: "0.12.33";
|
|
53
53
|
readonly genVersion: "2.879.1";
|
|
54
|
-
readonly userAgent: "speakeasy-sdk/typescript 0.12.
|
|
54
|
+
readonly userAgent: "speakeasy-sdk/typescript 0.12.33 2.879.1 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: "0.12.
|
|
29
|
+
sdkVersion: "0.12.33",
|
|
30
30
|
genVersion: "2.879.1",
|
|
31
|
-
userAgent: "speakeasy-sdk/typescript 0.12.
|
|
31
|
+
userAgent: "speakeasy-sdk/typescript 0.12.33 2.879.1 1.0.0 @openrouter/sdk",
|
|
32
32
|
};
|
|
33
33
|
//# sourceMappingURL=config.js.map
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
* @generated-id: 33effd05ad97
|
|
4
4
|
*/
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
|
-
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
6
|
import { safeParse } from "../lib/schemas.js";
|
|
8
7
|
/** @internal */
|
|
9
8
|
export const EndpointInfo$inboundSchema = z
|
|
@@ -11,13 +10,6 @@ export const EndpointInfo$inboundSchema = z
|
|
|
11
10
|
model: z.string(),
|
|
12
11
|
provider: z.string(),
|
|
13
12
|
selected: z.boolean(),
|
|
14
|
-
sort_rank: z.int(),
|
|
15
|
-
sort_value: z.nullable(z.number()),
|
|
16
|
-
}).transform((v) => {
|
|
17
|
-
return remap$(v, {
|
|
18
|
-
"sort_rank": "sortRank",
|
|
19
|
-
"sort_value": "sortValue",
|
|
20
|
-
});
|
|
21
13
|
});
|
|
22
14
|
export function endpointInfoFromJSON(jsonString) {
|
|
23
15
|
return safeParse(jsonString, (x) => EndpointInfo$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EndpointInfo' from JSON`);
|
|
@@ -4,8 +4,6 @@ import { EndpointInfo } from "./endpointinfo.js";
|
|
|
4
4
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
5
|
export type EndpointsMetadata = {
|
|
6
6
|
available: Array<EndpointInfo>;
|
|
7
|
-
sort: string;
|
|
8
|
-
sortValue?: number | null | undefined;
|
|
9
7
|
total: number;
|
|
10
8
|
};
|
|
11
9
|
/** @internal */
|
|
@@ -3,19 +3,12 @@
|
|
|
3
3
|
* @generated-id: 43bec63453bf
|
|
4
4
|
*/
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
|
-
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
6
|
import { safeParse } from "../lib/schemas.js";
|
|
8
7
|
import { EndpointInfo$inboundSchema } from "./endpointinfo.js";
|
|
9
8
|
/** @internal */
|
|
10
9
|
export const EndpointsMetadata$inboundSchema = z.object({
|
|
11
10
|
available: z.array(EndpointInfo$inboundSchema),
|
|
12
|
-
sort: z.string(),
|
|
13
|
-
sort_value: z.nullable(z.number()).optional(),
|
|
14
11
|
total: z.int(),
|
|
15
|
-
}).transform((v) => {
|
|
16
|
-
return remap$(v, {
|
|
17
|
-
"sort_value": "sortValue",
|
|
18
|
-
});
|
|
19
12
|
});
|
|
20
13
|
export function endpointsMetadataFromJSON(jsonString) {
|
|
21
14
|
return safeParse(jsonString, (x) => EndpointsMetadata$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EndpointsMetadata' from JSON`);
|
|
@@ -4,10 +4,8 @@ import { OpenEnum } from "../types/enums.js";
|
|
|
4
4
|
* Categorical kind of a pipeline stage. Multiple plugins can share a type (e.g. all guardrail-level plugins emit `guardrail`); the `name` field disambiguates which plugin emitted it.
|
|
5
5
|
*/
|
|
6
6
|
export declare const PipelineStageType: {
|
|
7
|
-
readonly Router: "router";
|
|
8
7
|
readonly Guardrail: "guardrail";
|
|
9
|
-
readonly
|
|
10
|
-
readonly FileParser: "file_parser";
|
|
8
|
+
readonly Plugin: "plugin";
|
|
11
9
|
readonly ServerTools: "server_tools";
|
|
12
10
|
readonly ResponseHealing: "response_healing";
|
|
13
11
|
readonly ContextCompression: "context_compression";
|
|
@@ -7,10 +7,8 @@ import * as openEnums from "../types/enums.js";
|
|
|
7
7
|
* Categorical kind of a pipeline stage. Multiple plugins can share a type (e.g. all guardrail-level plugins emit `guardrail`); the `name` field disambiguates which plugin emitted it.
|
|
8
8
|
*/
|
|
9
9
|
export const PipelineStageType = {
|
|
10
|
-
Router: "router",
|
|
11
10
|
Guardrail: "guardrail",
|
|
12
|
-
|
|
13
|
-
FileParser: "file_parser",
|
|
11
|
+
Plugin: "plugin",
|
|
14
12
|
ServerTools: "server_tools",
|
|
15
13
|
ResponseHealing: "response_healing",
|
|
16
14
|
ContextCompression: "context_compression",
|
|
@@ -3,7 +3,6 @@ import { Result as SafeParseResult } from "../types/fp.js";
|
|
|
3
3
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
4
|
export type RouterParams = {
|
|
5
5
|
qualityFloor?: number | undefined;
|
|
6
|
-
sort?: string | undefined;
|
|
7
6
|
throughputFloor?: number | undefined;
|
|
8
7
|
versionGroup?: string | undefined;
|
|
9
8
|
additionalProperties?: {
|
|
@@ -8,7 +8,6 @@ import { collectExtraKeys as collectExtraKeys$, safeParse, } from "../lib/schema
|
|
|
8
8
|
/** @internal */
|
|
9
9
|
export const RouterParams$inboundSchema = collectExtraKeys$(z.object({
|
|
10
10
|
quality_floor: z.number().optional(),
|
|
11
|
-
sort: z.string().optional(),
|
|
12
11
|
throughput_floor: z.number().optional(),
|
|
13
12
|
version_group: z.string().optional(),
|
|
14
13
|
}).catchall(z.any()), "additionalProperties", true).transform((v) => {
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openrouter/sdk",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.33",
|
|
4
4
|
"author": "OpenRouter",
|
|
5
5
|
"description": "The OpenRouter TypeScript SDK is a type-safe toolkit for building AI applications with access to 300+ language models through a unified API.",
|
|
6
6
|
"keywords": [
|
|
@@ -69,15 +69,15 @@
|
|
|
69
69
|
"lint": "eslint --cache --max-warnings=0 src",
|
|
70
70
|
"build": "tsc",
|
|
71
71
|
"prepublishOnly": "npm run build",
|
|
72
|
-
"test": "vitest --run --project unit",
|
|
73
|
-
"typecheck": "tsc --noEmit",
|
|
74
|
-
"typecheck:transit": "exit 0",
|
|
75
|
-
"compile": "tsc",
|
|
76
72
|
"prepare": "npm run build",
|
|
77
73
|
"test:e2e": "vitest --run --project e2e",
|
|
78
|
-
"test:transit": "exit 0",
|
|
79
74
|
"test:watch": "vitest --watch --project unit",
|
|
80
|
-
"
|
|
75
|
+
"compile": "tsc",
|
|
76
|
+
"postinstall": "node scripts/check-types.js || true",
|
|
77
|
+
"test": "vitest --run --project unit",
|
|
78
|
+
"test:transit": "exit 0",
|
|
79
|
+
"typecheck": "tsc --noEmit",
|
|
80
|
+
"typecheck:transit": "exit 0"
|
|
81
81
|
},
|
|
82
82
|
"peerDependencies": {},
|
|
83
83
|
"devDependencies": {
|