@openrouter/sdk 0.13.44 → 0.13.46

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.
Files changed (110) hide show
  1. package/esm/funcs/byokList.js +1 -1
  2. package/esm/funcs/embeddingsListModels.d.ts +4 -2
  3. package/esm/funcs/embeddingsListModels.js +45 -8
  4. package/esm/funcs/guardrailsList.js +1 -1
  5. package/esm/funcs/guardrailsListGuardrailKeyAssignments.js +1 -1
  6. package/esm/funcs/guardrailsListGuardrailMemberAssignments.js +1 -1
  7. package/esm/funcs/guardrailsListKeyAssignments.js +1 -1
  8. package/esm/funcs/guardrailsListMemberAssignments.js +1 -1
  9. package/esm/funcs/modelsList.d.ts +4 -2
  10. package/esm/funcs/modelsList.js +39 -7
  11. package/esm/funcs/modelsListForUser.d.ts +4 -2
  12. package/esm/funcs/modelsListForUser.js +45 -8
  13. package/esm/funcs/observabilityList.js +1 -1
  14. package/esm/funcs/organizationListMembers.js +1 -1
  15. package/esm/funcs/presetsList.js +1 -1
  16. package/esm/funcs/presetsListVersions.js +1 -1
  17. package/esm/funcs/workspacesList.js +1 -1
  18. package/esm/funcs/workspacesListMembers.js +1 -1
  19. package/esm/lib/config.d.ts +2 -2
  20. package/esm/lib/config.js +2 -2
  21. package/esm/models/additionaltoolsitem.d.ts +5 -5
  22. package/esm/models/additionaltoolsitem.js +3 -3
  23. package/esm/models/anthropiccitationsearchresultlocationparam.d.ts +24 -0
  24. package/esm/models/{anthropiccitationsearchresultlocation.js → anthropiccitationsearchresultlocationparam.js} +5 -5
  25. package/esm/models/anthropiccitationwebsearchresultlocationparam.d.ts +20 -0
  26. package/esm/models/{anthropiccitationwebsearchresultlocation.js → anthropiccitationwebsearchresultlocationparam.js} +5 -5
  27. package/esm/models/anthropictextblockparam.d.ts +6 -6
  28. package/esm/models/anthropictextblockparam.js +6 -6
  29. package/esm/models/chatformatjsonobjectconfig.d.ts +15 -0
  30. package/esm/models/chatformatjsonobjectconfig.js +13 -0
  31. package/esm/models/chatrequest.d.ts +5 -5
  32. package/esm/models/chatrequest.js +3 -3
  33. package/esm/models/createobservabilitydestinationrequest.d.ts +3 -3
  34. package/esm/models/createobservabilitydestinationrequest.js +2 -2
  35. package/esm/models/imagegenerationproviderpreferences.d.ts +811 -0
  36. package/esm/models/imagegenerationproviderpreferences.js +208 -0
  37. package/esm/models/imagegenerationrequest.d.ts +4 -753
  38. package/esm/models/imagegenerationrequest.js +2 -162
  39. package/esm/models/imageinputmodality.d.ts +13 -0
  40. package/esm/models/imageinputmodality.js +15 -0
  41. package/esm/models/imagemodelarchitecture.d.ts +2 -2
  42. package/esm/models/imagemodelarchitecture.js +2 -2
  43. package/esm/models/index.d.ts +10 -2
  44. package/esm/models/index.js +10 -2
  45. package/esm/models/legacychatcontentvideo.d.ts +3 -3
  46. package/esm/models/legacychatcontentvideo.js +3 -3
  47. package/esm/models/legacychatcontentvideoinput.d.ts +23 -0
  48. package/esm/models/legacychatcontentvideoinput.js +21 -0
  49. package/esm/models/messagesrequest.d.ts +5 -5
  50. package/esm/models/messagesrequest.js +3 -3
  51. package/esm/models/messagessearchmodelsservertool.d.ts +28 -0
  52. package/esm/models/messagessearchmodelsservertool.js +20 -0
  53. package/esm/models/modelarchitecture.d.ts +2 -35
  54. package/esm/models/modelarchitecture.js +2 -32
  55. package/esm/models/modelslistresponse.d.ts +20 -0
  56. package/esm/models/modelslistresponse.js +14 -0
  57. package/esm/models/observabilityfilterrulegroup.d.ts +94 -0
  58. package/esm/models/observabilityfilterrulegroup.js +103 -0
  59. package/esm/models/observabilityfilterrulesconfig.d.ts +3 -100
  60. package/esm/models/observabilityfilterrulesconfig.js +2 -105
  61. package/esm/models/observabilityfilterrulesconfignullable.d.ts +18 -0
  62. package/esm/models/observabilityfilterrulesconfignullable.js +15 -0
  63. package/esm/models/operations/createembeddings.d.ts +1 -12
  64. package/esm/models/operations/createembeddings.js +1 -17
  65. package/esm/models/operations/getmodels.d.ts +19 -0
  66. package/esm/models/operations/getmodels.js +15 -0
  67. package/esm/models/operations/listbyokkeys.d.ts +2 -2
  68. package/esm/models/operations/listbyokkeys.js +2 -2
  69. package/esm/models/operations/listembeddingsmodels.d.ts +19 -0
  70. package/esm/models/operations/listembeddingsmodels.js +15 -0
  71. package/esm/models/operations/listguardrailkeyassignments.d.ts +2 -2
  72. package/esm/models/operations/listguardrailkeyassignments.js +2 -2
  73. package/esm/models/operations/listguardrailmemberassignments.d.ts +2 -2
  74. package/esm/models/operations/listguardrailmemberassignments.js +2 -2
  75. package/esm/models/operations/listguardrails.d.ts +2 -2
  76. package/esm/models/operations/listguardrails.js +2 -2
  77. package/esm/models/operations/listkeyassignments.d.ts +2 -2
  78. package/esm/models/operations/listkeyassignments.js +2 -2
  79. package/esm/models/operations/listmemberassignments.d.ts +2 -2
  80. package/esm/models/operations/listmemberassignments.js +2 -2
  81. package/esm/models/operations/listmodelsuser.d.ts +19 -0
  82. package/esm/models/operations/listmodelsuser.js +15 -0
  83. package/esm/models/operations/listobservabilitydestinations.d.ts +2 -2
  84. package/esm/models/operations/listobservabilitydestinations.js +2 -2
  85. package/esm/models/operations/listorganizationmembers.d.ts +2 -2
  86. package/esm/models/operations/listorganizationmembers.js +2 -2
  87. package/esm/models/operations/listpresets.d.ts +2 -2
  88. package/esm/models/operations/listpresets.js +2 -2
  89. package/esm/models/operations/listpresetversions.d.ts +2 -2
  90. package/esm/models/operations/listpresetversions.js +2 -2
  91. package/esm/models/operations/listworkspacemembers.d.ts +2 -2
  92. package/esm/models/operations/listworkspacemembers.js +2 -2
  93. package/esm/models/operations/listworkspaces.d.ts +2 -2
  94. package/esm/models/operations/listworkspaces.js +2 -2
  95. package/esm/models/providerpreferences.d.ts +16 -16
  96. package/esm/models/providerpreferences.js +12 -19
  97. package/esm/models/responsesrequest.d.ts +5 -5
  98. package/esm/models/responsesrequest.js +3 -3
  99. package/esm/models/searchmodelsservertoolopenrouter.d.ts +28 -0
  100. package/esm/models/searchmodelsservertoolopenrouter.js +20 -0
  101. package/esm/models/updateobservabilitydestinationrequest.d.ts +3 -3
  102. package/esm/models/updateobservabilitydestinationrequest.js +2 -2
  103. package/esm/sdk/embeddings.d.ts +4 -2
  104. package/esm/sdk/embeddings.js +2 -1
  105. package/esm/sdk/models.d.ts +7 -2
  106. package/esm/sdk/models.js +3 -2
  107. package/jsr.json +1 -1
  108. package/package.json +5 -5
  109. package/esm/models/anthropiccitationsearchresultlocation.d.ts +0 -24
  110. package/esm/models/anthropiccitationwebsearchresultlocation.d.ts +0 -20
