@openrouter/sdk 1.5.43 → 1.5.44

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.43";
53
+ readonly sdkVersion: "1.5.44";
54
54
  readonly genVersion: "2.950.13";
55
- readonly userAgent: "speakeasy-sdk/typescript 1.5.43 2.950.13 1.0.0 @openrouter/sdk";
55
+ readonly userAgent: "speakeasy-sdk/typescript 1.5.44 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.43",
32
+ sdkVersion: "1.5.44",
33
33
  genVersion: "2.950.13",
34
- userAgent: "speakeasy-sdk/typescript 1.5.43 2.950.13 1.0.0 @openrouter/sdk",
34
+ userAgent: "speakeasy-sdk/typescript 1.5.44 2.950.13 1.0.0 @openrouter/sdk",
35
35
  };
36
36
  //# sourceMappingURL=config.js.map
@@ -0,0 +1,16 @@
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 { PercentileStats } from "./percentilestats.js";
5
+ export type Extractions = {
6
+ latency: PercentileStats | null;
7
+ /**
8
+ * Total requests admitted for this workload in the window.
9
+ */
10
+ requestCount: number | null;
11
+ throughput: PercentileStats | null;
12
+ };
13
+ /** @internal */
14
+ export declare const Extractions$inboundSchema: z.ZodType<Extractions, unknown>;
15
+ export declare function extractionsFromJSON(jsonString: string): SafeParseResult<Extractions, SDKValidationError>;
16
+ //# sourceMappingURL=extractions.d.ts.map
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: b8db9219ea90
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
+ import { PercentileStats$inboundSchema, } from "./percentilestats.js";
9
+ /** @internal */
10
+ export const Extractions$inboundSchema = z
11
+ .object({
12
+ latency: z.nullable(PercentileStats$inboundSchema),
13
+ request_count: z.nullable(z.int()),
14
+ throughput: z.nullable(PercentileStats$inboundSchema),
15
+ }).transform((v) => {
16
+ return remap$(v, {
17
+ "request_count": "requestCount",
18
+ });
19
+ });
20
+ export function extractionsFromJSON(jsonString) {
21
+ return safeParse(jsonString, (x) => Extractions$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Extractions' from JSON`);
22
+ }
23
+ //# sourceMappingURL=extractions.js.map
@@ -350,6 +350,7 @@ export * from "./extractionlistanswer.js";
350
350
  export * from "./extractionlistfield.js";
351
351
  export * from "./extractionnumberanswer.js";
352
352
  export * from "./extractionnumberfield.js";
353
+ export * from "./extractions.js";
353
354
  export * from "./extractionsrequest.js";
354
355
  export * from "./extractionsresponse.js";
355
356
  export * from "./extractionsusage.js";
@@ -354,6 +354,7 @@ export * from "./extractionlistanswer.js";
354
354
  export * from "./extractionlistfield.js";
355
355
  export * from "./extractionnumberanswer.js";
356
356
  export * from "./extractionnumberfield.js";
357
+ export * from "./extractions.js";
357
358
  export * from "./extractionsrequest.js";
358
359
  export * from "./extractionsresponse.js";
359
360
  export * from "./extractionsusage.js";
@@ -3,6 +3,7 @@ import { Result as SafeParseResult } from "../types/fp.js";
3
3
  import { Decisions } from "./decisions.js";
4
4
  import { Embeddings } from "./embeddings.js";
5
5
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
6
+ import { Extractions } from "./extractions.js";
6
7
  import { ImageGeneration } from "./imagegeneration.js";
7
8
  import { Rerank } from "./rerank.js";
8
9
  import { STT } from "./stt.js";
@@ -16,6 +17,7 @@ import { VideoGeneration } from "./videogeneration.js";
16
17
  export type PerfLast30mByWorkload = {
17
18
  decisions?: Decisions | undefined;
18
19
  embeddings?: Embeddings | undefined;
20
+ extractions?: Extractions | undefined;
19
21
  imageGeneration?: ImageGeneration | undefined;
20
22
  rerank?: Rerank | undefined;
21
23
  stt?: STT | undefined;
@@ -7,6 +7,7 @@ import { remap as remap$ } from "../lib/primitives.js";
7
7
  import { safeParse } from "../lib/schemas.js";
8
8
  import { Decisions$inboundSchema } from "./decisions.js";
9
9
  import { Embeddings$inboundSchema } from "./embeddings.js";
10
+ import { Extractions$inboundSchema } from "./extractions.js";
10
11
  import { ImageGeneration$inboundSchema, } from "./imagegeneration.js";
11
12
  import { Rerank$inboundSchema } from "./rerank.js";
12
13
  import { STT$inboundSchema } from "./stt.js";
@@ -18,6 +19,7 @@ import { VideoGeneration$inboundSchema, } from "./videogeneration.js";
18
19
  export const PerfLast30mByWorkload$inboundSchema = z.object({
19
20
  decisions: Decisions$inboundSchema.optional(),
20
21
  embeddings: Embeddings$inboundSchema.optional(),
22
+ extractions: Extractions$inboundSchema.optional(),
21
23
  image_generation: ImageGeneration$inboundSchema.optional(),
22
24
  rerank: Rerank$inboundSchema.optional(),
23
25
  stt: STT$inboundSchema.optional(),
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@openrouter/sdk",
5
- "version": "1.5.43",
5
+ "version": "1.5.44",
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.43",
3
+ "version": "1.5.44",
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,13 +73,13 @@
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
- "prepare": "npm run build",
77
- "test": "vitest --run --project unit",
78
- "test:watch": "vitest --watch --project unit",
79
- "typecheck:transit": "exit 0",
80
76
  "compile": "tsc && node scripts/unbarrel-imports.js",
81
77
  "postinstall": "node scripts/check-types.js || true",
78
+ "prepare": "npm run build",
82
79
  "test:e2e": "vitest --run --project e2e",
80
+ "test:watch": "vitest --watch --project unit",
81
+ "typecheck:transit": "exit 0",
82
+ "test": "vitest --run --project unit",
83
83
  "test:transit": "exit 0",
84
84
  "typecheck": "tsc --noEmit"
85
85
  },