@openrouter/sdk 1.5.61 → 1.5.62
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-
|
|
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.
|
package/esm/lib/config.d.ts
CHANGED
|
@@ -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.
|
|
53
|
+
readonly sdkVersion: "1.5.62";
|
|
54
54
|
readonly genVersion: "2.950.13";
|
|
55
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.5.
|
|
55
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.5.62 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.
|
|
32
|
+
sdkVersion: "1.5.62",
|
|
33
33
|
genVersion: "2.950.13",
|
|
34
|
-
userAgent: "speakeasy-sdk/typescript 1.5.
|
|
34
|
+
userAgent: "speakeasy-sdk/typescript 1.5.62 2.950.13 1.0.0 @openrouter/sdk",
|
|
35
35
|
};
|
|
36
36
|
//# sourceMappingURL=config.js.map
|
|
@@ -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
|
});
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openrouter/sdk",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.62",
|
|
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
|
+
"postinstall": "node scripts/check-types.js || true",
|
|
77
|
+
"prepare": "npm run build",
|
|
76
78
|
"test": "vitest --run --project unit",
|
|
77
|
-
"test:e2e": "vitest --run --project e2e",
|
|
78
79
|
"test:transit": "exit 0",
|
|
79
|
-
"typecheck": "tsc --noEmit",
|
|
80
|
-
"typecheck:transit": "exit 0",
|
|
81
80
|
"compile": "tsc && node scripts/unbarrel-imports.js",
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"
|
|
81
|
+
"test:e2e": "vitest --run --project e2e",
|
|
82
|
+
"test:watch": "vitest --watch --project unit",
|
|
83
|
+
"typecheck": "tsc --noEmit",
|
|
84
|
+
"typecheck:transit": "exit 0"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
87
|
|