@@ -26,10 +26,9 @@ export const DataCollection = {
26
26
  /** @internal */
27
27
  export const DataCollection$outboundSchema = openEnums.outboundSchema(DataCollection);
28
28
  /** @internal */
29
- export const Ignore$outboundSchema = z
30
- .union([ProviderName$outboundSchema, z.string()]);
31
- export function ignoreToJSON(ignore) {
32
- return JSON.stringify(Ignore$outboundSchema.parse(ignore));
29
+ export const ProviderPreferencesIgnore$outboundSchema = z.union([ProviderName$outboundSchema, z.string()]);
30
+ export function providerPreferencesIgnoreToJSON(providerPreferencesIgnore) {
31
+ return JSON.stringify(ProviderPreferencesIgnore$outboundSchema.parse(providerPreferencesIgnore));
33
32
  }
34
33
  /** @internal */
35
34
  export const MaxPrice$outboundSchema = z
@@ -44,29 +43,23 @@ export function maxPriceToJSON(maxPrice) {
44
43
  return JSON.stringify(MaxPrice$outboundSchema.parse(maxPrice));
45
44
  }
46
45
  /** @internal */
47
- export const Only$outboundSchema = z.union([
48
- ProviderName$outboundSchema,
49
- z.string(),
50
- ]);
51
- export function onlyToJSON(only) {
52
- return JSON.stringify(Only$outboundSchema.parse(only));
46
+ export const ProviderPreferencesOnly$outboundSchema = z.union([ProviderName$outboundSchema, z.string()]);
47
+ export function providerPreferencesOnlyToJSON(providerPreferencesOnly) {
48
+ return JSON.stringify(ProviderPreferencesOnly$outboundSchema.parse(providerPreferencesOnly));
53
49
  }
54
50
  /** @internal */
55
- export const Order$outboundSchema = z.union([
56
- ProviderName$outboundSchema,
57
- z.string(),
58
- ]);
59
- export function orderToJSON(order) {
60
- return JSON.stringify(Order$outboundSchema.parse(order));
51
+ export const ProviderPreferencesOrder$outboundSchema = z.union([ProviderName$outboundSchema, z.string()]);
52
+ export function providerPreferencesOrderToJSON(providerPreferencesOrder) {
53
+ return JSON.stringify(ProviderPreferencesOrder$outboundSchema.parse(providerPreferencesOrder));
61
54
  }
62
55
  /** @internal */
63
- export const Sort$outboundSchema = z.union([
56
+ export const ProviderPreferencesSort$outboundSchema = z.union([
64
57
  ProviderSort$outboundSchema,
65
58
  ProviderSortConfig$outboundSchema,
66
59
  z.any(),
67
60
  ]);
68
- export function sortToJSON(sort) {
69
- return JSON.stringify(Sort$outboundSchema.parse(sort));
61
+ export function providerPreferencesSortToJSON(providerPreferencesSort) {
62
+ return JSON.stringify(ProviderPreferencesSort$outboundSchema.parse(providerPreferencesSort));
70
63
  }
71
64
  /** @internal */
72
65
  export const ProviderPreferences$outboundSchema = z.object({
@@ -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
- }) | (ChatSearchModelsServerTool & {
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
- }) | (ChatSearchModelsServerTool & {
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
- }) | (ChatSearchModelsServerTool$Outbound & {
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
- }) | (ChatSearchModelsServerTool$Outbound & {
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
- ChatSearchModelsServerTool$outboundSchema.and(z.object({ type: z.literal("openrouter:experimental__search_models") })),
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
- ChatSearchModelsServerTool$outboundSchema.and(z.object({ type: z.literal("openrouter:experimental__search_models") })),
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 { ObservabilityFilterRulesConfig, ObservabilityFilterRulesConfig$Outbound } from "./observabilityfilterrulesconfig.js";
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?: ObservabilityFilterRulesConfig | null | undefined;
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?: ObservabilityFilterRulesConfig$Outbound | null | undefined;
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 { ObservabilityFilterRulesConfig$outboundSchema, } from "./observabilityfilterrulesconfig.js";
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(ObservabilityFilterRulesConfig$outboundSchema)
13
+ filterRules: z.nullable(ObservabilityFilterRulesConfigNullable$outboundSchema)
14
14
  .optional(),
15
15
  name: z.string().optional(),
16
16
  privacyMode: z.boolean().optional(),
@@ -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<models.ModelsListResponse>;
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
@@ -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 unwrapAsync(embeddingsListModels(this, request, options));
27
+ return unwrapResultIterator(embeddingsListModels(this, request, options));
27
28
  }
28
29
  }
29
30
  //# sourceMappingURL=embeddings.js.map
@@ -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<models.ModelsListResponse>;
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<models.ModelsListResponse>;
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 unwrapAsync(modelsList(this, request, options));
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 unwrapAsync(modelsListForUser(this, security, request, options));
41
+ return unwrapResultIterator(modelsListForUser(this, security, request, options));
41
42
  }
42
43
  }
43
44
  //# sourceMappingURL=models.js.map
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@openrouter/sdk",
5
- "version": "0.13.44",
5
+ "version": "0.13.46",
6
6
  "exports": {
7
7
  ".": "./src/index.ts",
8
8
  "./models/errors": "./src/models/errors/index.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openrouter/sdk",
3
- "version": "0.13.44",
3
+ "version": "0.13.46",
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": [
@@ -74,14 +74,14 @@
74
74
  "build": "tsc",
75
75
  "prepublishOnly": "npm run build",
76
76
  "compile": "tsc",
77
- "postinstall": "node scripts/check-types.js || true",
78
- "test:watch": "vitest --watch --project unit",
77
+ "prepare": "npm run build",
79
78
  "typecheck": "tsc --noEmit",
80
79
  "typecheck:transit": "exit 0",
81
- "prepare": "npm run build",
80
+ "postinstall": "node scripts/check-types.js || true",
82
81
  "test": "vitest --run --project unit",
83
82
  "test:e2e": "vitest --run --project e2e",
84
- "test:transit": "exit 0"
83
+ "test:transit": "exit 0",
84
+ "test:watch": "vitest --watch --project unit"
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