@openrouter/sdk 1.5.38 → 1.5.40

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.
@@ -13,7 +13,7 @@ import { Result } from "../types/fp.js";
13
13
  * Submit a Decisions request
14
14
  *
15
15
  * @remarks
16
- * Asks a Decisions model typed questions (`noul`, `choice`, `score`, `box`) about the content in `state` and returns one typed answer per question with its probabilities. Images, audio and video go in `state` as `image_url`, `input_audio` and `video_url` parts; PNG and JPEG images can instead go once in `assets` and be referenced by key. Which question types, media parts and asset references an endpoint accepts depends on the provider; a request an endpoint cannot serve fails with `400` before anything is sent upstream. See the [Multimodal Decisions guide](/docs/guides/community/multimodal-decisions) for the per-provider table. Alpha: the shape may change.
16
+ * Asks a Decisions model typed questions (`noul`, `choice`, `score`, `box`) about the content in `state` and returns one typed answer per question with its probabilities. Images, audio and video go in `state` as `image_url`, `input_audio` and `video_url` parts; PNG and JPEG images can instead go once in `assets` and be referenced by key. Which question types, media parts and asset references an endpoint accepts depends on the provider; a request an endpoint cannot serve fails with `400` before anything is sent upstream. See the [Multimodal Decisions guide](/docs/guides/community/multimodal-decisions) for the per-provider table. Typed fields (text, numbers, dates, lists, estimates, forecasts) come from [`POST /api/alpha/extractions`](/docs/guides/community/extractions), which takes the same envelope with `fields` in place of `questions` (text `state` only; images and PDFs go in `assets`). Alpha: the shape may change.
17
17
  */
18
18
  export declare function alphaDecisionsCreate(client: OpenRouterCore, request: operations.CreateApiAlphaDecisionsRequest, options?: RequestOptions): APIPromise<Result<models.DecisionsResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.PaymentRequiredResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.PayloadTooLargeResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | errors.BadGatewayResponseError | errors.ServiceUnavailableResponseError | errors.EdgeNetworkTimeoutResponseError | errors.ProviderOverloadedResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
19
19
  //# sourceMappingURL=alphaDecisionsCreate.d.ts.map
@@ -18,7 +18,7 @@ import { APIPromise } from "../types/async.js";
18
18
  * Submit a Decisions request
19
19
  *
20
20
  * @remarks
21
- * Asks a Decisions model typed questions (`noul`, `choice`, `score`, `box`) about the content in `state` and returns one typed answer per question with its probabilities. Images, audio and video go in `state` as `image_url`, `input_audio` and `video_url` parts; PNG and JPEG images can instead go once in `assets` and be referenced by key. Which question types, media parts and asset references an endpoint accepts depends on the provider; a request an endpoint cannot serve fails with `400` before anything is sent upstream. See the [Multimodal Decisions guide](/docs/guides/community/multimodal-decisions) for the per-provider table. Alpha: the shape may change.
21
+ * Asks a Decisions model typed questions (`noul`, `choice`, `score`, `box`) about the content in `state` and returns one typed answer per question with its probabilities. Images, audio and video go in `state` as `image_url`, `input_audio` and `video_url` parts; PNG and JPEG images can instead go once in `assets` and be referenced by key. Which question types, media parts and asset references an endpoint accepts depends on the provider; a request an endpoint cannot serve fails with `400` before anything is sent upstream. See the [Multimodal Decisions guide](/docs/guides/community/multimodal-decisions) for the per-provider table. Typed fields (text, numbers, dates, lists, estimates, forecasts) come from [`POST /api/alpha/extractions`](/docs/guides/community/extractions), which takes the same envelope with `fields` in place of `questions` (text `state` only; images and PDFs go in `assets`). Alpha: the shape may change.
22
22
  */
