@openrouter/sdk 1.5.64 → 1.5.65

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.64";
53
+ readonly sdkVersion: "1.5.65";
54
54
  readonly genVersion: "2.950.13";
55
- readonly userAgent: "speakeasy-sdk/typescript 1.5.64 2.950.13 1.0.0 @openrouter/sdk";
55
+ readonly userAgent: "speakeasy-sdk/typescript 1.5.65 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.64",
32
+ sdkVersion: "1.5.65",
33
33
  genVersion: "2.950.13",
34
- userAgent: "speakeasy-sdk/typescript 1.5.64 2.950.13 1.0.0 @openrouter/sdk",
34
+ userAgent: "speakeasy-sdk/typescript 1.5.65 2.950.13 1.0.0 @openrouter/sdk",
35
35
  };
36
36
  //# sourceMappingURL=config.js.map
@@ -24,7 +24,7 @@ export declare const TypeCodeInterpreter: {
24
24
  };
25
25
  export type TypeCodeInterpreter = ClosedEnum<typeof TypeCodeInterpreter>;
26
26
  /**
27
- * Code interpreter tool configuration
27
+ * Code interpreter tool configuration. An existing container id or `container.file_ids` requires BYOK (your own OpenAI key); requests on OpenRouter credits must use `auto` with no `file_ids`.
28
28
  */
