@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.
Files changed (104) 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/imageinputmodality.d.ts +13 -0
  36. package/esm/models/imageinputmodality.js +15 -0
  37. package/esm/models/imagemodelarchitecture.d.ts +2 -2
  38. package/esm/models/imagemodelarchitecture.js +2 -2
  39. package/esm/models/index.d.ts +9 -2
  40. package/esm/models/index.js +9 -2
  41. package/esm/models/legacychatcontentvideo.d.ts +3 -3
  42. package/esm/models/legacychatcontentvideo.js +3 -3
  43. package/esm/models/legacychatcontentvideoinput.d.ts +23 -0
  44. package/esm/models/legacychatcontentvideoinput.js +21 -0
  45. package/esm/models/messagesrequest.d.ts +5 -5
  46. package/esm/models/messagesrequest.js +3 -3
  47. package/esm/models/messagessearchmodelsservertool.d.ts +28 -0
  48. package/esm/models/messagessearchmodelsservertool.js +20 -0
  49. package/esm/models/modelarchitecture.d.ts +2 -35
  50. package/esm/models/modelarchitecture.js +2 -32
  51. package/esm/models/modelslistresponse.d.ts +20 -0
  52. package/esm/models/modelslistresponse.js +14 -0
  53. package/esm/models/observabilityfilterrulegroup.d.ts +94 -0
  54. package/esm/models/observabilityfilterrulegroup.js +103 -0
  55. package/esm/models/observabilityfilterrulesconfig.d.ts +3 -100
  56. package/esm/models/observabilityfilterrulesconfig.js +2 -105
  57. package/esm/models/observabilityfilterrulesconfignullable.d.ts +18 -0
  58. package/esm/models/observabilityfilterrulesconfignullable.js +15 -0
  59. package/esm/models/operations/createembeddings.d.ts +1 -12
  60. package/esm/models/operations/createembeddings.js +1 -17
  61. package/esm/models/operations/getmodels.d.ts +19 -0
  62. package/esm/models/operations/getmodels.js +15 -0
  63. package/esm/models/operations/listbyokkeys.d.ts +2 -2
  64. package/esm/models/operations/listbyokkeys.js +2 -2
  65. package/esm/models/operations/listembeddingsmodels.d.ts +19 -0
  66. package/esm/models/operations/listembeddingsmodels.js +15 -0
  67. package/esm/models/operations/listguardrailkeyassignments.d.ts +2 -2
  68. package/esm/models/operations/listguardrailkeyassignments.js +2 -2
  69. package/esm/models/operations/listguardrailmemberassignments.d.ts +2 -2
  70. package/esm/models/operations/listguardrailmemberassignments.js +2 -2
  71. package/esm/models/operations/listguardrails.d.ts +2 -2
  72. package/esm/models/operations/listguardrails.js +2 -2
  73. package/esm/models/operations/listkeyassignments.d.ts +2 -2
  74. package/esm/models/operations/listkeyassignments.js +2 -2
  75. package/esm/models/operations/listmemberassignments.d.ts +2 -2
  76. package/esm/models/operations/listmemberassignments.js +2 -2
  77. package/esm/models/operations/listmodelsuser.d.ts +19 -0
  78. package/esm/models/operations/listmodelsuser.js +15 -0
  79. package/esm/models/operations/listobservabilitydestinations.d.ts +2 -2
  80. package/esm/models/operations/listobservabilitydestinations.js +2 -2
  81. package/esm/models/operations/listorganizationmembers.d.ts +2 -2
  82. package/esm/models/operations/listorganizationmembers.js +2 -2
  83. package/esm/models/operations/listpresets.d.ts +2 -2
  84. package/esm/models/operations/listpresets.js +2 -2
  85. package/esm/models/operations/listpresetversions.d.ts +2 -2
  86. package/esm/models/operations/listpresetversions.js +2 -2
  87. package/esm/models/operations/listworkspacemembers.d.ts +2 -2
  88. package/esm/models/operations/listworkspacemembers.js +2 -2
  89. package/esm/models/operations/listworkspaces.d.ts +2 -2
  90. package/esm/models/operations/listworkspaces.js +2 -2
  91. package/esm/models/responsesrequest.d.ts +5 -5
  92. package/esm/models/responsesrequest.js +3 -3
  93. package/esm/models/searchmodelsservertoolopenrouter.d.ts +28 -0
  94. package/esm/models/searchmodelsservertoolopenrouter.js +20 -0
  95. package/esm/models/updateobservabilitydestinationrequest.d.ts +3 -3
  96. package/esm/models/updateobservabilitydestinationrequest.js +2 -2
  97. package/esm/sdk/embeddings.d.ts +4 -2
  98. package/esm/sdk/embeddings.js +2 -1
  99. package/esm/sdk/models.d.ts +7 -2
  100. package/esm/sdk/models.js +3 -2
  101. package/jsr.json +1 -1
  102. package/package.json +8 -8
  103. package/esm/models/anthropiccitationsearchresultlocation.d.ts +0 -24
  104. package/esm/models/anthropiccitationwebsearchresultlocation.d.ts +0 -20
@@ -13,7 +13,6 @@ import { AnthropicToolUsesTrigger, AnthropicToolUsesTrigger$Outbound } from "./a
13
13
  import { AnthropicWebSearchToolUserLocation, AnthropicWebSearchToolUserLocation$Outbound } from "./anthropicwebsearchtooluserlocation.js";
