@openrouter/sdk 0.12.1 → 0.12.3
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/chatfunctiontool.d.ts +3 -2
- package/esm/models/chatfunctiontool.js +2 -0
- package/esm/models/chatsearchmodelsservertool.d.ts +28 -0
- package/esm/models/chatsearchmodelsservertool.js +20 -0
- package/esm/models/index.d.ts +2 -0
- package/esm/models/index.js +2 -0
- package/esm/models/providername.d.ts +2 -0
- package/esm/models/providername.js +2 -0
- package/esm/models/providerresponse.d.ts +2 -0
- package/esm/models/providerresponse.js +2 -0
- package/esm/models/responsesrequest.d.ts +9 -0
- package/esm/models/responsesrequest.js +3 -0
- package/esm/models/searchmodelsservertoolconfig.d.ts +18 -0
- package/esm/models/searchmodelsservertoolconfig.js +18 -0
- package/esm/models/videogenerationrequest.d.ts +12 -0
- package/esm/models/videogenerationrequest.js +2 -0
- package/jsr.json +1 -1
- package/package.json +4 -4
package/esm/lib/config.d.ts
CHANGED
|
@@ -49,8 +49,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
|
|
|
49
49
|
export declare const SDK_METADATA: {
|
|
50
50
|
readonly language: "typescript";
|
|
51
51
|
readonly openapiDocVersion: "1.0.0";
|
|
52
|
-
readonly sdkVersion: "0.12.
|
|
52
|
+
readonly sdkVersion: "0.12.3";
|
|
53
53
|
readonly genVersion: "2.879.1";
|
|
54
|
-
readonly userAgent: "speakeasy-sdk/typescript 0.12.
|
|
54
|
+
readonly userAgent: "speakeasy-sdk/typescript 0.12.3 2.879.1 1.0.0 @openrouter/sdk";
|
|
55
55
|
};
|
|
56
56
|
//# sourceMappingURL=config.d.ts.map
|
package/esm/lib/config.js
CHANGED
|
@@ -26,8 +26,8 @@ export function serverURLFromOptions(options) {
|
|
|
26
26
|
export const SDK_METADATA = {
|
|
27
27
|
language: "typescript",
|
|
28
28
|
openapiDocVersion: "1.0.0",
|
|
29
|
-
sdkVersion: "0.12.
|
|
29
|
+
sdkVersion: "0.12.3",
|
|
30
30
|
genVersion: "2.879.1",
|
|
31
|
-
userAgent: "speakeasy-sdk/typescript 0.12.
|
|
31
|
+
userAgent: "speakeasy-sdk/typescript 0.12.3 2.879.1 1.0.0 @openrouter/sdk",
|
|
32
32
|
};
|
|
33
33
|
//# sourceMappingURL=config.js.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
2
|
import { ClosedEnum } from "../types/enums.js";
|
|
3
3
|
import { ChatContentCacheControl, ChatContentCacheControl$Outbound } from "./chatcontentcachecontrol.js";
|
|
4
|
+
import { ChatSearchModelsServerTool, ChatSearchModelsServerTool$Outbound } from "./chatsearchmodelsservertool.js";
|
|
4
5
|
import { ChatWebSearchShorthand, ChatWebSearchShorthand$Outbound } from "./chatwebsearchshorthand.js";
|
|
5
6
|
import { DatetimeServerTool, DatetimeServerTool$Outbound } from "./datetimeservertool.js";
|
|
6
7
|
import { OpenRouterWebSearchServerTool, OpenRouterWebSearchServerTool$Outbound } from "./openrouterwebsearchservertool.js";
|
|
@@ -45,7 +46,7 @@ export type ChatFunctionToolFunction = {
|
|
|
45
46
|
/**
|
|
46
47
|
* Tool definition for function calling (regular function or OpenRouter built-in server tool)
|
|
47
48
|
*/
|
|
48
|
-
export type ChatFunctionTool = ChatFunctionToolFunction | DatetimeServerTool | OpenRouterWebSearchServerTool | ChatWebSearchShorthand;
|
|
49
|
+
export type ChatFunctionTool = ChatFunctionToolFunction | DatetimeServerTool | ChatSearchModelsServerTool | OpenRouterWebSearchServerTool | ChatWebSearchShorthand;
|
|
49
50
|
/** @internal */
|
|
50
51
|
export type ChatFunctionToolFunctionFunction$Outbound = {
|
|
51
52
|
description?: string | undefined;
|
|
@@ -70,7 +71,7 @@ export type ChatFunctionToolFunction$Outbound = {
|
|
|
70
71
|
export declare const ChatFunctionToolFunction$outboundSchema: z.ZodType<ChatFunctionToolFunction$Outbound, ChatFunctionToolFunction>;
|
|
71
72
|
export declare function chatFunctionToolFunctionToJSON(chatFunctionToolFunction: ChatFunctionToolFunction): string;
|
|
72
73
|
/** @internal */
|
|
73
|
-
export type ChatFunctionTool$Outbound = ChatFunctionToolFunction$Outbound | DatetimeServerTool$Outbound | OpenRouterWebSearchServerTool$Outbound | ChatWebSearchShorthand$Outbound;
|
|
74
|
+
export type ChatFunctionTool$Outbound = ChatFunctionToolFunction$Outbound | DatetimeServerTool$Outbound | ChatSearchModelsServerTool$Outbound | OpenRouterWebSearchServerTool$Outbound | ChatWebSearchShorthand$Outbound;
|
|
74
75
|
/** @internal */
|
|
75
76
|
export declare const ChatFunctionTool$outboundSchema: z.ZodType<ChatFunctionTool$Outbound, ChatFunctionTool>;
|
|
76
77
|
export declare function chatFunctionToolToJSON(chatFunctionTool: ChatFunctionTool): string;
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
6
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
7
|
import { ChatContentCacheControl$outboundSchema, } from "./chatcontentcachecontrol.js";
|
|
8
|
+
import { ChatSearchModelsServerTool$outboundSchema, } from "./chatsearchmodelsservertool.js";
|
|
8
9
|
import { ChatWebSearchShorthand$outboundSchema, } from "./chatwebsearchshorthand.js";
|
|
9
10
|
import { DatetimeServerTool$outboundSchema, } from "./datetimeservertool.js";
|
|
10
11
|
import { OpenRouterWebSearchServerTool$outboundSchema, } from "./openrouterwebsearchservertool.js";
|
|
@@ -40,6 +41,7 @@ export function chatFunctionToolFunctionToJSON(chatFunctionToolFunction) {
|
|
|
40
41
|
export const ChatFunctionTool$outboundSchema = z.union([
|
|
41
42
|
z.lazy(() => ChatFunctionToolFunction$outboundSchema),
|
|
42
43
|
DatetimeServerTool$outboundSchema,
|
|
44
|
+
ChatSearchModelsServerTool$outboundSchema,
|
|
43
45
|
OpenRouterWebSearchServerTool$outboundSchema,
|
|
44
46
|
ChatWebSearchShorthand$outboundSchema,
|
|
45
47
|
]);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
3
|
+
import { SearchModelsServerToolConfig, SearchModelsServerToolConfig$Outbound } from "./searchmodelsservertoolconfig.js";
|
|
4
|
+
export declare const ChatSearchModelsServerToolType: {
|
|
5
|
+
readonly OpenrouterExperimentalSearchModels: "openrouter:experimental__search_models";
|
|
6
|
+
};
|
|
7
|
+
export type ChatSearchModelsServerToolType = ClosedEnum<typeof ChatSearchModelsServerToolType>;
|
|
8
|
+
/**
|
|
9
|
+
* OpenRouter built-in server tool: searches and filters AI models available on OpenRouter
|
|
10
|
+
*/
|
|
11
|
+
export type ChatSearchModelsServerTool = {
|
|
12
|
+
/**
|
|
13
|
+
* Configuration for the openrouter:experimental__search_models server tool
|
|
14
|
+
*/
|
|
15
|
+
parameters?: SearchModelsServerToolConfig | undefined;
|
|
16
|
+
type: ChatSearchModelsServerToolType;
|
|
17
|
+
};
|
|
18
|
+
/** @internal */
|
|
19
|
+
export declare const ChatSearchModelsServerToolType$outboundSchema: z.ZodEnum<typeof ChatSearchModelsServerToolType>;
|
|
20
|
+
/** @internal */
|
|
21
|
+
export type ChatSearchModelsServerTool$Outbound = {
|
|
22
|
+
parameters?: SearchModelsServerToolConfig$Outbound | undefined;
|
|
23
|
+
type: string;
|
|
24
|
+
};
|
|
25
|
+
/** @internal */
|
|
26
|
+
export declare const ChatSearchModelsServerTool$outboundSchema: z.ZodType<ChatSearchModelsServerTool$Outbound, ChatSearchModelsServerTool>;
|
|
27
|
+
export declare function chatSearchModelsServerToolToJSON(chatSearchModelsServerTool: ChatSearchModelsServerTool): string;
|
|
28
|
+
//# sourceMappingURL=chatsearchmodelsservertool.d.ts.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: bb9f1922b007
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { SearchModelsServerToolConfig$outboundSchema, } from "./searchmodelsservertoolconfig.js";
|
|
7
|
+
export const ChatSearchModelsServerToolType = {
|
|
8
|
+
OpenrouterExperimentalSearchModels: "openrouter:experimental__search_models",
|
|
9
|
+
};
|
|
10
|
+
/** @internal */
|
|
11
|
+
export const ChatSearchModelsServerToolType$outboundSchema = z.enum(ChatSearchModelsServerToolType);
|
|
12
|
+
/** @internal */
|
|
13
|
+
export const ChatSearchModelsServerTool$outboundSchema = z.object({
|
|
14
|
+
parameters: SearchModelsServerToolConfig$outboundSchema.optional(),
|
|
15
|
+
type: ChatSearchModelsServerToolType$outboundSchema,
|
|
16
|
+
});
|
|
17
|
+
export function chatSearchModelsServerToolToJSON(chatSearchModelsServerTool) {
|
|
18
|
+
return JSON.stringify(ChatSearchModelsServerTool$outboundSchema.parse(chatSearchModelsServerTool));
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=chatsearchmodelsservertool.js.map
|
package/esm/models/index.d.ts
CHANGED
|
@@ -43,6 +43,7 @@ export * from "./chatnamedtoolchoice.js";
|
|
|
43
43
|
export * from "./chatreasoningsummaryverbosityenum.js";
|
|
44
44
|
export * from "./chatrequest.js";
|
|
45
45
|
export * from "./chatresult.js";
|
|
46
|
+
export * from "./chatsearchmodelsservertool.js";
|
|
46
47
|
export * from "./chatstreamchoice.js";
|
|
47
48
|
export * from "./chatstreamchunk.js";
|
|
48
49
|
export * from "./chatstreamdelta.js";
|
|
@@ -216,6 +217,7 @@ export * from "./responseoutputtext.js";
|
|
|
216
217
|
export * from "./responseserrorfield.js";
|
|
217
218
|
export * from "./responsesrequest.js";
|
|
218
219
|
export * from "./searchcontextsizeenum.js";
|
|
220
|
+
export * from "./searchmodelsservertoolconfig.js";
|
|
219
221
|
export * from "./searchqualitylevel.js";
|
|
220
222
|
export * from "./security.js";
|
|
221
223
|
export * from "./serviceunavailableresponseerrordata.js";
|
package/esm/models/index.js
CHANGED
|
@@ -47,6 +47,7 @@ export * from "./chatnamedtoolchoice.js";
|
|
|
47
47
|
export * from "./chatreasoningsummaryverbosityenum.js";
|
|
48
48
|
export * from "./chatrequest.js";
|
|
49
49
|
export * from "./chatresult.js";
|
|
50
|
+
export * from "./chatsearchmodelsservertool.js";
|
|
50
51
|
export * from "./chatstreamchoice.js";
|
|
51
52
|
export * from "./chatstreamchunk.js";
|
|
52
53
|
export * from "./chatstreamdelta.js";
|
|
@@ -220,6 +221,7 @@ export * from "./responseoutputtext.js";
|
|
|
220
221
|
export * from "./responseserrorfield.js";
|
|
221
222
|
export * from "./responsesrequest.js";
|
|
222
223
|
export * from "./searchcontextsizeenum.js";
|
|
224
|
+
export * from "./searchmodelsservertoolconfig.js";
|
|
223
225
|
export * from "./searchqualitylevel.js";
|
|
224
226
|
export * from "./security.js";
|
|
225
227
|
export * from "./serviceunavailableresponseerrordata.js";
|
|
@@ -25,6 +25,7 @@ export declare const ProviderName: {
|
|
|
25
25
|
readonly Crusoe: "Crusoe";
|
|
26
26
|
readonly DeepInfra: "DeepInfra";
|
|
27
27
|
readonly DeepSeek: "DeepSeek";
|
|
28
|
+
readonly DekaLLM: "DekaLLM";
|
|
28
29
|
readonly Featherless: "Featherless";
|
|
29
30
|
readonly Fireworks: "Fireworks";
|
|
30
31
|
readonly Friendli: "Friendli";
|
|
@@ -59,6 +60,7 @@ export declare const ProviderName: {
|
|
|
59
60
|
readonly Parasail: "Parasail";
|
|
60
61
|
readonly Perplexity: "Perplexity";
|
|
61
62
|
readonly Phala: "Phala";
|
|
63
|
+
readonly Recraft: "Recraft";
|
|
62
64
|
readonly Reka: "Reka";
|
|
63
65
|
readonly Relace: "Relace";
|
|
64
66
|
readonly SambaNova: "SambaNova";
|
|
@@ -28,6 +28,7 @@ export const ProviderName = {
|
|
|
28
28
|
Crusoe: "Crusoe",
|
|
29
29
|
DeepInfra: "DeepInfra",
|
|
30
30
|
DeepSeek: "DeepSeek",
|
|
31
|
+
DekaLLM: "DekaLLM",
|
|
31
32
|
Featherless: "Featherless",
|
|
32
33
|
Fireworks: "Fireworks",
|
|
33
34
|
Friendli: "Friendli",
|
|
@@ -62,6 +63,7 @@ export const ProviderName = {
|
|
|
62
63
|
Parasail: "Parasail",
|
|
63
64
|
Perplexity: "Perplexity",
|
|
64
65
|
Phala: "Phala",
|
|
66
|
+
Recraft: "Recraft",
|
|
65
67
|
Reka: "Reka",
|
|
66
68
|
Relace: "Relace",
|
|
67
69
|
SambaNova: "SambaNova",
|
|
@@ -58,6 +58,7 @@ export declare const ProviderResponseProviderName: {
|
|
|
58
58
|
readonly Crusoe: "Crusoe";
|
|
59
59
|
readonly DeepInfra: "DeepInfra";
|
|
60
60
|
readonly DeepSeek: "DeepSeek";
|
|
61
|
+
readonly DekaLLM: "DekaLLM";
|
|
61
62
|
readonly Featherless: "Featherless";
|
|
62
63
|
readonly Fireworks: "Fireworks";
|
|
63
64
|
readonly Friendli: "Friendli";
|
|
@@ -92,6 +93,7 @@ export declare const ProviderResponseProviderName: {
|
|
|
92
93
|
readonly Parasail: "Parasail";
|
|
93
94
|
readonly Perplexity: "Perplexity";
|
|
94
95
|
readonly Phala: "Phala";
|
|
96
|
+
readonly Recraft: "Recraft";
|
|
95
97
|
readonly Reka: "Reka";
|
|
96
98
|
readonly Relace: "Relace";
|
|
97
99
|
readonly SambaNova: "SambaNova";
|
|
@@ -62,6 +62,7 @@ export const ProviderResponseProviderName = {
|
|
|
62
62
|
Crusoe: "Crusoe",
|
|
63
63
|
DeepInfra: "DeepInfra",
|
|
64
64
|
DeepSeek: "DeepSeek",
|
|
65
|
+
DekaLLM: "DekaLLM",
|
|
65
66
|
Featherless: "Featherless",
|
|
66
67
|
Fireworks: "Fireworks",
|
|
67
68
|
Friendli: "Friendli",
|
|
@@ -96,6 +97,7 @@ export const ProviderResponseProviderName = {
|
|
|
96
97
|
Parasail: "Parasail",
|
|
97
98
|
Perplexity: "Perplexity",
|
|
98
99
|
Phala: "Phala",
|
|
100
|
+
Recraft: "Recraft",
|
|
99
101
|
Reka: "Reka",
|
|
100
102
|
Relace: "Relace",
|
|
101
103
|
SambaNova: "SambaNova",
|
|
@@ -2,6 +2,7 @@ import * as z from "zod/v4";
|
|
|
2
2
|
import { OpenEnum } from "../types/enums.js";
|
|
3
3
|
import { ApplyPatchServerTool, ApplyPatchServerTool$Outbound } from "./applypatchservertool.js";
|
|
4
4
|
import { AutoRouterPlugin, AutoRouterPlugin$Outbound } from "./autorouterplugin.js";
|
|
5
|
+
import { ChatSearchModelsServerTool, ChatSearchModelsServerTool$Outbound } from "./chatsearchmodelsservertool.js";
|
|
5
6
|
import { CodeInterpreterServerTool, CodeInterpreterServerTool$Outbound } from "./codeinterpreterservertool.js";
|
|
6
7
|
import { CodexLocalShellTool, CodexLocalShellTool$Outbound } from "./codexlocalshelltool.js";
|
|
7
8
|
import { ComputerUseServerTool, ComputerUseServerTool$Outbound } from "./computeruseservertool.js";
|
|
@@ -55,6 +56,8 @@ export type ResponsesRequestToolFunction = {
|
|
|
55
56
|
};
|
|
56
57
|
export type ResponsesRequestToolUnion = ResponsesRequestToolFunction | PreviewWebSearchServerTool | Preview20250311WebSearchServerTool | LegacyWebSearchServerTool | WebSearchServerTool | FileSearchServerTool | ComputerUseServerTool | CodeInterpreterServerTool | McpServerTool | ImageGenerationServerTool | CodexLocalShellTool | ShellServerTool | ApplyPatchServerTool | CustomTool | (DatetimeServerTool & {
|
|
57
58
|
type: "openrouter:datetime";
|
|
59
|
+
}) | (ChatSearchModelsServerTool & {
|
|
60
|
+
type: "openrouter:experimental__search_models";
|
|
58
61
|
}) | WebSearchServerToolOpenRouter;
|
|
59
62
|
/**
|
|
60
63
|
* Request schema for Responses endpoint
|
|
@@ -121,6 +124,8 @@ export type ResponsesRequest = {
|
|
|
121
124
|
toolChoice?: OpenAIResponsesToolChoiceUnion | undefined;
|
|
122
125
|
tools?: Array<ResponsesRequestToolFunction | PreviewWebSearchServerTool | Preview20250311WebSearchServerTool | LegacyWebSearchServerTool | WebSearchServerTool | FileSearchServerTool | ComputerUseServerTool | CodeInterpreterServerTool | McpServerTool | ImageGenerationServerTool | CodexLocalShellTool | ShellServerTool | ApplyPatchServerTool | CustomTool | (DatetimeServerTool & {
|
|
123
126
|
type: "openrouter:datetime";
|
|
127
|
+
}) | (ChatSearchModelsServerTool & {
|
|
128
|
+
type: "openrouter:experimental__search_models";
|
|
124
129
|
}) | WebSearchServerToolOpenRouter> | undefined;
|
|
125
130
|
topK?: number | undefined;
|
|
126
131
|
topLogprobs?: number | undefined;
|
|
@@ -163,6 +168,8 @@ export declare function responsesRequestToolFunctionToJSON(responsesRequestToolF
|
|
|
163
168
|
/** @internal */
|
|
164
169
|
export type ResponsesRequestToolUnion$Outbound = ResponsesRequestToolFunction$Outbound | PreviewWebSearchServerTool$Outbound | Preview20250311WebSearchServerTool$Outbound | LegacyWebSearchServerTool$Outbound | WebSearchServerTool$Outbound | FileSearchServerTool$Outbound | ComputerUseServerTool$Outbound | CodeInterpreterServerTool$Outbound | McpServerTool$Outbound | ImageGenerationServerTool$Outbound | CodexLocalShellTool$Outbound | ShellServerTool$Outbound | ApplyPatchServerTool$Outbound | CustomTool$Outbound | (DatetimeServerTool$Outbound & {
|
|
165
170
|
type: "openrouter:datetime";
|
|
171
|
+
}) | (ChatSearchModelsServerTool$Outbound & {
|
|
172
|
+
type: "openrouter:experimental__search_models";
|
|
166
173
|
}) | WebSearchServerToolOpenRouter$Outbound;
|
|
167
174
|
/** @internal */
|
|
168
175
|
export declare const ResponsesRequestToolUnion$outboundSchema: z.ZodType<ResponsesRequestToolUnion$Outbound, ResponsesRequestToolUnion>;
|
|
@@ -203,6 +210,8 @@ export type ResponsesRequest$Outbound = {
|
|
|
203
210
|
tool_choice?: OpenAIResponsesToolChoiceUnion$Outbound | undefined;
|
|
204
211
|
tools?: Array<ResponsesRequestToolFunction$Outbound | PreviewWebSearchServerTool$Outbound | Preview20250311WebSearchServerTool$Outbound | LegacyWebSearchServerTool$Outbound | WebSearchServerTool$Outbound | FileSearchServerTool$Outbound | ComputerUseServerTool$Outbound | CodeInterpreterServerTool$Outbound | McpServerTool$Outbound | ImageGenerationServerTool$Outbound | CodexLocalShellTool$Outbound | ShellServerTool$Outbound | ApplyPatchServerTool$Outbound | CustomTool$Outbound | (DatetimeServerTool$Outbound & {
|
|
205
212
|
type: "openrouter:datetime";
|
|
213
|
+
}) | (ChatSearchModelsServerTool$Outbound & {
|
|
214
|
+
type: "openrouter:experimental__search_models";
|
|
206
215
|
}) | WebSearchServerToolOpenRouter$Outbound> | undefined;
|
|
207
216
|
top_k?: number | undefined;
|
|
208
217
|
top_logprobs?: number | undefined;
|
|
@@ -7,6 +7,7 @@ import { remap as remap$ } from "../lib/primitives.js";
|
|
|
7
7
|
import * as openEnums from "../types/enums.js";
|
|
8
8
|
import { ApplyPatchServerTool$outboundSchema, } from "./applypatchservertool.js";
|
|
9
9
|
import { AutoRouterPlugin$outboundSchema, } from "./autorouterplugin.js";
|
|
10
|
+
import { ChatSearchModelsServerTool$outboundSchema, } from "./chatsearchmodelsservertool.js";
|
|
10
11
|
import { CodeInterpreterServerTool$outboundSchema, } from "./codeinterpreterservertool.js";
|
|
11
12
|
import { CodexLocalShellTool$outboundSchema, } from "./codexlocalshelltool.js";
|
|
12
13
|
import { ComputerUseServerTool$outboundSchema, } from "./computeruseservertool.js";
|
|
@@ -90,6 +91,7 @@ export const ResponsesRequestToolUnion$outboundSchema = z.union([
|
|
|
90
91
|
ApplyPatchServerTool$outboundSchema,
|
|
91
92
|
CustomTool$outboundSchema,
|
|
92
93
|
DatetimeServerTool$outboundSchema.and(z.object({ type: z.literal("openrouter:datetime") })),
|
|
94
|
+
ChatSearchModelsServerTool$outboundSchema.and(z.object({ type: z.literal("openrouter:experimental__search_models") })),
|
|
93
95
|
WebSearchServerToolOpenRouter$outboundSchema,
|
|
94
96
|
]);
|
|
95
97
|
export function responsesRequestToolUnionToJSON(responsesRequestToolUnion) {
|
|
@@ -149,6 +151,7 @@ export const ResponsesRequest$outboundSchema = z.object({
|
|
|
149
151
|
ApplyPatchServerTool$outboundSchema,
|
|
150
152
|
CustomTool$outboundSchema,
|
|
151
153
|
DatetimeServerTool$outboundSchema.and(z.object({ type: z.literal("openrouter:datetime") })),
|
|
154
|
+
ChatSearchModelsServerTool$outboundSchema.and(z.object({ type: z.literal("openrouter:experimental__search_models") })),
|
|
152
155
|
WebSearchServerToolOpenRouter$outboundSchema,
|
|
153
156
|
])).optional(),
|
|
154
157
|
topK: z.int().optional(),
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
/**
|
|
3
|
+
* Configuration for the openrouter:experimental__search_models server tool
|
|
4
|
+
*/
|
|
5
|
+
export type SearchModelsServerToolConfig = {
|
|
6
|
+
/**
|
|
7
|
+
* Maximum number of models to return. Defaults to 5, max 20.
|
|
8
|
+
*/
|
|
9
|
+
maxResults?: number | undefined;
|
|
10
|
+
};
|
|
11
|
+
/** @internal */
|
|
12
|
+
export type SearchModelsServerToolConfig$Outbound = {
|
|
13
|
+
max_results?: number | undefined;
|
|
14
|
+
};
|
|
15
|
+
/** @internal */
|
|
16
|
+
export declare const SearchModelsServerToolConfig$outboundSchema: z.ZodType<SearchModelsServerToolConfig$Outbound, SearchModelsServerToolConfig>;
|
|
17
|
+
export declare function searchModelsServerToolConfigToJSON(searchModelsServerToolConfig: SearchModelsServerToolConfig): string;
|
|
18
|
+
//# sourceMappingURL=searchmodelsservertoolconfig.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: f15358a543a6
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export const SearchModelsServerToolConfig$outboundSchema = z.object({
|
|
9
|
+
maxResults: z.int().optional(),
|
|
10
|
+
}).transform((v) => {
|
|
11
|
+
return remap$(v, {
|
|
12
|
+
maxResults: "max_results",
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
export function searchModelsServerToolConfigToJSON(searchModelsServerToolConfig) {
|
|
16
|
+
return JSON.stringify(SearchModelsServerToolConfig$outboundSchema.parse(searchModelsServerToolConfig));
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=searchmodelsservertoolconfig.js.map
|
|
@@ -109,6 +109,9 @@ export type Options = {
|
|
|
109
109
|
deepseek?: {
|
|
110
110
|
[k: string]: any | null;
|
|
111
111
|
} | undefined;
|
|
112
|
+
dekallm?: {
|
|
113
|
+
[k: string]: any | null;
|
|
114
|
+
} | undefined;
|
|
112
115
|
enfer?: {
|
|
113
116
|
[k: string]: any | null;
|
|
114
117
|
} | undefined;
|
|
@@ -259,6 +262,9 @@ export type Options = {
|
|
|
259
262
|
phala?: {
|
|
260
263
|
[k: string]: any | null;
|
|
261
264
|
} | undefined;
|
|
265
|
+
recraft?: {
|
|
266
|
+
[k: string]: any | null;
|
|
267
|
+
} | undefined;
|
|
262
268
|
recursal?: {
|
|
263
269
|
[k: string]: any | null;
|
|
264
270
|
} | undefined;
|
|
@@ -490,6 +496,9 @@ export type Options$Outbound = {
|
|
|
490
496
|
deepseek?: {
|
|
491
497
|
[k: string]: any | null;
|
|
492
498
|
} | undefined;
|
|
499
|
+
dekallm?: {
|
|
500
|
+
[k: string]: any | null;
|
|
501
|
+
} | undefined;
|
|
493
502
|
enfer?: {
|
|
494
503
|
[k: string]: any | null;
|
|
495
504
|
} | undefined;
|
|
@@ -640,6 +649,9 @@ export type Options$Outbound = {
|
|
|
640
649
|
phala?: {
|
|
641
650
|
[k: string]: any | null;
|
|
642
651
|
} | undefined;
|
|
652
|
+
recraft?: {
|
|
653
|
+
[k: string]: any | null;
|
|
654
|
+
} | undefined;
|
|
643
655
|
recursal?: {
|
|
644
656
|
[k: string]: any | null;
|
|
645
657
|
} | undefined;
|
|
@@ -64,6 +64,7 @@ export const Options$outboundSchema = z
|
|
|
64
64
|
crusoe: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
65
65
|
deepinfra: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
66
66
|
deepseek: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
67
|
+
dekallm: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
67
68
|
enfer: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
68
69
|
fakeProvider: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
69
70
|
featherless: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
@@ -114,6 +115,7 @@ export const Options$outboundSchema = z
|
|
|
114
115
|
parasail: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
115
116
|
perplexity: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
116
117
|
phala: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
118
|
+
recraft: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
117
119
|
recursal: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
118
120
|
reflection: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
119
121
|
reka: z.record(z.string(), z.nullable(z.any())).optional(),
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openrouter/sdk",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.3",
|
|
4
4
|
"author": "OpenRouter",
|
|
5
5
|
"description": "The OpenRouter TypeScript SDK is a type-safe toolkit for building AI applications with access to 300+ language models through a unified API.",
|
|
6
6
|
"keywords": [
|
|
@@ -69,15 +69,15 @@
|
|
|
69
69
|
"lint": "eslint --cache --max-warnings=0 src",
|
|
70
70
|
"build": "tsc",
|
|
71
71
|
"prepublishOnly": "npm run build",
|
|
72
|
-
"compile": "tsc",
|
|
73
|
-
"postinstall": "node scripts/check-types.js || true",
|
|
74
72
|
"prepare": "npm run build",
|
|
75
73
|
"test": "vitest --run --project unit",
|
|
76
74
|
"test:e2e": "vitest --run --project e2e",
|
|
77
75
|
"test:transit": "exit 0",
|
|
76
|
+
"typecheck:transit": "exit 0",
|
|
78
77
|
"test:watch": "vitest --watch --project unit",
|
|
79
78
|
"typecheck": "tsc --noEmit",
|
|
80
|
-
"
|
|
79
|
+
"compile": "tsc",
|
|
80
|
+
"postinstall": "node scripts/check-types.js || true"
|
|
81
81
|
},
|
|
82
82
|
"peerDependencies": {},
|
|
83
83
|
"devDependencies": {
|