@openrouter/sdk 1.5.12 → 1.5.14

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.12";
53
+ readonly sdkVersion: "1.5.14";
54
54
  readonly genVersion: "2.948.4";
55
- readonly userAgent: "speakeasy-sdk/typescript 1.5.12 2.948.4 1.0.0 @openrouter/sdk";
55
+ readonly userAgent: "speakeasy-sdk/typescript 1.5.14 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.12",
32
+ sdkVersion: "1.5.14",
33
33
  genVersion: "2.948.4",
34
- userAgent: "speakeasy-sdk/typescript 1.5.12 2.948.4 1.0.0 @openrouter/sdk",
34
+ userAgent: "speakeasy-sdk/typescript 1.5.14 2.948.4 1.0.0 @openrouter/sdk",
35
35
  };
36
36
  //# sourceMappingURL=config.js.map
@@ -0,0 +1,34 @@
1
+ import * as z from "zod/v4";
2
+ import { ClosedEnum, OpenEnum } from "../types/enums.js";
3
+ export declare const DecisionsImageAssetFormat: {
4
+ readonly Png: "png";
5
+ readonly Jpg: "jpg";
6
+ readonly Jpeg: "jpeg";
7
+ };
8
+ export type DecisionsImageAssetFormat = OpenEnum<typeof DecisionsImageAssetFormat>;
9
+ export declare const DecisionsImageAssetType: {
10
+ readonly Image: "image";
11
+ };
12
+ export type DecisionsImageAssetType = ClosedEnum<typeof DecisionsImageAssetType>;
13
+ /**
14
+ * An image sent once and referenced by its key in the `assets` map. `data_base64` is the PNG or JPEG file in standard base64 with no `data:` prefix. The multipart `part` field of TypeSafe's API is not accepted.
15
+ */
16
+ export type DecisionsImageAsset = {
17
+ dataBase64: string;
18
+ format: DecisionsImageAssetFormat;
19
+ type?: DecisionsImageAssetType | undefined;
20
+ };
21
+ /** @internal */
22
+ export declare const DecisionsImageAssetFormat$outboundSchema: z.ZodType<string, DecisionsImageAssetFormat>;
23
+ /** @internal */
24
+ export declare const DecisionsImageAssetType$outboundSchema: z.ZodEnum<typeof DecisionsImageAssetType>;
25
+ /** @internal */
26
+ export type DecisionsImageAsset$Outbound = {
27
+ data_base64: string;
28
+ format: string;
29
+ type?: string | undefined;
30
+ };
31
+ /** @internal */
32
+ export declare const DecisionsImageAsset$outboundSchema: z.ZodType<DecisionsImageAsset$Outbound, DecisionsImageAsset>;
33
+ export declare function decisionsImageAssetToJSON(decisionsImageAsset: DecisionsImageAsset): string;
34
+ //# sourceMappingURL=decisionsimageasset.d.ts.map
@@ -0,0 +1,33 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 4869a6173b1c
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ import * as openEnums from "../types/enums.js";
8
+ export const DecisionsImageAssetFormat = {
9
+ Png: "png",
10
+ Jpg: "jpg",
11
+ Jpeg: "jpeg",
12
+ };
13
+ export const DecisionsImageAssetType = {
14
+ Image: "image",
15
+ };
16
+ /** @internal */
17
+ export const DecisionsImageAssetFormat$outboundSchema = openEnums.outboundSchema(DecisionsImageAssetFormat);
18
+ /** @internal */
19
+ export const DecisionsImageAssetType$outboundSchema = z.enum(DecisionsImageAssetType);
20
+ /** @internal */
21
+ export const DecisionsImageAsset$outboundSchema = z.object({
22
+ dataBase64: z.string(),
23
+ format: DecisionsImageAssetFormat$outboundSchema,
24
+ type: DecisionsImageAssetType$outboundSchema.optional(),
25
+ }).transform((v) => {
26
+ return remap$(v, {
27
+ dataBase64: "data_base64",
28
+ });
29
+ });
30
+ export function decisionsImageAssetToJSON(decisionsImageAsset) {
31
+ return JSON.stringify(DecisionsImageAsset$outboundSchema.parse(decisionsImageAsset));
32
+ }
33
+ //# sourceMappingURL=decisionsimageasset.js.map
@@ -1,6 +1,7 @@
1
1
  import * as z from "zod/v4";
2
2
  import { DecisionsBoxQuestion, DecisionsBoxQuestion$Outbound } from "./decisionsboxquestion.js";
3
3
  import { DecisionsChoiceQuestion, DecisionsChoiceQuestion$Outbound } from "./decisionschoicequestion.js";