29
29
  export type CodeInterpreterServerTool = {
30
30
  container: ContainerAuto | string;
@@ -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 a universal `tool_search` query reaches the client's own tool search. Absent or `keywords`: a `select:` query becomes the words of the selected names and the limit is always filled. `native`: a `select:` query passes through verbatim when the client search documents `select:`, and the limit field is sent only when the model gave one, unless the client search requires it, in which case its documented default is sent. Experimental.
6
+ */
7
+ export declare const CascadeMode: {
8
+ readonly Keywords: "keywords";
9
+ readonly Native: "native";
10
+ };
11
+ /**
12
+ * How a universal `tool_search` query reaches the client's own tool search. Absent or `keywords`: a `select:` query becomes the words of the selected names and the limit is always filled. `native`: a `select:` query passes through verbatim when the client search documents `select:`, and the limit field is sent only when the model gave one, unless the client search requires it, in which case its documented default is sent. Experimental.
13
+ */
14
+ export type CascadeMode = OpenEnum<typeof CascadeMode>;
4
15
  /**
5
16
  * 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
17
  */
@@ -28,14 +39,15 @@ export declare const Protocol: {
28
39
  };
29
40
  export type Protocol = ClosedEnum<typeof Protocol>;
30
41
  /**
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.
42
+ * 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. `client`: only the tools the client itself marked `defer_loading`, so a harness with its own tool search keeps its other direct tools direct; an adopted client tool search is still replaced by the router wrappers, and a client-deferred tool the router cannot wrap stays direct. Experimental.
32
43
  */
33
44
  export declare const DeferredToolsControlScope: {
34
45
  readonly All: "all";
35
46
  readonly Mcp: "mcp";
47
+ readonly Client: "client";
36
48
  };
37
49
  /**
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.
50
+ * 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. `client`: only the tools the client itself marked `defer_loading`, so a harness with its own tool search keeps its other direct tools direct; an adopted client tool search is still replaced by the router wrappers, and a client-deferred tool the router cannot wrap stays direct. Experimental.
39
51
  */
40
52
  export type DeferredToolsControlScope = OpenEnum<typeof DeferredToolsControlScope>;
41
53
  /**
@@ -52,6 +64,10 @@ export type Validation = ClosedEnum<typeof Validation>;
52
64
  * Opt-in versioned router-level deferred-tool protocol. Replay assistant reasoning unchanged on continuation; keep the catalog unchanged.
53
65
  */
54
66
  export type DeferredToolsControl = {
67
+ /**
68
+ * How a universal `tool_search` query reaches the client's own tool search. Absent or `keywords`: a `select:` query becomes the words of the selected names and the limit is always filled. `native`: a `select:` query passes through verbatim when the client search documents `select:`, and the limit field is sent only when the model gave one, unless the client search requires it, in which case its documented default is sent. Experimental.
69
+ */
70
+ cascadeMode?: CascadeMode | undefined;
55
71
  /**
56
72
  * 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
73
  */
@@ -62,7 +78,7 @@ export type DeferredToolsControl = {
62
78
  profile: Profile;
63
79
  protocol: Protocol;
64
80
  /**
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.
81
+ * 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. `client`: only the tools the client itself marked `defer_loading`, so a harness with its own tool search keeps its other direct tools direct; an adopted client tool search is still replaced by the router wrappers, and a client-deferred tool the router cannot wrap stays direct. Experimental.
66
82
  */
67
83
  scope?: DeferredToolsControlScope | undefined;
68
84
  /**
@@ -75,6 +91,8 @@ export type DeferredToolsControl = {
75
91
  validation: Validation;
76
92
  };
77
93
  /** @internal */
94
+ export declare const CascadeMode$outboundSchema: z.ZodType<string, CascadeMode>;
95
+ /** @internal */
78
96
  export declare const Interface$outboundSchema: z.ZodType<string, Interface>;
79
97
  /** @internal */
80
98
  export declare const Profile$outboundSchema: z.ZodType<string, Profile>;
@@ -86,6 +104,7 @@ export declare const DeferredToolsControlScope$outboundSchema: z.ZodType<string,
86
104
  export declare const Validation$outboundSchema: z.ZodEnum<typeof Validation>;
87
105
  /** @internal */
88
106
  export type DeferredToolsControl$Outbound = {
107
+ cascade_mode?: string | undefined;
89
108
  interface?: string | undefined;
90
109
  profile: string;
91
110
  protocol: string;
@@ -3,8 +3,16 @@
3
3
  * @generated-id: 117738d3058e
4
4
  */
5
5
  import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
6
7
  import * as openEnums from "../types/enums.js";
7
8
  import { DeferredToolsSearchStrategy$outboundSchema, } from "./deferredtoolssearchstrategy.js";
9
+ /**
10
+ * How a universal `tool_search` query reaches the client's own tool search. Absent or `keywords`: a `select:` query becomes the words of the selected names and the limit is always filled. `native`: a `select:` query passes through verbatim when the client search documents `select:`, and the limit field is sent only when the model gave one, unless the client search requires it, in which case its documented default is sent. Experimental.
11
+ */
12
+ export const CascadeMode = {
13
+ Keywords: "keywords",
14
+ Native: "native",
15
+ };
8
16
  /**
9
17
  * 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
18
  */
@@ -23,11 +31,12 @@ export const Protocol = {
23
31
  V1: "v1",
24
32
  };
25
33
  /**
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.
34
+ * 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. `client`: only the tools the client itself marked `defer_loading`, so a harness with its own tool search keeps its other direct tools direct; an adopted client tool search is still replaced by the router wrappers, and a client-deferred tool the router cannot wrap stays direct. Experimental.
27
35
  */
28
36
  export const DeferredToolsControlScope = {
29
37
  All: "all",
30
38
  Mcp: "mcp",
39
+ Client: "client",
31
40
  };
32
41
  /**
33
42
  * Where tool-call arguments are checked against the original schema. Only `runtime` (in OpenRouter) is available in this release.
@@ -36,6 +45,8 @@ export const Validation = {
36
45
  Runtime: "runtime",
37
46
  };
38
47
  /** @internal */
48
+ export const CascadeMode$outboundSchema = openEnums.outboundSchema(CascadeMode);
49
+ /** @internal */
39
50
  export const Interface$outboundSchema = openEnums
40
51
  .outboundSchema(Interface);
41
52
  /** @internal */
@@ -49,12 +60,17 @@ export const DeferredToolsControlScope$outboundSchema = openEnums.outboundSchema
49
60
  export const Validation$outboundSchema = z.enum(Validation);
50
61
  /** @internal */
51
62
  export const DeferredToolsControl$outboundSchema = z.object({
63
+ cascadeMode: CascadeMode$outboundSchema.optional(),
52
64
  interface: Interface$outboundSchema.optional(),
53
65
  profile: Profile$outboundSchema,
54
66
  protocol: Protocol$outboundSchema,
55
67
  scope: DeferredToolsControlScope$outboundSchema.optional(),
56
68
  search: DeferredToolsSearchStrategy$outboundSchema,
57
69
  validation: Validation$outboundSchema,
70
+ }).transform((v) => {
71
+ return remap$(v, {
72
+ cascadeMode: "cascade_mode",
73
+ });
58
74
  });
59
75
  export function deferredToolsControlToJSON(deferredToolsControl) {
60
76
  return JSON.stringify(DeferredToolsControl$outboundSchema.parse(deferredToolsControl));
@@ -34,7 +34,7 @@ export declare const TypeFileSearch: {
34
34
  };
35
35
  export type TypeFileSearch = ClosedEnum<typeof TypeFileSearch>;
36
36
  /**
37
- * File search tool configuration
37
+ * File search tool configuration. `vector_store_ids` names OpenAI vector stores, so it requires BYOK (your own OpenAI key); requests on OpenRouter credits get a 400.
38
38
  */
39
39
  export type FileSearchServerTool = {
40
40
  filters?: Filters | CompoundFilter | null | undefined;
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@openrouter/sdk",
5
- "version": "1.5.64",
5
+ "version": "1.5.65",
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.64",
3
+ "version": "1.5.65",
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:watch": "vitest --watch --project unit",
76
+ "postinstall": "node scripts/check-types.js || true",
77
+ "test:transit": "exit 0",
77
78
  "typecheck:transit": "exit 0",
78
79
  "prepare": "npm run build",
79
80
  "test": "vitest --run --project unit",
80
81
  "test:e2e": "vitest --run --project e2e",
82
+ "test:watch": "vitest --watch --project unit",
81
83
  "typecheck": "tsc --noEmit",
82
- "compile": "tsc && node scripts/unbarrel-imports.js",
83
- "postinstall": "node scripts/check-types.js || true",
84
- "test:transit": "exit 0"
84
+ "compile": "tsc && node scripts/unbarrel-imports.js"
85
85
  },
86
86
  "peerDependencies": {
87
87