@openrouter/sdk 1.5.61 → 1.5.63

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.
@@ -2,7 +2,7 @@
2
2
  // README at: https://github.com/devcontainers/images/tree/main/src/typescript-node
3
3
  {
4
4
  "name": "TypeScript",
5
- "image": "mcr.microsoft.com/devcontainers/typescript-node:1-20-bullseye",
5
+ "image": "mcr.microsoft.com/devcontainers/typescript-node:1-24-bookworm",
6
6
  // Features to add to the dev container. More info: https://containers.dev/features.
7
7
  // "features": {},
8
8
  // Use 'forwardPorts' to make a list of ports inside the container available locally.
@@ -13,7 +13,7 @@ import { Result } from "../types/fp.js";
13
13
  * Create a preset from a chat-completions request body
14
14
  *
15
15
  * @remarks
16
- * Creates a preset (or a new version of an existing one) from an inference request body. Only fields that overlap with the preset config are persisted; other fields (e.g. `messages`, `stream`, `prompt`) are silently ignored.
16
+ * Creates a preset (or a new version of an existing one) from an inference request body. Only fields that overlap with the preset config are persisted; other fields (e.g. `messages`, `stream`, `prompt`) are silently ignored. Requires a read-write [management key](/docs/guides/overview/auth/management-api-keys); inference API keys are rejected.
17
17
  *
18
18
  * If set, this operation will use {@link Security.apiKey} from the global security.
19
19
  */
@@ -2,7 +2,7 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  * @generated-id: 4386fe202ea5
4
4
  */
5
- import { encodeJSON, encodeSimple } from "../lib/encodings.js";
5
+ import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js";
6
6
  import { matchStatusCode } from "../lib/http.js";
7
7
  import * as M from "../lib/matchers.js";
8
8
  import { compactMap } from "../lib/primitives.js";
@@ -17,7 +17,7 @@ import { APIPromise } from "../types/async.js";
17
17
  * Create a preset from a chat-completions request body
18
18
  *
19
19
  * @remarks
20
- * Creates a preset (or a new version of an existing one) from an inference request body. Only fields that overlap with the preset config are persisted; other fields (e.g. `messages`, `stream`, `prompt`) are silently ignored.
20
+ * Creates a preset (or a new version of an existing one) from an inference request body. Only fields that overlap with the preset config are persisted; other fields (e.g. `messages`, `stream`, `prompt`) are silently ignored. Requires a read-write [management key](/docs/guides/overview/auth/management-api-keys); inference API keys are rejected.
21
21
  *
22
22
  * If set, this operation will use {@link Security.apiKey} from the global security.
23
23
  */
@@ -38,6 +38,9 @@ async function $do(client, request, options) {
38
38
  }),
39
39
  };
40
40
  const path = pathToFunc("/presets/{slug}/chat/completions")(pathParams);
