@openrouter/sdk 1.5.47 → 1.5.48

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.
Files changed (32) hide show
  1. package/esm/lib/config.d.ts +2 -2
  2. package/esm/lib/config.js +2 -2
  3. package/esm/models/index.d.ts +0 -7
  4. package/esm/models/index.js +0 -7
  5. package/esm/models/operations/gettaskclassifications.d.ts +4 -4
  6. package/esm/models/operations/gettaskclassifications.js +3 -3
  7. package/esm/models/operations/index.d.ts +0 -1
  8. package/esm/models/operations/index.js +0 -1
  9. package/esm/models/videogenerationrequest.d.ts +36 -2
  10. package/esm/models/videogenerationrequest.js +21 -0
  11. package/esm/sdk/providers.d.ts +0 -8
  12. package/esm/sdk/providers.js +0 -10
  13. package/jsr.json +1 -1
  14. package/package.json +3 -3
  15. package/esm/funcs/providersListProviderEndpoints.d.ts +0 -19
  16. package/esm/funcs/providersListProviderEndpoints.js +0 -108
  17. package/esm/models/endpointsummary.d.ts +0 -65
  18. package/esm/models/endpointsummary.js +0 -48
  19. package/esm/models/endpointtestprofile.d.ts +0 -271
  20. package/esm/models/endpointtestprofile.js +0 -252
  21. package/esm/models/operations/listproviderendpoints.d.ts +0 -106
  22. package/esm/models/operations/listproviderendpoints.js +0 -55
  23. package/esm/models/providerendpoints.d.ts +0 -34
  24. package/esm/models/providerendpoints.js +0 -32
  25. package/esm/models/providerendpointsresponse.d.ts +0 -11
  26. package/esm/models/providerendpointsresponse.js +0 -15
  27. package/esm/models/providerendpointstats.d.ts +0 -11
  28. package/esm/models/providerendpointstats.js +0 -17
  29. package/esm/models/providerendpointstatsavailable.d.ts +0 -66
  30. package/esm/models/providerendpointstatsavailable.js +0 -51
  31. package/esm/models/providerendpointstatsunavailable.d.ts +0 -10
  32. package/esm/models/providerendpointstatsunavailable.js +0 -14
