@openrouter/sdk 1.5.34 → 1.5.35

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
- * Submits a Decisions request to the Decisions router
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.
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
- * Submits a Decisions request to the Decisions router
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.
22
22
  */
23
23
  export function alphaDecisionsCreate(client, request, options) {
24
24
  return new APIPromise($do(client, request, options));
@@ -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.34";
53
+ readonly sdkVersion: "1.5.35";
54
54
  readonly genVersion: "2.950.13";
55
- readonly userAgent: "speakeasy-sdk/typescript 1.5.34 2.950.13 1.0.0 @openrouter/sdk";
55
+ readonly userAgent: "speakeasy-sdk/typescript 1.5.35 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.34",
32
+ sdkVersion: "1.5.35",
33
33
  genVersion: "2.950.13",
34
- userAgent: "speakeasy-sdk/typescript 1.5.34 2.950.13 1.0.0 @openrouter/sdk",
34
+ userAgent: "speakeasy-sdk/typescript 1.5.35 2.950.13 1.0.0 @openrouter/sdk",
35
35
  };
36
36
  //# sourceMappingURL=config.js.map
@@ -1,13 +1,16 @@
1
1
  import * as z from "zod/v4";
2
2
  /**
3
- * A plain string, or a JSON object or array of structured guidance.
3
+ * A description of the target to find, naming the image in `state` it is in; not a command, and no `criteria`.
4
4
  */
5
5
  export type DecisionsBoxQuestionInstructions = string | {
6
6
  [k: string]: any;
7
7
  } | Array<any>;
8
+ /**
9
+ * Finds one target in an image in `state` and answers with one bounding box (`top`, `bottom`, `left`, `right` as fractions of the image). Served by TypeSafe Jev endpoints only; every other provider rejects a box question with `400` before anything is sent upstream.
10
+ */
8
11
  export type DecisionsBoxQuestion = {
9
12
  /**
10
- * A plain string, or a JSON object or array of structured guidance.
13
+ * A description of the target to find, naming the image in `state` it is in; not a command, and no `criteria`.
11
14
  */
12
15
  instructions: string | {
13
16
  [k: string]: any;
@@ -18,7 +18,7 @@ export type State = string | {
18
18
  } | Array<any>;
19
19
  export type DecisionsRequest = {
20
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.
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, or the request fails with `400` naming the unused key. TypeSafe Jev endpoints receive `assets` as written and read a reference as a whole string value or inside longer text. Every other provider has each whole-string reference resolved to an `image_url` part before the request is sent, so it is accepted only where that provider reads `image_url` parts (top-level `state` items), and a reference inside longer text fails with `400`. `image_url` parts and `assets` can be mixed in one request.
22
22
  */
23
23
  assets?: {
24
24
  [k: string]: DecisionsImageAsset;
@@ -6,7 +6,7 @@ export declare class Decisions extends ClientSDK {
6
6
  * Submit a Decisions request
7
7
  *
8
8
  * @remarks
9
- * Submits a Decisions request to the Decisions router
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.
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
- * Submits a Decisions request to the Decisions router
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.
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.34",
5
+ "version": "1.5.35",
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.34",
3
+ "version": "1.5.35",
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
- "access": "public",
25
- "provenance": true
24
+ "provenance": true,
25
+ "access": "public"
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
+ "compile": "tsc && node scripts/unbarrel-imports.js",
77
+ "postinstall": "node scripts/check-types.js || true",
76
78
  "test": "vitest --run --project unit",
77
- "test:e2e": "vitest --run --project e2e",
78
79
  "test:watch": "vitest --watch --project unit",
79
80
  "typecheck": "tsc --noEmit",
80
- "compile": "tsc && node scripts/unbarrel-imports.js",
81
- "postinstall": "node scripts/check-types.js || true",
82
- "test:transit": "exit 0",
83
81
  "typecheck:transit": "exit 0",
84
- "prepare": "npm run build"
82
+ "prepare": "npm run build",
83
+ "test:e2e": "vitest --run --project e2e",
84
+ "test:transit": "exit 0"
85
85
  },
86
86
  "peerDependencies": {
87
87