4
+ import { DecisionsImageAsset, DecisionsImageAsset$Outbound } from "./decisionsimageasset.js";
4
5
  import { DecisionsNoulQuestion, DecisionsNoulQuestion$Outbound } from "./decisionsnoulquestion.js";
5
6
  import { DecisionsScoreQuestion, DecisionsScoreQuestion$Outbound } from "./decisionsscorequestion.js";
6
7
  import { ProviderPreferences, ProviderPreferences$Outbound } from "./providerpreferences.js";
@@ -16,6 +17,12 @@ export type State = string | {
16
17
  [k: string]: any;
17
18
  } | Array<any>;
18
19
  export type DecisionsRequest = {
20
+ /**
21
+ * Images keyed by reference string, as in TypeSafe's API. Write a reference wherever the image belongs in `state`, `instructions`, or `criteria`; every asset must be referenced at least once. Jev reads a reference as a whole string value or inside longer text. Other Decisions models read a whole-string reference wherever they read an `image_url` part and reject a reference inside longer text.
22
+ */
23
+ assets?: {
24
+ [k: string]: DecisionsImageAsset;
25
+ } | undefined;
19
26
  model: string;
20
27
  provider?: ProviderPreferences | null | undefined;
21
28
  questions: {
@@ -51,6 +58,9 @@ export declare const State$outboundSchema: z.ZodType<State$Outbound, State>;
51
58
  export declare function stateToJSON(state: State): string;
52
59
  /** @internal */
53
60
  export type DecisionsRequest$Outbound = {
61
+ assets?: {
62
+ [k: string]: DecisionsImageAsset$Outbound;
63
+ } | undefined;
54
64
  model: string;
55
65
  provider?: ProviderPreferences$Outbound | null | undefined;
56
66
  questions: {
@@ -6,6 +6,7 @@ import * as z from "zod/v4";
6
6
  import { remap as remap$ } from "../lib/primitives.js";
7
7
  import { DecisionsBoxQuestion$outboundSchema, } from "./decisionsboxquestion.js";
8
8
  import { DecisionsChoiceQuestion$outboundSchema, } from "./decisionschoicequestion.js";
9
+ import { DecisionsImageAsset$outboundSchema, } from "./decisionsimageasset.js";
9
10
  import { DecisionsNoulQuestion$outboundSchema, } from "./decisionsnoulquestion.js";
10
11
  import { DecisionsScoreQuestion$outboundSchema, } from "./decisionsscorequestion.js";
11
12
  import { ProviderPreferences$outboundSchema, } from "./providerpreferences.js";
@@ -31,6 +32,7 @@ export function stateToJSON(state) {
31
32
  }
32
33
  /** @internal */
33
34
  export const DecisionsRequest$outboundSchema = z.object({
35
+ assets: z.record(z.string(), DecisionsImageAsset$outboundSchema).optional(),
34
36
  model: z.string(),
35
37
  provider: z.nullable(ProviderPreferences$outboundSchema).optional(),
36
38
  questions: z.record(z.string(), z.union([
@@ -323,6 +323,9 @@ export type ImageGenerationProviderPreferencesOptions = {
323
323
  poolside?: {
324
324
  [k: string]: any;
325
325
  } | undefined;
326
+ primalabs?: {
327
+ [k: string]: any;
328
+ } | undefined;
326
329
  primeintellect?: {
327
330
  [k: string]: any;
328
331
  } | undefined;
@@ -815,6 +818,9 @@ export type ImageGenerationProviderPreferencesOptions$Outbound = {
815
818
  poolside?: {
816
819
  [k: string]: any;
817
820
  } | undefined;
821
+ primalabs?: {
822
+ [k: string]: any;
823
+ } | undefined;
818
824
  primeintellect?: {
819
825
  [k: string]: any;
820
826
  } | undefined;
@@ -124,6 +124,7 @@ export const ImageGenerationProviderPreferencesOptions$outboundSchema = z.object
124
124
  perplexity: z.record(z.string(), z.any()).optional(),
125
125
  phala: z.record(z.string(), z.any()).optional(),
126
126
  poolside: z.record(z.string(), z.any()).optional(),
127
+ primalabs: z.record(z.string(), z.any()).optional(),
127
128
  primeintellect: z.record(z.string(), z.any()).optional(),
128
129
  quiver: z.record(z.string(), z.any()).optional(),
129
130
  recraft: z.record(z.string(), z.any()).optional(),
@@ -295,6 +295,7 @@ export * from "./decisionsboxanswer.js";
295
295
  export * from "./decisionsboxquestion.js";
296
296
  export * from "./decisionschoiceanswer.js";
297
297
  export * from "./decisionschoicequestion.js";
298
+ export * from "./decisionsimageasset.js";
298
299
  export * from "./decisionsnoulanswer.js";
299
300
  export * from "./decisionsnoulquestion.js";
300
301
  export * from "./decisionsrequest.js";
@@ -299,6 +299,7 @@ export * from "./decisionsboxanswer.js";
299
299
  export * from "./decisionsboxquestion.js";
300
300
  export * from "./decisionschoiceanswer.js";
301
301
  export * from "./decisionschoicequestion.js";
302
+ export * from "./decisionsimageasset.js";
302
303
  export * from "./decisionsnoulanswer.js";
303
304
  export * from "./decisionsnoulquestion.js";
304
305
  export * from "./decisionsrequest.js";
@@ -2,14 +2,14 @@ import * as z from "zod/v4";
2
2
  import { OpenEnum } from "../types/enums.js";
3
3
  import { Result as SafeParseResult } from "../types/fp.js";
4
4
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
- export declare const FormatEnum: {
5
+ export declare const InputAudioFormat: {
6
6
  readonly Mp3: "mp3";
7
7
  readonly Wav: "wav";
8
8
  };
9
- export type FormatEnum = OpenEnum<typeof FormatEnum>;
9
+ export type InputAudioFormat = OpenEnum<typeof InputAudioFormat>;
10
10
  export type InputAudioInputAudio = {
11
11
  data: string;
12
- format: FormatEnum;
12
+ format: InputAudioFormat;
13
13
  };
14
14
  /**
15
15
  * Audio input content item
@@ -19,9 +19,9 @@ export type InputAudio = {
19
19
  type: "input_audio";
20
20
  };
21
21
  /** @internal */
22
- export declare const FormatEnum$inboundSchema: z.ZodType<FormatEnum, unknown>;
22
+ export declare const InputAudioFormat$inboundSchema: z.ZodType<InputAudioFormat, unknown>;
23
23
  /** @internal */
24
- export declare const FormatEnum$outboundSchema: z.ZodType<string, FormatEnum>;
24
+ export declare const InputAudioFormat$outboundSchema: z.ZodType<string, InputAudioFormat>;
25
25
  /** @internal */
26
26
  export declare const InputAudioInputAudio$inboundSchema: z.ZodType<InputAudioInputAudio, unknown>;
27
27
  /** @internal */
@@ -6,23 +6,23 @@ 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
8
  import * as openEnums from "../types/enums.js";
9
- export const FormatEnum = {
9
+ export const InputAudioFormat = {
10
10
  Mp3: "mp3",
11
11
  Wav: "wav",
12
12
  };
13
13
  /** @internal */
14
- export const FormatEnum$inboundSchema = openEnums.inboundSchema(FormatEnum);
14
+ export const InputAudioFormat$inboundSchema = openEnums.inboundSchema(InputAudioFormat);
15
15
  /** @internal */
16
- export const FormatEnum$outboundSchema = openEnums.outboundSchema(FormatEnum);
16
+ export const InputAudioFormat$outboundSchema = openEnums.outboundSchema(InputAudioFormat);
17
17
  /** @internal */
18
18
  export const InputAudioInputAudio$inboundSchema = z.object({
19
19
  data: z.string(),
20
- format: FormatEnum$inboundSchema,
20
+ format: InputAudioFormat$inboundSchema,
21
21
  });
22
22
  /** @internal */
23
23
  export const InputAudioInputAudio$outboundSchema = z.object({
24
24
  data: z.string(),
25
- format: FormatEnum$outboundSchema,
25
+ format: InputAudioFormat$outboundSchema,
26
26
  });
27
27
  export function inputAudioInputAudioToJSON(inputAudioInputAudio) {
28
28
  return JSON.stringify(InputAudioInputAudio$outboundSchema.parse(inputAudioInputAudio));
@@ -81,6 +81,7 @@ export declare const ProviderName: {
81
81
  readonly Parasail: "Parasail";
82
82
  readonly ParetoAlpha: "ParetoAlpha";
83
83
  readonly Poolside: "Poolside";
84
+ readonly PrimaLabs: "PrimaLabs";
84
85
  readonly PrimeIntellect: "PrimeIntellect";
85
86
  readonly Perceptron: "Perceptron";
86
87
  readonly Perplexity: "Perplexity";
@@ -84,6 +84,7 @@ export const ProviderName = {
84
84
  Parasail: "Parasail",
85
85
  ParetoAlpha: "ParetoAlpha",
86
86
  Poolside: "Poolside",
87
+ PrimaLabs: "PrimaLabs",
87
88
  PrimeIntellect: "PrimeIntellect",
88
89
  Perceptron: "Perceptron",
89
90
  Perplexity: "Perplexity",
@@ -318,6 +318,9 @@ export type ProviderOptions = {
318
318
  poolside?: {
319
319
  [k: string]: any;
320
320
  } | undefined;
321
+ primalabs?: {
322
+ [k: string]: any;
323
+ } | undefined;
321
324
  primeintellect?: {
322
325
  [k: string]: any;
323
326
  } | undefined;
@@ -765,6 +768,9 @@ export type ProviderOptions$Outbound = {
765
768
  poolside?: {
766
769
  [k: string]: any;
767
770
  } | undefined;
771
+ primalabs?: {
772
+ [k: string]: any;
773
+ } | undefined;
768
774
  primeintellect?: {
769
775
  [k: string]: any;
770
776
  } | undefined;
@@ -111,6 +111,7 @@ export const ProviderOptions$outboundSchema = z.object({
111
111
  perplexity: z.record(z.string(), z.any()).optional(),
112
112
  phala: z.record(z.string(), z.any()).optional(),
113
113
  poolside: z.record(z.string(), z.any()).optional(),
114
+ primalabs: z.record(z.string(), z.any()).optional(),
114
115
  primeintellect: z.record(z.string(), z.any()).optional(),
115
116
  quiver: z.record(z.string(), z.any()).optional(),
116
117
  recraft: z.record(z.string(), z.any()).optional(),
@@ -114,6 +114,7 @@ export declare const ProviderResponseProviderName: {
114
114
  readonly Parasail: "Parasail";
115
115
  readonly ParetoAlpha: "ParetoAlpha";
116
116
  readonly Poolside: "Poolside";
117
+ readonly PrimaLabs: "PrimaLabs";
117
118
  readonly PrimeIntellect: "PrimeIntellect";
118
119
  readonly Perceptron: "Perceptron";
119
120
  readonly Perplexity: "Perplexity";
@@ -118,6 +118,7 @@ export const ProviderResponseProviderName = {
118
118
  Parasail: "Parasail",
119
119
  ParetoAlpha: "ParetoAlpha",
120
120
  Poolside: "Poolside",
121
+ PrimaLabs: "PrimaLabs",
121
122
  PrimeIntellect: "PrimeIntellect",
122
123
  Perceptron: "Perceptron",
123
124
  Perplexity: "Perplexity",
@@ -340,6 +340,9 @@ export type VideoGenerationRequestOptions = {
340
340
  poolside?: {
341
341
  [k: string]: any;
342
342
  } | undefined;
343
+ primalabs?: {
344
+ [k: string]: any;
345
+ } | undefined;
343
346
  primeintellect?: {
344
347
  [k: string]: any;
345
348
  } | undefined;
@@ -883,6 +886,9 @@ export type VideoGenerationRequestOptions$Outbound = {
883
886
  poolside?: {
884
887
  [k: string]: any;
885
888
  } | undefined;
889
+ primalabs?: {
890
+ [k: string]: any;
891
+ } | undefined;
886
892
  primeintellect?: {
887
893
  [k: string]: any;
888
894
  } | undefined;
@@ -144,6 +144,7 @@ export const VideoGenerationRequestOptions$outboundSchema = z.object({
144
144
  perplexity: z.record(z.string(), z.any()).optional(),
145
145
  phala: z.record(z.string(), z.any()).optional(),
146
146
  poolside: z.record(z.string(), z.any()).optional(),
147
+ primalabs: z.record(z.string(), z.any()).optional(),
147
148
  primeintellect: z.record(z.string(), z.any()).optional(),
148
149
  quiver: z.record(z.string(), z.any()).optional(),
149
150
  recraft: z.record(z.string(), z.any()).optional(),
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@openrouter/sdk",
5
- "version": "1.5.12",
5
+ "version": "1.5.14",
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.12",
3
+ "version": "1.5.14",
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
- "postinstall": "node scripts/check-types.js || true",
77
- "test:e2e": "vitest --run --project e2e",
76
+ "test:transit": "exit 0",
78
77
  "test:watch": "vitest --watch --project unit",
79
78
  "typecheck": "tsc --noEmit",
80
- "compile": "tsc && node scripts/unbarrel-imports.js",
81
79
  "prepare": "npm run build",
82
80
  "test": "vitest --run --project unit",
83
- "test:transit": "exit 0",
84
- "typecheck:transit": "exit 0"
81
+ "typecheck:transit": "exit 0",
82
+ "compile": "tsc && node scripts/unbarrel-imports.js",
83
+ "postinstall": "node scripts/check-types.js || true",
84
+ "test:e2e": "vitest --run --project e2e"
85
85
  },
86
86
  "peerDependencies": {
87
87