@openrouter/sdk 1.2.52 → 1.2.54
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/funcs/embeddingsGenerate.d.ts +1 -1
- package/esm/funcs/embeddingsGenerate.js +1 -1
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/additionaltoolsitem.d.ts +10 -4
- package/esm/models/additionaltoolsitem.js +8 -0
- package/esm/models/index.d.ts +2 -0
- package/esm/models/index.js +2 -0
- package/esm/models/messagesrequest.d.ts +5 -4
- package/esm/models/messagesrequest.js +3 -0
- package/esm/models/openresponsesresult.d.ts +4 -0
- package/esm/models/openresponsesresult.js +5 -0
- package/esm/models/responsesrequest.d.ts +14 -0
- package/esm/models/responsesrequest.js +8 -0
- package/esm/models/toolsearchservertool.d.ts +28 -0
- package/esm/models/toolsearchservertool.js +20 -0
- package/esm/models/toolsearchservertoolconfig.d.ts +18 -0
- package/esm/models/toolsearchservertoolconfig.js +18 -0
- package/jsr.json +1 -1
- package/package.json +9 -9
|
@@ -14,5 +14,5 @@ import { Result } from "../types/fp.js";
|
|
|
14
14
|
* @remarks
|
|
15
15
|
* Submits an embedding request to the embeddings router
|
|
16
16
|
*/
|
|
17
|
-
export declare function embeddingsGenerate(client: OpenRouterCore, request: operations.CreateEmbeddingsRequest, options?: RequestOptions): APIPromise<Result<operations.CreateEmbeddingsResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.PaymentRequiredResponseError | errors.NotFoundResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | errors.BadGatewayResponseError | errors.ServiceUnavailableResponseError | errors.EdgeNetworkTimeoutResponseError | errors.ProviderOverloadedResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
17
|
+
export declare function embeddingsGenerate(client: OpenRouterCore, request: operations.CreateEmbeddingsRequest, options?: RequestOptions): APIPromise<Result<operations.CreateEmbeddingsResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.PaymentRequiredResponseError | errors.NotFoundResponseError | errors.RequestTimeoutResponseError | errors.PayloadTooLargeResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | errors.BadGatewayResponseError | errors.ServiceUnavailableResponseError | errors.EdgeNetworkTimeoutResponseError | errors.ProviderOverloadedResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
18
18
|
//# sourceMappingURL=embeddingsGenerate.d.ts.map
|
|
@@ -90,7 +90,7 @@ async function $do(client, request, options) {
|
|
|
90
90
|
};
|
|
91
91
|
const [result] = await M.match(M.json(200, operations.CreateEmbeddingsResponse$inboundSchema), M.text(200, operations.CreateEmbeddingsResponse$inboundSchema, {
|
|
92
92
|
ctype: "text/event-stream",
|
|
93
|
-
}), M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(402, errors.PaymentRequiredResponseError$inboundSchema), M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), M.jsonErr(429, errors.TooManyRequestsResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), M.jsonErr(502, errors.BadGatewayResponseError$inboundSchema), M.jsonErr(503, errors.ServiceUnavailableResponseError$inboundSchema), M.jsonErr(524, errors.EdgeNetworkTimeoutResponseError$inboundSchema), M.jsonErr(529, errors.ProviderOverloadedResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
93
|
+
}), M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(402, errors.PaymentRequiredResponseError$inboundSchema), M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), M.jsonErr(408, errors.RequestTimeoutResponseError$inboundSchema), M.jsonErr(413, errors.PayloadTooLargeResponseError$inboundSchema), M.jsonErr(429, errors.TooManyRequestsResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), M.jsonErr(502, errors.BadGatewayResponseError$inboundSchema), M.jsonErr(503, errors.ServiceUnavailableResponseError$inboundSchema), M.jsonErr(524, errors.EdgeNetworkTimeoutResponseError$inboundSchema), M.jsonErr(529, errors.ProviderOverloadedResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
94
94
|
if (!result.ok) {
|
|
95
95
|
return [result, { status: "complete", request: req, response }];
|
|
96
96
|
}
|
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.2.
|
|
53
|
+
readonly sdkVersion: "1.2.54";
|
|
54
54
|
readonly genVersion: "2.914.0";
|
|
55
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.2.
|
|
55
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.2.54 2.914.0 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.2.
|
|
32
|
+
sdkVersion: "1.2.54",
|
|
33
33
|
genVersion: "2.914.0",
|
|
34
|
-
userAgent: "speakeasy-sdk/typescript 1.2.
|
|
34
|
+
userAgent: "speakeasy-sdk/typescript 1.2.54 2.914.0 1.0.0 @openrouter/sdk",
|
|
35
35
|
};
|
|
36
36
|
//# sourceMappingURL=config.js.map
|
|
@@ -23,6 +23,7 @@ import { SearchModelsServerToolOpenRouter, SearchModelsServerToolOpenRouter$Outb
|
|
|
23
23
|
import { ShellServerTool, ShellServerTool$Outbound } from "./shellservertool.js";
|
|
24
24
|
import { ShellServerToolOpenRouter, ShellServerToolOpenRouter$Outbound } from "./shellservertoolopenrouter.js";
|
|
25
25
|
import { SubagentServerToolOpenRouter, SubagentServerToolOpenRouter$Outbound } from "./subagentservertoolopenrouter.js";
|
|
26
|
+
import { ToolSearchServerTool, ToolSearchServerTool$Outbound } from "./toolsearchservertool.js";
|
|
26
27
|
import { WebFetchServerTool, WebFetchServerTool$Outbound } from "./webfetchservertool.js";
|
|
27
28
|
import { WebSearchServerTool, WebSearchServerTool$Outbound } from "./websearchservertool.js";
|
|
28
29
|
import { WebSearchServerToolOpenRouter, WebSearchServerToolOpenRouter$Outbound } from "./websearchservertoolopenrouter.js";
|
|
@@ -58,8 +59,12 @@ export type AdditionalToolsItemToolFunction = {
|
|
|
58
59
|
} | null;
|
|
59
60
|
strict?: boolean | null | undefined;
|
|
60
61
|
type: AdditionalToolsItemTypeFunction;
|
|
62
|
+
/**
|
|
63
|
+
* Withhold this tool from the model until `openrouter:tool_search` finds it. Requires the tool search server tool; at least one tool must remain non-deferred.
|
|
64
|
+
*/
|
|
65
|
+
deferLoading?: boolean | undefined;
|
|
61
66
|
};
|
|
62
|
-
export type AdditionalToolsItemToolUnion = ComputerUseServerTool | NamespaceTool | AdditionalToolsItemToolFunction | FileSearchServerTool | CodeInterpreterServerTool | McpServerTool | CustomTool | PreviewWebSearchServerTool | Preview20250311WebSearchServerTool | LegacyWebSearchServerTool | WebSearchServerTool | ImageGenerationServerTool | CodexLocalShellTool | ShellServerTool | ApplyPatchServerTool | AdvisorServerToolOpenRouter | SubagentServerToolOpenRouter | DatetimeServerTool | FilesServerTool | FusionServerToolOpenRouter | ImageGenerationServerToolOpenRouter | SearchModelsServerToolOpenRouter | WebFetchServerTool | WebSearchServerToolOpenRouter | ApplyPatchServerToolOpenRouter | BashServerTool | ShellServerToolOpenRouter | AdditionalToolsItemTool;
|
|
67
|
+
export type AdditionalToolsItemToolUnion = ComputerUseServerTool | NamespaceTool | AdditionalToolsItemToolFunction | FileSearchServerTool | CodeInterpreterServerTool | McpServerTool | CustomTool | PreviewWebSearchServerTool | Preview20250311WebSearchServerTool | LegacyWebSearchServerTool | WebSearchServerTool | ImageGenerationServerTool | CodexLocalShellTool | ShellServerTool | ApplyPatchServerTool | AdvisorServerToolOpenRouter | SubagentServerToolOpenRouter | DatetimeServerTool | FilesServerTool | FusionServerToolOpenRouter | ImageGenerationServerToolOpenRouter | SearchModelsServerToolOpenRouter | WebFetchServerTool | WebSearchServerToolOpenRouter | ApplyPatchServerToolOpenRouter | BashServerTool | ShellServerToolOpenRouter | ToolSearchServerTool | AdditionalToolsItemTool;
|
|
63
68
|
export declare const TypeAdditionalTools: {
|
|
64
69
|
readonly AdditionalTools: "additional_tools";
|
|
65
70
|
};
|
|
@@ -70,7 +75,7 @@ export type TypeAdditionalTools = ClosedEnum<typeof TypeAdditionalTools>;
|
|
|
70
75
|
export type AdditionalToolsItem = {
|
|
71
76
|
id?: string | null | undefined;
|
|
72
77
|
role: AdditionalToolsItemRole;
|
|
73
|
-
tools: Array<ComputerUseServerTool | NamespaceTool | AdditionalToolsItemToolFunction | FileSearchServerTool | CodeInterpreterServerTool | McpServerTool | CustomTool | PreviewWebSearchServerTool | Preview20250311WebSearchServerTool | LegacyWebSearchServerTool | WebSearchServerTool | ImageGenerationServerTool | CodexLocalShellTool | ShellServerTool | ApplyPatchServerTool | AdvisorServerToolOpenRouter | SubagentServerToolOpenRouter | DatetimeServerTool | FilesServerTool | FusionServerToolOpenRouter | ImageGenerationServerToolOpenRouter | SearchModelsServerToolOpenRouter | WebFetchServerTool | WebSearchServerToolOpenRouter | ApplyPatchServerToolOpenRouter | BashServerTool | ShellServerToolOpenRouter | AdditionalToolsItemTool>;
|
|
78
|
+
tools: Array<ComputerUseServerTool | NamespaceTool | AdditionalToolsItemToolFunction | FileSearchServerTool | CodeInterpreterServerTool | McpServerTool | CustomTool | PreviewWebSearchServerTool | Preview20250311WebSearchServerTool | LegacyWebSearchServerTool | WebSearchServerTool | ImageGenerationServerTool | CodexLocalShellTool | ShellServerTool | ApplyPatchServerTool | AdvisorServerToolOpenRouter | SubagentServerToolOpenRouter | DatetimeServerTool | FilesServerTool | FusionServerToolOpenRouter | ImageGenerationServerToolOpenRouter | SearchModelsServerToolOpenRouter | WebFetchServerTool | WebSearchServerToolOpenRouter | ApplyPatchServerToolOpenRouter | BashServerTool | ShellServerToolOpenRouter | ToolSearchServerTool | AdditionalToolsItemTool>;
|
|
74
79
|
type: TypeAdditionalTools;
|
|
75
80
|
};
|
|
76
81
|
/** @internal */
|
|
@@ -94,12 +99,13 @@ export type AdditionalToolsItemToolFunction$Outbound = {
|
|
|
94
99
|
} | null;
|
|
95
100
|
strict?: boolean | null | undefined;
|
|
96
101
|
type: string;
|
|
102
|
+
defer_loading?: boolean | undefined;
|
|
97
103
|
};
|
|
98
104
|
/** @internal */
|
|
99
105
|
export declare const AdditionalToolsItemToolFunction$outboundSchema: z.ZodType<AdditionalToolsItemToolFunction$Outbound, AdditionalToolsItemToolFunction>;
|
|
100
106
|
export declare function additionalToolsItemToolFunctionToJSON(additionalToolsItemToolFunction: AdditionalToolsItemToolFunction): string;
|
|
101
107
|
/** @internal */
|
|
102
|
-
export type AdditionalToolsItemToolUnion$Outbound = ComputerUseServerTool$Outbound | NamespaceTool$Outbound | AdditionalToolsItemToolFunction$Outbound | FileSearchServerTool$Outbound | CodeInterpreterServerTool$Outbound | McpServerTool$Outbound | CustomTool$Outbound | PreviewWebSearchServerTool$Outbound | Preview20250311WebSearchServerTool$Outbound | LegacyWebSearchServerTool$Outbound | WebSearchServerTool$Outbound | ImageGenerationServerTool$Outbound | CodexLocalShellTool$Outbound | ShellServerTool$Outbound | ApplyPatchServerTool$Outbound | AdvisorServerToolOpenRouter$Outbound | SubagentServerToolOpenRouter$Outbound | DatetimeServerTool$Outbound | FilesServerTool$Outbound | FusionServerToolOpenRouter$Outbound | ImageGenerationServerToolOpenRouter$Outbound | SearchModelsServerToolOpenRouter$Outbound | WebFetchServerTool$Outbound | WebSearchServerToolOpenRouter$Outbound | ApplyPatchServerToolOpenRouter$Outbound | BashServerTool$Outbound | ShellServerToolOpenRouter$Outbound | AdditionalToolsItemTool$Outbound;
|
|
108
|
+
export type AdditionalToolsItemToolUnion$Outbound = ComputerUseServerTool$Outbound | NamespaceTool$Outbound | AdditionalToolsItemToolFunction$Outbound | FileSearchServerTool$Outbound | CodeInterpreterServerTool$Outbound | McpServerTool$Outbound | CustomTool$Outbound | PreviewWebSearchServerTool$Outbound | Preview20250311WebSearchServerTool$Outbound | LegacyWebSearchServerTool$Outbound | WebSearchServerTool$Outbound | ImageGenerationServerTool$Outbound | CodexLocalShellTool$Outbound | ShellServerTool$Outbound | ApplyPatchServerTool$Outbound | AdvisorServerToolOpenRouter$Outbound | SubagentServerToolOpenRouter$Outbound | DatetimeServerTool$Outbound | FilesServerTool$Outbound | FusionServerToolOpenRouter$Outbound | ImageGenerationServerToolOpenRouter$Outbound | SearchModelsServerToolOpenRouter$Outbound | WebFetchServerTool$Outbound | WebSearchServerToolOpenRouter$Outbound | ApplyPatchServerToolOpenRouter$Outbound | BashServerTool$Outbound | ShellServerToolOpenRouter$Outbound | ToolSearchServerTool$Outbound | AdditionalToolsItemTool$Outbound;
|
|
103
109
|
/** @internal */
|
|
104
110
|
export declare const AdditionalToolsItemToolUnion$outboundSchema: z.ZodType<AdditionalToolsItemToolUnion$Outbound, AdditionalToolsItemToolUnion>;
|
|
105
111
|
export declare function additionalToolsItemToolUnionToJSON(additionalToolsItemToolUnion: AdditionalToolsItemToolUnion): string;
|
|
@@ -109,7 +115,7 @@ export declare const TypeAdditionalTools$outboundSchema: z.ZodEnum<typeof TypeAd
|
|
|
109
115
|
export type AdditionalToolsItem$Outbound = {
|
|
110
116
|
id?: string | null | undefined;
|
|
111
117
|
role: string;
|
|
112
|
-
tools: Array<ComputerUseServerTool$Outbound | NamespaceTool$Outbound | AdditionalToolsItemToolFunction$Outbound | FileSearchServerTool$Outbound | CodeInterpreterServerTool$Outbound | McpServerTool$Outbound | CustomTool$Outbound | PreviewWebSearchServerTool$Outbound | Preview20250311WebSearchServerTool$Outbound | LegacyWebSearchServerTool$Outbound | WebSearchServerTool$Outbound | ImageGenerationServerTool$Outbound | CodexLocalShellTool$Outbound | ShellServerTool$Outbound | ApplyPatchServerTool$Outbound | AdvisorServerToolOpenRouter$Outbound | SubagentServerToolOpenRouter$Outbound | DatetimeServerTool$Outbound | FilesServerTool$Outbound | FusionServerToolOpenRouter$Outbound | ImageGenerationServerToolOpenRouter$Outbound | SearchModelsServerToolOpenRouter$Outbound | WebFetchServerTool$Outbound | WebSearchServerToolOpenRouter$Outbound | ApplyPatchServerToolOpenRouter$Outbound | BashServerTool$Outbound | ShellServerToolOpenRouter$Outbound | AdditionalToolsItemTool$Outbound>;
|
|
118
|
+
tools: Array<ComputerUseServerTool$Outbound | NamespaceTool$Outbound | AdditionalToolsItemToolFunction$Outbound | FileSearchServerTool$Outbound | CodeInterpreterServerTool$Outbound | McpServerTool$Outbound | CustomTool$Outbound | PreviewWebSearchServerTool$Outbound | Preview20250311WebSearchServerTool$Outbound | LegacyWebSearchServerTool$Outbound | WebSearchServerTool$Outbound | ImageGenerationServerTool$Outbound | CodexLocalShellTool$Outbound | ShellServerTool$Outbound | ApplyPatchServerTool$Outbound | AdvisorServerToolOpenRouter$Outbound | SubagentServerToolOpenRouter$Outbound | DatetimeServerTool$Outbound | FilesServerTool$Outbound | FusionServerToolOpenRouter$Outbound | ImageGenerationServerToolOpenRouter$Outbound | SearchModelsServerToolOpenRouter$Outbound | WebFetchServerTool$Outbound | WebSearchServerToolOpenRouter$Outbound | ApplyPatchServerToolOpenRouter$Outbound | BashServerTool$Outbound | ShellServerToolOpenRouter$Outbound | ToolSearchServerTool$Outbound | AdditionalToolsItemTool$Outbound>;
|
|
113
119
|
type: string;
|
|
114
120
|
};
|
|
115
121
|
/** @internal */
|
|
@@ -28,6 +28,7 @@ import { SearchModelsServerToolOpenRouter$outboundSchema, } from "./searchmodels
|
|
|
28
28
|
import { ShellServerTool$outboundSchema, } from "./shellservertool.js";
|
|
29
29
|
import { ShellServerToolOpenRouter$outboundSchema, } from "./shellservertoolopenrouter.js";
|
|
30
30
|
import { SubagentServerToolOpenRouter$outboundSchema, } from "./subagentservertoolopenrouter.js";
|
|
31
|
+
import { ToolSearchServerTool$outboundSchema, } from "./toolsearchservertool.js";
|
|
31
32
|
import { WebFetchServerTool$outboundSchema, } from "./webfetchservertool.js";
|
|
32
33
|
import { WebSearchServerTool$outboundSchema, } from "./websearchservertool.js";
|
|
33
34
|
import { WebSearchServerToolOpenRouter$outboundSchema, } from "./websearchservertoolopenrouter.js";
|
|
@@ -73,6 +74,11 @@ export const AdditionalToolsItemToolFunction$outboundSchema = z.object({
|
|
|
73
74
|
parameters: z.nullable(z.record(z.string(), z.any())),
|
|
74
75
|
strict: z.nullable(z.boolean()).optional(),
|
|
75
76
|
type: AdditionalToolsItemTypeFunction$outboundSchema,
|
|
77
|
+
deferLoading: z.boolean().optional(),
|
|
78
|
+
}).transform((v) => {
|
|
79
|
+
return remap$(v, {
|
|
80
|
+
deferLoading: "defer_loading",
|
|
81
|
+
});
|
|
76
82
|
});
|
|
77
83
|
export function additionalToolsItemToolFunctionToJSON(additionalToolsItemToolFunction) {
|
|
78
84
|
return JSON.stringify(AdditionalToolsItemToolFunction$outboundSchema.parse(additionalToolsItemToolFunction));
|
|
@@ -106,6 +112,7 @@ export const AdditionalToolsItemToolUnion$outboundSchema = z.union([
|
|
|
106
112
|
ApplyPatchServerToolOpenRouter$outboundSchema,
|
|
107
113
|
BashServerTool$outboundSchema,
|
|
108
114
|
ShellServerToolOpenRouter$outboundSchema,
|
|
115
|
+
ToolSearchServerTool$outboundSchema,
|
|
109
116
|
z.lazy(() => AdditionalToolsItemTool$outboundSchema),
|
|
110
117
|
]);
|
|
111
118
|
export function additionalToolsItemToolUnionToJSON(additionalToolsItemToolUnion) {
|
|
@@ -145,6 +152,7 @@ export const AdditionalToolsItem$outboundSchema = z.object({
|
|
|
145
152
|
ApplyPatchServerToolOpenRouter$outboundSchema,
|
|
146
153
|
BashServerTool$outboundSchema,
|
|
147
154
|
ShellServerToolOpenRouter$outboundSchema,
|
|
155
|
+
ToolSearchServerTool$outboundSchema,
|
|
148
156
|
z.lazy(() => AdditionalToolsItemTool$outboundSchema),
|
|
149
157
|
])),
|
|
150
158
|
type: TypeAdditionalTools$outboundSchema,
|
package/esm/models/index.d.ts
CHANGED
|
@@ -555,6 +555,8 @@ export * from "./textdoneevent.js";
|
|
|
555
555
|
export * from "./textextendedconfig.js";
|
|
556
556
|
export * from "./toolcallstatus.js";
|
|
557
557
|
export * from "./toolchoiceallowed.js";
|
|
558
|
+
export * from "./toolsearchservertool.js";
|
|
559
|
+
export * from "./toolsearchservertoolconfig.js";
|
|
558
560
|
export * from "./toomanyrequestsresponseerrordata.js";
|
|
559
561
|
export * from "./topproviderinfo.js";
|
|
560
562
|
export * from "./traceconfig.js";
|
package/esm/models/index.js
CHANGED
|
@@ -559,6 +559,8 @@ export * from "./textdoneevent.js";
|
|
|
559
559
|
export * from "./textextendedconfig.js";
|
|
560
560
|
export * from "./toolcallstatus.js";
|
|
561
561
|
export * from "./toolchoiceallowed.js";
|
|
562
|
+
export * from "./toolsearchservertool.js";
|
|
563
|
+
export * from "./toolsearchservertoolconfig.js";
|
|
562
564
|
export * from "./toomanyrequestsresponseerrordata.js";
|
|
563
565
|
export * from "./topproviderinfo.js";
|
|
564
566
|
export * from "./traceconfig.js";
|
|
@@ -31,6 +31,7 @@ import { ProviderPreferences, ProviderPreferences$Outbound } from "./providerpre
|
|
|
31
31
|
import { ResponseHealingPlugin, ResponseHealingPlugin$Outbound } from "./responsehealingplugin.js";
|
|
32
32
|
import { ShellServerToolOpenRouter, ShellServerToolOpenRouter$Outbound } from "./shellservertoolopenrouter.js";
|
|
33
33
|
import { StopServerToolsWhenCondition, StopServerToolsWhenCondition$Outbound } from "./stopservertoolswhencondition.js";
|
|
34
|
+
import { ToolSearchServerTool, ToolSearchServerTool$Outbound } from "./toolsearchservertool.js";
|
|
34
35
|
import { TraceConfig, TraceConfig$Outbound } from "./traceconfig.js";
|
|
35
36
|
import { WebFetchPlugin, WebFetchPlugin$Outbound } from "./webfetchplugin.js";
|
|
36
37
|
import { WebFetchServerTool, WebFetchServerTool$Outbound } from "./webfetchservertool.js";
|
|
@@ -248,7 +249,7 @@ export type ToolCustom = {
|
|
|
248
249
|
name: string;
|
|
249
250
|
type?: ToolTypeCustom | undefined;
|
|
250
251
|
};
|
|
251
|
-
export type MessagesRequestToolUnion = ToolAdvisor20260301 | ToolCustom | ToolBash20250124 | ToolTextEditor20250124 | ToolWebSearch20250305 | ToolWebSearch20260209 | AnthropicToolSearchToolBm25 | AnthropicToolSearchToolRegex | BashServerTool | DatetimeServerTool | ImageGenerationServerToolOpenRouter | MessagesSearchModelsServerTool | WebFetchServerTool | OpenRouterWebSearchServerTool | MessagesRequestTool | ShellServerToolOpenRouter;
|
|
252
|
+
export type MessagesRequestToolUnion = ToolAdvisor20260301 | ToolCustom | ToolBash20250124 | ToolTextEditor20250124 | ToolWebSearch20250305 | ToolWebSearch20260209 | AnthropicToolSearchToolBm25 | AnthropicToolSearchToolRegex | BashServerTool | DatetimeServerTool | ImageGenerationServerToolOpenRouter | MessagesSearchModelsServerTool | WebFetchServerTool | OpenRouterWebSearchServerTool | MessagesRequestTool | ShellServerToolOpenRouter | ToolSearchServerTool;
|
|
252
253
|
/**
|
|
253
254
|
* Request schema for Anthropic Messages API endpoint
|
|
254
255
|
*/
|
|
@@ -295,7 +296,7 @@ export type MessagesRequest = {
|
|
|
295
296
|
temperature?: number | undefined;
|
|
296
297
|
thinking?: ThinkingEnabled | ThinkingDisabled | ThinkingAdaptive | undefined;
|
|
297
298
|
toolChoice?: ToolChoiceAuto | ToolChoiceAny | ToolChoiceNone | ToolChoiceTool | undefined;
|
|
298
|
-
tools?: Array<ToolAdvisor20260301 | ToolCustom | ToolBash20250124 | ToolTextEditor20250124 | ToolWebSearch20250305 | ToolWebSearch20260209 | AnthropicToolSearchToolBm25 | AnthropicToolSearchToolRegex | BashServerTool | DatetimeServerTool | ImageGenerationServerToolOpenRouter | MessagesSearchModelsServerTool | WebFetchServerTool | OpenRouterWebSearchServerTool | MessagesRequestTool | ShellServerToolOpenRouter> | undefined;
|
|
299
|
+
tools?: Array<ToolAdvisor20260301 | ToolCustom | ToolBash20250124 | ToolTextEditor20250124 | ToolWebSearch20250305 | ToolWebSearch20260209 | AnthropicToolSearchToolBm25 | AnthropicToolSearchToolRegex | BashServerTool | DatetimeServerTool | ImageGenerationServerToolOpenRouter | MessagesSearchModelsServerTool | WebFetchServerTool | OpenRouterWebSearchServerTool | MessagesRequestTool | ShellServerToolOpenRouter | ToolSearchServerTool> | undefined;
|
|
299
300
|
topK?: number | undefined;
|
|
300
301
|
topP?: number | undefined;
|
|
301
302
|
/**
|
|
@@ -582,7 +583,7 @@ export type ToolCustom$Outbound = {
|
|
|
582
583
|
export declare const ToolCustom$outboundSchema: z.ZodType<ToolCustom$Outbound, ToolCustom>;
|
|
583
584
|
export declare function toolCustomToJSON(toolCustom: ToolCustom): string;
|
|
584
585
|
/** @internal */
|
|
585
|
-
export type MessagesRequestToolUnion$Outbound = ToolAdvisor20260301$Outbound | ToolCustom$Outbound | ToolBash20250124$Outbound | ToolTextEditor20250124$Outbound | ToolWebSearch20250305$Outbound | ToolWebSearch20260209$Outbound | AnthropicToolSearchToolBm25$Outbound | AnthropicToolSearchToolRegex$Outbound | BashServerTool$Outbound | DatetimeServerTool$Outbound | ImageGenerationServerToolOpenRouter$Outbound | MessagesSearchModelsServerTool$Outbound | WebFetchServerTool$Outbound | OpenRouterWebSearchServerTool$Outbound | MessagesRequestTool$Outbound | ShellServerToolOpenRouter$Outbound;
|
|
586
|
+
export type MessagesRequestToolUnion$Outbound = ToolAdvisor20260301$Outbound | ToolCustom$Outbound | ToolBash20250124$Outbound | ToolTextEditor20250124$Outbound | ToolWebSearch20250305$Outbound | ToolWebSearch20260209$Outbound | AnthropicToolSearchToolBm25$Outbound | AnthropicToolSearchToolRegex$Outbound | BashServerTool$Outbound | DatetimeServerTool$Outbound | ImageGenerationServerToolOpenRouter$Outbound | MessagesSearchModelsServerTool$Outbound | WebFetchServerTool$Outbound | OpenRouterWebSearchServerTool$Outbound | MessagesRequestTool$Outbound | ShellServerToolOpenRouter$Outbound | ToolSearchServerTool$Outbound;
|
|
586
587
|
/** @internal */
|
|
587
588
|
export declare const MessagesRequestToolUnion$outboundSchema: z.ZodType<MessagesRequestToolUnion$Outbound, MessagesRequestToolUnion>;
|
|
588
589
|
export declare function messagesRequestToolUnionToJSON(messagesRequestToolUnion: MessagesRequestToolUnion): string;
|
|
@@ -609,7 +610,7 @@ export type MessagesRequest$Outbound = {
|
|
|
609
610
|
temperature?: number | undefined;
|
|
610
611
|
thinking?: ThinkingEnabled$Outbound | ThinkingDisabled$Outbound | ThinkingAdaptive$Outbound | undefined;
|
|
611
612
|
tool_choice?: ToolChoiceAuto$Outbound | ToolChoiceAny$Outbound | ToolChoiceNone$Outbound | ToolChoiceTool$Outbound | undefined;
|
|
612
|
-
tools?: Array<ToolAdvisor20260301$Outbound | ToolCustom$Outbound | ToolBash20250124$Outbound | ToolTextEditor20250124$Outbound | ToolWebSearch20250305$Outbound | ToolWebSearch20260209$Outbound | AnthropicToolSearchToolBm25$Outbound | AnthropicToolSearchToolRegex$Outbound | BashServerTool$Outbound | DatetimeServerTool$Outbound | ImageGenerationServerToolOpenRouter$Outbound | MessagesSearchModelsServerTool$Outbound | WebFetchServerTool$Outbound | OpenRouterWebSearchServerTool$Outbound | MessagesRequestTool$Outbound | ShellServerToolOpenRouter$Outbound> | undefined;
|
|
613
|
+
tools?: Array<ToolAdvisor20260301$Outbound | ToolCustom$Outbound | ToolBash20250124$Outbound | ToolTextEditor20250124$Outbound | ToolWebSearch20250305$Outbound | ToolWebSearch20260209$Outbound | AnthropicToolSearchToolBm25$Outbound | AnthropicToolSearchToolRegex$Outbound | BashServerTool$Outbound | DatetimeServerTool$Outbound | ImageGenerationServerToolOpenRouter$Outbound | MessagesSearchModelsServerTool$Outbound | WebFetchServerTool$Outbound | OpenRouterWebSearchServerTool$Outbound | MessagesRequestTool$Outbound | ShellServerToolOpenRouter$Outbound | ToolSearchServerTool$Outbound> | undefined;
|
|
613
614
|
top_k?: number | undefined;
|
|
614
615
|
top_p?: number | undefined;
|
|
615
616
|
trace?: TraceConfig$Outbound | undefined;
|
|
@@ -36,6 +36,7 @@ import { ProviderPreferences$outboundSchema, } from "./providerpreferences.js";
|
|
|
36
36
|
import { ResponseHealingPlugin$outboundSchema, } from "./responsehealingplugin.js";
|
|
37
37
|
import { ShellServerToolOpenRouter$outboundSchema, } from "./shellservertoolopenrouter.js";
|
|
38
38
|
import { StopServerToolsWhenCondition$outboundSchema, } from "./stopservertoolswhencondition.js";
|
|
39
|
+
import { ToolSearchServerTool$outboundSchema, } from "./toolsearchservertool.js";
|
|
39
40
|
import { TraceConfig$outboundSchema, } from "./traceconfig.js";
|
|
40
41
|
import { WebFetchPlugin$outboundSchema, } from "./webfetchplugin.js";
|
|
41
42
|
import { WebFetchServerTool$outboundSchema, } from "./webfetchservertool.js";
|
|
@@ -518,6 +519,7 @@ export const MessagesRequestToolUnion$outboundSchema = z.union([
|
|
|
518
519
|
OpenRouterWebSearchServerTool$outboundSchema,
|
|
519
520
|
z.lazy(() => MessagesRequestTool$outboundSchema),
|
|
520
521
|
ShellServerToolOpenRouter$outboundSchema,
|
|
522
|
+
ToolSearchServerTool$outboundSchema,
|
|
521
523
|
]);
|
|
522
524
|
export function messagesRequestToolUnionToJSON(messagesRequestToolUnion) {
|
|
523
525
|
return JSON.stringify(MessagesRequestToolUnion$outboundSchema.parse(messagesRequestToolUnion));
|
|
@@ -586,6 +588,7 @@ export const MessagesRequest$outboundSchema = z.object({
|
|
|
586
588
|
OpenRouterWebSearchServerTool$outboundSchema,
|
|
587
589
|
z.lazy(() => MessagesRequestTool$outboundSchema),
|
|
588
590
|
ShellServerToolOpenRouter$outboundSchema,
|
|
591
|
+
ToolSearchServerTool$outboundSchema,
|
|
589
592
|
])).optional(),
|
|
590
593
|
topK: z.int().optional(),
|
|
591
594
|
topP: z.number().optional(),
|
|
@@ -46,6 +46,10 @@ export type OpenResponsesResultToolFunction = {
|
|
|
46
46
|
} | null;
|
|
47
47
|
strict?: boolean | null | undefined;
|
|
48
48
|
type: "function";
|
|
49
|
+
/**
|
|
50
|
+
* Withhold this tool from the model until `openrouter:tool_search` finds it. Requires the tool search server tool; at least one tool must remain non-deferred.
|
|
51
|
+
*/
|
|
52
|
+
deferLoading?: boolean | undefined;
|
|
49
53
|
};
|
|
50
54
|
export type OpenResponsesResultToolUnion = OpenResponsesResultToolFunction | (PreviewWebSearchServerTool & {
|
|
51
55
|
type: "web_search_preview";
|
|
@@ -46,6 +46,11 @@ export const OpenResponsesResultToolFunction$inboundSchema = z.object({
|
|
|
46
46
|
parameters: z.nullable(z.record(z.string(), z.any())),
|
|
47
47
|
strict: z.nullable(z.boolean()).optional(),
|
|
48
48
|
type: z.literal("function"),
|
|
49
|
+
defer_loading: z.boolean().optional(),
|
|
50
|
+
}).transform((v) => {
|
|
51
|
+
return remap$(v, {
|
|
52
|
+
"defer_loading": "deferLoading",
|
|
53
|
+
});
|
|
49
54
|
});
|
|
50
55
|
export function openResponsesResultToolFunctionFromJSON(jsonString) {
|
|
51
56
|
return safeParse(jsonString, (x) => OpenResponsesResultToolFunction$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OpenResponsesResultToolFunction' from JSON`);
|
|
@@ -48,6 +48,7 @@ import { StopServerToolsWhenCondition, StopServerToolsWhenCondition$Outbound } f
|
|
|
48
48
|
import { StoredPromptTemplate, StoredPromptTemplate$Outbound } from "./storedprompttemplate.js";
|
|
49
49
|
import { SubagentServerToolOpenRouter, SubagentServerToolOpenRouter$Outbound } from "./subagentservertoolopenrouter.js";
|
|
50
50
|
import { TextExtendedConfig, TextExtendedConfig$Outbound } from "./textextendedconfig.js";
|
|
51
|
+
import { ToolSearchServerTool, ToolSearchServerTool$Outbound } from "./toolsearchservertool.js";
|
|
51
52
|
import { TraceConfig, TraceConfig$Outbound } from "./traceconfig.js";
|
|
52
53
|
import { WebFetchPlugin, WebFetchPlugin$Outbound } from "./webfetchplugin.js";
|
|
53
54
|
import { WebFetchServerTool, WebFetchServerTool$Outbound } from "./webfetchservertool.js";
|
|
@@ -95,6 +96,10 @@ export type ResponsesRequestToolFunction = {
|
|
|
95
96
|
} | null;
|
|
96
97
|
strict?: boolean | null | undefined;
|
|
97
98
|
type: "function";
|
|
99
|
+
/**
|
|
100
|
+
* Withhold this tool from the model until `openrouter:tool_search` finds it. Requires the tool search server tool; at least one tool must remain non-deferred.
|
|
101
|
+
*/
|
|
102
|
+
deferLoading?: boolean | undefined;
|
|
98
103
|
};
|
|
99
104
|
export type ResponsesRequestToolUnion = ResponsesRequestToolFunction | (PreviewWebSearchServerTool & {
|
|
100
105
|
type: "web_search_preview";
|
|
@@ -148,6 +153,8 @@ export type ResponsesRequestToolUnion = ResponsesRequestToolFunction | (PreviewW
|
|
|
148
153
|
type: "openrouter:bash";
|
|
149
154
|
}) | (ShellServerToolOpenRouter & {
|
|
150
155
|
type: "openrouter:shell";
|
|
156
|
+
}) | (ToolSearchServerTool & {
|
|
157
|
+
type: "openrouter:tool_search";
|
|
151
158
|
});
|
|
152
159
|
/**
|
|
153
160
|
* Request schema for Responses endpoint
|
|
@@ -292,6 +299,8 @@ export type ResponsesRequest = {
|
|
|
292
299
|
type: "openrouter:bash";
|
|
293
300
|
}) | (ShellServerToolOpenRouter & {
|
|
294
301
|
type: "openrouter:shell";
|
|
302
|
+
}) | (ToolSearchServerTool & {
|
|
303
|
+
type: "openrouter:tool_search";
|
|
295
304
|
})> | undefined;
|
|
296
305
|
topK?: number | undefined;
|
|
297
306
|
topLogprobs?: number | null | undefined;
|
|
@@ -334,6 +343,7 @@ export type ResponsesRequestToolFunction$Outbound = {
|
|
|
334
343
|
} | null;
|
|
335
344
|
strict?: boolean | null | undefined;
|
|
336
345
|
type: "function";
|
|
346
|
+
defer_loading?: boolean | undefined;
|
|
337
347
|
};
|
|
338
348
|
/** @internal */
|
|
339
349
|
export declare const ResponsesRequestToolFunction$outboundSchema: z.ZodType<ResponsesRequestToolFunction$Outbound, ResponsesRequestToolFunction>;
|
|
@@ -391,6 +401,8 @@ export type ResponsesRequestToolUnion$Outbound = ResponsesRequestToolFunction$Ou
|
|
|
391
401
|
type: "openrouter:bash";
|
|
392
402
|
}) | (ShellServerToolOpenRouter$Outbound & {
|
|
393
403
|
type: "openrouter:shell";
|
|
404
|
+
}) | (ToolSearchServerTool$Outbound & {
|
|
405
|
+
type: "openrouter:tool_search";
|
|
394
406
|
});
|
|
395
407
|
/** @internal */
|
|
396
408
|
export declare const ResponsesRequestToolUnion$outboundSchema: z.ZodType<ResponsesRequestToolUnion$Outbound, ResponsesRequestToolUnion>;
|
|
@@ -485,6 +497,8 @@ export type ResponsesRequest$Outbound = {
|
|
|
485
497
|
type: "openrouter:bash";
|
|
486
498
|
}) | (ShellServerToolOpenRouter$Outbound & {
|
|
487
499
|
type: "openrouter:shell";
|
|
500
|
+
}) | (ToolSearchServerTool$Outbound & {
|
|
501
|
+
type: "openrouter:tool_search";
|
|
488
502
|
})> | undefined;
|
|
489
503
|
top_k?: number | undefined;
|
|
490
504
|
top_logprobs?: number | null | undefined;
|
|
@@ -53,6 +53,7 @@ import { StopServerToolsWhenCondition$outboundSchema, } from "./stopservertoolsw
|
|
|
53
53
|
import { StoredPromptTemplate$outboundSchema, } from "./storedprompttemplate.js";
|
|
54
54
|
import { SubagentServerToolOpenRouter$outboundSchema, } from "./subagentservertoolopenrouter.js";
|
|
55
55
|
import { TextExtendedConfig$outboundSchema, } from "./textextendedconfig.js";
|
|
56
|
+
import { ToolSearchServerTool$outboundSchema, } from "./toolsearchservertool.js";
|
|
56
57
|
import { TraceConfig$outboundSchema, } from "./traceconfig.js";
|
|
57
58
|
import { WebFetchPlugin$outboundSchema, } from "./webfetchplugin.js";
|
|
58
59
|
import { WebFetchServerTool$outboundSchema, } from "./webfetchservertool.js";
|
|
@@ -111,6 +112,11 @@ export const ResponsesRequestToolFunction$outboundSchema = z.object({
|
|
|
111
112
|
parameters: z.nullable(z.record(z.string(), z.any())),
|
|
112
113
|
strict: z.nullable(z.boolean()).optional(),
|
|
113
114
|
type: z.literal("function"),
|
|
115
|
+
deferLoading: z.boolean().optional(),
|
|
116
|
+
}).transform((v) => {
|
|
117
|
+
return remap$(v, {
|
|
118
|
+
deferLoading: "defer_loading",
|
|
119
|
+
});
|
|
114
120
|
});
|
|
115
121
|
export function responsesRequestToolFunctionToJSON(responsesRequestToolFunction) {
|
|
116
122
|
return JSON.stringify(ResponsesRequestToolFunction$outboundSchema.parse(responsesRequestToolFunction));
|
|
@@ -144,6 +150,7 @@ export const ResponsesRequestToolUnion$outboundSchema = z.union([
|
|
|
144
150
|
ApplyPatchServerToolOpenRouter$outboundSchema.and(z.object({ type: z.literal("openrouter:apply_patch") })),
|
|
145
151
|
BashServerTool$outboundSchema.and(z.object({ type: z.literal("openrouter:bash") })),
|
|
146
152
|
ShellServerToolOpenRouter$outboundSchema.and(z.object({ type: z.literal("openrouter:shell") })),
|
|
153
|
+
ToolSearchServerTool$outboundSchema.and(z.object({ type: z.literal("openrouter:tool_search") })),
|
|
147
154
|
]);
|
|
148
155
|
export function responsesRequestToolUnionToJSON(responsesRequestToolUnion) {
|
|
149
156
|
return JSON.stringify(ResponsesRequestToolUnion$outboundSchema.parse(responsesRequestToolUnion));
|
|
@@ -223,6 +230,7 @@ export const ResponsesRequest$outboundSchema = z.object({
|
|
|
223
230
|
ApplyPatchServerToolOpenRouter$outboundSchema.and(z.object({ type: z.literal("openrouter:apply_patch") })),
|
|
224
231
|
BashServerTool$outboundSchema.and(z.object({ type: z.literal("openrouter:bash") })),
|
|
225
232
|
ShellServerToolOpenRouter$outboundSchema.and(z.object({ type: z.literal("openrouter:shell") })),
|
|
233
|
+
ToolSearchServerTool$outboundSchema.and(z.object({ type: z.literal("openrouter:tool_search") })),
|
|
226
234
|
])).optional(),
|
|
227
235
|
topK: z.int().optional(),
|
|
228
236
|
topLogprobs: z.nullable(z.int()).optional(),
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
3
|
+
import { ToolSearchServerToolConfig, ToolSearchServerToolConfig$Outbound } from "./toolsearchservertoolconfig.js";
|
|
4
|
+
export declare const ToolSearchServerToolType: {
|
|
5
|
+
readonly OpenrouterToolSearch: "openrouter:tool_search";
|
|
6
|
+
};
|
|
7
|
+
export type ToolSearchServerToolType = ClosedEnum<typeof ToolSearchServerToolType>;
|
|
8
|
+
/**
|
|
9
|
+
* OpenRouter built-in server tool: finds tools marked `defer_loading` and makes them callable
|
|
10
|
+
*/
|
|
11
|
+
export type ToolSearchServerTool = {
|
|
12
|
+
/**
|
|
13
|
+
* Configuration for the openrouter:tool_search server tool
|
|
14
|
+
*/
|
|
15
|
+
parameters?: ToolSearchServerToolConfig | undefined;
|
|
16
|
+
type: ToolSearchServerToolType;
|
|
17
|
+
};
|
|
18
|
+
/** @internal */
|
|
19
|
+
export declare const ToolSearchServerToolType$outboundSchema: z.ZodEnum<typeof ToolSearchServerToolType>;
|
|
20
|
+
/** @internal */
|
|
21
|
+
export type ToolSearchServerTool$Outbound = {
|
|
22
|
+
parameters?: ToolSearchServerToolConfig$Outbound | undefined;
|
|
23
|
+
type: string;
|
|
24
|
+
};
|
|
25
|
+
/** @internal */
|
|
26
|
+
export declare const ToolSearchServerTool$outboundSchema: z.ZodType<ToolSearchServerTool$Outbound, ToolSearchServerTool>;
|
|
27
|
+
export declare function toolSearchServerToolToJSON(toolSearchServerTool: ToolSearchServerTool): string;
|
|
28
|
+
//# sourceMappingURL=toolsearchservertool.d.ts.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: de3e685fadd8
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { ToolSearchServerToolConfig$outboundSchema, } from "./toolsearchservertoolconfig.js";
|
|
7
|
+
export const ToolSearchServerToolType = {
|
|
8
|
+
OpenrouterToolSearch: "openrouter:tool_search",
|
|
9
|
+
};
|
|
10
|
+
/** @internal */
|
|
11
|
+
export const ToolSearchServerToolType$outboundSchema = z.enum(ToolSearchServerToolType);
|
|
12
|
+
/** @internal */
|
|
13
|
+
export const ToolSearchServerTool$outboundSchema = z.object({
|
|
14
|
+
parameters: ToolSearchServerToolConfig$outboundSchema.optional(),
|
|
15
|
+
type: ToolSearchServerToolType$outboundSchema,
|
|
16
|
+
});
|
|
17
|
+
export function toolSearchServerToolToJSON(toolSearchServerTool) {
|
|
18
|
+
return JSON.stringify(ToolSearchServerTool$outboundSchema.parse(toolSearchServerTool));
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=toolsearchservertool.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
/**
|
|
3
|
+
* Configuration for the openrouter:tool_search server tool
|
|
4
|
+
*/
|
|
5
|
+
export type ToolSearchServerToolConfig = {
|
|
6
|
+
/**
|
|
7
|
+
* Maximum tools returned by one search. Defaults to 5.
|
|
8
|
+
*/
|
|
9
|
+
maxResults?: number | undefined;
|
|
10
|
+
};
|
|
11
|
+
/** @internal */
|
|
12
|
+
export type ToolSearchServerToolConfig$Outbound = {
|
|
13
|
+
max_results?: number | undefined;
|
|
14
|
+
};
|
|
15
|
+
/** @internal */
|
|
16
|
+
export declare const ToolSearchServerToolConfig$outboundSchema: z.ZodType<ToolSearchServerToolConfig$Outbound, ToolSearchServerToolConfig>;
|
|
17
|
+
export declare function toolSearchServerToolConfigToJSON(toolSearchServerToolConfig: ToolSearchServerToolConfig): string;
|
|
18
|
+
//# sourceMappingURL=toolsearchservertoolconfig.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: cd3efc23b324
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export const ToolSearchServerToolConfig$outboundSchema = z.object({
|
|
9
|
+
maxResults: z.int().optional(),
|
|
10
|
+
}).transform((v) => {
|
|
11
|
+
return remap$(v, {
|
|
12
|
+
maxResults: "max_results",
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
export function toolSearchServerToolConfigToJSON(toolSearchServerToolConfig) {
|
|
16
|
+
return JSON.stringify(ToolSearchServerToolConfig$outboundSchema.parse(toolSearchServerToolConfig));
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=toolsearchservertoolconfig.js.map
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openrouter/sdk",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.54",
|
|
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
|
-
"
|
|
25
|
-
"
|
|
24
|
+
"access": "public",
|
|
25
|
+
"provenance": true
|
|
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",
|
|
75
75
|
"prepublishOnly": "npm run build",
|
|
76
|
-
"prepare": "npm run build",
|
|
77
|
-
"test:e2e": "vitest --run --project e2e",
|
|
78
|
-
"test:watch": "vitest --watch --project unit",
|
|
79
|
-
"typecheck": "tsc --noEmit",
|
|
80
|
-
"typecheck:transit": "exit 0",
|
|
81
76
|
"postinstall": "node scripts/check-types.js || true",
|
|
82
77
|
"test": "vitest --run --project unit",
|
|
78
|
+
"test:e2e": "vitest --run --project e2e",
|
|
83
79
|
"test:transit": "exit 0",
|
|
84
|
-
"
|
|
80
|
+
"test:watch": "vitest --watch --project unit",
|
|
81
|
+
"typecheck:transit": "exit 0",
|
|
82
|
+
"compile": "tsc",
|
|
83
|
+
"prepare": "npm run build",
|
|
84
|
+
"typecheck": "tsc --noEmit"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {},
|
|
87
87
|
"devDependencies": {
|