23
23
  export function alphaDecisionsCreate(client, request, options) {
24
24
  return new APIPromise($do(client, request, options));
@@ -32,6 +32,7 @@ async function $do(client, request, options) {
32
32
  "category": payload?.category,
33
33
  "context": payload?.context,
34
34
  "distillable": payload?.distillable,
35
+ "endpoints": payload?.endpoints,
35
36
  "input_modalities": payload?.input_modalities,
36
37
  "limit": payload?.limit,
37
38
  "max_age_days": payload?.max_age_days,
@@ -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.38";
53
+ readonly sdkVersion: "1.5.40";
54
54
  readonly genVersion: "2.950.13";
55
- readonly userAgent: "speakeasy-sdk/typescript 1.5.38 2.950.13 1.0.0 @openrouter/sdk";
55
+ readonly userAgent: "speakeasy-sdk/typescript 1.5.40 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.38",
32
+ sdkVersion: "1.5.40",
33
33
  genVersion: "2.950.13",
34
- userAgent: "speakeasy-sdk/typescript 1.5.38 2.950.13 1.0.0 @openrouter/sdk",
34
+ userAgent: "speakeasy-sdk/typescript 1.5.40 2.950.13 1.0.0 @openrouter/sdk",
35
35
  };
36
36
  //# sourceMappingURL=config.js.map
@@ -12,6 +12,7 @@ export declare const BYOKProviderSlug: {
12
12
  readonly AmazonBedrockClaudeOnAws: "amazon-bedrock/claude-on-aws";
13
13
  readonly AmazonNova: "amazon-nova";
14
14
  readonly Ambient: "ambient";
15
+ readonly Antdigital: "antdigital";
15
16
  readonly Anthropic: "anthropic";
16
17
  readonly Anthropic2: "anthropic/2";
17
18
  readonly ArceeAi: "arcee-ai";
@@ -85,6 +86,7 @@ export declare const BYOKProviderSlug: {
85
86
  readonly Parasail: "parasail";
86
87
  readonly ParetoAlpha: "pareto-alpha";
87
88
  readonly ParticleAi: "particle-ai";
89
+ readonly PearlResearch: "pearl-research";
88
90
  readonly Perceptron: "perceptron";
89
91
  readonly Perplexity: "perplexity";
90
92
  readonly Phala: "phala";
@@ -15,6 +15,7 @@ export const BYOKProviderSlug = {
15
15
  AmazonBedrockClaudeOnAws: "amazon-bedrock/claude-on-aws",
16
16
  AmazonNova: "amazon-nova",
17
17
  Ambient: "ambient",
18
+ Antdigital: "antdigital",
18
19
  Anthropic: "anthropic",
19
20
  Anthropic2: "anthropic/2",
20
21
  ArceeAi: "arcee-ai",
@@ -88,6 +89,7 @@ export const BYOKProviderSlug = {
88
89
  Parasail: "parasail",
89
90
  ParetoAlpha: "pareto-alpha",
90
91
  ParticleAi: "particle-ai",
92
+ PearlResearch: "pearl-research",
91
93
  Perceptron: "perceptron",
92
94
  Perplexity: "perplexity",
93
95
  Phala: "phala",
@@ -35,6 +35,9 @@ export type ImageGenerationProviderPreferencesOptions = {
35
35
  ambient?: {
36
36
  [k: string]: any;
37
37
  } | undefined;
38
+ antdigital?: {
39
+ [k: string]: any;
40
+ } | undefined;
38
41
  anthropic?: {
39
42
  [k: string]: any;
40
43
  } | undefined;
@@ -317,6 +320,9 @@ export type ImageGenerationProviderPreferencesOptions = {
317
320
  particleAi?: {
318
321
  [k: string]: any;
319
322
  } | undefined;
323
+ pearlResearch?: {
324
+ [k: string]: any;
325
+ } | undefined;
320
326
  perceptron?: {
321
327
  [k: string]: any;
322
328
  } | undefined;
@@ -536,6 +542,9 @@ export type ImageGenerationProviderPreferencesOptions$Outbound = {
536
542
  ambient?: {
537
543
  [k: string]: any;
538
544
  } | undefined;
545
+ antdigital?: {
546
+ [k: string]: any;
547
+ } | undefined;
539
548
  anthropic?: {
540
549
  [k: string]: any;
541
550
  } | undefined;
@@ -818,6 +827,9 @@ export type ImageGenerationProviderPreferencesOptions$Outbound = {
818
827
  "particle-ai"?: {
819
828
  [k: string]: any;
820
829
  } | undefined;
830
+ "pearl-research"?: {
831
+ [k: string]: any;
832
+ } | undefined;
821
833
  perceptron?: {
822
834
  [k: string]: any;
823
835
  } | undefined;
@@ -28,6 +28,7 @@ export const ImageGenerationProviderPreferencesOptions$outboundSchema = z.object
28
28
  amazonBedrockClaudeOnAws: z.record(z.string(), z.any()).optional(),
29
29
  amazonNova: z.record(z.string(), z.any()).optional(),
30
30
  ambient: z.record(z.string(), z.any()).optional(),
31
+ antdigital: z.record(z.string(), z.any()).optional(),
31
32
  anthropic: z.record(z.string(), z.any()).optional(),
32
33
  anthropic2: z.record(z.string(), z.any()).optional(),
33
34
  anyscale: z.record(z.string(), z.any()).optional(),
@@ -122,6 +123,7 @@ export const ImageGenerationProviderPreferencesOptions$outboundSchema = z.object
122
123
  parasail: z.record(z.string(), z.any()).optional(),
123
124
  paretoAlpha: z.record(z.string(), z.any()).optional(),
124
125
  particleAi: z.record(z.string(), z.any()).optional(),
126
+ pearlResearch: z.record(z.string(), z.any()).optional(),
125
127
  perceptron: z.record(z.string(), z.any()).optional(),
126
128
  perplexity: z.record(z.string(), z.any()).optional(),
127
129
  phala: z.record(z.string(), z.any()).optional(),
@@ -197,6 +199,7 @@ export const ImageGenerationProviderPreferencesOptions$outboundSchema = z.object
197
199
  openInference: "open-inference",
198
200
  paretoAlpha: "pareto-alpha",
199
201
  particleAi: "particle-ai",
202
+ pearlResearch: "pearl-research",
200
203
  sailResearch: "sail-research",
201
204
  sakanaAi: "sakana-ai",
202
205
  sambanovaCloaked: "sambanova-cloaked",
@@ -150,6 +150,10 @@ export type GetModelsRequest = {
150
150
  * Filter models by input modality. Comma-separated list of: text, image, audio, file.
151
151
  */
152
152
  inputModalities?: string | undefined;
153
+ /**
154
+ * Filter models by the request API paths they serve, as listed in each model's `endpoints` field. Comma-separated; a model must serve every listed path. Valid values: /api/v1/chat/completions, /api/v1/completions, /api/v1/messages, /api/v1/responses, /api/v1/embeddings, /api/v1/rerank, /api/alpha/decisions, /api/alpha/extractions, /api/v1/videos, /api/v1/audio/speech, /api/v1/audio/transcriptions, /api/v1/images, /api/v1/batches. When set without `output_modalities`, models of every output modality are considered (the companion `/api/alpha/extractions` route is served by text and decisions models alike).
155
+ */
156
+ endpoints?: string | undefined;
153
157
  /**
154
158
  * Minimum context length (tokens). Models with smaller context are excluded.
155
159
  */
@@ -261,6 +265,7 @@ export type GetModelsRequest$Outbound = {
261
265
  sort?: string | undefined;
262
266
  q?: string | undefined;
263
267
  input_modalities?: string | undefined;
268
+ endpoints?: string | undefined;
264
269
  context?: number | undefined;
265
270
  min_price?: number | null | undefined;
266
271
  max_price?: number | null | undefined;
@@ -85,6 +85,7 @@ export const GetModelsRequest$outboundSchema = z.object({
85
85
  sort: GetModelsSort$outboundSchema.optional(),
86
86
  q: z.string().optional(),
87
87
  inputModalities: z.string().optional(),
88
+ endpoints: z.string().optional(),
88
89
  context: z.int().optional(),
89
90
  minPrice: z.nullable(z.number()).optional(),
90
91
  maxPrice: z.nullable(z.number()).optional(),
@@ -36,6 +36,7 @@ export declare const Provider: {
36
36
  readonly AmazonBedrockClaudeOnAws: "amazon-bedrock/claude-on-aws";
37
37
  readonly AmazonNova: "amazon-nova";
38
38
  readonly Ambient: "ambient";
39
+ readonly Antdigital: "antdigital";
39
40
  readonly Anthropic: "anthropic";
40
41
  readonly Anthropic2: "anthropic/2";
41
42
  readonly ArceeAi: "arcee-ai";
@@ -109,6 +110,7 @@ export declare const Provider: {
109
110
  readonly Parasail: "parasail";
110
111
  readonly ParetoAlpha: "pareto-alpha";
111
112
  readonly ParticleAi: "particle-ai";
113
+ readonly PearlResearch: "pearl-research";
112
114
  readonly Perceptron: "perceptron";
113
115
  readonly Perplexity: "perplexity";
114
116
  readonly Phala: "phala";
@@ -19,6 +19,7 @@ export const Provider = {
19
19
  AmazonBedrockClaudeOnAws: "amazon-bedrock/claude-on-aws",
20
20
  AmazonNova: "amazon-nova",
21
21
  Ambient: "ambient",
22
+ Antdigital: "antdigital",
22
23
  Anthropic: "anthropic",
23
24
  Anthropic2: "anthropic/2",
24
25
  ArceeAi: "arcee-ai",
@@ -92,6 +93,7 @@ export const Provider = {
92
93
  Parasail: "parasail",
93
94
  ParetoAlpha: "pareto-alpha",
94
95
  ParticleAi: "particle-ai",
96
+ PearlResearch: "pearl-research",
95
97
  Perceptron: "perceptron",
96
98
  Perplexity: "perplexity",
97
99
  Phala: "phala",
@@ -7,6 +7,7 @@ export declare const ProviderName: {
7
7
  readonly AionLabs: "AionLabs";
8
8
  readonly Alibaba: "Alibaba";
9
9
  readonly Ambient: "Ambient";
10
+ readonly AntDigital: "Ant Digital";
10
11
  readonly Baidu: "Baidu";
11
12
  readonly AmazonBedrock: "Amazon Bedrock";
12
13
  readonly AmazonNova: "Amazon Nova";
@@ -82,6 +83,7 @@ export declare const ProviderName: {
82
83
  readonly Parasail: "Parasail";
83
84
  readonly ParetoAlpha: "ParetoAlpha";
84
85
  readonly ParticleAI: "Particle AI";
86
+ readonly PearlResearch: "Pearl Research";
85
87
  readonly Poolside: "Poolside";
86
88
  readonly PrimaLabs: "PrimaLabs";
87
89
  readonly PrimeIntellect: "PrimeIntellect";
@@ -10,6 +10,7 @@ export const ProviderName = {
10
10
  AionLabs: "AionLabs",
11
11
  Alibaba: "Alibaba",
12
12
  Ambient: "Ambient",
13
+ AntDigital: "Ant Digital",
13
14
  Baidu: "Baidu",
14
15
  AmazonBedrock: "Amazon Bedrock",
15
16
  AmazonNova: "Amazon Nova",
@@ -85,6 +86,7 @@ export const ProviderName = {
85
86
  Parasail: "Parasail",
86
87
  ParetoAlpha: "ParetoAlpha",
87
88
  ParticleAI: "Particle AI",
89
+ PearlResearch: "Pearl Research",
88
90
  Poolside: "Poolside",
89
91
  PrimaLabs: "PrimaLabs",
90
92
  PrimeIntellect: "PrimeIntellect",
@@ -30,6 +30,9 @@ export type ProviderOptions = {
30
30
  ambient?: {
31
31
  [k: string]: any;
32
32
  } | undefined;
33
+ antdigital?: {
34
+ [k: string]: any;
35
+ } | undefined;
33
36
  anthropic?: {
34
37
  [k: string]: any;
35
38
  } | undefined;
@@ -312,6 +315,9 @@ export type ProviderOptions = {
312
315
  particleAi?: {
313
316
  [k: string]: any;
314
317
  } | undefined;
318
+ pearlResearch?: {
319
+ [k: string]: any;
320
+ } | undefined;
315
321
  perceptron?: {
316
322
  [k: string]: any;
317
323
  } | undefined;
@@ -486,6 +492,9 @@ export type ProviderOptions$Outbound = {
486
492
  ambient?: {
487
493
  [k: string]: any;
488
494
  } | undefined;
495
+ antdigital?: {
496
+ [k: string]: any;
497
+ } | undefined;
489
498
  anthropic?: {
490
499
  [k: string]: any;
491
500
  } | undefined;
@@ -768,6 +777,9 @@ export type ProviderOptions$Outbound = {
768
777
  "particle-ai"?: {
769
778
  [k: string]: any;
770
779
  } | undefined;
780
+ "pearl-research"?: {
781
+ [k: string]: any;
782
+ } | undefined;
771
783
  perceptron?: {
772
784
  [k: string]: any;
773
785
  } | undefined;
@@ -15,6 +15,7 @@ export const ProviderOptions$outboundSchema = z.object({
15
15
  amazonBedrockClaudeOnAws: z.record(z.string(), z.any()).optional(),
16
16
  amazonNova: z.record(z.string(), z.any()).optional(),
17
17
  ambient: z.record(z.string(), z.any()).optional(),
18
+ antdigital: z.record(z.string(), z.any()).optional(),
18
19
  anthropic: z.record(z.string(), z.any()).optional(),
19
20
  anthropic2: z.record(z.string(), z.any()).optional(),
20
21
  anyscale: z.record(z.string(), z.any()).optional(),
@@ -109,6 +110,7 @@ export const ProviderOptions$outboundSchema = z.object({
109
110
  parasail: z.record(z.string(), z.any()).optional(),
110
111
  paretoAlpha: z.record(z.string(), z.any()).optional(),
111
112
  particleAi: z.record(z.string(), z.any()).optional(),
113
+ pearlResearch: z.record(z.string(), z.any()).optional(),
112
114
  perceptron: z.record(z.string(), z.any()).optional(),
113
115
  perplexity: z.record(z.string(), z.any()).optional(),
114
116
  phala: z.record(z.string(), z.any()).optional(),
@@ -184,6 +186,7 @@ export const ProviderOptions$outboundSchema = z.object({
184
186
  openInference: "open-inference",
185
187
  paretoAlpha: "pareto-alpha",
186
188
  particleAi: "particle-ai",
189
+ pearlResearch: "pearl-research",
187
190
  sailResearch: "sail-research",
188
191
  sakanaAi: "sakana-ai",
189
192
  sambanovaCloaked: "sambanova-cloaked",
@@ -40,6 +40,7 @@ export declare const ProviderResponseProviderName: {
40
40
  readonly AionLabs: "AionLabs";
41
41
  readonly Alibaba: "Alibaba";
42
42
  readonly Ambient: "Ambient";
43
+ readonly AntDigital: "Ant Digital";
43
44
  readonly Baidu: "Baidu";
44
45
  readonly AmazonBedrock: "Amazon Bedrock";
45
46
  readonly AmazonNova: "Amazon Nova";
@@ -115,6 +116,7 @@ export declare const ProviderResponseProviderName: {
115
116
  readonly Parasail: "Parasail";
116
117
  readonly ParetoAlpha: "ParetoAlpha";
117
118
  readonly ParticleAI: "Particle AI";
119
+ readonly PearlResearch: "Pearl Research";
118
120
  readonly Poolside: "Poolside";
119
121
  readonly PrimaLabs: "PrimaLabs";
120
122
  readonly PrimeIntellect: "PrimeIntellect";
@@ -44,6 +44,7 @@ export const ProviderResponseProviderName = {
44
44
  AionLabs: "AionLabs",
45
45
  Alibaba: "Alibaba",
46
46
  Ambient: "Ambient",
47
+ AntDigital: "Ant Digital",
47
48
  Baidu: "Baidu",
48
49
  AmazonBedrock: "Amazon Bedrock",
49
50
  AmazonNova: "Amazon Nova",
@@ -119,6 +120,7 @@ export const ProviderResponseProviderName = {
119
120
  Parasail: "Parasail",
120
121
  ParetoAlpha: "ParetoAlpha",
121
122
  ParticleAI: "Particle AI",
123
+ PearlResearch: "Pearl Research",
122
124
  Poolside: "Poolside",
123
125
  PrimaLabs: "PrimaLabs",
124
126
  PrimeIntellect: "PrimeIntellect",
@@ -52,6 +52,9 @@ export type VideoGenerationRequestOptions = {
52
52
  ambient?: {
53
53
  [k: string]: any;
54
54
  } | undefined;
55
+ antdigital?: {
56
+ [k: string]: any;
57
+ } | undefined;
55
58
  anthropic?: {
56
59
  [k: string]: any;
57
60
  } | undefined;
@@ -334,6 +337,9 @@ export type VideoGenerationRequestOptions = {
334
337
  particleAi?: {
335
338
  [k: string]: any;
336
339
  } | undefined;
340
+ pearlResearch?: {
341
+ [k: string]: any;
342
+ } | undefined;
337
343
  perceptron?: {
338
344
  [k: string]: any;
339
345
  } | undefined;
@@ -604,6 +610,9 @@ export type VideoGenerationRequestOptions$Outbound = {
604
610
  ambient?: {
605
611
  [k: string]: any;
606
612
  } | undefined;
613
+ antdigital?: {
614
+ [k: string]: any;
615
+ } | undefined;
607
616
  anthropic?: {
608
617
  [k: string]: any;
609
618
  } | undefined;
@@ -886,6 +895,9 @@ export type VideoGenerationRequestOptions$Outbound = {
886
895
  "particle-ai"?: {
887
896
  [k: string]: any;
888
897
  } | undefined;
898
+ "pearl-research"?: {
899
+ [k: string]: any;
900
+ } | undefined;
889
901
  perceptron?: {
890
902
  [k: string]: any;
891
903
  } | undefined;
@@ -48,6 +48,7 @@ export const VideoGenerationRequestOptions$outboundSchema = z.object({
48
48
  amazonBedrockClaudeOnAws: z.record(z.string(), z.any()).optional(),
49
49
  amazonNova: z.record(z.string(), z.any()).optional(),
50
50
  ambient: z.record(z.string(), z.any()).optional(),
51
+ antdigital: z.record(z.string(), z.any()).optional(),
51
52
  anthropic: z.record(z.string(), z.any()).optional(),
52
53
  anthropic2: z.record(z.string(), z.any()).optional(),
53
54
  anyscale: z.record(z.string(), z.any()).optional(),
@@ -142,6 +143,7 @@ export const VideoGenerationRequestOptions$outboundSchema = z.object({
142
143
  parasail: z.record(z.string(), z.any()).optional(),
143
144
  paretoAlpha: z.record(z.string(), z.any()).optional(),
144
145
  particleAi: z.record(z.string(), z.any()).optional(),
146
+ pearlResearch: z.record(z.string(), z.any()).optional(),
145
147
  perceptron: z.record(z.string(), z.any()).optional(),
146
148
  perplexity: z.record(z.string(), z.any()).optional(),
147
149
  phala: z.record(z.string(), z.any()).optional(),
@@ -217,6 +219,7 @@ export const VideoGenerationRequestOptions$outboundSchema = z.object({
217
219
  openInference: "open-inference",
218
220
  paretoAlpha: "pareto-alpha",
219
221
  particleAi: "particle-ai",
222
+ pearlResearch: "pearl-research",
220
223
  sailResearch: "sail-research",
221
224
  sakanaAi: "sakana-ai",
222
225
  sambanovaCloaked: "sambanova-cloaked",
@@ -6,7 +6,7 @@ export declare class Decisions extends ClientSDK {
6
6
  * Submit a Decisions request
7
7
  *
8
8
  * @remarks
9
- * Asks a Decisions model typed questions (`noul`, `choice`, `score`, `box`) about the content in `state` and returns one typed answer per question with its probabilities. Images, audio and video go in `state` as `image_url`, `input_audio` and `video_url` parts; PNG and JPEG images can instead go once in `assets` and be referenced by key. Which question types, media parts and asset references an endpoint accepts depends on the provider; a request an endpoint cannot serve fails with `400` before anything is sent upstream. See the [Multimodal Decisions guide](/docs/guides/community/multimodal-decisions) for the per-provider table. Alpha: the shape may change.
9
+ * Asks a Decisions model typed questions (`noul`, `choice`, `score`, `box`) about the content in `state` and returns one typed answer per question with its probabilities. Images, audio and video go in `state` as `image_url`, `input_audio` and `video_url` parts; PNG and JPEG images can instead go once in `assets` and be referenced by key. Which question types, media parts and asset references an endpoint accepts depends on the provider; a request an endpoint cannot serve fails with `400` before anything is sent upstream. See the [Multimodal Decisions guide](/docs/guides/community/multimodal-decisions) for the per-provider table. Typed fields (text, numbers, dates, lists, estimates, forecasts) come from [`POST /api/alpha/extractions`](/docs/guides/community/extractions), which takes the same envelope with `fields` in place of `questions` (text `state` only; images and PDFs go in `assets`). Alpha: the shape may change.
10
10
  */
11
11
  create(request: operations.CreateApiAlphaDecisionsRequest, options?: RequestOptions): Promise<models.DecisionsResponse>;
12
12
  }
@@ -10,7 +10,7 @@ export class Decisions extends ClientSDK {
10
10
  * Submit a Decisions request
11
11
  *
12
12
  * @remarks
13
- * Asks a Decisions model typed questions (`noul`, `choice`, `score`, `box`) about the content in `state` and returns one typed answer per question with its probabilities. Images, audio and video go in `state` as `image_url`, `input_audio` and `video_url` parts; PNG and JPEG images can instead go once in `assets` and be referenced by key. Which question types, media parts and asset references an endpoint accepts depends on the provider; a request an endpoint cannot serve fails with `400` before anything is sent upstream. See the [Multimodal Decisions guide](/docs/guides/community/multimodal-decisions) for the per-provider table. Alpha: the shape may change.
13
+ * Asks a Decisions model typed questions (`noul`, `choice`, `score`, `box`) about the content in `state` and returns one typed answer per question with its probabilities. Images, audio and video go in `state` as `image_url`, `input_audio` and `video_url` parts; PNG and JPEG images can instead go once in `assets` and be referenced by key. Which question types, media parts and asset references an endpoint accepts depends on the provider; a request an endpoint cannot serve fails with `400` before anything is sent upstream. See the [Multimodal Decisions guide](/docs/guides/community/multimodal-decisions) for the per-provider table. Typed fields (text, numbers, dates, lists, estimates, forecasts) come from [`POST /api/alpha/extractions`](/docs/guides/community/extractions), which takes the same envelope with `fields` in place of `questions` (text `state` only; images and PDFs go in `assets`). Alpha: the shape may change.
14
14
  */
15
15
  async create(request, options) {
16
16
  return unwrapAsync(alphaDecisionsCreate(this, request, options));
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@openrouter/sdk",
5
- "version": "1.5.38",
5
+ "version": "1.5.40",
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.38",
3
+ "version": "1.5.40",
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
- "typecheck": "tsc --noEmit",
77
- "typecheck:transit": "exit 0",
78
76
  "compile": "tsc && node scripts/unbarrel-imports.js",
79
- "test:watch": "vitest --watch --project unit",
80
- "postinstall": "node scripts/check-types.js || true",
81
77
  "prepare": "npm run build",
78
+ "typecheck": "tsc --noEmit",
79
+ "postinstall": "node scripts/check-types.js || true",
82
80
  "test": "vitest --run --project unit",
83
81
  "test:e2e": "vitest --run --project e2e",
84
- "test:transit": "exit 0"
82
+ "test:transit": "exit 0",
83
+ "test:watch": "vitest --watch --project unit",
84
+ "typecheck:transit": "exit 0"
85
85
  },
86
86
  "peerDependencies": {
87
87