@@ -1,34 +0,0 @@
1
- import * as z from "zod/v4";
2
- import { OpenEnum } from "../types/enums.js";
3
- import { Result as SafeParseResult } from "../types/fp.js";
4
- import { EndpointSummary } from "./endpointsummary.js";
5
- import { SDKValidationError } from "./errors/sdkvalidationerror.js";
6
- import { ProviderEndpointStats } from "./providerendpointstats.js";
7
- /**
8
- * Time window the provider-wide stats cover
9
- */
10
- export declare const Window: {
11
- readonly Onehr: "1hr";
12
- readonly Oned: "1d";
13
- readonly Onew: "1w";
14
- readonly Onemo: "1mo";
15
- readonly Oney: "1y";
16
- };
17
- /**
18
- * Time window the provider-wide stats cover
19
- */
20
- export type Window = OpenEnum<typeof Window>;
21
- export type ProviderEndpoints = {
22
- endpoints: Array<EndpointSummary>;
23
- stats: ProviderEndpointStats;
24
- /**
25
- * Time window the provider-wide stats cover
26
- */
27
- window: Window;
28
- };
29
- /** @internal */
30
- export declare const Window$inboundSchema: z.ZodType<Window, unknown>;
31
- /** @internal */
32
- export declare const ProviderEndpoints$inboundSchema: z.ZodType<ProviderEndpoints, unknown>;
33
- export declare function providerEndpointsFromJSON(jsonString: string): SafeParseResult<ProviderEndpoints, SDKValidationError>;
34
- //# sourceMappingURL=providerendpoints.d.ts.map
@@ -1,32 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- * @generated-id: 248051591265
4
- */
5
- import * as z from "zod/v4";
6
- import { safeParse } from "../lib/schemas.js";
7
- import * as openEnums from "../types/enums.js";
8
- import { EndpointSummary$inboundSchema, } from "./endpointsummary.js";
9
- import { ProviderEndpointStats$inboundSchema, } from "./providerendpointstats.js";
10
- /**
11
- * Time window the provider-wide stats cover
12
- */
13
- export const Window = {
14
- Onehr: "1hr",
15
- Oned: "1d",
16
- Onew: "1w",
17
- Onemo: "1mo",
18
- Oney: "1y",
19
- };
20
- /** @internal */
21
- export const Window$inboundSchema = openEnums
22
- .inboundSchema(Window);
23
- /** @internal */
24
- export const ProviderEndpoints$inboundSchema = z.object({
25
- endpoints: z.array(EndpointSummary$inboundSchema),
26
- stats: ProviderEndpointStats$inboundSchema,
27
- window: Window$inboundSchema,
28
- });
29
- export function providerEndpointsFromJSON(jsonString) {
30
- return safeParse(jsonString, (x) => ProviderEndpoints$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ProviderEndpoints' from JSON`);
31
- }
32
- //# sourceMappingURL=providerendpoints.js.map
@@ -1,11 +0,0 @@
1
- import * as z from "zod/v4";
2
- import { Result as SafeParseResult } from "../types/fp.js";
3
- import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
- import { ProviderEndpoints } from "./providerendpoints.js";
5
- export type ProviderEndpointsResponse = {
6
- data: ProviderEndpoints;
7
- };
8
- /** @internal */
9
- export declare const ProviderEndpointsResponse$inboundSchema: z.ZodType<ProviderEndpointsResponse, unknown>;
10
- export declare function providerEndpointsResponseFromJSON(jsonString: string): SafeParseResult<ProviderEndpointsResponse, SDKValidationError>;
11
- //# sourceMappingURL=providerendpointsresponse.d.ts.map
@@ -1,15 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- * @generated-id: 7e6b90e2ebc2
4
- */
5
- import * as z from "zod/v4";
6
- import { safeParse } from "../lib/schemas.js";
7
- import { ProviderEndpoints$inboundSchema, } from "./providerendpoints.js";
8
- /** @internal */
9
- export const ProviderEndpointsResponse$inboundSchema = z.object({
10
- data: ProviderEndpoints$inboundSchema,
11
- });
12
- export function providerEndpointsResponseFromJSON(jsonString) {
13
- return safeParse(jsonString, (x) => ProviderEndpointsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ProviderEndpointsResponse' from JSON`);
14
- }
15
- //# sourceMappingURL=providerendpointsresponse.js.map
@@ -1,11 +0,0 @@
1
- import * as z from "zod/v4";
2
- import * as discriminatedUnionTypes from "../types/discriminatedUnion.js";
3
- import { Result as SafeParseResult } from "../types/fp.js";
4
- import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
- import { ProviderEndpointStatsAvailable } from "./providerendpointstatsavailable.js";
6
- import { ProviderEndpointStatsUnavailable } from "./providerendpointstatsunavailable.js";
7
- export type ProviderEndpointStats = ProviderEndpointStatsAvailable | ProviderEndpointStatsUnavailable | discriminatedUnionTypes.Unknown<"status">;
8
- /** @internal */
9
- export declare const ProviderEndpointStats$inboundSchema: z.ZodType<ProviderEndpointStats, unknown>;
10
- export declare function providerEndpointStatsFromJSON(jsonString: string): SafeParseResult<ProviderEndpointStats, SDKValidationError>;
11
- //# sourceMappingURL=providerendpointstats.d.ts.map
@@ -1,17 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- * @generated-id: 0c878b38826c
4
- */
5
- import { safeParse } from "../lib/schemas.js";
6
- import { discriminatedUnion } from "../types/discriminatedUnion.js";
7
- import { ProviderEndpointStatsAvailable$inboundSchema, } from "./providerendpointstatsavailable.js";
8
- import { ProviderEndpointStatsUnavailable$inboundSchema, } from "./providerendpointstatsunavailable.js";
9
- /** @internal */
10
- export const ProviderEndpointStats$inboundSchema = discriminatedUnion("status", {
11
- available: ProviderEndpointStatsAvailable$inboundSchema,
12
- unavailable: ProviderEndpointStatsUnavailable$inboundSchema,
13
- });
14
- export function providerEndpointStatsFromJSON(jsonString) {
15
- return safeParse(jsonString, (x) => ProviderEndpointStats$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ProviderEndpointStats' from JSON`);
16
- }
17
- //# sourceMappingURL=providerendpointstats.js.map
@@ -1,66 +0,0 @@
1
- import * as z from "zod/v4";
2
- import { Result as SafeParseResult } from "../types/fp.js";
3
- import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
- /**
5
- * Request latency, milliseconds
6
- */
7
- export type LatencyMs = {
8
- p50: number | null;
9
- p90: number | null;
10
- };
11
- /**
12
- * Output tokens per second
13
- */
14
- export type ThroughputTokensPerSecond = {
15
- p50: number | null;
16
- p90: number | null;
17
- };
18
- export type ProviderEndpointStatsAvailable = {
19
- /**
20
- * Endpoints the stats cover
21
- */
22
- endpointCount: number;
23
- /**
24
- * Errored share of requests that count toward uptime, 0-100
25
- */
26
- errorRatePercent: number;
27
- /**
28
- * Request latency, milliseconds
29
- */
30
- latencyMs: LatencyMs;
31
- /**
32
- * Routing quality, 0-100
33
- */
34
- qualityPercent: number | null;
35
- /**
36
- * Rate-limited share of routed requests, 0-100
37
- */
38
- rateLimitedPercent: number | null;
39
- /**
40
- * Routing reliability, 0-100
41
- */
42
- reliabilityPercent: number | null;
43
- /**
44
- * Requests in the window
45
- */
46
- requests: number;
47
- status: "available";
48
- /**
49
- * Output tokens per second
50
- */
51
- throughputTokensPerSecond: ThroughputTokensPerSecond;
52
- /**
53
- * Successful share of requests that count toward uptime, 0-100
54
- */
55
- uptimePercent: number | null;
56
- };
57
- /** @internal */
58
- export declare const LatencyMs$inboundSchema: z.ZodType<LatencyMs, unknown>;
59
- export declare function latencyMsFromJSON(jsonString: string): SafeParseResult<LatencyMs, SDKValidationError>;
60
- /** @internal */
61
- export declare const ThroughputTokensPerSecond$inboundSchema: z.ZodType<ThroughputTokensPerSecond, unknown>;
62
- export declare function throughputTokensPerSecondFromJSON(jsonString: string): SafeParseResult<ThroughputTokensPerSecond, SDKValidationError>;
63
- /** @internal */
64
- export declare const ProviderEndpointStatsAvailable$inboundSchema: z.ZodType<ProviderEndpointStatsAvailable, unknown>;
65
- export declare function providerEndpointStatsAvailableFromJSON(jsonString: string): SafeParseResult<ProviderEndpointStatsAvailable, SDKValidationError>;
66
- //# sourceMappingURL=providerendpointstatsavailable.d.ts.map
@@ -1,51 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- * @generated-id: 2d30fafcb067
4
- */
5
- import * as z from "zod/v4";
6
- import { remap as remap$ } from "../lib/primitives.js";
7
- import { safeParse } from "../lib/schemas.js";
8
- /** @internal */
9
- export const LatencyMs$inboundSchema = z.object({
10
- p50: z.nullable(z.number()),
11
- p90: z.nullable(z.number()),
12
- });
13
- export function latencyMsFromJSON(jsonString) {
14
- return safeParse(jsonString, (x) => LatencyMs$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LatencyMs' from JSON`);
15
- }
16
- /** @internal */
17
- export const ThroughputTokensPerSecond$inboundSchema = z.object({
18
- p50: z.nullable(z.number()),
19
- p90: z.nullable(z.number()),
20
- });
21
- export function throughputTokensPerSecondFromJSON(jsonString) {
22
- return safeParse(jsonString, (x) => ThroughputTokensPerSecond$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThroughputTokensPerSecond' from JSON`);
23
- }
24
- /** @internal */
25
- export const ProviderEndpointStatsAvailable$inboundSchema = z.object({
26
- endpoint_count: z.int(),
27
- error_rate_percent: z.number(),
28
- latency_ms: z.lazy(() => LatencyMs$inboundSchema),
29
- quality_percent: z.nullable(z.number()),
30
- rate_limited_percent: z.nullable(z.number()),
31
- reliability_percent: z.nullable(z.number()),
32
- requests: z.int(),
33
- status: z.literal("available"),
34
- throughput_tokens_per_second: z.lazy(() => ThroughputTokensPerSecond$inboundSchema),
35
- uptime_percent: z.nullable(z.number()),
36
- }).transform((v) => {
37
- return remap$(v, {
38
- "endpoint_count": "endpointCount",
39
- "error_rate_percent": "errorRatePercent",
40
- "latency_ms": "latencyMs",
41
- "quality_percent": "qualityPercent",
42
- "rate_limited_percent": "rateLimitedPercent",
43
- "reliability_percent": "reliabilityPercent",
44
- "throughput_tokens_per_second": "throughputTokensPerSecond",
45
- "uptime_percent": "uptimePercent",
46
- });
47
- });
48
- export function providerEndpointStatsAvailableFromJSON(jsonString) {
49
- return safeParse(jsonString, (x) => ProviderEndpointStatsAvailable$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ProviderEndpointStatsAvailable' from JSON`);
50
- }
51
- //# sourceMappingURL=providerendpointstatsavailable.js.map
@@ -1,10 +0,0 @@
1
- import * as z from "zod/v4";
2
- import { Result as SafeParseResult } from "../types/fp.js";
3
- import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
- export type ProviderEndpointStatsUnavailable = {
5
- status: "unavailable";
6
- };
7
- /** @internal */
8
- export declare const ProviderEndpointStatsUnavailable$inboundSchema: z.ZodType<ProviderEndpointStatsUnavailable, unknown>;
9
- export declare function providerEndpointStatsUnavailableFromJSON(jsonString: string): SafeParseResult<ProviderEndpointStatsUnavailable, SDKValidationError>;
10
- //# sourceMappingURL=providerendpointstatsunavailable.d.ts.map
@@ -1,14 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- * @generated-id: f8a0fc50ae42
4
- */
5
- import * as z from "zod/v4";
6
- import { safeParse } from "../lib/schemas.js";
7
- /** @internal */
8
- export const ProviderEndpointStatsUnavailable$inboundSchema = z.object({
9
- status: z.literal("unavailable"),
10
- });
11
- export function providerEndpointStatsUnavailableFromJSON(jsonString) {
12
- return safeParse(jsonString, (x) => ProviderEndpointStatsUnavailable$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ProviderEndpointStatsUnavailable' from JSON`);
13
- }
14
- //# sourceMappingURL=providerendpointstatsunavailable.js.map