@openrouter/sdk 0.13.38 → 0.13.39

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 (46) hide show
  1. package/esm/lib/config.d.ts +2 -2
  2. package/esm/lib/config.js +2 -2
  3. package/esm/models/additionaltoolsitem.d.ts +117 -0
  4. package/esm/models/additionaltoolsitem.js +152 -0
  5. package/esm/models/applypatchservertool.d.ts +11 -2
  6. package/esm/models/applypatchservertool.js +9 -2
  7. package/esm/models/applypatchservertoolopenrouter.d.ts +9 -2
  8. package/esm/models/applypatchservertoolopenrouter.js +6 -1
  9. package/esm/models/codeinterpreterservertool.d.ts +10 -2
  10. package/esm/models/codeinterpreterservertool.js +9 -2
  11. package/esm/models/codexlocalshelltool.d.ts +11 -2
  12. package/esm/models/codexlocalshelltool.js +9 -2
  13. package/esm/models/computeruseservertool.d.ts +11 -3
  14. package/esm/models/computeruseservertool.js +9 -2
  15. package/esm/models/customtool.d.ts +11 -3
  16. package/esm/models/customtool.js +9 -2
  17. package/esm/models/filesearchservertool.d.ts +11 -3
  18. package/esm/models/filesearchservertool.js +10 -2
  19. package/esm/models/imagegenerationservertool.d.ts +11 -3
  20. package/esm/models/imagegenerationservertool.js +9 -2
  21. package/esm/models/index.d.ts +1 -0
  22. package/esm/models/index.js +1 -0
  23. package/esm/models/inputsunion.d.ts +5 -4
  24. package/esm/models/inputsunion.js +3 -0
  25. package/esm/models/legacywebsearchservertool.d.ts +11 -2
  26. package/esm/models/legacywebsearchservertool.js +9 -2
  27. package/esm/models/mcpservertool.d.ts +10 -2
  28. package/esm/models/mcpservertool.js +9 -2
  29. package/esm/models/openresponsesresult.d.ts +54 -2
  30. package/esm/models/openresponsesresult.js +26 -26
  31. package/esm/models/preview20250311websearchservertool.d.ts +11 -2
  32. package/esm/models/preview20250311websearchservertool.js +9 -2
  33. package/esm/models/previewwebsearchservertool.d.ts +11 -2
  34. package/esm/models/previewwebsearchservertool.js +9 -2
  35. package/esm/models/responsesrequest.d.ts +140 -12
  36. package/esm/models/responsesrequest.js +32 -32
  37. package/esm/models/shellservertool.d.ts +11 -2
  38. package/esm/models/shellservertool.js +9 -2
  39. package/esm/models/shellservertoolopenrouter.d.ts +9 -2
  40. package/esm/models/shellservertoolopenrouter.js +6 -1
  41. package/esm/models/websearchservertool.d.ts +11 -2
  42. package/esm/models/websearchservertool.js +9 -2
  43. package/esm/models/websearchservertoolopenrouter.d.ts +9 -2
  44. package/esm/models/websearchservertoolopenrouter.js +6 -1
  45. package/jsr.json +1 -1
  46. package/package.json +6 -6
@@ -49,8 +49,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
49
49
  export declare const SDK_METADATA: {
50
50
  readonly language: "typescript";
51
51
  readonly openapiDocVersion: "1.0.0";
52
- readonly sdkVersion: "0.13.38";
52
+ readonly sdkVersion: "0.13.39";
53
53
  readonly genVersion: "2.884.4";
54
- readonly userAgent: "speakeasy-sdk/typescript 0.13.38 2.884.4 1.0.0 @openrouter/sdk";
54
+ readonly userAgent: "speakeasy-sdk/typescript 0.13.39 2.884.4 1.0.0 @openrouter/sdk";
55
55
  };
56
56
  //# sourceMappingURL=config.d.ts.map
