@openrouter/sdk 0.13.43 → 0.13.45
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/byokList.js +1 -1
- package/esm/funcs/embeddingsListModels.d.ts +4 -2
- package/esm/funcs/embeddingsListModels.js +45 -8
- package/esm/funcs/guardrailsList.js +1 -1
- package/esm/funcs/guardrailsListGuardrailKeyAssignments.js +1 -1
- package/esm/funcs/guardrailsListGuardrailMemberAssignments.js +1 -1
- package/esm/funcs/guardrailsListKeyAssignments.js +1 -1
- package/esm/funcs/guardrailsListMemberAssignments.js +1 -1
- package/esm/funcs/modelsList.d.ts +4 -2
- package/esm/funcs/modelsList.js +39 -7
- package/esm/funcs/modelsListForUser.d.ts +4 -2
- package/esm/funcs/modelsListForUser.js +45 -8
- package/esm/funcs/observabilityList.js +1 -1
- package/esm/funcs/organizationListMembers.js +1 -1
- package/esm/funcs/presetsList.js +1 -1
- package/esm/funcs/presetsListVersions.js +1 -1
- package/esm/funcs/workspacesList.js +1 -1
- package/esm/funcs/workspacesListMembers.js +1 -1
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/additionaltoolsitem.d.ts +5 -5
- package/esm/models/additionaltoolsitem.js +3 -3
- package/esm/models/anthropiccitationsearchresultlocationparam.d.ts +24 -0
- package/esm/models/{anthropiccitationsearchresultlocation.js → anthropiccitationsearchresultlocationparam.js} +5 -5
- package/esm/models/anthropiccitationwebsearchresultlocationparam.d.ts +20 -0
- package/esm/models/{anthropiccitationwebsearchresultlocation.js → anthropiccitationwebsearchresultlocationparam.js} +5 -5
- package/esm/models/anthropictextblockparam.d.ts +6 -6
- package/esm/models/anthropictextblockparam.js +6 -6
- package/esm/models/chatformatjsonobjectconfig.d.ts +15 -0
- package/esm/models/chatformatjsonobjectconfig.js +13 -0
- package/esm/models/chatrequest.d.ts +5 -5
- package/esm/models/chatrequest.js +3 -3
- package/esm/models/createobservabilitydestinationrequest.d.ts +3 -3
- package/esm/models/createobservabilitydestinationrequest.js +2 -2
- package/esm/models/imageinputmodality.d.ts +13 -0
- package/esm/models/imageinputmodality.js +15 -0
- package/esm/models/imagemodelarchitecture.d.ts +2 -2
- package/esm/models/imagemodelarchitecture.js +2 -2
- package/esm/models/index.d.ts +9 -2
- package/esm/models/index.js +9 -2
- package/esm/models/legacychatcontentvideo.d.ts +3 -3
- package/esm/models/legacychatcontentvideo.js +3 -3
- package/esm/models/legacychatcontentvideoinput.d.ts +23 -0
- package/esm/models/legacychatcontentvideoinput.js +21 -0
- package/esm/models/messagesrequest.d.ts +5 -5
- package/esm/models/messagesrequest.js +3 -3
- package/esm/models/messagessearchmodelsservertool.d.ts +28 -0
- package/esm/models/messagessearchmodelsservertool.js +20 -0
- package/esm/models/modelarchitecture.d.ts +2 -35
- package/esm/models/modelarchitecture.js +2 -32
- package/esm/models/modelslistresponse.d.ts +20 -0
- package/esm/models/modelslistresponse.js +14 -0
- package/esm/models/observabilityfilterrulegroup.d.ts +94 -0
- package/esm/models/observabilityfilterrulegroup.js +103 -0
- package/esm/models/observabilityfilterrulesconfig.d.ts +3 -100
- package/esm/models/observabilityfilterrulesconfig.js +2 -105
- package/esm/models/observabilityfilterrulesconfignullable.d.ts +18 -0
- package/esm/models/observabilityfilterrulesconfignullable.js +15 -0
- package/esm/models/operations/createembeddings.d.ts +1 -12
- package/esm/models/operations/createembeddings.js +1 -17
- package/esm/models/operations/getmodels.d.ts +19 -0
- package/esm/models/operations/getmodels.js +15 -0
- package/esm/models/operations/listbyokkeys.d.ts +2 -2
- package/esm/models/operations/listbyokkeys.js +2 -2
- package/esm/models/operations/listembeddingsmodels.d.ts +19 -0
- package/esm/models/operations/listembeddingsmodels.js +15 -0
- package/esm/models/operations/listguardrailkeyassignments.d.ts +2 -2
- package/esm/models/operations/listguardrailkeyassignments.js +2 -2
- package/esm/models/operations/listguardrailmemberassignments.d.ts +2 -2
- package/esm/models/operations/listguardrailmemberassignments.js +2 -2
- package/esm/models/operations/listguardrails.d.ts +2 -2
- package/esm/models/operations/listguardrails.js +2 -2
- package/esm/models/operations/listkeyassignments.d.ts +2 -2
- package/esm/models/operations/listkeyassignments.js +2 -2
- package/esm/models/operations/listmemberassignments.d.ts +2 -2
- package/esm/models/operations/listmemberassignments.js +2 -2
- package/esm/models/operations/listmodelsuser.d.ts +19 -0
- package/esm/models/operations/listmodelsuser.js +15 -0
- package/esm/models/operations/listobservabilitydestinations.d.ts +2 -2
- package/esm/models/operations/listobservabilitydestinations.js +2 -2
- package/esm/models/operations/listorganizationmembers.d.ts +2 -2
- package/esm/models/operations/listorganizationmembers.js +2 -2
- package/esm/models/operations/listpresets.d.ts +2 -2
- package/esm/models/operations/listpresets.js +2 -2
- package/esm/models/operations/listpresetversions.d.ts +2 -2
- package/esm/models/operations/listpresetversions.js +2 -2
- package/esm/models/operations/listworkspacemembers.d.ts +2 -2
- package/esm/models/operations/listworkspacemembers.js +2 -2
- package/esm/models/operations/listworkspaces.d.ts +2 -2
- package/esm/models/operations/listworkspaces.js +2 -2
- package/esm/models/responsesrequest.d.ts +5 -5
- package/esm/models/responsesrequest.js +3 -3
- package/esm/models/searchmodelsservertoolopenrouter.d.ts +28 -0
- package/esm/models/searchmodelsservertoolopenrouter.js +20 -0
- package/esm/models/updateobservabilitydestinationrequest.d.ts +3 -3
- package/esm/models/updateobservabilitydestinationrequest.js +2 -2
- package/esm/sdk/embeddings.d.ts +4 -2
- package/esm/sdk/embeddings.js +2 -1
- package/esm/sdk/models.d.ts +7 -2
- package/esm/sdk/models.js +3 -2
- package/jsr.json +1 -1
- package/package.json +8 -8
- package/esm/models/anthropiccitationsearchresultlocation.d.ts +0 -24
- package/esm/models/anthropiccitationwebsearchresultlocation.d.ts +0 -20
|
@@ -60,8 +60,8 @@ export type ListPresetsRequest$Outbound = {
|
|
|
60
60
|
"HTTP-Referer"?: string | undefined;
|
|
61
61
|
appTitle?: string | undefined;
|
|
62
62
|
appCategories?: string | undefined;
|
|
63
|
-
offset
|
|
64
|
-
limit
|
|
63
|
+
offset: number | null;
|
|
64
|
+
limit: number;
|
|
65
65
|
};
|
|
66
66
|
/** @internal */
|
|
67
67
|
export declare const ListPresetsRequest$outboundSchema: z.ZodType<ListPresetsRequest$Outbound, ListPresetsRequest>;
|
|
@@ -11,8 +11,8 @@ export const ListPresetsRequest$outboundSchema = z.object({
|
|
|
11
11
|
httpReferer: z.string().optional(),
|
|
12
12
|
appTitle: z.string().optional(),
|
|
13
13
|
appCategories: z.string().optional(),
|
|
14
|
-
offset: z.nullable(z.int()
|
|
15
|
-
limit: z.int().
|
|
14
|
+
offset: z.nullable(z.int().default(0)),
|
|
15
|
+
limit: z.int().default(50),
|
|
16
16
|
}).transform((v) => {
|
|
17
17
|
return remap$(v, {
|
|
18
18
|
httpReferer: "HTTP-Referer",
|
|
@@ -65,8 +65,8 @@ export type ListPresetVersionsRequest$Outbound = {
|
|
|
65
65
|
appTitle?: string | undefined;
|
|
66
66
|
appCategories?: string | undefined;
|
|
67
67
|
slug: string;
|
|
68
|
-
offset
|
|
69
|
-
limit
|
|
68
|
+
offset: number | null;
|
|
69
|
+
limit: number;
|
|
70
70
|
};
|
|
71
71
|
/** @internal */
|
|
72
72
|
export declare const ListPresetVersionsRequest$outboundSchema: z.ZodType<ListPresetVersionsRequest$Outbound, ListPresetVersionsRequest>;
|
|
@@ -12,8 +12,8 @@ export const ListPresetVersionsRequest$outboundSchema = z.object({
|
|
|
12
12
|
appTitle: z.string().optional(),
|
|
13
13
|
appCategories: z.string().optional(),
|
|
14
14
|
slug: z.string(),
|
|
15
|
-
offset: z.nullable(z.int()
|
|
16
|
-
limit: z.int().
|
|
15
|
+
offset: z.nullable(z.int().default(0)),
|
|
16
|
+
limit: z.int().default(50),
|
|
17
17
|
}).transform((v) => {
|
|
18
18
|
return remap$(v, {
|
|
19
19
|
httpReferer: "HTTP-Referer",
|
|
@@ -65,8 +65,8 @@ export type ListWorkspaceMembersRequest$Outbound = {
|
|
|
65
65
|
appTitle?: string | undefined;
|
|
66
66
|
appCategories?: string | undefined;
|
|
67
67
|
id: string;
|
|
68
|
-
offset
|
|
69
|
-
limit
|
|
68
|
+
offset: number | null;
|
|
69
|
+
limit: number;
|
|
70
70
|
};
|
|
71
71
|
/** @internal */
|
|
72
72
|
export declare const ListWorkspaceMembersRequest$outboundSchema: z.ZodType<ListWorkspaceMembersRequest$Outbound, ListWorkspaceMembersRequest>;
|
|
@@ -12,8 +12,8 @@ export const ListWorkspaceMembersRequest$outboundSchema = z.object({
|
|
|
12
12
|
appTitle: z.string().optional(),
|
|
13
13
|
appCategories: z.string().optional(),
|
|
14
14
|
id: z.string(),
|
|
15
|
-
offset: z.nullable(z.int()
|
|
16
|
-
limit: z.int().
|
|
15
|
+
offset: z.nullable(z.int().default(0)),
|
|
16
|
+
limit: z.int().default(50),
|
|
17
17
|
}).transform((v) => {
|
|
18
18
|
return remap$(v, {
|
|
19
19
|
httpReferer: "HTTP-Referer",
|
|
@@ -60,8 +60,8 @@ export type ListWorkspacesRequest$Outbound = {
|
|
|
60
60
|
"HTTP-Referer"?: string | undefined;
|
|
61
61
|
appTitle?: string | undefined;
|
|
62
62
|
appCategories?: string | undefined;
|
|
63
|
-
offset
|
|
64
|
-
limit
|
|
63
|
+
offset: number | null;
|
|
64
|
+
limit: number;
|
|
65
65
|
};
|
|
66
66
|
/** @internal */
|
|
67
67
|
export declare const ListWorkspacesRequest$outboundSchema: z.ZodType<ListWorkspacesRequest$Outbound, ListWorkspacesRequest>;
|
|
@@ -11,8 +11,8 @@ export const ListWorkspacesRequest$outboundSchema = z.object({
|
|
|
11
11
|
httpReferer: z.string().optional(),
|
|
12
12
|
appTitle: z.string().optional(),
|
|
13
13
|
appCategories: z.string().optional(),
|
|
14
|
-
offset: z.nullable(z.int()
|
|
15
|
-
limit: z.int().
|
|
14
|
+
offset: z.nullable(z.int().default(0)),
|
|
15
|
+
limit: z.int().default(50),
|
|
16
16
|
}).transform((v) => {
|
|
17
17
|
return remap$(v, {
|
|
18
18
|
httpReferer: "HTTP-Referer",
|
|
@@ -7,7 +7,6 @@ import { ApplyPatchServerToolOpenRouter, ApplyPatchServerToolOpenRouter$Outbound
|
|
|
7
7
|
import { AutoRouterPlugin, AutoRouterPlugin$Outbound } from "./autorouterplugin.js";
|
|
8
8
|
import { BashServerTool, BashServerTool$Outbound } from "./bashservertool.js";
|
|
9
9
|
import { ChatDebugOptions, ChatDebugOptions$Outbound } from "./chatdebugoptions.js";
|
|
10
|
-
import { ChatSearchModelsServerTool, ChatSearchModelsServerTool$Outbound } from "./chatsearchmodelsservertool.js";
|
|
11
10
|
import { CodeInterpreterServerTool, CodeInterpreterServerTool$Outbound } from "./codeinterpreterservertool.js";
|
|
12
11
|
import { CodexLocalShellTool, CodexLocalShellTool$Outbound } from "./codexlocalshelltool.js";
|
|
13
12
|
import { ComputerUseServerTool, ComputerUseServerTool$Outbound } from "./computeruseservertool.js";
|
|
@@ -37,6 +36,7 @@ import { ProviderPreferences, ProviderPreferences$Outbound } from "./providerpre
|
|
|
37
36
|
import { ReasoningConfig, ReasoningConfig$Outbound } from "./reasoningconfig.js";
|
|
38
37
|
import { ResponseHealingPlugin, ResponseHealingPlugin$Outbound } from "./responsehealingplugin.js";
|
|
39
38
|
import { ResponseIncludesEnum } from "./responseincludesenum.js";
|
|
39
|
+
import { SearchModelsServerToolOpenRouter, SearchModelsServerToolOpenRouter$Outbound } from "./searchmodelsservertoolopenrouter.js";
|
|
40
40
|
import { ShellServerTool, ShellServerTool$Outbound } from "./shellservertool.js";
|
|
41
41
|
import { ShellServerToolOpenRouter, ShellServerToolOpenRouter$Outbound } from "./shellservertoolopenrouter.js";
|
|
42
42
|
import { StopServerToolsWhenCondition, StopServerToolsWhenCondition$Outbound } from "./stopservertoolswhencondition.js";
|
|
@@ -108,7 +108,7 @@ export type ResponsesRequestToolUnion = ResponsesRequestToolFunction | (PreviewW
|
|
|
108
108
|
type: "openrouter:fusion";
|
|
109
109
|
}) | (ImageGenerationServerToolOpenRouter & {
|
|
110
110
|
type: "openrouter:image_generation";
|
|
111
|
-
}) | (
|
|
111
|
+
}) | (SearchModelsServerToolOpenRouter & {
|
|
112
112
|
type: "openrouter:experimental__search_models";
|
|
113
113
|
}) | (WebFetchServerTool & {
|
|
114
114
|
type: "openrouter:web_fetch";
|
|
@@ -238,7 +238,7 @@ export type ResponsesRequest = {
|
|
|
238
238
|
type: "openrouter:fusion";
|
|
239
239
|
}) | (ImageGenerationServerToolOpenRouter & {
|
|
240
240
|
type: "openrouter:image_generation";
|
|
241
|
-
}) | (
|
|
241
|
+
}) | (SearchModelsServerToolOpenRouter & {
|
|
242
242
|
type: "openrouter:experimental__search_models";
|
|
243
243
|
}) | (WebFetchServerTool & {
|
|
244
244
|
type: "openrouter:web_fetch";
|
|
@@ -323,7 +323,7 @@ export type ResponsesRequestToolUnion$Outbound = ResponsesRequestToolFunction$Ou
|
|
|
323
323
|
type: "openrouter:fusion";
|
|
324
324
|
}) | (ImageGenerationServerToolOpenRouter$Outbound & {
|
|
325
325
|
type: "openrouter:image_generation";
|
|
326
|
-
}) | (
|
|
326
|
+
}) | (SearchModelsServerToolOpenRouter$Outbound & {
|
|
327
327
|
type: "openrouter:experimental__search_models";
|
|
328
328
|
}) | (WebFetchServerTool$Outbound & {
|
|
329
329
|
type: "openrouter:web_fetch";
|
|
@@ -415,7 +415,7 @@ export type ResponsesRequest$Outbound = {
|
|
|
415
415
|
type: "openrouter:fusion";
|
|
416
416
|
}) | (ImageGenerationServerToolOpenRouter$Outbound & {
|
|
417
417
|
type: "openrouter:image_generation";
|
|
418
|
-
}) | (
|
|
418
|
+
}) | (SearchModelsServerToolOpenRouter$Outbound & {
|
|
419
419
|
type: "openrouter:experimental__search_models";
|
|
420
420
|
}) | (WebFetchServerTool$Outbound & {
|
|
421
421
|
type: "openrouter:web_fetch";
|
|
@@ -12,7 +12,6 @@ import { ApplyPatchServerToolOpenRouter$outboundSchema, } from "./applypatchserv
|
|
|
12
12
|
import { AutoRouterPlugin$outboundSchema, } from "./autorouterplugin.js";
|
|
13
13
|
import { BashServerTool$outboundSchema, } from "./bashservertool.js";
|
|
14
14
|
import { ChatDebugOptions$outboundSchema, } from "./chatdebugoptions.js";
|
|
15
|
-
import { ChatSearchModelsServerTool$outboundSchema, } from "./chatsearchmodelsservertool.js";
|
|
16
15
|
import { CodeInterpreterServerTool$outboundSchema, } from "./codeinterpreterservertool.js";
|
|
17
16
|
import { CodexLocalShellTool$outboundSchema, } from "./codexlocalshelltool.js";
|
|
18
17
|
import { ComputerUseServerTool$outboundSchema, } from "./computeruseservertool.js";
|
|
@@ -42,6 +41,7 @@ import { ProviderPreferences$outboundSchema, } from "./providerpreferences.js";
|
|
|
42
41
|
import { ReasoningConfig$outboundSchema, } from "./reasoningconfig.js";
|
|
43
42
|
import { ResponseHealingPlugin$outboundSchema, } from "./responsehealingplugin.js";
|
|
44
43
|
import { ResponseIncludesEnum$outboundSchema, } from "./responseincludesenum.js";
|
|
44
|
+
import { SearchModelsServerToolOpenRouter$outboundSchema, } from "./searchmodelsservertoolopenrouter.js";
|
|
45
45
|
import { ShellServerTool$outboundSchema, } from "./shellservertool.js";
|
|
46
46
|
import { ShellServerToolOpenRouter$outboundSchema, } from "./shellservertoolopenrouter.js";
|
|
47
47
|
import { StopServerToolsWhenCondition$outboundSchema, } from "./stopservertoolswhencondition.js";
|
|
@@ -111,7 +111,7 @@ export const ResponsesRequestToolUnion$outboundSchema = z.union([
|
|
|
111
111
|
FilesServerTool$outboundSchema.and(z.object({ type: z.literal("openrouter:files") })),
|
|
112
112
|
FusionServerToolOpenRouter$outboundSchema.and(z.object({ type: z.literal("openrouter:fusion") })),
|
|
113
113
|
ImageGenerationServerToolOpenRouter$outboundSchema.and(z.object({ type: z.literal("openrouter:image_generation") })),
|
|
114
|
-
|
|
114
|
+
SearchModelsServerToolOpenRouter$outboundSchema.and(z.object({ type: z.literal("openrouter:experimental__search_models") })),
|
|
115
115
|
WebFetchServerTool$outboundSchema.and(z.object({ type: z.literal("openrouter:web_fetch") })),
|
|
116
116
|
WebSearchServerToolOpenRouter$outboundSchema.and(z.object({ type: z.literal("openrouter:web_search") })),
|
|
117
117
|
ApplyPatchServerToolOpenRouter$outboundSchema.and(z.object({ type: z.literal("openrouter:apply_patch") })),
|
|
@@ -187,7 +187,7 @@ export const ResponsesRequest$outboundSchema = z.object({
|
|
|
187
187
|
FilesServerTool$outboundSchema.and(z.object({ type: z.literal("openrouter:files") })),
|
|
188
188
|
FusionServerToolOpenRouter$outboundSchema.and(z.object({ type: z.literal("openrouter:fusion") })),
|
|
189
189
|
ImageGenerationServerToolOpenRouter$outboundSchema.and(z.object({ type: z.literal("openrouter:image_generation") })),
|
|
190
|
-
|
|
190
|
+
SearchModelsServerToolOpenRouter$outboundSchema.and(z.object({ type: z.literal("openrouter:experimental__search_models") })),
|
|
191
191
|
WebFetchServerTool$outboundSchema.and(z.object({ type: z.literal("openrouter:web_fetch") })),
|
|
192
192
|
WebSearchServerToolOpenRouter$outboundSchema.and(z.object({ type: z.literal("openrouter:web_search") })),
|
|
193
193
|
ApplyPatchServerToolOpenRouter$outboundSchema.and(z.object({ type: z.literal("openrouter:apply_patch") })),
|
|
@@ -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 SearchModelsServerToolOpenRouterType: {
|
|
5
|
+
readonly OpenrouterExperimentalSearchModels: "openrouter:experimental__search_models";
|
|
6
|
+
};
|
|
7
|
+
export type SearchModelsServerToolOpenRouterType = ClosedEnum<typeof SearchModelsServerToolOpenRouterType>;
|
|
8
|
+
/**
|
|
9
|
+
* OpenRouter built-in server tool: searches and filters AI models available on OpenRouter
|
|
10
|
+
*/
|
|
11
|
+
export type SearchModelsServerToolOpenRouter = {
|
|
12
|
+
/**
|
|
13
|
+
* Configuration for the openrouter:experimental__search_models server tool
|
|
14
|
+
*/
|
|
15
|
+
parameters?: SearchModelsServerToolConfig | undefined;
|
|
16
|
+
type: SearchModelsServerToolOpenRouterType;
|
|
17
|
+
};
|
|
18
|
+
/** @internal */
|
|
19
|
+
export declare const SearchModelsServerToolOpenRouterType$outboundSchema: z.ZodEnum<typeof SearchModelsServerToolOpenRouterType>;
|
|
20
|
+
/** @internal */
|
|
21
|
+
export type SearchModelsServerToolOpenRouter$Outbound = {
|
|
22
|
+
parameters?: SearchModelsServerToolConfig$Outbound | undefined;
|
|
23
|
+
type: string;
|
|
24
|
+
};
|
|
25
|
+
/** @internal */
|
|
26
|
+
export declare const SearchModelsServerToolOpenRouter$outboundSchema: z.ZodType<SearchModelsServerToolOpenRouter$Outbound, SearchModelsServerToolOpenRouter>;
|
|
27
|
+
export declare function searchModelsServerToolOpenRouterToJSON(searchModelsServerToolOpenRouter: SearchModelsServerToolOpenRouter): string;
|
|
28
|
+
//# sourceMappingURL=searchmodelsservertoolopenrouter.d.ts.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 54985de41cb6
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { SearchModelsServerToolConfig$outboundSchema, } from "./searchmodelsservertoolconfig.js";
|
|
7
|
+
export const SearchModelsServerToolOpenRouterType = {
|
|
8
|
+
OpenrouterExperimentalSearchModels: "openrouter:experimental__search_models",
|
|
9
|
+
};
|
|
10
|
+
/** @internal */
|
|
11
|
+
export const SearchModelsServerToolOpenRouterType$outboundSchema = z.enum(SearchModelsServerToolOpenRouterType);
|
|
12
|
+
/** @internal */
|
|
13
|
+
export const SearchModelsServerToolOpenRouter$outboundSchema = z.object({
|
|
14
|
+
parameters: SearchModelsServerToolConfig$outboundSchema.optional(),
|
|
15
|
+
type: SearchModelsServerToolOpenRouterType$outboundSchema,
|
|
16
|
+
});
|
|
17
|
+
export function searchModelsServerToolOpenRouterToJSON(searchModelsServerToolOpenRouter) {
|
|
18
|
+
return JSON.stringify(SearchModelsServerToolOpenRouter$outboundSchema.parse(searchModelsServerToolOpenRouter));
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=searchmodelsservertoolopenrouter.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
|
-
import {
|
|
2
|
+
import { ObservabilityFilterRulesConfigNullable, ObservabilityFilterRulesConfigNullable$Outbound } from "./observabilityfilterrulesconfignullable.js";
|
|
3
3
|
export type UpdateObservabilityDestinationRequest = {
|
|
4
4
|
/**
|
|
5
5
|
* Optional allowlist of OpenRouter API key hashes. `null` clears the filter (all keys). Omitting leaves the current value. Must contain at least one hash if provided.
|
|
@@ -15,7 +15,7 @@ export type UpdateObservabilityDestinationRequest = {
|
|
|
15
15
|
* Whether the destination is enabled.
|
|
16
16
|
*/
|
|
17
17
|
enabled?: boolean | undefined;
|
|
18
|
-
filterRules?:
|
|
18
|
+
filterRules?: ObservabilityFilterRulesConfigNullable | null | undefined;
|
|
19
19
|
/**
|
|
20
20
|
* Human-readable name for the destination.
|
|
21
21
|
*/
|
|
@@ -36,7 +36,7 @@ export type UpdateObservabilityDestinationRequest$Outbound = {
|
|
|
36
36
|
[k: string]: any | null;
|
|
37
37
|
} | undefined;
|
|
38
38
|
enabled?: boolean | undefined;
|
|
39
|
-
filter_rules?:
|
|
39
|
+
filter_rules?: ObservabilityFilterRulesConfigNullable$Outbound | null | undefined;
|
|
40
40
|
name?: string | undefined;
|
|
41
41
|
privacy_mode?: boolean | undefined;
|
|
42
42
|
sampling_rate?: number | undefined;
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
6
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
-
import {
|
|
7
|
+
import { ObservabilityFilterRulesConfigNullable$outboundSchema, } from "./observabilityfilterrulesconfignullable.js";
|
|
8
8
|
/** @internal */
|
|
9
9
|
export const UpdateObservabilityDestinationRequest$outboundSchema = z.object({
|
|
10
10
|
apiKeyHashes: z.nullable(z.array(z.string())).optional(),
|
|
11
11
|
config: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
12
12
|
enabled: z.boolean().optional(),
|
|
13
|
-
filterRules: z.nullable(
|
|
13
|
+
filterRules: z.nullable(ObservabilityFilterRulesConfigNullable$outboundSchema)
|
|
14
14
|
.optional(),
|
|
15
15
|
name: z.string().optional(),
|
|
16
16
|
privacyMode: z.boolean().optional(),
|
package/esm/sdk/embeddings.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
2
|
-
import * as models from "../models/index.js";
|
|
3
2
|
import * as operations from "../models/operations/index.js";
|
|
3
|
+
import { PageIterator } from "../types/operations.js";
|
|
4
4
|
export declare class Embeddings extends ClientSDK {
|
|
5
5
|
/**
|
|
6
6
|
* Submit an embedding request
|
|
@@ -15,6 +15,8 @@ export declare class Embeddings extends ClientSDK {
|
|
|
15
15
|
* @remarks
|
|
16
16
|
* Returns a list of all available embeddings models and their properties
|
|
17
17
|
*/
|
|
18
|
-
listModels(request?: operations.ListEmbeddingsModelsRequest | undefined, options?: RequestOptions): Promise<
|
|
18
|
+
listModels(request?: operations.ListEmbeddingsModelsRequest | undefined, options?: RequestOptions): Promise<PageIterator<operations.ListEmbeddingsModelsResponse, {
|
|
19
|
+
offset: number;
|
|
20
|
+
}>>;
|
|
19
21
|
}
|
|
20
22
|
//# sourceMappingURL=embeddings.d.ts.map
|
package/esm/sdk/embeddings.js
CHANGED
|
@@ -6,6 +6,7 @@ import { embeddingsGenerate } from "../funcs/embeddingsGenerate.js";
|
|
|
6
6
|
import { embeddingsListModels } from "../funcs/embeddingsListModels.js";
|
|
7
7
|
import { ClientSDK } from "../lib/sdks.js";
|
|
8
8
|
import { unwrapAsync } from "../types/fp.js";
|
|
9
|
+
import { unwrapResultIterator } from "../types/operations.js";
|
|
9
10
|
export class Embeddings extends ClientSDK {
|
|
10
11
|
/**
|
|
11
12
|
* Submit an embedding request
|
|
@@ -23,7 +24,7 @@ export class Embeddings extends ClientSDK {
|
|
|
23
24
|
* Returns a list of all available embeddings models and their properties
|
|
24
25
|
*/
|
|
25
26
|
async listModels(request, options) {
|
|
26
|
-
return
|
|
27
|
+
return unwrapResultIterator(embeddingsListModels(this, request, options));
|
|
27
28
|
}
|
|
28
29
|
}
|
|
29
30
|
//# sourceMappingURL=embeddings.js.map
|
package/esm/sdk/models.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
2
2
|
import * as models from "../models/index.js";
|
|
3
3
|
import * as operations from "../models/operations/index.js";
|
|
4
|
+
import { PageIterator } from "../types/operations.js";
|
|
4
5
|
export declare class Models extends ClientSDK {
|
|
5
6
|
/**
|
|
6
7
|
* Get a model by its slug
|
|
@@ -12,7 +13,9 @@ export declare class Models extends ClientSDK {
|
|
|
12
13
|
/**
|
|
13
14
|
* List all models and their properties
|
|
14
15
|
*/
|
|
15
|
-
list(request?: operations.GetModelsRequest | undefined, options?: RequestOptions): Promise<
|
|
16
|
+
list(request?: operations.GetModelsRequest | undefined, options?: RequestOptions): Promise<PageIterator<operations.GetModelsResponse, {
|
|
17
|
+
offset: number;
|
|
18
|
+
}>>;
|
|
16
19
|
/**
|
|
17
20
|
* Get total count of available models
|
|
18
21
|
*/
|
|
@@ -23,6 +26,8 @@ export declare class Models extends ClientSDK {
|
|
|
23
26
|
* @remarks
|
|
24
27
|
* List models filtered by user provider preferences, [privacy settings](https://openrouter.ai/docs/guides/privacy/provider-logging), and [guardrails](https://openrouter.ai/docs/guides/features/guardrails). If requesting through `eu.openrouter.ai/api/v1/...` the results will be filtered to models that satisfy [EU in-region routing](https://openrouter.ai/docs/guides/privacy/provider-logging#enterprise-eu-in-region-routing).
|
|
25
28
|
*/
|
|
26
|
-
listForUser(security: operations.ListModelsUserSecurity, request?: operations.ListModelsUserRequest | undefined, options?: RequestOptions): Promise<
|
|
29
|
+
listForUser(security: operations.ListModelsUserSecurity, request?: operations.ListModelsUserRequest | undefined, options?: RequestOptions): Promise<PageIterator<operations.ListModelsUserResponse, {
|
|
30
|
+
offset: number;
|
|
31
|
+
}>>;
|
|
27
32
|
}
|
|
28
33
|
//# sourceMappingURL=models.d.ts.map
|
package/esm/sdk/models.js
CHANGED
|
@@ -8,6 +8,7 @@ import { modelsList } from "../funcs/modelsList.js";
|
|
|
8
8
|
import { modelsListForUser } from "../funcs/modelsListForUser.js";
|
|
9
9
|
import { ClientSDK } from "../lib/sdks.js";
|
|
10
10
|
import { unwrapAsync } from "../types/fp.js";
|
|
11
|
+
import { unwrapResultIterator } from "../types/operations.js";
|
|
11
12
|
export class Models extends ClientSDK {
|
|
12
13
|
/**
|
|
13
14
|
* Get a model by its slug
|
|
@@ -22,7 +23,7 @@ export class Models extends ClientSDK {
|
|
|
22
23
|
* List all models and their properties
|
|
23
24
|
*/
|
|
24
25
|
async list(request, options) {
|
|
25
|
-
return
|
|
26
|
+
return unwrapResultIterator(modelsList(this, request, options));
|
|
26
27
|
}
|
|
27
28
|
/**
|
|
28
29
|
* Get total count of available models
|
|
@@ -37,7 +38,7 @@ export class Models extends ClientSDK {
|
|
|
37
38
|
* List models filtered by user provider preferences, [privacy settings](https://openrouter.ai/docs/guides/privacy/provider-logging), and [guardrails](https://openrouter.ai/docs/guides/features/guardrails). If requesting through `eu.openrouter.ai/api/v1/...` the results will be filtered to models that satisfy [EU in-region routing](https://openrouter.ai/docs/guides/privacy/provider-logging#enterprise-eu-in-region-routing).
|
|
38
39
|
*/
|
|
39
40
|
async listForUser(security, request, options) {
|
|
40
|
-
return
|
|
41
|
+
return unwrapResultIterator(modelsListForUser(this, security, request, options));
|
|
41
42
|
}
|
|
42
43
|
}
|
|
43
44
|
//# sourceMappingURL=models.js.map
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openrouter/sdk",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.45",
|
|
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",
|
|
75
75
|
"prepublishOnly": "npm run build",
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"test:watch": "vitest --watch --project unit",
|
|
79
|
-
"typecheck:transit": "exit 0",
|
|
76
|
+
"test:transit": "exit 0",
|
|
77
|
+
"typecheck": "tsc --noEmit",
|
|
80
78
|
"compile": "tsc",
|
|
81
79
|
"prepare": "npm run build",
|
|
82
|
-
"test:
|
|
83
|
-
"
|
|
84
|
-
"
|
|
80
|
+
"test:watch": "vitest --watch --project unit",
|
|
81
|
+
"typecheck:transit": "exit 0",
|
|
82
|
+
"postinstall": "node scripts/check-types.js || true",
|
|
83
|
+
"test": "vitest --run --project unit",
|
|
84
|
+
"test:e2e": "vitest --run --project e2e"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {},
|
|
87
87
|
"devDependencies": {
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
export type AnthropicCitationSearchResultLocation = {
|
|
3
|
-
citedText: string;
|
|
4
|
-
endBlockIndex: number;
|
|
5
|
-
searchResultIndex: number;
|
|
6
|
-
source: string;
|
|
7
|
-
startBlockIndex: number;
|
|
8
|
-
title: string | null;
|
|
9
|
-
type: "search_result_location";
|
|
10
|
-
};
|
|
11
|
-
/** @internal */
|
|
12
|
-
export type AnthropicCitationSearchResultLocation$Outbound = {
|
|
13
|
-
cited_text: string;
|
|
14
|
-
end_block_index: number;
|
|
15
|
-
search_result_index: number;
|
|
16
|
-
source: string;
|
|
17
|
-
start_block_index: number;
|
|
18
|
-
title: string | null;
|
|
19
|
-
type: "search_result_location";
|
|
20
|
-
};
|
|
21
|
-
/** @internal */
|
|
22
|
-
export declare const AnthropicCitationSearchResultLocation$outboundSchema: z.ZodType<AnthropicCitationSearchResultLocation$Outbound, AnthropicCitationSearchResultLocation>;
|
|
23
|
-
export declare function anthropicCitationSearchResultLocationToJSON(anthropicCitationSearchResultLocation: AnthropicCitationSearchResultLocation): string;
|
|
24
|
-
//# sourceMappingURL=anthropiccitationsearchresultlocation.d.ts.map
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
export type AnthropicCitationWebSearchResultLocation = {
|
|
3
|
-
citedText: string;
|
|
4
|
-
encryptedIndex: string;
|
|
5
|
-
title: string | null;
|
|
6
|
-
type: "web_search_result_location";
|
|
7
|
-
url: string;
|
|
8
|
-
};
|
|
9
|
-
/** @internal */
|
|
10
|
-
export type AnthropicCitationWebSearchResultLocation$Outbound = {
|
|
11
|
-
cited_text: string;
|
|
12
|
-
encrypted_index: string;
|
|
13
|
-
title: string | null;
|
|
14
|
-
type: "web_search_result_location";
|
|
15
|
-
url: string;
|
|
16
|
-
};
|
|
17
|
-
/** @internal */
|
|
18
|
-
export declare const AnthropicCitationWebSearchResultLocation$outboundSchema: z.ZodType<AnthropicCitationWebSearchResultLocation$Outbound, AnthropicCitationWebSearchResultLocation>;
|
|
19
|
-
export declare function anthropicCitationWebSearchResultLocationToJSON(anthropicCitationWebSearchResultLocation: AnthropicCitationWebSearchResultLocation): string;
|
|
20
|
-
//# sourceMappingURL=anthropiccitationwebsearchresultlocation.d.ts.map
|