@openrouter/sdk 1.5.65 → 1.5.66
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.
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/deferredbm25search.d.ts +5 -0
- package/esm/models/deferredbm25search.js +1 -0
- package/esm/models/deferredregexsearch.d.ts +5 -0
- package/esm/models/deferredregexsearch.js +1 -0
- package/esm/models/deferredtoolscontrol.d.ts +5 -0
- package/esm/models/deferredtoolscontrol.js +1 -0
- package/esm/models/outputtoolsearchservertoolitem.d.ts +9 -0
- package/esm/models/outputtoolsearchservertoolitem.js +2 -0
- package/jsr.json +1 -1
- package/package.json +5 -5
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.66";
|
|
54
54
|
readonly genVersion: "2.950.13";
|
|
55
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.5.
|
|
55
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.5.66 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.66",
|
|
33
33
|
genVersion: "2.950.13",
|
|
34
|
-
userAgent: "speakeasy-sdk/typescript 1.5.
|
|
34
|
+
userAgent: "speakeasy-sdk/typescript 1.5.66 2.950.13 1.0.0 @openrouter/sdk",
|
|
35
35
|
};
|
|
36
36
|
//# sourceMappingURL=config.js.map
|
|
@@ -4,11 +4,16 @@ import * as z from "zod/v4";
|
|
|
4
4
|
*/
|
|
5
5
|
export type DeferredBm25Search = {
|
|
6
6
|
maxResults?: number | undefined;
|
|
7
|
+
/**
|
|
8
|
+
* Universal profile only, for searches the router answers through the `tool_search` wrapper; code-mode `search()` and a client-owned tool search list the matched tools alone. When true, each result also names up to 16 other deferred tools of every source a match came from, so a model that found one tool of an MCP server learns its neighbours without another search. Absent or false: results list the matched tools alone.
|
|
9
|
+
*/
|
|
10
|
+
siblings?: boolean | undefined;
|
|
7
11
|
type: "bm25";
|
|
8
12
|
};
|
|
9
13
|
/** @internal */
|
|
10
14
|
export type DeferredBm25Search$Outbound = {
|
|
11
15
|
max_results?: number | undefined;
|
|
16
|
+
siblings?: boolean | undefined;
|
|
12
17
|
type: "bm25";
|
|
13
18
|
};
|
|
14
19
|
/** @internal */
|
|
@@ -7,6 +7,7 @@ import { remap as remap$ } from "../lib/primitives.js";
|
|
|
7
7
|
/** @internal */
|
|
8
8
|
export const DeferredBm25Search$outboundSchema = z.object({
|
|
9
9
|
maxResults: z.int().optional(),
|
|
10
|
+
siblings: z.boolean().optional(),
|
|
10
11
|
type: z.literal("bm25"),
|
|
11
12
|
}).transform((v) => {
|
|
12
13
|
return remap$(v, {
|
|
@@ -4,11 +4,16 @@ import * as z from "zod/v4";
|
|
|
4
4
|
*/
|
|
5
5
|
export type DeferredRegexSearch = {
|
|
6
6
|
maxResults?: number | undefined;
|
|
7
|
+
/**
|
|
8
|
+
* Universal profile only, for searches the router answers through the `tool_search` wrapper; code-mode `search()` and a client-owned tool search list the matched tools alone. When true, each result also names up to 16 other deferred tools of every source a match came from, so a model that found one tool of an MCP server learns its neighbours without another search. Absent or false: results list the matched tools alone.
|
|
9
|
+
*/
|
|
10
|
+
siblings?: boolean | undefined;
|
|
7
11
|
type: "regex";
|
|
8
12
|
};
|
|
9
13
|
/** @internal */
|
|
10
14
|
export type DeferredRegexSearch$Outbound = {
|
|
11
15
|
max_results?: number | undefined;
|
|
16
|
+
siblings?: boolean | undefined;
|
|
12
17
|
type: "regex";
|
|
13
18
|
};
|
|
14
19
|
/** @internal */
|
|
@@ -7,6 +7,7 @@ import { remap as remap$ } from "../lib/primitives.js";
|
|
|
7
7
|
/** @internal */
|
|
8
8
|
export const DeferredRegexSearch$outboundSchema = z.object({
|
|
9
9
|
maxResults: z.int().optional(),
|
|
10
|
+
siblings: z.boolean().optional(),
|
|
10
11
|
type: z.literal("regex"),
|
|
11
12
|
}).transform((v) => {
|
|
12
13
|
return remap$(v, {
|
|
@@ -68,6 +68,10 @@ export type DeferredToolsControl = {
|
|
|
68
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
69
|
*/
|
|
70
70
|
cascadeMode?: CascadeMode | undefined;
|
|
71
|
+
/**
|
|
72
|
+
* Universal profile only. Caller text announced to the model with the deferred catalog before its first turn, for example which sources the task needs. Repeated only when it changes. Trimmed before the length bounds apply. Recorded in the `catalog_index` discovery record of the response, so it is replayed with the conversation.
|
|
73
|
+
*/
|
|
74
|
+
hint?: string | undefined;
|
|
71
75
|
/**
|
|
72
76
|
* 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.
|
|
73
77
|
*/
|
|
@@ -105,6 +109,7 @@ export declare const Validation$outboundSchema: z.ZodEnum<typeof Validation>;
|
|
|
105
109
|
/** @internal */
|
|
106
110
|
export type DeferredToolsControl$Outbound = {
|
|
107
111
|
cascade_mode?: string | undefined;
|
|
112
|
+
hint?: string | undefined;
|
|
108
113
|
interface?: string | undefined;
|
|
109
114
|
profile: string;
|
|
110
115
|
protocol: string;
|
|
@@ -61,6 +61,7 @@ export const Validation$outboundSchema = z.enum(Validation);
|
|
|
61
61
|
/** @internal */
|
|
62
62
|
export const DeferredToolsControl$outboundSchema = z.object({
|
|
63
63
|
cascadeMode: CascadeMode$outboundSchema.optional(),
|
|
64
|
+
hint: z.string().optional(),
|
|
64
65
|
interface: Interface$outboundSchema.optional(),
|
|
65
66
|
profile: Profile$outboundSchema,
|
|
66
67
|
protocol: Protocol$outboundSchema,
|
|
@@ -55,6 +55,12 @@ export type OutputToolSearchServerToolItem = {
|
|
|
55
55
|
id?: string | undefined;
|
|
56
56
|
matches?: Array<Match> | undefined;
|
|
57
57
|
query?: string | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* The other deferred tools of each source a match came from, by name, when the search listed siblings. Replaying the item shows the same names.
|
|
60
|
+
*/
|
|
61
|
+
sources?: {
|
|
62
|
+
[k: string]: Array<string>;
|
|
63
|
+
} | undefined;
|
|
58
64
|
status: FailableToolCallStatus;
|
|
59
65
|
/**
|
|
60
66
|
* The IDs of every tool call in the model response that ran the search, in order. Replaying the item keeps those calls in one turn.
|
|
@@ -97,6 +103,9 @@ export type OutputToolSearchServerToolItem$Outbound = {
|
|
|
97
103
|
id?: string | undefined;
|
|
98
104
|
matches?: Array<Match$Outbound> | undefined;
|
|
99
105
|
query?: string | undefined;
|
|
106
|
+
sources?: {
|
|
107
|
+
[k: string]: Array<string>;
|
|
108
|
+
} | undefined;
|
|
100
109
|
status: string;
|
|
101
110
|
turn_call_ids?: Array<string> | undefined;
|
|
102
111
|
type: string;
|
|
@@ -62,6 +62,7 @@ export const OutputToolSearchServerToolItem$inboundSchema = z.object({
|
|
|
62
62
|
id: z.string().optional(),
|
|
63
63
|
matches: z.array(z.lazy(() => Match$inboundSchema)).optional(),
|
|
64
64
|
query: z.string().optional(),
|
|
65
|
+
sources: z.record(z.string(), z.array(z.string())).optional(),
|
|
65
66
|
status: FailableToolCallStatus$inboundSchema,
|
|
66
67
|
turn_call_ids: z.array(z.string()).optional(),
|
|
67
68
|
type: OutputToolSearchServerToolItemType$inboundSchema,
|
|
@@ -83,6 +84,7 @@ export const OutputToolSearchServerToolItem$outboundSchema = z.object({
|
|
|
83
84
|
id: z.string().optional(),
|
|
84
85
|
matches: z.array(z.lazy(() => Match$outboundSchema)).optional(),
|
|
85
86
|
query: z.string().optional(),
|
|
87
|
+
sources: z.record(z.string(), z.array(z.string())).optional(),
|
|
86
88
|
status: FailableToolCallStatus$outboundSchema,
|
|
87
89
|
turnCallIds: z.array(z.string()).optional(),
|
|
88
90
|
type: OutputToolSearchServerToolItemType$outboundSchema,
|
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.66",
|
|
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
|
-
"test:transit": "exit 0",
|
|
78
76
|
"typecheck:transit": "exit 0",
|
|
77
|
+
"postinstall": "node scripts/check-types.js || true",
|
|
79
78
|
"prepare": "npm run build",
|
|
80
79
|
"test": "vitest --run --project unit",
|
|
81
80
|
"test:e2e": "vitest --run --project e2e",
|
|
82
|
-
"test:
|
|
81
|
+
"test:transit": "exit 0",
|
|
83
82
|
"typecheck": "tsc --noEmit",
|
|
84
|
-
"compile": "tsc && node scripts/unbarrel-imports.js"
|
|
83
|
+
"compile": "tsc && node scripts/unbarrel-imports.js",
|
|
84
|
+
"test:watch": "vitest --watch --project unit"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
87
|
|