package/esm/lib/config.js CHANGED
@@ -26,8 +26,8 @@ export function serverURLFromOptions(options) {
26
26
  export const SDK_METADATA = {
27
27
  language: "typescript",
28
28
  openapiDocVersion: "1.0.0",
29
- sdkVersion: "0.13.38",
29
+ sdkVersion: "0.13.39",
30
30
  genVersion: "2.884.4",
31
- userAgent: "speakeasy-sdk/typescript 0.13.38 2.884.4 1.0.0 @openrouter/sdk",
31
+ userAgent: "speakeasy-sdk/typescript 0.13.39 2.884.4 1.0.0 @openrouter/sdk",
32
32
  };
33
33
  //# sourceMappingURL=config.js.map
@@ -0,0 +1,117 @@
1
+ import * as z from "zod/v4";
2
+ import { ClosedEnum, OpenEnum } from "../types/enums.js";
3
+ import { AdvisorServerToolOpenRouter, AdvisorServerToolOpenRouter$Outbound } from "./advisorservertoolopenrouter.js";
4
+ import { ApplyPatchServerTool, ApplyPatchServerTool$Outbound } from "./applypatchservertool.js";
5
+ import { ApplyPatchServerToolOpenRouter, ApplyPatchServerToolOpenRouter$Outbound } from "./applypatchservertoolopenrouter.js";
6
+ import { BashServerTool, BashServerTool$Outbound } from "./bashservertool.js";
7
+ import { ChatSearchModelsServerTool, ChatSearchModelsServerTool$Outbound } from "./chatsearchmodelsservertool.js";
8
+ import { CodeInterpreterServerTool, CodeInterpreterServerTool$Outbound } from "./codeinterpreterservertool.js";
9
+ import { CodexLocalShellTool, CodexLocalShellTool$Outbound } from "./codexlocalshelltool.js";
10
+ import { ComputerUseServerTool, ComputerUseServerTool$Outbound } from "./computeruseservertool.js";
11
+ import { CustomTool, CustomTool$Outbound } from "./customtool.js";
12
+ import { DatetimeServerTool, DatetimeServerTool$Outbound } from "./datetimeservertool.js";
13
+ import { FileSearchServerTool, FileSearchServerTool$Outbound } from "./filesearchservertool.js";
14
+ import { FilesServerTool, FilesServerTool$Outbound } from "./filesservertool.js";
15
+ import { FusionServerToolOpenRouter, FusionServerToolOpenRouter$Outbound } from "./fusionservertoolopenrouter.js";
16
+ import { ImageGenerationServerTool, ImageGenerationServerTool$Outbound } from "./imagegenerationservertool.js";
17
+ import { ImageGenerationServerToolOpenRouter, ImageGenerationServerToolOpenRouter$Outbound } from "./imagegenerationservertoolopenrouter.js";
18
+ import { LegacyWebSearchServerTool, LegacyWebSearchServerTool$Outbound } from "./legacywebsearchservertool.js";
19
+ import { McpServerTool, McpServerTool$Outbound } from "./mcpservertool.js";
20
+ import { Preview20250311WebSearchServerTool, Preview20250311WebSearchServerTool$Outbound } from "./preview20250311websearchservertool.js";
21
+ import { PreviewWebSearchServerTool, PreviewWebSearchServerTool$Outbound } from "./previewwebsearchservertool.js";
22
+ import { ShellServerTool, ShellServerTool$Outbound } from "./shellservertool.js";
23
+ import { ShellServerToolOpenRouter, ShellServerToolOpenRouter$Outbound } from "./shellservertoolopenrouter.js";
24
+ import { SubagentServerToolOpenRouter, SubagentServerToolOpenRouter$Outbound } from "./subagentservertoolopenrouter.js";
25
+ import { WebFetchServerTool, WebFetchServerTool$Outbound } from "./webfetchservertool.js";
26
+ import { WebSearchServerTool, WebSearchServerTool$Outbound } from "./websearchservertool.js";
27
+ import { WebSearchServerToolOpenRouter, WebSearchServerToolOpenRouter$Outbound } from "./websearchservertoolopenrouter.js";
28
+ export declare const AdditionalToolsItemRole: {
29
+ readonly Unknown: "unknown";
30
+ readonly User: "user";
31
+ readonly Assistant: "assistant";
32
+ readonly System: "system";
33
+ readonly Critic: "critic";
34
+ readonly Discriminator: "discriminator";
35
+ readonly Developer: "developer";
36
+ readonly Tool: "tool";
37
+ };
38
+ export type AdditionalToolsItemRole = OpenEnum<typeof AdditionalToolsItemRole>;
39
+ export type AdditionalToolsItemTool = {
40
+ type: string;
41
+ additionalProperties?: {
42
+ [k: string]: any | null;
43
+ } | undefined;
44
+ };
45
+ export declare const AdditionalToolsItemTypeFunction: {
46
+ readonly Function: "function";
47
+ };
48
+ export type AdditionalToolsItemTypeFunction = ClosedEnum<typeof AdditionalToolsItemTypeFunction>;
49
+ /**
50
+ * Function tool definition
51
+ */
52
+ export type AdditionalToolsItemToolFunction = {
53
+ description?: string | null | undefined;
54
+ name: string;
55
+ parameters: {
56
+ [k: string]: any | null;
57
+ } | null;
58
+ strict?: boolean | null | undefined;
59
+ type: AdditionalToolsItemTypeFunction;
60
+ };
61
+ export type AdditionalToolsItemToolUnion = ComputerUseServerTool | AdditionalToolsItemToolFunction | FileSearchServerTool | CodeInterpreterServerTool | McpServerTool | CustomTool | PreviewWebSearchServerTool | Preview20250311WebSearchServerTool | LegacyWebSearchServerTool | WebSearchServerTool | ImageGenerationServerTool | CodexLocalShellTool | ShellServerTool | ApplyPatchServerTool | AdvisorServerToolOpenRouter | SubagentServerToolOpenRouter | DatetimeServerTool | FilesServerTool | FusionServerToolOpenRouter | ImageGenerationServerToolOpenRouter | ChatSearchModelsServerTool | WebFetchServerTool | WebSearchServerToolOpenRouter | ApplyPatchServerToolOpenRouter | BashServerTool | ShellServerToolOpenRouter | AdditionalToolsItemTool;
62
+ export declare const TypeAdditionalTools: {
63
+ readonly AdditionalTools: "additional_tools";
64
+ };
65
+ export type TypeAdditionalTools = ClosedEnum<typeof TypeAdditionalTools>;
66
+ /**
67
+ * Additional tools made available to the model at this point in the input
68
+ */
69
+ export type AdditionalToolsItem = {
70
+ id?: string | null | undefined;
71
+ role: AdditionalToolsItemRole;
72
+ tools: Array<ComputerUseServerTool | AdditionalToolsItemToolFunction | FileSearchServerTool | CodeInterpreterServerTool | McpServerTool | CustomTool | PreviewWebSearchServerTool | Preview20250311WebSearchServerTool | LegacyWebSearchServerTool | WebSearchServerTool | ImageGenerationServerTool | CodexLocalShellTool | ShellServerTool | ApplyPatchServerTool | AdvisorServerToolOpenRouter | SubagentServerToolOpenRouter | DatetimeServerTool | FilesServerTool | FusionServerToolOpenRouter | ImageGenerationServerToolOpenRouter | ChatSearchModelsServerTool | WebFetchServerTool | WebSearchServerToolOpenRouter | ApplyPatchServerToolOpenRouter | BashServerTool | ShellServerToolOpenRouter | AdditionalToolsItemTool>;
73
+ type: TypeAdditionalTools;
74
+ };
75
+ /** @internal */
76
+ export declare const AdditionalToolsItemRole$outboundSchema: z.ZodType<string, AdditionalToolsItemRole>;
77
+ /** @internal */
78
+ export type AdditionalToolsItemTool$Outbound = {
79
+ type: string;
80
+ [additionalProperties: string]: unknown;
81
+ };
82
+ /** @internal */
83
+ export declare const AdditionalToolsItemTool$outboundSchema: z.ZodType<AdditionalToolsItemTool$Outbound, AdditionalToolsItemTool>;
84
+ export declare function additionalToolsItemToolToJSON(additionalToolsItemTool: AdditionalToolsItemTool): string;
85
+ /** @internal */
86
+ export declare const AdditionalToolsItemTypeFunction$outboundSchema: z.ZodEnum<typeof AdditionalToolsItemTypeFunction>;
87
+ /** @internal */
88
+ export type AdditionalToolsItemToolFunction$Outbound = {
89
+ description?: string | null | undefined;
90
+ name: string;
91
+ parameters: {
92
+ [k: string]: any | null;
93
+ } | null;
94
+ strict?: boolean | null | undefined;
95
+ type: string;
96
+ };
97
+ /** @internal */
98
+ export declare const AdditionalToolsItemToolFunction$outboundSchema: z.ZodType<AdditionalToolsItemToolFunction$Outbound, AdditionalToolsItemToolFunction>;
99
+ export declare function additionalToolsItemToolFunctionToJSON(additionalToolsItemToolFunction: AdditionalToolsItemToolFunction): string;
100
+ /** @internal */
101
+ export type AdditionalToolsItemToolUnion$Outbound = ComputerUseServerTool$Outbound | AdditionalToolsItemToolFunction$Outbound | FileSearchServerTool$Outbound | CodeInterpreterServerTool$Outbound | McpServerTool$Outbound | CustomTool$Outbound | PreviewWebSearchServerTool$Outbound | Preview20250311WebSearchServerTool$Outbound | LegacyWebSearchServerTool$Outbound | WebSearchServerTool$Outbound | ImageGenerationServerTool$Outbound | CodexLocalShellTool$Outbound | ShellServerTool$Outbound | ApplyPatchServerTool$Outbound | AdvisorServerToolOpenRouter$Outbound | SubagentServerToolOpenRouter$Outbound | DatetimeServerTool$Outbound | FilesServerTool$Outbound | FusionServerToolOpenRouter$Outbound | ImageGenerationServerToolOpenRouter$Outbound | ChatSearchModelsServerTool$Outbound | WebFetchServerTool$Outbound | WebSearchServerToolOpenRouter$Outbound | ApplyPatchServerToolOpenRouter$Outbound | BashServerTool$Outbound | ShellServerToolOpenRouter$Outbound | AdditionalToolsItemTool$Outbound;
102
+ /** @internal */
103
+ export declare const AdditionalToolsItemToolUnion$outboundSchema: z.ZodType<AdditionalToolsItemToolUnion$Outbound, AdditionalToolsItemToolUnion>;
104
+ export declare function additionalToolsItemToolUnionToJSON(additionalToolsItemToolUnion: AdditionalToolsItemToolUnion): string;
105
+ /** @internal */
106
+ export declare const TypeAdditionalTools$outboundSchema: z.ZodEnum<typeof TypeAdditionalTools>;
107
+ /** @internal */
108
+ export type AdditionalToolsItem$Outbound = {
109
+ id?: string | null | undefined;
110
+ role: string;
111
+ tools: Array<ComputerUseServerTool$Outbound | AdditionalToolsItemToolFunction$Outbound | FileSearchServerTool$Outbound | CodeInterpreterServerTool$Outbound | McpServerTool$Outbound | CustomTool$Outbound | PreviewWebSearchServerTool$Outbound | Preview20250311WebSearchServerTool$Outbound | LegacyWebSearchServerTool$Outbound | WebSearchServerTool$Outbound | ImageGenerationServerTool$Outbound | CodexLocalShellTool$Outbound | ShellServerTool$Outbound | ApplyPatchServerTool$Outbound | AdvisorServerToolOpenRouter$Outbound | SubagentServerToolOpenRouter$Outbound | DatetimeServerTool$Outbound | FilesServerTool$Outbound | FusionServerToolOpenRouter$Outbound | ImageGenerationServerToolOpenRouter$Outbound | ChatSearchModelsServerTool$Outbound | WebFetchServerTool$Outbound | WebSearchServerToolOpenRouter$Outbound | ApplyPatchServerToolOpenRouter$Outbound | BashServerTool$Outbound | ShellServerToolOpenRouter$Outbound | AdditionalToolsItemTool$Outbound>;
112
+ type: string;
113
+ };
114
+ /** @internal */
115
+ export declare const AdditionalToolsItem$outboundSchema: z.ZodType<AdditionalToolsItem$Outbound, AdditionalToolsItem>;
116
+ export declare function additionalToolsItemToJSON(additionalToolsItem: AdditionalToolsItem): string;
117
+ //# sourceMappingURL=additionaltoolsitem.d.ts.map
@@ -0,0 +1,152 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: d33059f81c21
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ import * as openEnums from "../types/enums.js";
8
+ import { AdvisorServerToolOpenRouter$outboundSchema, } from "./advisorservertoolopenrouter.js";
9
+ import { ApplyPatchServerTool$outboundSchema, } from "./applypatchservertool.js";
10
+ import { ApplyPatchServerToolOpenRouter$outboundSchema, } from "./applypatchservertoolopenrouter.js";
11
+ import { BashServerTool$outboundSchema, } from "./bashservertool.js";
12
+ import { ChatSearchModelsServerTool$outboundSchema, } from "./chatsearchmodelsservertool.js";
13
+ import { CodeInterpreterServerTool$outboundSchema, } from "./codeinterpreterservertool.js";
14
+ import { CodexLocalShellTool$outboundSchema, } from "./codexlocalshelltool.js";
15
+ import { ComputerUseServerTool$outboundSchema, } from "./computeruseservertool.js";
16
+ import { CustomTool$outboundSchema, } from "./customtool.js";
17
+ import { DatetimeServerTool$outboundSchema, } from "./datetimeservertool.js";
18
+ import { FileSearchServerTool$outboundSchema, } from "./filesearchservertool.js";
19
+ import { FilesServerTool$outboundSchema, } from "./filesservertool.js";
20
+ import { FusionServerToolOpenRouter$outboundSchema, } from "./fusionservertoolopenrouter.js";
21
+ import { ImageGenerationServerTool$outboundSchema, } from "./imagegenerationservertool.js";
22
+ import { ImageGenerationServerToolOpenRouter$outboundSchema, } from "./imagegenerationservertoolopenrouter.js";
23
+ import { LegacyWebSearchServerTool$outboundSchema, } from "./legacywebsearchservertool.js";
24
+ import { McpServerTool$outboundSchema, } from "./mcpservertool.js";
25
+ import { Preview20250311WebSearchServerTool$outboundSchema, } from "./preview20250311websearchservertool.js";
26
+ import { PreviewWebSearchServerTool$outboundSchema, } from "./previewwebsearchservertool.js";
27
+ import { ShellServerTool$outboundSchema, } from "./shellservertool.js";
28
+ import { ShellServerToolOpenRouter$outboundSchema, } from "./shellservertoolopenrouter.js";
29
+ import { SubagentServerToolOpenRouter$outboundSchema, } from "./subagentservertoolopenrouter.js";
30
+ import { WebFetchServerTool$outboundSchema, } from "./webfetchservertool.js";
31
+ import { WebSearchServerTool$outboundSchema, } from "./websearchservertool.js";
32
+ import { WebSearchServerToolOpenRouter$outboundSchema, } from "./websearchservertoolopenrouter.js";
33
+ export const AdditionalToolsItemRole = {
34
+ Unknown: "unknown",
35
+ User: "user",
36
+ Assistant: "assistant",
37
+ System: "system",
38
+ Critic: "critic",
39
+ Discriminator: "discriminator",
40
+ Developer: "developer",
41
+ Tool: "tool",
42
+ };
43
+ export const AdditionalToolsItemTypeFunction = {
44
+ Function: "function",
45
+ };
46
+ export const TypeAdditionalTools = {
47
+ AdditionalTools: "additional_tools",
48
+ };
49
+ /** @internal */
50
+ export const AdditionalToolsItemRole$outboundSchema = openEnums.outboundSchema(AdditionalToolsItemRole);
51
+ /** @internal */
52
+ export const AdditionalToolsItemTool$outboundSchema = z.object({
53
+ type: z.string(),
54
+ additionalProperties: z.record(z.string(), z.nullable(z.any())).optional(),
55
+ }).transform((v) => {
56
+ return {
57
+ ...v.additionalProperties,
58
+ ...remap$(v, {
59
+ additionalProperties: null,
60
+ }),
61
+ };
62
+ });
63
+ export function additionalToolsItemToolToJSON(additionalToolsItemTool) {
64
+ return JSON.stringify(AdditionalToolsItemTool$outboundSchema.parse(additionalToolsItemTool));
65
+ }
66
+ /** @internal */
67
+ export const AdditionalToolsItemTypeFunction$outboundSchema = z.enum(AdditionalToolsItemTypeFunction);
68
+ /** @internal */
69
+ export const AdditionalToolsItemToolFunction$outboundSchema = z.object({
70
+ description: z.nullable(z.string()).optional(),
71
+ name: z.string(),
72
+ parameters: z.nullable(z.record(z.string(), z.nullable(z.any()))),
73
+ strict: z.nullable(z.boolean()).optional(),
74
+ type: AdditionalToolsItemTypeFunction$outboundSchema,
75
+ });
76
+ export function additionalToolsItemToolFunctionToJSON(additionalToolsItemToolFunction) {
77
+ return JSON.stringify(AdditionalToolsItemToolFunction$outboundSchema.parse(additionalToolsItemToolFunction));
78
+ }
79
+ /** @internal */
80
+ export const AdditionalToolsItemToolUnion$outboundSchema = z.union([
81
+ ComputerUseServerTool$outboundSchema,
82
+ z.lazy(() => AdditionalToolsItemToolFunction$outboundSchema),
83
+ FileSearchServerTool$outboundSchema,
84
+ CodeInterpreterServerTool$outboundSchema,
85
+ McpServerTool$outboundSchema,
86
+ CustomTool$outboundSchema,
87
+ PreviewWebSearchServerTool$outboundSchema,
88
+ Preview20250311WebSearchServerTool$outboundSchema,
89
+ LegacyWebSearchServerTool$outboundSchema,
90
+ WebSearchServerTool$outboundSchema,
91
+ ImageGenerationServerTool$outboundSchema,
92
+ CodexLocalShellTool$outboundSchema,
93
+ ShellServerTool$outboundSchema,
94
+ ApplyPatchServerTool$outboundSchema,
95
+ AdvisorServerToolOpenRouter$outboundSchema,
96
+ SubagentServerToolOpenRouter$outboundSchema,
97
+ DatetimeServerTool$outboundSchema,
98
+ FilesServerTool$outboundSchema,
99
+ FusionServerToolOpenRouter$outboundSchema,
100
+ ImageGenerationServerToolOpenRouter$outboundSchema,
101
+ ChatSearchModelsServerTool$outboundSchema,
102
+ WebFetchServerTool$outboundSchema,
103
+ WebSearchServerToolOpenRouter$outboundSchema,
104
+ ApplyPatchServerToolOpenRouter$outboundSchema,
105
+ BashServerTool$outboundSchema,
106
+ ShellServerToolOpenRouter$outboundSchema,
107
+ z.lazy(() => AdditionalToolsItemTool$outboundSchema),
108
+ ]);
109
+ export function additionalToolsItemToolUnionToJSON(additionalToolsItemToolUnion) {
110
+ return JSON.stringify(AdditionalToolsItemToolUnion$outboundSchema.parse(additionalToolsItemToolUnion));
111
+ }
112
+ /** @internal */
113
+ export const TypeAdditionalTools$outboundSchema = z.enum(TypeAdditionalTools);
114
+ /** @internal */
115
+ export const AdditionalToolsItem$outboundSchema = z.object({
116
+ id: z.nullable(z.string()).optional(),
117
+ role: AdditionalToolsItemRole$outboundSchema,
118
+ tools: z.array(z.union([
119
+ ComputerUseServerTool$outboundSchema,
120
+ z.lazy(() => AdditionalToolsItemToolFunction$outboundSchema),
121
+ FileSearchServerTool$outboundSchema,
122
+ CodeInterpreterServerTool$outboundSchema,
123
+ McpServerTool$outboundSchema,
124
+ CustomTool$outboundSchema,
125
+ PreviewWebSearchServerTool$outboundSchema,
126
+ Preview20250311WebSearchServerTool$outboundSchema,
127
+ LegacyWebSearchServerTool$outboundSchema,
128
+ WebSearchServerTool$outboundSchema,
129
+ ImageGenerationServerTool$outboundSchema,
130
+ CodexLocalShellTool$outboundSchema,
131
+ ShellServerTool$outboundSchema,
132
+ ApplyPatchServerTool$outboundSchema,
133
+ AdvisorServerToolOpenRouter$outboundSchema,
134
+ SubagentServerToolOpenRouter$outboundSchema,
135
+ DatetimeServerTool$outboundSchema,
136
+ FilesServerTool$outboundSchema,
137
+ FusionServerToolOpenRouter$outboundSchema,
138
+ ImageGenerationServerToolOpenRouter$outboundSchema,
139
+ ChatSearchModelsServerTool$outboundSchema,
140
+ WebFetchServerTool$outboundSchema,
141
+ WebSearchServerToolOpenRouter$outboundSchema,
142
+ ApplyPatchServerToolOpenRouter$outboundSchema,
143
+ BashServerTool$outboundSchema,
144
+ ShellServerToolOpenRouter$outboundSchema,
145
+ z.lazy(() => AdditionalToolsItemTool$outboundSchema),
146
+ ])),
147
+ type: TypeAdditionalTools$outboundSchema,
148
+ });
149
+ export function additionalToolsItemToJSON(additionalToolsItem) {
150
+ return JSON.stringify(AdditionalToolsItem$outboundSchema.parse(additionalToolsItem));
151
+ }
152
+ //# sourceMappingURL=additionaltoolsitem.js.map
@@ -1,17 +1,26 @@
1
1
  import * as z from "zod/v4";
2
+ import { ClosedEnum } from "../types/enums.js";
2
3
  import { Result as SafeParseResult } from "../types/fp.js";
3
4
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
+ export declare const ApplyPatchServerToolType: {
6
+ readonly ApplyPatch: "apply_patch";
7
+ };
8
+ export type ApplyPatchServerToolType = ClosedEnum<typeof ApplyPatchServerToolType>;
4
9
  /**
5
10
  * Apply patch tool configuration
6
11
  */
7
12
  export type ApplyPatchServerTool = {
8
- type: "apply_patch";
13
+ type: ApplyPatchServerToolType;
9
14
  };
10
15
  /** @internal */
16
+ export declare const ApplyPatchServerToolType$inboundSchema: z.ZodEnum<typeof ApplyPatchServerToolType>;
17
+ /** @internal */
18
+ export declare const ApplyPatchServerToolType$outboundSchema: z.ZodEnum<typeof ApplyPatchServerToolType>;
19
+ /** @internal */
11
20
  export declare const ApplyPatchServerTool$inboundSchema: z.ZodType<ApplyPatchServerTool, unknown>;
12
21
  /** @internal */
13
22
  export type ApplyPatchServerTool$Outbound = {
14
- type: "apply_patch";
23
+ type: string;
15
24
  };
16
25
  /** @internal */
17
26
  export declare const ApplyPatchServerTool$outboundSchema: z.ZodType<ApplyPatchServerTool$Outbound, ApplyPatchServerTool>;
@@ -4,13 +4,20 @@
4
4
  */
5
5
  import * as z from "zod/v4";
6
6
  import { safeParse } from "../lib/schemas.js";
7
+ export const ApplyPatchServerToolType = {
8
+ ApplyPatch: "apply_patch",
9
+ };
10
+ /** @internal */
11
+ export const ApplyPatchServerToolType$inboundSchema = z.enum(ApplyPatchServerToolType);
12
+ /** @internal */
13
+ export const ApplyPatchServerToolType$outboundSchema = ApplyPatchServerToolType$inboundSchema;
7
14
  /** @internal */
8
15
  export const ApplyPatchServerTool$inboundSchema = z.object({
9
- type: z.literal("apply_patch"),
16
+ type: ApplyPatchServerToolType$inboundSchema,
10
17
  });
11
18
  /** @internal */
12
19
  export const ApplyPatchServerTool$outboundSchema = z.object({
13
- type: z.literal("apply_patch"),
20
+ type: ApplyPatchServerToolType$outboundSchema,
14
21
  });
15
22
  export function applyPatchServerToolToJSON(applyPatchServerTool) {
16
23
  return JSON.stringify(ApplyPatchServerTool$outboundSchema.parse(applyPatchServerTool));
@@ -1,5 +1,10 @@
1
1
  import * as z from "zod/v4";
2
+ import { ClosedEnum } from "../types/enums.js";
2
3
  import { ApplyPatchServerToolConfig, ApplyPatchServerToolConfig$Outbound } from "./applypatchservertoolconfig.js";
4
+ export declare const ApplyPatchServerToolOpenRouterType: {
5
+ readonly OpenrouterApplyPatch: "openrouter:apply_patch";
6
+ };
7
+ export type ApplyPatchServerToolOpenRouterType = ClosedEnum<typeof ApplyPatchServerToolOpenRouterType>;
3
8
  /**
4
9
  * OpenRouter built-in server tool: validates V4A diff patches for file operations (create, update, delete). Restricted to the Responses API.
5
10
  */
@@ -8,12 +13,14 @@ export type ApplyPatchServerToolOpenRouter = {
8
13
  * Configuration for the openrouter:apply_patch server tool
9
14
  */
10
15
  parameters?: ApplyPatchServerToolConfig | undefined;
11
- type: "openrouter:apply_patch";
16
+ type: ApplyPatchServerToolOpenRouterType;
12
17
  };
13
18
  /** @internal */
19
+ export declare const ApplyPatchServerToolOpenRouterType$outboundSchema: z.ZodEnum<typeof ApplyPatchServerToolOpenRouterType>;
20
+ /** @internal */
14
21
  export type ApplyPatchServerToolOpenRouter$Outbound = {
15
22
  parameters?: ApplyPatchServerToolConfig$Outbound | undefined;
16
- type: "openrouter:apply_patch";
23
+ type: string;
17
24
  };
18
25
  /** @internal */
19
26
  export declare const ApplyPatchServerToolOpenRouter$outboundSchema: z.ZodType<ApplyPatchServerToolOpenRouter$Outbound, ApplyPatchServerToolOpenRouter>;
@@ -4,10 +4,15 @@
4
4
  */
5
5
  import * as z from "zod/v4";
6
6
  import { ApplyPatchServerToolConfig$outboundSchema, } from "./applypatchservertoolconfig.js";
7
+ export const ApplyPatchServerToolOpenRouterType = {
8
+ OpenrouterApplyPatch: "openrouter:apply_patch",
9
+ };
10
+ /** @internal */
11
+ export const ApplyPatchServerToolOpenRouterType$outboundSchema = z.enum(ApplyPatchServerToolOpenRouterType);
7
12
  /** @internal */
8
13
  export const ApplyPatchServerToolOpenRouter$outboundSchema = z.object({
9
14
  parameters: ApplyPatchServerToolConfig$outboundSchema.optional(),
10
- type: z.literal("openrouter:apply_patch"),
15
+ type: ApplyPatchServerToolOpenRouterType$outboundSchema,
11
16
  });
12
17
  export function applyPatchServerToolOpenRouterToJSON(applyPatchServerToolOpenRouter) {
13
18
  return JSON.stringify(ApplyPatchServerToolOpenRouter$outboundSchema.parse(applyPatchServerToolOpenRouter));
@@ -19,12 +19,16 @@ export type ContainerAuto = {
19
19
  type: ContainerType;
20
20
  };
21
21
  export type Container = ContainerAuto | string;
22
+ export declare const TypeCodeInterpreter: {
23
+ readonly CodeInterpreter: "code_interpreter";
24
+ };
25
+ export type TypeCodeInterpreter = ClosedEnum<typeof TypeCodeInterpreter>;
22
26
  /**
23
27
  * Code interpreter tool configuration
24
28
  */
25
29
  export type CodeInterpreterServerTool = {
26
30
  container: ContainerAuto | string;
27
- type: "code_interpreter";
31
+ type: TypeCodeInterpreter;
28
32
  };
29
33
  /** @internal */
30
34
  export declare const MemoryLimit$inboundSchema: z.ZodType<MemoryLimit, unknown>;
@@ -55,11 +59,15 @@ export declare const Container$outboundSchema: z.ZodType<Container$Outbound, Con
55
59
  export declare function containerToJSON(container: Container): string;
56
60
  export declare function containerFromJSON(jsonString: string): SafeParseResult<Container, SDKValidationError>;
57
61
  /** @internal */
62
+ export declare const TypeCodeInterpreter$inboundSchema: z.ZodEnum<typeof TypeCodeInterpreter>;
63
+ /** @internal */
64
+ export declare const TypeCodeInterpreter$outboundSchema: z.ZodEnum<typeof TypeCodeInterpreter>;
65
+ /** @internal */
58
66
  export declare const CodeInterpreterServerTool$inboundSchema: z.ZodType<CodeInterpreterServerTool, unknown>;
59
67
  /** @internal */
60
68
  export type CodeInterpreterServerTool$Outbound = {
61
69
  container: ContainerAuto$Outbound | string;
62
- type: "code_interpreter";
70
+ type: string;
63
71
  };
64
72
  /** @internal */
65
73
  export declare const CodeInterpreterServerTool$outboundSchema: z.ZodType<CodeInterpreterServerTool$Outbound, CodeInterpreterServerTool>;
@@ -15,6 +15,9 @@ export const MemoryLimit = {
15
15
  export const ContainerType = {
16
16
  Auto: "auto",
17
17
  };
18
+ export const TypeCodeInterpreter = {
19
+ CodeInterpreter: "code_interpreter",
20
+ };
18
21
  /** @internal */
19
22
  export const MemoryLimit$inboundSchema = openEnums.inboundSchema(MemoryLimit);
20
23
  /** @internal */
@@ -67,14 +70,18 @@ export function containerFromJSON(jsonString) {
67
70
  return safeParse(jsonString, (x) => Container$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Container' from JSON`);
68
71
  }
69
72
  /** @internal */
73
+ export const TypeCodeInterpreter$inboundSchema = z.enum(TypeCodeInterpreter);
74
+ /** @internal */
75
+ export const TypeCodeInterpreter$outboundSchema = TypeCodeInterpreter$inboundSchema;
76
+ /** @internal */
70
77
  export const CodeInterpreterServerTool$inboundSchema = z.object({
71
78
  container: z.union([z.lazy(() => ContainerAuto$inboundSchema), z.string()]),
72
- type: z.literal("code_interpreter"),
79
+ type: TypeCodeInterpreter$inboundSchema,
73
80
  });
74
81
  /** @internal */
75
82
  export const CodeInterpreterServerTool$outboundSchema = z.object({
76
83
  container: z.union([z.lazy(() => ContainerAuto$outboundSchema), z.string()]),
77
- type: z.literal("code_interpreter"),
84
+ type: TypeCodeInterpreter$outboundSchema,
78
85
  });
79
86
  export function codeInterpreterServerToolToJSON(codeInterpreterServerTool) {
80
87
  return JSON.stringify(CodeInterpreterServerTool$outboundSchema.parse(codeInterpreterServerTool));
@@ -1,17 +1,26 @@
1
1
  import * as z from "zod/v4";
2
+ import { ClosedEnum } from "../types/enums.js";
2
3
  import { Result as SafeParseResult } from "../types/fp.js";
3
4
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
+ export declare const CodexLocalShellToolType: {
6
+ readonly LocalShell: "local_shell";
7
+ };
8
+ export type CodexLocalShellToolType = ClosedEnum<typeof CodexLocalShellToolType>;
4
9
  /**
5
10
  * Local shell tool configuration
6
11
  */
7
12
  export type CodexLocalShellTool = {
8
- type: "local_shell";
13
+ type: CodexLocalShellToolType;
9
14
  };
10
15
  /** @internal */
16
+ export declare const CodexLocalShellToolType$inboundSchema: z.ZodEnum<typeof CodexLocalShellToolType>;
17
+ /** @internal */
18
+ export declare const CodexLocalShellToolType$outboundSchema: z.ZodEnum<typeof CodexLocalShellToolType>;
19
+ /** @internal */
11
20
  export declare const CodexLocalShellTool$inboundSchema: z.ZodType<CodexLocalShellTool, unknown>;
12
21
  /** @internal */
13
22
  export type CodexLocalShellTool$Outbound = {
14
- type: "local_shell";
23
+ type: string;
15
24
  };
16
25
  /** @internal */
17
26
  export declare const CodexLocalShellTool$outboundSchema: z.ZodType<CodexLocalShellTool$Outbound, CodexLocalShellTool>;
@@ -4,13 +4,20 @@
4
4
  */
5
5
  import * as z from "zod/v4";
6
6
  import { safeParse } from "../lib/schemas.js";
7
+ export const CodexLocalShellToolType = {
8
+ LocalShell: "local_shell",
9
+ };
10
+ /** @internal */
11
+ export const CodexLocalShellToolType$inboundSchema = z.enum(CodexLocalShellToolType);
12
+ /** @internal */
13
+ export const CodexLocalShellToolType$outboundSchema = CodexLocalShellToolType$inboundSchema;
7
14
  /** @internal */
8
15
  export const CodexLocalShellTool$inboundSchema = z.object({
9
- type: z.literal("local_shell"),
16
+ type: CodexLocalShellToolType$inboundSchema,
10
17
  });
11
18
  /** @internal */
12
19
  export const CodexLocalShellTool$outboundSchema = z.object({
13
- type: z.literal("local_shell"),
20
+ type: CodexLocalShellToolType$outboundSchema,
14
21
  });
15
22
  export function codexLocalShellToolToJSON(codexLocalShellTool) {
16
23
  return JSON.stringify(CodexLocalShellTool$outboundSchema.parse(codexLocalShellTool));
@@ -1,5 +1,5 @@
1
1
  import * as z from "zod/v4";
2
- import { OpenEnum } from "../types/enums.js";
2
+ import { ClosedEnum, OpenEnum } from "../types/enums.js";
3
3
  import { Result as SafeParseResult } from "../types/fp.js";
4
4
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
5
  export declare const Environment: {
@@ -10,6 +10,10 @@ export declare const Environment: {
10
10
  readonly Browser: "browser";
11
11
  };
12
12
  export type Environment = OpenEnum<typeof Environment>;
13
+ export declare const ComputerUseServerToolType: {
14
+ readonly ComputerUsePreview: "computer_use_preview";
15
+ };
16
+ export type ComputerUseServerToolType = ClosedEnum<typeof ComputerUseServerToolType>;
13
17
  /**
14
18
  * Computer use preview tool configuration
15
19
  */
@@ -17,20 +21,24 @@ export type ComputerUseServerTool = {
17
21
  displayHeight: number;
18
22
  displayWidth: number;
19
23
  environment: Environment;
20
- type: "computer_use_preview";
24
+ type: ComputerUseServerToolType;
21
25
  };
22
26
  /** @internal */
23
27
  export declare const Environment$inboundSchema: z.ZodType<Environment, unknown>;
24
28
  /** @internal */
25
29
  export declare const Environment$outboundSchema: z.ZodType<string, Environment>;
26
30
  /** @internal */
31
+ export declare const ComputerUseServerToolType$inboundSchema: z.ZodEnum<typeof ComputerUseServerToolType>;
32
+ /** @internal */
33
+ export declare const ComputerUseServerToolType$outboundSchema: z.ZodEnum<typeof ComputerUseServerToolType>;
34
+ /** @internal */
27
35
  export declare const ComputerUseServerTool$inboundSchema: z.ZodType<ComputerUseServerTool, unknown>;
28
36
  /** @internal */
29
37
  export type ComputerUseServerTool$Outbound = {
30
38
  display_height: number;
31
39
  display_width: number;
32
40
  environment: string;
33
- type: "computer_use_preview";
41
+ type: string;
34
42
  };
35
43
  /** @internal */
36
44
  export declare const ComputerUseServerTool$outboundSchema: z.ZodType<ComputerUseServerTool$Outbound, ComputerUseServerTool>;
@@ -13,16 +13,23 @@ export const Environment = {
13
13
  Ubuntu: "ubuntu",
14
14
  Browser: "browser",
15
15
  };
16
+ export const ComputerUseServerToolType = {
17
+ ComputerUsePreview: "computer_use_preview",
18
+ };
16
19
  /** @internal */
17
20
  export const Environment$inboundSchema = openEnums.inboundSchema(Environment);
18
21
  /** @internal */
19
22
  export const Environment$outboundSchema = openEnums.outboundSchema(Environment);
20
23
  /** @internal */
24
+ export const ComputerUseServerToolType$inboundSchema = z.enum(ComputerUseServerToolType);
25
+ /** @internal */
26
+ export const ComputerUseServerToolType$outboundSchema = ComputerUseServerToolType$inboundSchema;
27
+ /** @internal */
21
28
  export const ComputerUseServerTool$inboundSchema = z.object({
22
29
  display_height: z.int(),
23
30
  display_width: z.int(),
24
31
  environment: Environment$inboundSchema,
25
- type: z.literal("computer_use_preview"),
32
+ type: ComputerUseServerToolType$inboundSchema,
26
33
  }).transform((v) => {
27
34
  return remap$(v, {
28
35
  "display_height": "displayHeight",
@@ -34,7 +41,7 @@ export const ComputerUseServerTool$outboundSchema = z.object({
34
41
  displayHeight: z.int(),
35
42
  displayWidth: z.int(),
36
43
  environment: Environment$outboundSchema,
37
- type: z.literal("computer_use_preview"),
44
+ type: ComputerUseServerToolType$outboundSchema,
38
45
  }).transform((v) => {
39
46
  return remap$(v, {
40
47
  displayHeight: "display_height",
@@ -1,6 +1,6 @@
1
1
  import * as z from "zod/v4";
2
2
  import * as discriminatedUnionTypes from "../types/discriminatedUnion.js";
3
- import { OpenEnum } from "../types/enums.js";
3
+ import { ClosedEnum, OpenEnum } from "../types/enums.js";
4
4
  import { Result as SafeParseResult } from "../types/fp.js";
5
5
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
6
6
  export declare const Syntax: {
@@ -17,6 +17,10 @@ export type FormatText = {
17
17
  type: "text";
18
18
  };
19
19
  export type Format = FormatText | FormatGrammar | discriminatedUnionTypes.Unknown<"type">;
20
+ export declare const CustomToolTypeCustom: {
21
+ readonly Custom: "custom";
22
+ };
23
+ export type CustomToolTypeCustom = ClosedEnum<typeof CustomToolTypeCustom>;
20
24
  /**
21
25
  * Custom tool configuration
22
26
  */
@@ -24,7 +28,7 @@ export type CustomTool = {
24
28
  description?: string | undefined;
25
29
  format?: FormatText | FormatGrammar | discriminatedUnionTypes.Unknown<"type"> | undefined;
26
30
  name: string;
27
- type: "custom";
31
+ type: CustomToolTypeCustom;
28
32
  };
29
33
  /** @internal */
30
34
  export declare const Syntax$inboundSchema: z.ZodType<Syntax, unknown>;
@@ -61,13 +65,17 @@ export declare const Format$outboundSchema: z.ZodType<Format$Outbound, Format>;
61
65
  export declare function formatToJSON(format: Format): string;
62
66
  export declare function formatFromJSON(jsonString: string): SafeParseResult<Format, SDKValidationError>;
63
67
  /** @internal */
68
+ export declare const CustomToolTypeCustom$inboundSchema: z.ZodEnum<typeof CustomToolTypeCustom>;
69
+ /** @internal */
70
+ export declare const CustomToolTypeCustom$outboundSchema: z.ZodEnum<typeof CustomToolTypeCustom>;
71
+ /** @internal */
64
72
  export declare const CustomTool$inboundSchema: z.ZodType<CustomTool, unknown>;
65
73
  /** @internal */
66
74
  export type CustomTool$Outbound = {
67
75
  description?: string | undefined;
68
76
  format?: FormatText$Outbound | FormatGrammar$Outbound | undefined;
69
77
  name: string;
70
- type: "custom";
78
+ type: string;
71
79
  };
72
80
  /** @internal */
73
81
  export declare const CustomTool$outboundSchema: z.ZodType<CustomTool$Outbound, CustomTool>;