41
+ const query = encodeFormQuery({
42
+ "workspace_id": payload.workspace_id,
43
+ });
41
44
  const headers = new Headers(compactMap({
42
45
  "Content-Type": "application/json",
43
46
  Accept: "application/json",
@@ -76,6 +79,7 @@ async function $do(client, request, options) {
76
79
  baseURL: options?.serverURL,
77
80
  path: path,
78
81
  headers: headers,
82
+ query: query,
79
83
  body: body,
80
84
  userAgent: client._options.userAgent,
81
85
  timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
@@ -13,7 +13,7 @@ import { Result } from "../types/fp.js";
13
13
  * Create a preset from a messages request body
14
14
  *
15
15
  * @remarks
16
- * Creates a preset (or a new version of an existing one) from an inference request body. Only fields that overlap with the preset config are persisted; other fields (e.g. `messages`, `stream`, `prompt`) are silently ignored.
16
+ * Creates a preset (or a new version of an existing one) from an inference request body. Only fields that overlap with the preset config are persisted; other fields (e.g. `messages`, `stream`, `prompt`) are silently ignored. Requires a read-write [management key](/docs/guides/overview/auth/management-api-keys); inference API keys are rejected.
17
17
  *
18
18
  * If set, this operation will use {@link Security.apiKey} from the global security.
19
19
  */
@@ -2,7 +2,7 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  * @generated-id: 5f218a786a25
4
4
  */
5
- import { encodeJSON, encodeSimple } from "../lib/encodings.js";
5
+ import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js";
6
6
  import { matchStatusCode } from "../lib/http.js";
7
7
  import * as M from "../lib/matchers.js";
8
8
  import { compactMap } from "../lib/primitives.js";
@@ -17,7 +17,7 @@ import { APIPromise } from "../types/async.js";
17
17
  * Create a preset from a messages request body
18
18
  *
19
19
  * @remarks
20
- * Creates a preset (or a new version of an existing one) from an inference request body. Only fields that overlap with the preset config are persisted; other fields (e.g. `messages`, `stream`, `prompt`) are silently ignored.
20
+ * Creates a preset (or a new version of an existing one) from an inference request body. Only fields that overlap with the preset config are persisted; other fields (e.g. `messages`, `stream`, `prompt`) are silently ignored. Requires a read-write [management key](/docs/guides/overview/auth/management-api-keys); inference API keys are rejected.
21
21
  *
22
22
  * If set, this operation will use {@link Security.apiKey} from the global security.
23
23
  */
@@ -38,6 +38,9 @@ async function $do(client, request, options) {
38
38
  }),
39
39
  };
40
40
  const path = pathToFunc("/presets/{slug}/messages")(pathParams);
41
+ const query = encodeFormQuery({
42
+ "workspace_id": payload.workspace_id,
43
+ });
41
44
  const headers = new Headers(compactMap({
42
45
  "Content-Type": "application/json",
43
46
  Accept: "application/json",
@@ -76,6 +79,7 @@ async function $do(client, request, options) {
76
79
  baseURL: options?.serverURL,
77
80
  path: path,
78
81
  headers: headers,
82
+ query: query,
79
83
  body: body,
80
84
  userAgent: client._options.userAgent,
81
85
  timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
@@ -13,7 +13,7 @@ import { Result } from "../types/fp.js";
13
13
  * Create a preset from a responses request body
14
14
  *
15
15
  * @remarks
16
- * Creates a preset (or a new version of an existing one) from an inference request body. Only fields that overlap with the preset config are persisted; other fields (e.g. `messages`, `stream`, `prompt`) are silently ignored.
16
+ * Creates a preset (or a new version of an existing one) from an inference request body. Only fields that overlap with the preset config are persisted; other fields (e.g. `messages`, `stream`, `prompt`) are silently ignored. Requires a read-write [management key](/docs/guides/overview/auth/management-api-keys); inference API keys are rejected.
17
17
  *
18
18
  * If set, this operation will use {@link Security.apiKey} from the global security.
19
19
  */
@@ -2,7 +2,7 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  * @generated-id: 1f2a88a6adbc
4
4
  */
5
- import { encodeJSON, encodeSimple } from "../lib/encodings.js";
5
+ import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js";
6
6
  import { matchStatusCode } from "../lib/http.js";
7
7
  import * as M from "../lib/matchers.js";
8
8
  import { compactMap } from "../lib/primitives.js";
@@ -17,7 +17,7 @@ import { APIPromise } from "../types/async.js";
17
17
  * Create a preset from a responses request body
18
18
  *
19
19
  * @remarks
20
- * Creates a preset (or a new version of an existing one) from an inference request body. Only fields that overlap with the preset config are persisted; other fields (e.g. `messages`, `stream`, `prompt`) are silently ignored.
20
+ * Creates a preset (or a new version of an existing one) from an inference request body. Only fields that overlap with the preset config are persisted; other fields (e.g. `messages`, `stream`, `prompt`) are silently ignored. Requires a read-write [management key](/docs/guides/overview/auth/management-api-keys); inference API keys are rejected.
21
21
  *
22
22
  * If set, this operation will use {@link Security.apiKey} from the global security.
23
23
  */
@@ -38,6 +38,9 @@ async function $do(client, request, options) {
38
38
  }),
39
39
  };
40
40
  const path = pathToFunc("/presets/{slug}/responses")(pathParams);
41
+ const query = encodeFormQuery({
42
+ "workspace_id": payload.workspace_id,
43
+ });
41
44
  const headers = new Headers(compactMap({
42
45
  "Content-Type": "application/json",
43
46
  Accept: "application/json",
@@ -76,6 +79,7 @@ async function $do(client, request, options) {
76
79
  baseURL: options?.serverURL,
77
80
  path: path,
78
81
  headers: headers,
82
+ query: query,
79
83
  body: body,
80
84
  userAgent: client._options.userAgent,
81
85
  timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
@@ -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.61";
53
+ readonly sdkVersion: "1.5.63";
54
54
  readonly genVersion: "2.950.13";
55
- readonly userAgent: "speakeasy-sdk/typescript 1.5.61 2.950.13 1.0.0 @openrouter/sdk";
55
+ readonly userAgent: "speakeasy-sdk/typescript 1.5.63 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.61",
32
+ sdkVersion: "1.5.63",
33
33
  genVersion: "2.950.13",
34
- userAgent: "speakeasy-sdk/typescript 1.5.61 2.950.13 1.0.0 @openrouter/sdk",
34
+ userAgent: "speakeasy-sdk/typescript 1.5.63 2.950.13 1.0.0 @openrouter/sdk",
35
35
  };
36
36
  //# sourceMappingURL=config.js.map
@@ -2,6 +2,7 @@ import * as z from "zod/v4";
2
2
  import { Result as SafeParseResult } from "../types/fp.js";
3
3
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
4
  export type DecisionsNoulAnswer = {
5
+ confidence?: number | undefined;
5
6
  noul: number;
6
7
  type: "noul";
7
8
  };
@@ -6,6 +6,7 @@ import * as z from "zod/v4";
6
6
  import { safeParse } from "../lib/schemas.js";
7
7
  /** @internal */
8
8
  export const DecisionsNoulAnswer$inboundSchema = z.object({
9
+ confidence: z.number().optional(),
9
10
  noul: z.number(),
10
11
  type: z.literal("noul"),
11
12
  });
@@ -1,6 +1,17 @@
1
1
  import * as z from "zod/v4";
2
2
  import { ClosedEnum, OpenEnum } from "../types/enums.js";
3
3
  import { DeferredToolsSearchStrategy, DeferredToolsSearchStrategy$Outbound } from "./deferredtoolssearchstrategy.js";
4
+ /**
5
+ * How the universal profile exposes the hidden catalog to the provider. Absent or `wrappers`: the `tool_search` and `tool_exec` tools. `code_mode`: one `tool_code` tool that runs a short JavaScript program in which `search()` and `call()` reach the catalog, so several searches and calls complete in one tool result. Experimental.
6
+ */
7
+ export declare const Interface: {
8
+ readonly Wrappers: "wrappers";
9
+ readonly CodeMode: "code_mode";
10
+ };
11
+ /**
12
+ * How the universal profile exposes the hidden catalog to the provider. Absent or `wrappers`: the `tool_search` and `tool_exec` tools. `code_mode`: one `tool_code` tool that runs a short JavaScript program in which `search()` and `call()` reach the catalog, so several searches and calls complete in one tool result. Experimental.
13
+ */
14
+ export type Interface = OpenEnum<typeof Interface>;
4
15
  /**
5
16
  * Loading profile. `portable` serves the `defer_loading` tools with router-built search and call wrappers on any model and keeps the catalog fixed. `universal` defers every wrappable tool behind the same wrappers so the provider-facing tool list never changes, and rebuilds the catalog from each request so tools can be added or removed mid-conversation.
6
17
  */
@@ -16,6 +27,17 @@ export declare const Protocol: {
16
27
  readonly V1: "v1";
17
28
  };
18
29
  export type Protocol = ClosedEnum<typeof Protocol>;
30
+ /**
31
+ * Which tools the universal profile defers. Absent or `all`: every wrappable tool outside the coding-harness core set. `mcp`: only MCP server tools (`mcp__*` names and Responses namespaces outside `functions`); the harness keeps its own built-in tools direct. Experimental.
32
+ */
33
+ export declare const DeferredToolsControlScope: {
34
+ readonly All: "all";
35
+ readonly Mcp: "mcp";
36
+ };
37
+ /**
38
+ * Which tools the universal profile defers. Absent or `all`: every wrappable tool outside the coding-harness core set. `mcp`: only MCP server tools (`mcp__*` names and Responses namespaces outside `functions`); the harness keeps its own built-in tools direct. Experimental.
39
+ */
40
+ export type DeferredToolsControlScope = OpenEnum<typeof DeferredToolsControlScope>;
19
41
  /**
20
42
  * Where tool-call arguments are checked against the original schema. Only `runtime` (in OpenRouter) is available in this release.
21
43
  */
@@ -30,11 +52,19 @@ export type Validation = ClosedEnum<typeof Validation>;
30
52
  * Opt-in versioned router-level deferred-tool protocol. Replay assistant reasoning unchanged on continuation; keep the catalog unchanged.
31
53
  */
32
54
  export type DeferredToolsControl = {
55
+ /**
56
+ * How the universal profile exposes the hidden catalog to the provider. Absent or `wrappers`: the `tool_search` and `tool_exec` tools. `code_mode`: one `tool_code` tool that runs a short JavaScript program in which `search()` and `call()` reach the catalog, so several searches and calls complete in one tool result. Experimental.
57
+ */
58
+ interface?: Interface | undefined;
33
59
  /**
34
60
  * Loading profile. `portable` serves the `defer_loading` tools with router-built search and call wrappers on any model and keeps the catalog fixed. `universal` defers every wrappable tool behind the same wrappers so the provider-facing tool list never changes, and rebuilds the catalog from each request so tools can be added or removed mid-conversation.
35
61
  */
36
62
  profile: Profile;
37
63
  protocol: Protocol;
64
+ /**
65
+ * Which tools the universal profile defers. Absent or `all`: every wrappable tool outside the coding-harness core set. `mcp`: only MCP server tools (`mcp__*` names and Responses namespaces outside `functions`); the harness keeps its own built-in tools direct. Experimental.
66
+ */
67
+ scope?: DeferredToolsControlScope | undefined;
38
68
  /**
39
69
  * Router-local regex/BM25 or caller-owned custom search.
40
70
  */
@@ -45,15 +75,21 @@ export type DeferredToolsControl = {
45
75
  validation: Validation;
46
76
  };
47
77
  /** @internal */
78
+ export declare const Interface$outboundSchema: z.ZodType<string, Interface>;
79
+ /** @internal */
48
80
  export declare const Profile$outboundSchema: z.ZodType<string, Profile>;
49
81
  /** @internal */
50
82
  export declare const Protocol$outboundSchema: z.ZodEnum<typeof Protocol>;
51
83
  /** @internal */
84
+ export declare const DeferredToolsControlScope$outboundSchema: z.ZodType<string, DeferredToolsControlScope>;
85
+ /** @internal */
52
86
  export declare const Validation$outboundSchema: z.ZodEnum<typeof Validation>;
53
87
  /** @internal */
54
88
  export type DeferredToolsControl$Outbound = {
89
+ interface?: string | undefined;
55
90
  profile: string;
56
91
  protocol: string;
92
+ scope?: string | undefined;
57
93
  search: DeferredToolsSearchStrategy$Outbound;
58
94
  validation: string;
59
95
  };
@@ -5,6 +5,13 @@
5
5
  import * as z from "zod/v4";
6
6
  import * as openEnums from "../types/enums.js";
7
7
  import { DeferredToolsSearchStrategy$outboundSchema, } from "./deferredtoolssearchstrategy.js";
8
+ /**
9
+ * How the universal profile exposes the hidden catalog to the provider. Absent or `wrappers`: the `tool_search` and `tool_exec` tools. `code_mode`: one `tool_code` tool that runs a short JavaScript program in which `search()` and `call()` reach the catalog, so several searches and calls complete in one tool result. Experimental.
10
+ */
11
+ export const Interface = {
12
+ Wrappers: "wrappers",
13
+ CodeMode: "code_mode",
14
+ };
8
15
  /**
9
16
  * Loading profile. `portable` serves the `defer_loading` tools with router-built search and call wrappers on any model and keeps the catalog fixed. `universal` defers every wrappable tool behind the same wrappers so the provider-facing tool list never changes, and rebuilds the catalog from each request so tools can be added or removed mid-conversation.
10
17
  */
@@ -15,6 +22,13 @@ export const Profile = {
15
22
  export const Protocol = {
16
23
  V1: "v1",
17
24
  };
25
+ /**
26
+ * Which tools the universal profile defers. Absent or `all`: every wrappable tool outside the coding-harness core set. `mcp`: only MCP server tools (`mcp__*` names and Responses namespaces outside `functions`); the harness keeps its own built-in tools direct. Experimental.
27
+ */
28
+ export const DeferredToolsControlScope = {
29
+ All: "all",
30
+ Mcp: "mcp",
31
+ };
18
32
  /**
19
33
  * Where tool-call arguments are checked against the original schema. Only `runtime` (in OpenRouter) is available in this release.
20
34
  */
@@ -22,16 +36,23 @@ export const Validation = {
22
36
  Runtime: "runtime",
23
37
  };
24
38
  /** @internal */
39
+ export const Interface$outboundSchema = openEnums
40
+ .outboundSchema(Interface);
41
+ /** @internal */
25
42
  export const Profile$outboundSchema = openEnums
26
43
  .outboundSchema(Profile);
27
44
  /** @internal */
28
45
  export const Protocol$outboundSchema = z.enum(Protocol);
29
46
  /** @internal */
47
+ export const DeferredToolsControlScope$outboundSchema = openEnums.outboundSchema(DeferredToolsControlScope);
48
+ /** @internal */
30
49
  export const Validation$outboundSchema = z.enum(Validation);
31
50
  /** @internal */
32
51
  export const DeferredToolsControl$outboundSchema = z.object({
52
+ interface: Interface$outboundSchema.optional(),
33
53
  profile: Profile$outboundSchema,
34
54
  protocol: Protocol$outboundSchema,
55
+ scope: DeferredToolsControlScope$outboundSchema.optional(),
35
56
  search: DeferredToolsSearchStrategy$outboundSchema,
36
57
  validation: Validation$outboundSchema,
37
58
  });
@@ -45,6 +45,10 @@ export type CreatePresetsChatCompletionsRequest = {
45
45
  * URL-safe slug identifying the preset. Created if it does not exist.
46
46
  */
47
47
  slug: string;
48
+ /**
49
+ * Workspace to create the preset in. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
50
+ */
51
+ workspaceId?: string | undefined;
48
52
  chatRequest: models.ChatRequest;
49
53
  };
50
54
  /** @internal */
@@ -53,6 +57,7 @@ export type CreatePresetsChatCompletionsRequest$Outbound = {
53
57
  appTitle?: string | undefined;
54
58
  appCategories?: string | undefined;
55
59
  slug: string;
60
+ workspace_id?: string | undefined;
56
61
  ChatRequest: models.ChatRequest$Outbound;
57
62
  };
58
63
  /** @internal */
@@ -11,10 +11,12 @@ export const CreatePresetsChatCompletionsRequest$outboundSchema = z.object({
11
11
  appTitle: z.string().optional(),
12
12
  appCategories: z.string().optional(),
13
13
  slug: z.string(),
14
+ workspaceId: z.string().optional(),
14
15
  chatRequest: models_ChatRequest$outboundSchema,
15
16
  }).transform((v) => {
16
17
  return remap$(v, {
17
18
  httpReferer: "HTTP-Referer",
19
+ workspaceId: "workspace_id",
18
20
  chatRequest: "ChatRequest",
19
21
  });
20
22
  });
@@ -45,6 +45,10 @@ export type CreatePresetsMessagesRequest = {
45
45
  * URL-safe slug identifying the preset. Created if it does not exist.
46
46
  */
47
47
  slug: string;
48
+ /**
49
+ * Workspace to create the preset in. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
50
+ */
51
+ workspaceId?: string | undefined;
48
52
  messagesRequest: models.MessagesRequest;
49
53
  };
50
54
  /** @internal */
@@ -53,6 +57,7 @@ export type CreatePresetsMessagesRequest$Outbound = {
53
57
  appTitle?: string | undefined;
54
58
  appCategories?: string | undefined;
55
59
  slug: string;
60
+ workspace_id?: string | undefined;
56
61
  MessagesRequest: models.MessagesRequest$Outbound;
57
62
  };
58
63
  /** @internal */
@@ -11,10 +11,12 @@ export const CreatePresetsMessagesRequest$outboundSchema = z.object({
11
11
  appTitle: z.string().optional(),
12
12
  appCategories: z.string().optional(),
13
13
  slug: z.string(),
14
+ workspaceId: z.string().optional(),
14
15
  messagesRequest: models_MessagesRequest$outboundSchema,
15
16
  }).transform((v) => {
16
17
  return remap$(v, {
17
18
  httpReferer: "HTTP-Referer",
19
+ workspaceId: "workspace_id",
18
20
  messagesRequest: "MessagesRequest",
19
21
  });
20
22
  });
@@ -45,6 +45,10 @@ export type CreatePresetsResponsesRequest = {
45
45
  * URL-safe slug identifying the preset. Created if it does not exist.
46
46
  */
47
47
  slug: string;
48
+ /**
49
+ * Workspace to create the preset in. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
50
+ */
51
+ workspaceId?: string | undefined;
48
52
  responsesRequest: models.ResponsesRequest;
49
53
  };
50
54
  /** @internal */
@@ -53,6 +57,7 @@ export type CreatePresetsResponsesRequest$Outbound = {
53
57
  appTitle?: string | undefined;
54
58
  appCategories?: string | undefined;
55
59
  slug: string;
60
+ workspace_id?: string | undefined;
56
61
  ResponsesRequest: models.ResponsesRequest$Outbound;
57
62
  };
58
63
  /** @internal */
@@ -11,10 +11,12 @@ export const CreatePresetsResponsesRequest$outboundSchema = z.object({
11
11
  appTitle: z.string().optional(),
12
12
  appCategories: z.string().optional(),
13
13
  slug: z.string(),
14
+ workspaceId: z.string().optional(),
14
15
  responsesRequest: models_ResponsesRequest$outboundSchema,
15
16
  }).transform((v) => {
16
17
  return remap$(v, {
17
18
  httpReferer: "HTTP-Referer",
19
+ workspaceId: "workspace_id",
18
20
  responsesRequest: "ResponsesRequest",
19
21
  });
20
22
  });
@@ -23,21 +23,21 @@ export declare class Presets extends ClientSDK {
23
23
  * Create a preset from a chat-completions request body
24
24
  *
25
25
  * @remarks
26
- * Creates a preset (or a new version of an existing one) from an inference request body. Only fields that overlap with the preset config are persisted; other fields (e.g. `messages`, `stream`, `prompt`) are silently ignored.
26
+ * Creates a preset (or a new version of an existing one) from an inference request body. Only fields that overlap with the preset config are persisted; other fields (e.g. `messages`, `stream`, `prompt`) are silently ignored. Requires a read-write [management key](/docs/guides/overview/auth/management-api-keys); inference API keys are rejected.
27
27
  */
28
28
  createPresetsChatCompletions(request: operations.CreatePresetsChatCompletionsRequest, options?: RequestOptions): Promise<models.CreatePresetFromInferenceResponse>;
29
29
  /**
30
30
  * Create a preset from a messages request body
31
31
  *
32
32
  * @remarks
33
- * Creates a preset (or a new version of an existing one) from an inference request body. Only fields that overlap with the preset config are persisted; other fields (e.g. `messages`, `stream`, `prompt`) are silently ignored.
33
+ * Creates a preset (or a new version of an existing one) from an inference request body. Only fields that overlap with the preset config are persisted; other fields (e.g. `messages`, `stream`, `prompt`) are silently ignored. Requires a read-write [management key](/docs/guides/overview/auth/management-api-keys); inference API keys are rejected.
34
34
  */
35
35
  createPresetsMessages(request: operations.CreatePresetsMessagesRequest, options?: RequestOptions): Promise<models.CreatePresetFromInferenceResponse>;
36
36
  /**
37
37
  * Create a preset from a responses request body
38
38
  *
39
39
  * @remarks
40
- * Creates a preset (or a new version of an existing one) from an inference request body. Only fields that overlap with the preset config are persisted; other fields (e.g. `messages`, `stream`, `prompt`) are silently ignored.
40
+ * Creates a preset (or a new version of an existing one) from an inference request body. Only fields that overlap with the preset config are persisted; other fields (e.g. `messages`, `stream`, `prompt`) are silently ignored. Requires a read-write [management key](/docs/guides/overview/auth/management-api-keys); inference API keys are rejected.
41
41
  */
42
42
  createPresetsResponses(request: operations.CreatePresetsResponsesRequest, options?: RequestOptions): Promise<models.CreatePresetFromInferenceResponse>;
43
43
  /**
@@ -35,7 +35,7 @@ export class Presets extends ClientSDK {
35
35
  * Create a preset from a chat-completions request body
36
36
  *
37
37
  * @remarks
38
- * Creates a preset (or a new version of an existing one) from an inference request body. Only fields that overlap with the preset config are persisted; other fields (e.g. `messages`, `stream`, `prompt`) are silently ignored.
38
+ * Creates a preset (or a new version of an existing one) from an inference request body. Only fields that overlap with the preset config are persisted; other fields (e.g. `messages`, `stream`, `prompt`) are silently ignored. Requires a read-write [management key](/docs/guides/overview/auth/management-api-keys); inference API keys are rejected.
39
39
  */
40
40
  async createPresetsChatCompletions(request, options) {
41
41
  return unwrapAsync(presetsCreatePresetsChatCompletions(this, request, options));
@@ -44,7 +44,7 @@ export class Presets extends ClientSDK {
44
44
  * Create a preset from a messages request body
45
45
  *
46
46
  * @remarks
47
- * Creates a preset (or a new version of an existing one) from an inference request body. Only fields that overlap with the preset config are persisted; other fields (e.g. `messages`, `stream`, `prompt`) are silently ignored.
47
+ * Creates a preset (or a new version of an existing one) from an inference request body. Only fields that overlap with the preset config are persisted; other fields (e.g. `messages`, `stream`, `prompt`) are silently ignored. Requires a read-write [management key](/docs/guides/overview/auth/management-api-keys); inference API keys are rejected.
48
48
  */
49
49
  async createPresetsMessages(request, options) {
50
50
  return unwrapAsync(presetsCreatePresetsMessages(this, request, options));
@@ -53,7 +53,7 @@ export class Presets extends ClientSDK {
53
53
  * Create a preset from a responses request body
54
54
  *
55
55
  * @remarks
56
- * Creates a preset (or a new version of an existing one) from an inference request body. Only fields that overlap with the preset config are persisted; other fields (e.g. `messages`, `stream`, `prompt`) are silently ignored.
56
+ * Creates a preset (or a new version of an existing one) from an inference request body. Only fields that overlap with the preset config are persisted; other fields (e.g. `messages`, `stream`, `prompt`) are silently ignored. Requires a read-write [management key](/docs/guides/overview/auth/management-api-keys); inference API keys are rejected.
57
57
  */
58
58
  async createPresetsResponses(request, options) {
59
59
  return unwrapAsync(presetsCreatePresetsResponses(this, request, options));
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@openrouter/sdk",
5
- "version": "1.5.61",
5
+ "version": "1.5.63",
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.61",
3
+ "version": "1.5.63",
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
- "test": "vitest --run --project unit",
77
- "test:e2e": "vitest --run --project e2e",
76
+ "postinstall": "node scripts/check-types.js || true",
77
+ "prepare": "npm run build",
78
78
  "test:transit": "exit 0",
79
+ "test:watch": "vitest --watch --project unit",
79
80
  "typecheck": "tsc --noEmit",
80
- "typecheck:transit": "exit 0",
81
81
  "compile": "tsc && node scripts/unbarrel-imports.js",
82
- "postinstall": "node scripts/check-types.js || true",
83
- "prepare": "npm run build",
84
- "test:watch": "vitest --watch --project unit"
82
+ "test": "vitest --run --project unit",
83
+ "test:e2e": "vitest --run --project e2e",
84
+ "typecheck:transit": "exit 0"
85
85
  },
86
86
  "peerDependencies": {
87
87