14
14
  import { AutoRouterPlugin, AutoRouterPlugin$Outbound } from "./autorouterplugin.js";
15
15
  import { BashServerTool, BashServerTool$Outbound } from "./bashservertool.js";
16
- import { ChatSearchModelsServerTool, ChatSearchModelsServerTool$Outbound } from "./chatsearchmodelsservertool.js";
17
16
  import { ContextCompressionPlugin, ContextCompressionPlugin$Outbound } from "./contextcompressionplugin.js";
18
17
  import { DatetimeServerTool, DatetimeServerTool$Outbound } from "./datetimeservertool.js";
19
18
  import { FileParserPlugin, FileParserPlugin$Outbound } from "./fileparserplugin.js";
@@ -22,6 +21,7 @@ import { ImageGenerationServerToolOpenRouter, ImageGenerationServerToolOpenRoute
22
21
  import { MessagesFallbackParam, MessagesFallbackParam$Outbound } from "./messagesfallbackparam.js";
23
22
  import { MessagesMessageParam, MessagesMessageParam$Outbound } from "./messagesmessageparam.js";
24
23
  import { MessagesOutputConfig, MessagesOutputConfig$Outbound } from "./messagesoutputconfig.js";
24
+ import { MessagesSearchModelsServerTool, MessagesSearchModelsServerTool$Outbound } from "./messagessearchmodelsservertool.js";
25
25
  import { ModerationPlugin, ModerationPlugin$Outbound } from "./moderationplugin.js";
26
26
  import { OpenRouterWebSearchServerTool, OpenRouterWebSearchServerTool$Outbound } from "./openrouterwebsearchservertool.js";
27
27
  import { ParetoRouterPlugin, ParetoRouterPlugin$Outbound } from "./paretorouterplugin.js";
@@ -255,7 +255,7 @@ export type ToolCustom = {
255
255
  name: string;
256
256
  type?: ToolTypeCustom | undefined;
257
257
  };
258
- export type MessagesRequestToolUnion = ToolAdvisor20260301 | ToolCustom | ToolBash20250124 | ToolTextEditor20250124 | ToolWebSearch20250305 | ToolWebSearch20260209 | BashServerTool | DatetimeServerTool | ImageGenerationServerToolOpenRouter | ChatSearchModelsServerTool | WebFetchServerTool | OpenRouterWebSearchServerTool | MessagesRequestTool;
258
+ export type MessagesRequestToolUnion = ToolAdvisor20260301 | ToolCustom | ToolBash20250124 | ToolTextEditor20250124 | ToolWebSearch20250305 | ToolWebSearch20260209 | BashServerTool | DatetimeServerTool | ImageGenerationServerToolOpenRouter | MessagesSearchModelsServerTool | WebFetchServerTool | OpenRouterWebSearchServerTool | MessagesRequestTool;
259
259
  /**
260
260
  * Request schema for Anthropic Messages API endpoint
261
261
  */
@@ -302,7 +302,7 @@ export type MessagesRequest = {
302
302
  temperature?: number | undefined;
303
303
  thinking?: ThinkingEnabled | ThinkingDisabled | ThinkingAdaptive | undefined;
304
304
  toolChoice?: ToolChoiceAuto | ToolChoiceAny | ToolChoiceNone | ToolChoiceTool | undefined;
305
- tools?: Array<ToolAdvisor20260301 | ToolCustom | ToolBash20250124 | ToolTextEditor20250124 | ToolWebSearch20250305 | ToolWebSearch20260209 | BashServerTool | DatetimeServerTool | ImageGenerationServerToolOpenRouter | ChatSearchModelsServerTool | WebFetchServerTool | OpenRouterWebSearchServerTool | MessagesRequestTool> | undefined;
305
+ tools?: Array<ToolAdvisor20260301 | ToolCustom | ToolBash20250124 | ToolTextEditor20250124 | ToolWebSearch20250305 | ToolWebSearch20260209 | BashServerTool | DatetimeServerTool | ImageGenerationServerToolOpenRouter | MessagesSearchModelsServerTool | WebFetchServerTool | OpenRouterWebSearchServerTool | MessagesRequestTool> | undefined;
306
306
  topK?: number | undefined;
307
307
  topP?: number | undefined;
308
308
  /**
@@ -598,7 +598,7 @@ export type ToolCustom$Outbound = {
598
598
  export declare const ToolCustom$outboundSchema: z.ZodType<ToolCustom$Outbound, ToolCustom>;
599
599
  export declare function toolCustomToJSON(toolCustom: ToolCustom): string;
600
600
  /** @internal */
601
- export type MessagesRequestToolUnion$Outbound = ToolAdvisor20260301$Outbound | ToolCustom$Outbound | ToolBash20250124$Outbound | ToolTextEditor20250124$Outbound | ToolWebSearch20250305$Outbound | ToolWebSearch20260209$Outbound | BashServerTool$Outbound | DatetimeServerTool$Outbound | ImageGenerationServerToolOpenRouter$Outbound | ChatSearchModelsServerTool$Outbound | WebFetchServerTool$Outbound | OpenRouterWebSearchServerTool$Outbound | MessagesRequestTool$Outbound;
601
+ export type MessagesRequestToolUnion$Outbound = ToolAdvisor20260301$Outbound | ToolCustom$Outbound | ToolBash20250124$Outbound | ToolTextEditor20250124$Outbound | ToolWebSearch20250305$Outbound | ToolWebSearch20260209$Outbound | BashServerTool$Outbound | DatetimeServerTool$Outbound | ImageGenerationServerToolOpenRouter$Outbound | MessagesSearchModelsServerTool$Outbound | WebFetchServerTool$Outbound | OpenRouterWebSearchServerTool$Outbound | MessagesRequestTool$Outbound;
602
602
  /** @internal */
603
603
  export declare const MessagesRequestToolUnion$outboundSchema: z.ZodType<MessagesRequestToolUnion$Outbound, MessagesRequestToolUnion>;
604
604
  export declare function messagesRequestToolUnionToJSON(messagesRequestToolUnion: MessagesRequestToolUnion): string;
@@ -625,7 +625,7 @@ export type MessagesRequest$Outbound = {
625
625
  temperature?: number | undefined;
626
626
  thinking?: ThinkingEnabled$Outbound | ThinkingDisabled$Outbound | ThinkingAdaptive$Outbound | undefined;
627
627
  tool_choice?: ToolChoiceAuto$Outbound | ToolChoiceAny$Outbound | ToolChoiceNone$Outbound | ToolChoiceTool$Outbound | undefined;
628
- tools?: Array<ToolAdvisor20260301$Outbound | ToolCustom$Outbound | ToolBash20250124$Outbound | ToolTextEditor20250124$Outbound | ToolWebSearch20250305$Outbound | ToolWebSearch20260209$Outbound | BashServerTool$Outbound | DatetimeServerTool$Outbound | ImageGenerationServerToolOpenRouter$Outbound | ChatSearchModelsServerTool$Outbound | WebFetchServerTool$Outbound | OpenRouterWebSearchServerTool$Outbound | MessagesRequestTool$Outbound> | undefined;
628
+ tools?: Array<ToolAdvisor20260301$Outbound | ToolCustom$Outbound | ToolBash20250124$Outbound | ToolTextEditor20250124$Outbound | ToolWebSearch20250305$Outbound | ToolWebSearch20260209$Outbound | BashServerTool$Outbound | DatetimeServerTool$Outbound | ImageGenerationServerToolOpenRouter$Outbound | MessagesSearchModelsServerTool$Outbound | WebFetchServerTool$Outbound | OpenRouterWebSearchServerTool$Outbound | MessagesRequestTool$Outbound> | undefined;
629
629
  top_k?: number | undefined;
630
630
  top_p?: number | undefined;
631
631
  trace?: TraceConfig$Outbound | undefined;
@@ -18,7 +18,6 @@ import { AnthropicToolUsesTrigger$outboundSchema, } from "./anthropictoolusestri
18
18
  import { AnthropicWebSearchToolUserLocation$outboundSchema, } from "./anthropicwebsearchtooluserlocation.js";
19
19
  import { AutoRouterPlugin$outboundSchema, } from "./autorouterplugin.js";
20
20
  import { BashServerTool$outboundSchema, } from "./bashservertool.js";
21
- import { ChatSearchModelsServerTool$outboundSchema, } from "./chatsearchmodelsservertool.js";
22
21
  import { ContextCompressionPlugin$outboundSchema, } from "./contextcompressionplugin.js";
23
22
  import { DatetimeServerTool$outboundSchema, } from "./datetimeservertool.js";
24
23
  import { FileParserPlugin$outboundSchema, } from "./fileparserplugin.js";
@@ -27,6 +26,7 @@ import { ImageGenerationServerToolOpenRouter$outboundSchema, } from "./imagegene
27
26
  import { MessagesFallbackParam$outboundSchema, } from "./messagesfallbackparam.js";
28
27
  import { MessagesMessageParam$outboundSchema, } from "./messagesmessageparam.js";
29
28
  import { MessagesOutputConfig$outboundSchema, } from "./messagesoutputconfig.js";
29
+ import { MessagesSearchModelsServerTool$outboundSchema, } from "./messagessearchmodelsservertool.js";
30
30
  import { ModerationPlugin$outboundSchema, } from "./moderationplugin.js";
31
31
  import { OpenRouterWebSearchServerTool$outboundSchema, } from "./openrouterwebsearchservertool.js";
32
32
  import { ParetoRouterPlugin$outboundSchema, } from "./paretorouterplugin.js";
@@ -518,7 +518,7 @@ export const MessagesRequestToolUnion$outboundSchema = z.union([
518
518
  BashServerTool$outboundSchema,
519
519
  DatetimeServerTool$outboundSchema,
520
520
  ImageGenerationServerToolOpenRouter$outboundSchema,
521
- ChatSearchModelsServerTool$outboundSchema,
521
+ MessagesSearchModelsServerTool$outboundSchema,
522
522
  WebFetchServerTool$outboundSchema,
523
523
  OpenRouterWebSearchServerTool$outboundSchema,
524
524
  z.lazy(() => MessagesRequestTool$outboundSchema),
@@ -582,7 +582,7 @@ export const MessagesRequest$outboundSchema = z.object({
582
582
  BashServerTool$outboundSchema,
583
583
  DatetimeServerTool$outboundSchema,
584
584
  ImageGenerationServerToolOpenRouter$outboundSchema,
585
- ChatSearchModelsServerTool$outboundSchema,
585
+ MessagesSearchModelsServerTool$outboundSchema,
586
586
  WebFetchServerTool$outboundSchema,
587
587
  OpenRouterWebSearchServerTool$outboundSchema,
588
588
  z.lazy(() => MessagesRequestTool$outboundSchema),
@@ -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 MessagesSearchModelsServerToolType: {
5
+ readonly OpenrouterExperimentalSearchModels: "openrouter:experimental__search_models";
6
+ };
7
+ export type MessagesSearchModelsServerToolType = ClosedEnum<typeof MessagesSearchModelsServerToolType>;
8
+ /**
9
+ * OpenRouter built-in server tool: searches and filters AI models available on OpenRouter
10
+ */
11
+ export type MessagesSearchModelsServerTool = {
12
+ /**
13
+ * Configuration for the openrouter:experimental__search_models server tool
14
+ */
15
+ parameters?: SearchModelsServerToolConfig | undefined;
16
+ type: MessagesSearchModelsServerToolType;
17
+ };
18
+ /** @internal */
19
+ export declare const MessagesSearchModelsServerToolType$outboundSchema: z.ZodEnum<typeof MessagesSearchModelsServerToolType>;
20
+ /** @internal */
21
+ export type MessagesSearchModelsServerTool$Outbound = {
22
+ parameters?: SearchModelsServerToolConfig$Outbound | undefined;
23
+ type: string;
24
+ };
25
+ /** @internal */
26
+ export declare const MessagesSearchModelsServerTool$outboundSchema: z.ZodType<MessagesSearchModelsServerTool$Outbound, MessagesSearchModelsServerTool>;
27
+ export declare function messagesSearchModelsServerToolToJSON(messagesSearchModelsServerTool: MessagesSearchModelsServerTool): string;
28
+ //# sourceMappingURL=messagessearchmodelsservertool.d.ts.map
@@ -0,0 +1,20 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 5ae7644a901f
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { SearchModelsServerToolConfig$outboundSchema, } from "./searchmodelsservertoolconfig.js";
7
+ export const MessagesSearchModelsServerToolType = {
8
+ OpenrouterExperimentalSearchModels: "openrouter:experimental__search_models",
9
+ };
10
+ /** @internal */
11
+ export const MessagesSearchModelsServerToolType$outboundSchema = z.enum(MessagesSearchModelsServerToolType);
12
+ /** @internal */
13
+ export const MessagesSearchModelsServerTool$outboundSchema = z.object({
14
+ parameters: SearchModelsServerToolConfig$outboundSchema.optional(),
15
+ type: MessagesSearchModelsServerToolType$outboundSchema,
16
+ });
17
+ export function messagesSearchModelsServerToolToJSON(messagesSearchModelsServerTool) {
18
+ return JSON.stringify(MessagesSearchModelsServerTool$outboundSchema.parse(messagesSearchModelsServerTool));
19
+ }
20
+ //# sourceMappingURL=messagessearchmodelsservertool.js.map
@@ -1,41 +1,10 @@
1
1
  import * as z from "zod/v4";
2
- import { OpenEnum } from "../types/enums.js";
3
2
  import { Result as SafeParseResult } from "../types/fp.js";
4
3
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
4
  import { InputModality } from "./inputmodality.js";
5
+ import { InstructType } from "./instructtype.js";
6
6
  import { ModelGroup } from "./modelgroup.js";
7
7
  import { OutputModality } from "./outputmodality.js";
8
- /**
9
- * Instruction format type
10
- */
11
- export declare const ModelArchitectureInstructType: {
12
- readonly None: "none";
13
- readonly Airoboros: "airoboros";
14
- readonly Alpaca: "alpaca";
15
- readonly AlpacaModif: "alpaca-modif";
16
- readonly Chatml: "chatml";
17
- readonly Claude: "claude";
18
- readonly CodeLlama: "code-llama";
19
- readonly Gemma: "gemma";
20
- readonly Llama2: "llama2";
21
- readonly Llama3: "llama3";
22
- readonly Mistral: "mistral";
23
- readonly Nemotron: "nemotron";
24
- readonly Neural: "neural";
25
- readonly Openchat: "openchat";
26
- readonly Phi3: "phi3";
27
- readonly Rwkv: "rwkv";
28
- readonly Vicuna: "vicuna";
29
- readonly Zephyr: "zephyr";
30
- readonly DeepseekR1: "deepseek-r1";
31
- readonly DeepseekV31: "deepseek-v3.1";
32
- readonly Qwq: "qwq";
33
- readonly Qwen3: "qwen3";
34
- };
35
- /**
36
- * Instruction format type
37
- */
38
- export type ModelArchitectureInstructType = OpenEnum<typeof ModelArchitectureInstructType>;
39
8
  /**
40
9
  * Model architecture information
41
10
  */
@@ -47,7 +16,7 @@ export type ModelArchitecture = {
47
16
  /**
48
17
  * Instruction format type
49
18
  */
50
- instructType?: ModelArchitectureInstructType | null | undefined;
19
+ instructType?: InstructType | null | undefined;
51
20
  /**
52
21
  * Primary modality of the model
53
22
  */
@@ -62,8 +31,6 @@ export type ModelArchitecture = {
62
31
  tokenizer?: ModelGroup | undefined;
63
32
  };
64
33
  /** @internal */
65
- export declare const ModelArchitectureInstructType$inboundSchema: z.ZodType<ModelArchitectureInstructType, unknown>;
66
- /** @internal */
67
34
  export declare const ModelArchitecture$inboundSchema: z.ZodType<ModelArchitecture, unknown>;
68
35
  export declare function modelArchitectureFromJSON(jsonString: string): SafeParseResult<ModelArchitecture, SDKValidationError>;
69
36
  //# sourceMappingURL=modelarchitecture.d.ts.map
@@ -5,44 +5,14 @@
5
5
  import * as z from "zod/v4";
6
6
  import { remap as remap$ } from "../lib/primitives.js";
7
7
  import { safeParse } from "../lib/schemas.js";
8
- import * as openEnums from "../types/enums.js";
9
8
  import { InputModality$inboundSchema } from "./inputmodality.js";
9
+ import { InstructType$inboundSchema } from "./instructtype.js";
10
10
  import { ModelGroup$inboundSchema } from "./modelgroup.js";
11
11
  import { OutputModality$inboundSchema, } from "./outputmodality.js";
12
- /**
13
- * Instruction format type
14
- */
15
- export const ModelArchitectureInstructType = {
16
- None: "none",
17
- Airoboros: "airoboros",
18
- Alpaca: "alpaca",
19
- AlpacaModif: "alpaca-modif",
20
- Chatml: "chatml",
21
- Claude: "claude",
22
- CodeLlama: "code-llama",
23
- Gemma: "gemma",
24
- Llama2: "llama2",
25
- Llama3: "llama3",
26
- Mistral: "mistral",
27
- Nemotron: "nemotron",
28
- Neural: "neural",
29
- Openchat: "openchat",
30
- Phi3: "phi3",
31
- Rwkv: "rwkv",
32
- Vicuna: "vicuna",
33
- Zephyr: "zephyr",
34
- DeepseekR1: "deepseek-r1",
35
- DeepseekV31: "deepseek-v3.1",
36
- Qwq: "qwq",
37
- Qwen3: "qwen3",
38
- };
39
- /** @internal */
40
- export const ModelArchitectureInstructType$inboundSchema = openEnums.inboundSchema(ModelArchitectureInstructType);
41
12
  /** @internal */
42
13
  export const ModelArchitecture$inboundSchema = z.object({
43
14
  input_modalities: z.array(InputModality$inboundSchema),
44
- instruct_type: z.nullable(ModelArchitectureInstructType$inboundSchema)
45
- .optional(),
15
+ instruct_type: z.nullable(InstructType$inboundSchema).optional(),
46
16
  modality: z.nullable(z.string()),
47
17
  output_modalities: z.array(OutputModality$inboundSchema),
48
18
  tokenizer: ModelGroup$inboundSchema.optional(),
@@ -2,6 +2,15 @@ import * as z from "zod/v4";
2
2
  import { Result as SafeParseResult } from "../types/fp.js";
3
3
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
4
  import { Model } from "./model.js";
5
+ /**
6
+ * Pagination links
7
+ */
8
+ export type Links = {
9
+ /**
10
+ * URL for the next page of results, or null if this is the last page
11
+ */
12
+ next: string | null;
13
+ };
5
14
  /**
6
15
  * List of available models
7
16
  */
@@ -10,8 +19,19 @@ export type ModelsListResponse = {
10
19
  * List of available models
11
20
  */
12
21
  data: Array<Model>;
22
+ /**
23
+ * Pagination links
24
+ */
25
+ links: Links;
26
+ /**
27
+ * Total number of models matching the query
28
+ */
29
+ totalCount: number;
13
30
  };
14
31
  /** @internal */
32
+ export declare const Links$inboundSchema: z.ZodType<Links, unknown>;
33
+ export declare function linksFromJSON(jsonString: string): SafeParseResult<Links, SDKValidationError>;
34
+ /** @internal */
15
35
  export declare const ModelsListResponse$inboundSchema: z.ZodType<ModelsListResponse, unknown>;
16
36
  export declare function modelsListResponseFromJSON(jsonString: string): SafeParseResult<ModelsListResponse, SDKValidationError>;
17
37
  //# sourceMappingURL=modelslistresponse.d.ts.map
@@ -3,11 +3,25 @@
3
3
  * @generated-id: ea0e62a13d8d
4
4
  */
5
5
  import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
6
7
  import { safeParse } from "../lib/schemas.js";
7
8
  import { Model$inboundSchema } from "./model.js";
8
9
  /** @internal */
10
+ export const Links$inboundSchema = z.object({
11
+ next: z.nullable(z.string()),
12
+ });
13
+ export function linksFromJSON(jsonString) {
14
+ return safeParse(jsonString, (x) => Links$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Links' from JSON`);
15
+ }
16
+ /** @internal */
9
17
  export const ModelsListResponse$inboundSchema = z.object({
10
18
  data: z.array(Model$inboundSchema),
19
+ links: z.lazy(() => Links$inboundSchema),
20
+ total_count: z.int(),
21
+ }).transform((v) => {
22
+ return remap$(v, {
23
+ "total_count": "totalCount",
24
+ });
11
25
  });
12
26
  export function modelsListResponseFromJSON(jsonString) {
13
27
  return safeParse(jsonString, (x) => ModelsListResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ModelsListResponse' from JSON`);
@@ -0,0 +1,94 @@
1
+ import * as z from "zod/v4";
2
+ import { OpenEnum } from "../types/enums.js";
3
+ import { Result as SafeParseResult } from "../types/fp.js";
4
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
+ export declare const Logic: {
6
+ readonly And: "and";
7
+ readonly Or: "or";
8
+ };
9
+ export type Logic = OpenEnum<typeof Logic>;
10
+ export declare const Field: {
11
+ readonly Model: "model";
12
+ readonly Provider: "provider";
13
+ readonly SessionId: "session_id";
14
+ readonly UserId: "user_id";
15
+ readonly ApiKeyName: "api_key_name";
16
+ readonly FinishReason: "finish_reason";
17
+ readonly Input: "input";
18
+ readonly Output: "output";
19
+ readonly TotalCost: "total_cost";
20
+ readonly TotalTokens: "total_tokens";
21
+ readonly PromptTokens: "prompt_tokens";
22
+ readonly CompletionTokens: "completion_tokens";
23
+ };
24
+ export type Field = OpenEnum<typeof Field>;
25
+ export declare const Operator: {
26
+ readonly Equals: "equals";
27
+ readonly NotEquals: "not_equals";
28
+ readonly Contains: "contains";
29
+ readonly NotContains: "not_contains";
30
+ readonly Regex: "regex";
31
+ readonly StartsWith: "starts_with";
32
+ readonly EndsWith: "ends_with";
33
+ readonly Gt: "gt";
34
+ readonly Lt: "lt";
35
+ readonly Gte: "gte";
36
+ readonly Lte: "lte";
37
+ readonly Exists: "exists";
38
+ readonly NotExists: "not_exists";
39
+ };
40
+ export type Operator = OpenEnum<typeof Operator>;
41
+ export type ObservabilityFilterRuleGroupValue = string | number;
42
+ export type Rule = {
43
+ field: Field;
44
+ operator: Operator;
45
+ value?: string | number | undefined;
46
+ };
47
+ export type ObservabilityFilterRuleGroup = {
48
+ logic?: Logic | undefined;
49
+ rules: Array<Rule>;
50
+ };
51
+ /** @internal */
52
+ export declare const Logic$inboundSchema: z.ZodType<Logic, unknown>;
53
+ /** @internal */
54
+ export declare const Logic$outboundSchema: z.ZodType<string, Logic>;
55
+ /** @internal */
56
+ export declare const Field$inboundSchema: z.ZodType<Field, unknown>;
57
+ /** @internal */
58
+ export declare const Field$outboundSchema: z.ZodType<string, Field>;
59
+ /** @internal */
60
+ export declare const Operator$inboundSchema: z.ZodType<Operator, unknown>;
61
+ /** @internal */
62
+ export declare const Operator$outboundSchema: z.ZodType<string, Operator>;
63
+ /** @internal */
64
+ export declare const ObservabilityFilterRuleGroupValue$inboundSchema: z.ZodType<ObservabilityFilterRuleGroupValue, unknown>;
65
+ /** @internal */
66
+ export type ObservabilityFilterRuleGroupValue$Outbound = string | number;
67
+ /** @internal */
68
+ export declare const ObservabilityFilterRuleGroupValue$outboundSchema: z.ZodType<ObservabilityFilterRuleGroupValue$Outbound, ObservabilityFilterRuleGroupValue>;
69
+ export declare function observabilityFilterRuleGroupValueToJSON(observabilityFilterRuleGroupValue: ObservabilityFilterRuleGroupValue): string;
70
+ export declare function observabilityFilterRuleGroupValueFromJSON(jsonString: string): SafeParseResult<ObservabilityFilterRuleGroupValue, SDKValidationError>;
71
+ /** @internal */
72
+ export declare const Rule$inboundSchema: z.ZodType<Rule, unknown>;
73
+ /** @internal */
74
+ export type Rule$Outbound = {
75
+ field: string;
76
+ operator: string;
77
+ value?: string | number | undefined;
78
+ };
79
+ /** @internal */
80
+ export declare const Rule$outboundSchema: z.ZodType<Rule$Outbound, Rule>;
81
+ export declare function ruleToJSON(rule: Rule): string;
82
+ export declare function ruleFromJSON(jsonString: string): SafeParseResult<Rule, SDKValidationError>;
83
+ /** @internal */
84
+ export declare const ObservabilityFilterRuleGroup$inboundSchema: z.ZodType<ObservabilityFilterRuleGroup, unknown>;
85
+ /** @internal */
86
+ export type ObservabilityFilterRuleGroup$Outbound = {
87
+ logic: string;
88
+ rules: Array<Rule$Outbound>;
89
+ };
90
+ /** @internal */
91
+ export declare const ObservabilityFilterRuleGroup$outboundSchema: z.ZodType<ObservabilityFilterRuleGroup$Outbound, ObservabilityFilterRuleGroup>;
92
+ export declare function observabilityFilterRuleGroupToJSON(observabilityFilterRuleGroup: ObservabilityFilterRuleGroup): string;
93
+ export declare function observabilityFilterRuleGroupFromJSON(jsonString: string): SafeParseResult<ObservabilityFilterRuleGroup, SDKValidationError>;
94
+ //# sourceMappingURL=observabilityfilterrulegroup.d.ts.map
@@ -0,0 +1,103 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 8d44f7499b39
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { safeParse } from "../lib/schemas.js";
7
+ import * as openEnums from "../types/enums.js";
8
+ export const Logic = {
9
+ And: "and",
10
+ Or: "or",
11
+ };
12
+ export const Field = {
13
+ Model: "model",
14
+ Provider: "provider",
15
+ SessionId: "session_id",
16
+ UserId: "user_id",
17
+ ApiKeyName: "api_key_name",
18
+ FinishReason: "finish_reason",
19
+ Input: "input",
20
+ Output: "output",
21
+ TotalCost: "total_cost",
22
+ TotalTokens: "total_tokens",
23
+ PromptTokens: "prompt_tokens",
24
+ CompletionTokens: "completion_tokens",
25
+ };
26
+ export const Operator = {
27
+ Equals: "equals",
28
+ NotEquals: "not_equals",
29
+ Contains: "contains",
30
+ NotContains: "not_contains",
31
+ Regex: "regex",
32
+ StartsWith: "starts_with",
33
+ EndsWith: "ends_with",
34
+ Gt: "gt",
35
+ Lt: "lt",
36
+ Gte: "gte",
37
+ Lte: "lte",
38
+ Exists: "exists",
39
+ NotExists: "not_exists",
40
+ };
41
+ /** @internal */
42
+ export const Logic$inboundSchema = openEnums
43
+ .inboundSchema(Logic);
44
+ /** @internal */
45
+ export const Logic$outboundSchema = openEnums
46
+ .outboundSchema(Logic);
47
+ /** @internal */
48
+ export const Field$inboundSchema = openEnums
49
+ .inboundSchema(Field);
50
+ /** @internal */
51
+ export const Field$outboundSchema = openEnums
52
+ .outboundSchema(Field);
53
+ /** @internal */
54
+ export const Operator$inboundSchema = openEnums
55
+ .inboundSchema(Operator);
56
+ /** @internal */
57
+ export const Operator$outboundSchema = openEnums
58
+ .outboundSchema(Operator);
59
+ /** @internal */
60
+ export const ObservabilityFilterRuleGroupValue$inboundSchema = z.union([z.string(), z.number()]);
61
+ /** @internal */
62
+ export const ObservabilityFilterRuleGroupValue$outboundSchema = z.union([z.string(), z.number()]);
63
+ export function observabilityFilterRuleGroupValueToJSON(observabilityFilterRuleGroupValue) {
64
+ return JSON.stringify(ObservabilityFilterRuleGroupValue$outboundSchema.parse(observabilityFilterRuleGroupValue));
65
+ }
66
+ export function observabilityFilterRuleGroupValueFromJSON(jsonString) {
67
+ return safeParse(jsonString, (x) => ObservabilityFilterRuleGroupValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ObservabilityFilterRuleGroupValue' from JSON`);
68
+ }
69
+ /** @internal */
70
+ export const Rule$inboundSchema = z.object({
71
+ field: Field$inboundSchema,
72
+ operator: Operator$inboundSchema,
73
+ value: z.union([z.string(), z.number()]).optional(),
74
+ });
75
+ /** @internal */
76
+ export const Rule$outboundSchema = z.object({
77
+ field: Field$outboundSchema,
78
+ operator: Operator$outboundSchema,
79
+ value: z.union([z.string(), z.number()]).optional(),
80
+ });
81
+ export function ruleToJSON(rule) {
82
+ return JSON.stringify(Rule$outboundSchema.parse(rule));
83
+ }
84
+ export function ruleFromJSON(jsonString) {
85
+ return safeParse(jsonString, (x) => Rule$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Rule' from JSON`);
86
+ }
87
+ /** @internal */
88
+ export const ObservabilityFilterRuleGroup$inboundSchema = z.object({
89
+ logic: Logic$inboundSchema.default("and"),
90
+ rules: z.array(z.lazy(() => Rule$inboundSchema)),
91
+ });
92
+ /** @internal */
93
+ export const ObservabilityFilterRuleGroup$outboundSchema = z.object({
94
+ logic: Logic$outboundSchema.default("and"),
95
+ rules: z.array(z.lazy(() => Rule$outboundSchema)),
96
+ });
97
+ export function observabilityFilterRuleGroupToJSON(observabilityFilterRuleGroup) {
98
+ return JSON.stringify(ObservabilityFilterRuleGroup$outboundSchema.parse(observabilityFilterRuleGroup));
99
+ }
100
+ export function observabilityFilterRuleGroupFromJSON(jsonString) {
101
+ return safeParse(jsonString, (x) => ObservabilityFilterRuleGroup$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ObservabilityFilterRuleGroup' from JSON`);
102
+ }
103
+ //# sourceMappingURL=observabilityfilterrulegroup.js.map
@@ -1,112 +1,15 @@
1
1
  import * as z from "zod/v4";
2
- import { OpenEnum } from "../types/enums.js";
3
2
  import { Result as SafeParseResult } from "../types/fp.js";
4
3
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
- export declare const Logic: {
6
- readonly And: "and";
7
- readonly Or: "or";
8
- };
9
- export type Logic = OpenEnum<typeof Logic>;
10
- export declare const Field: {
11
- readonly Model: "model";
12
- readonly Provider: "provider";
13
- readonly SessionId: "session_id";
14
- readonly UserId: "user_id";
15
- readonly ApiKeyName: "api_key_name";
16
- readonly FinishReason: "finish_reason";
17
- readonly Input: "input";
18
- readonly Output: "output";
19
- readonly TotalCost: "total_cost";
20
- readonly TotalTokens: "total_tokens";
21
- readonly PromptTokens: "prompt_tokens";
22
- readonly CompletionTokens: "completion_tokens";
23
- };
24
- export type Field = OpenEnum<typeof Field>;
25
- export declare const Operator: {
26
- readonly Equals: "equals";
27
- readonly NotEquals: "not_equals";
28
- readonly Contains: "contains";
29
- readonly NotContains: "not_contains";
30
- readonly Regex: "regex";
31
- readonly StartsWith: "starts_with";
32
- readonly EndsWith: "ends_with";
33
- readonly Gt: "gt";
34
- readonly Lt: "lt";
35
- readonly Gte: "gte";
36
- readonly Lte: "lte";
37
- readonly Exists: "exists";
38
- readonly NotExists: "not_exists";
39
- };
40
- export type Operator = OpenEnum<typeof Operator>;
41
- export type ObservabilityFilterRulesConfigValue = string | number;
42
- export type Rule = {
43
- field: Field;
44
- operator: Operator;
45
- value?: string | number | undefined;
46
- };
47
- export type Group = {
48
- logic?: Logic | undefined;
49
- rules: Array<Rule>;
50
- };
4
+ import { ObservabilityFilterRuleGroup } from "./observabilityfilterrulegroup.js";
51
5
  /**
52
6
  * Optional structured filter rules controlling which events are forwarded.
53
7
  */
54
8
  export type ObservabilityFilterRulesConfig = {
55
- enabled?: boolean | undefined;
56
- groups: Array<Group>;
57
- };
58
- /** @internal */
59
- export declare const Logic$inboundSchema: z.ZodType<Logic, unknown>;
60
- /** @internal */
61
- export declare const Logic$outboundSchema: z.ZodType<string, Logic>;
62
- /** @internal */
63
- export declare const Field$inboundSchema: z.ZodType<Field, unknown>;
64
- /** @internal */
65
- export declare const Field$outboundSchema: z.ZodType<string, Field>;
66
- /** @internal */
67
- export declare const Operator$inboundSchema: z.ZodType<Operator, unknown>;
68
- /** @internal */
69
- export declare const Operator$outboundSchema: z.ZodType<string, Operator>;
70
- /** @internal */
71
- export declare const ObservabilityFilterRulesConfigValue$inboundSchema: z.ZodType<ObservabilityFilterRulesConfigValue, unknown>;
72
- /** @internal */
73
- export type ObservabilityFilterRulesConfigValue$Outbound = string | number;
74
- /** @internal */
75
- export declare const ObservabilityFilterRulesConfigValue$outboundSchema: z.ZodType<ObservabilityFilterRulesConfigValue$Outbound, ObservabilityFilterRulesConfigValue>;
76
- export declare function observabilityFilterRulesConfigValueToJSON(observabilityFilterRulesConfigValue: ObservabilityFilterRulesConfigValue): string;
77
- export declare function observabilityFilterRulesConfigValueFromJSON(jsonString: string): SafeParseResult<ObservabilityFilterRulesConfigValue, SDKValidationError>;
78
- /** @internal */
79
- export declare const Rule$inboundSchema: z.ZodType<Rule, unknown>;
80
- /** @internal */
81
- export type Rule$Outbound = {
82
- field: string;
83
- operator: string;
84
- value?: string | number | undefined;
85
- };
86
- /** @internal */
87
- export declare const Rule$outboundSchema: z.ZodType<Rule$Outbound, Rule>;
88
- export declare function ruleToJSON(rule: Rule): string;
89
- export declare function ruleFromJSON(jsonString: string): SafeParseResult<Rule, SDKValidationError>;
90
- /** @internal */
91
- export declare const Group$inboundSchema: z.ZodType<Group, unknown>;
92
- /** @internal */
93
- export type Group$Outbound = {
94
- logic: string;
95
- rules: Array<Rule$Outbound>;
96
- };
97
- /** @internal */
98
- export declare const Group$outboundSchema: z.ZodType<Group$Outbound, Group>;
99
- export declare function groupToJSON(group: Group): string;
100
- export declare function groupFromJSON(jsonString: string): SafeParseResult<Group, SDKValidationError>;
101
- /** @internal */
102
- export declare const ObservabilityFilterRulesConfig$inboundSchema: z.ZodType<ObservabilityFilterRulesConfig, unknown>;
103
- /** @internal */
104
- export type ObservabilityFilterRulesConfig$Outbound = {
105
9
  enabled: boolean;
106
- groups: Array<Group$Outbound>;
10
+ groups: Array<ObservabilityFilterRuleGroup>;
107
11
  };
108
12
  /** @internal */
109
- export declare const ObservabilityFilterRulesConfig$outboundSchema: z.ZodType<ObservabilityFilterRulesConfig$Outbound, ObservabilityFilterRulesConfig>;
110
- export declare function observabilityFilterRulesConfigToJSON(observabilityFilterRulesConfig: ObservabilityFilterRulesConfig): string;
13
+ export declare const ObservabilityFilterRulesConfig$inboundSchema: z.ZodType<ObservabilityFilterRulesConfig, unknown>;
111
14
  export declare function observabilityFilterRulesConfigFromJSON(jsonString: string): SafeParseResult<ObservabilityFilterRulesConfig, SDKValidationError>;
112
15
  //# sourceMappingURL=observabilityfilterrulesconfig.d.ts.map