@openrouter/sdk 0.13.37 → 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 (70) hide show
  1. package/esm/funcs/generationsSubmitFeedback.d.ts +19 -0
  2. package/esm/funcs/generationsSubmitFeedback.js +100 -0
  3. package/esm/lib/config.d.ts +2 -2
  4. package/esm/lib/config.js +2 -2
  5. package/esm/lib/conversation-state.d.ts +1 -1
  6. package/esm/lib/turn-context.d.ts +1 -1
  7. package/esm/models/additionaltoolsitem.d.ts +117 -0
  8. package/esm/models/additionaltoolsitem.js +152 -0
  9. package/esm/models/applypatchservertool.d.ts +11 -2
  10. package/esm/models/applypatchservertool.js +9 -2
  11. package/esm/models/applypatchservertoolopenrouter.d.ts +9 -2
  12. package/esm/models/applypatchservertoolopenrouter.js +6 -1
  13. package/esm/models/byokproviderslug.d.ts +1 -1
  14. package/esm/models/byokproviderslug.js +1 -1
  15. package/esm/models/codeinterpreterservertool.d.ts +10 -2
  16. package/esm/models/codeinterpreterservertool.js +9 -2
  17. package/esm/models/codexlocalshelltool.d.ts +11 -2
  18. package/esm/models/codexlocalshelltool.js +9 -2
  19. package/esm/models/computeruseservertool.d.ts +11 -3
  20. package/esm/models/computeruseservertool.js +9 -2
  21. package/esm/models/customtool.d.ts +11 -3
  22. package/esm/models/customtool.js +9 -2
  23. package/esm/models/filesearchservertool.d.ts +11 -3
  24. package/esm/models/filesearchservertool.js +10 -2
  25. package/esm/models/imagegenerationrequest.d.ts +2 -2
  26. package/esm/models/imagegenerationrequest.js +1 -2
  27. package/esm/models/imagegenerationservertool.d.ts +11 -3
  28. package/esm/models/imagegenerationservertool.js +9 -2
  29. package/esm/models/index.d.ts +3 -0
  30. package/esm/models/index.js +3 -0
  31. package/esm/models/inputsunion.d.ts +5 -4
  32. package/esm/models/inputsunion.js +3 -0
  33. package/esm/models/legacywebsearchservertool.d.ts +11 -2
  34. package/esm/models/legacywebsearchservertool.js +9 -2
  35. package/esm/models/mcpservertool.d.ts +10 -2
  36. package/esm/models/mcpservertool.js +9 -2
  37. package/esm/models/openresponsesresult.d.ts +54 -2
  38. package/esm/models/openresponsesresult.js +26 -26
  39. package/esm/models/operations/index.d.ts +1 -0
  40. package/esm/models/operations/index.js +1 -0
  41. package/esm/models/operations/listbyokkeys.d.ts +1 -1
  42. package/esm/models/operations/listbyokkeys.js +1 -1
  43. package/esm/models/operations/submitgenerationfeedback.d.ts +56 -0
  44. package/esm/models/operations/submitgenerationfeedback.js +23 -0
  45. package/esm/models/preview20250311websearchservertool.d.ts +11 -2
  46. package/esm/models/preview20250311websearchservertool.js +9 -2
  47. package/esm/models/previewwebsearchservertool.d.ts +11 -2
  48. package/esm/models/previewwebsearchservertool.js +9 -2
  49. package/esm/models/provideroptions.d.ts +2 -2
  50. package/esm/models/provideroptions.js +1 -2
  51. package/esm/models/responsesrequest.d.ts +140 -12
  52. package/esm/models/responsesrequest.js +32 -32
  53. package/esm/models/shellservertool.d.ts +11 -2
  54. package/esm/models/shellservertool.js +9 -2
  55. package/esm/models/shellservertoolopenrouter.d.ts +9 -2
  56. package/esm/models/shellservertoolopenrouter.js +6 -1
  57. package/esm/models/submitgenerationfeedbackrequest.d.ts +47 -0
  58. package/esm/models/submitgenerationfeedbackrequest.js +36 -0
  59. package/esm/models/submitgenerationfeedbackresponse.d.ts +22 -0
  60. package/esm/models/submitgenerationfeedbackresponse.js +21 -0
  61. package/esm/models/videogenerationrequest.d.ts +2 -2
  62. package/esm/models/videogenerationrequest.js +1 -2
  63. package/esm/models/websearchservertool.d.ts +11 -2
  64. package/esm/models/websearchservertool.js +9 -2
  65. package/esm/models/websearchservertoolopenrouter.d.ts +9 -2
  66. package/esm/models/websearchservertoolopenrouter.js +6 -1
  67. package/esm/sdk/generations.d.ts +7 -0
  68. package/esm/sdk/generations.js +10 -0
  69. package/jsr.json +1 -1
  70. package/package.json +5 -5
@@ -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>;
@@ -10,6 +10,9 @@ export const Syntax = {
10
10
  Lark: "lark",
11
11
  Regex: "regex",
12
12
  };
13
+ export const CustomToolTypeCustom = {
14
+ Custom: "custom",
15
+ };
13
16
  /** @internal */
14
17
  export const Syntax$inboundSchema = openEnums
15
18
  .inboundSchema(Syntax);
@@ -68,6 +71,10 @@ export function formatFromJSON(jsonString) {
68
71
  return safeParse(jsonString, (x) => Format$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Format' from JSON`);
69
72
  }
70
73
  /** @internal */
74
+ export const CustomToolTypeCustom$inboundSchema = z.enum(CustomToolTypeCustom);
75
+ /** @internal */
76
+ export const CustomToolTypeCustom$outboundSchema = CustomToolTypeCustom$inboundSchema;
77
+ /** @internal */
71
78
  export const CustomTool$inboundSchema = z
72
79
  .object({
73
80
  description: z.string().optional(),
@@ -76,7 +83,7 @@ export const CustomTool$inboundSchema = z
76
83
  grammar: z.lazy(() => FormatGrammar$inboundSchema),
77
84
  }).optional(),
78
85
  name: z.string(),
79
- type: z.literal("custom"),
86
+ type: CustomToolTypeCustom$inboundSchema,
80
87
  });
81
88
  /** @internal */
82
89
  export const CustomTool$outboundSchema = z.object({
@@ -86,7 +93,7 @@ export const CustomTool$outboundSchema = z.object({
86
93
  z.lazy(() => FormatGrammar$outboundSchema),
87
94
  ]).optional(),
88
95
  name: z.string(),
89
- type: z.literal("custom"),
96
+ type: CustomToolTypeCustom$outboundSchema,
90
97
  });
91
98
  export function customToolToJSON(customTool) {
92
99
  return JSON.stringify(CustomTool$outboundSchema.parse(customTool));
@@ -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 { CompoundFilter, CompoundFilter$Outbound } from "./compoundfilter.js";
5
5
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
@@ -29,6 +29,10 @@ export type RankingOptions = {
29
29
  ranker?: Ranker | undefined;
30
30
  scoreThreshold?: number | undefined;
31
31
  };
32
+ export declare const TypeFileSearch: {
33
+ readonly FileSearch: "file_search";
34
+ };
35
+ export type TypeFileSearch = ClosedEnum<typeof TypeFileSearch>;
32
36
  /**
33
37
  * File search tool configuration
34
38
  */
@@ -36,7 +40,7 @@ export type FileSearchServerTool = {
36
40
  filters?: Filters | CompoundFilter | any | null | undefined;
37
41
  maxNumResults?: number | undefined;
38
42
  rankingOptions?: RankingOptions | undefined;
39
- type: "file_search";
43
+ type: TypeFileSearch;
40
44
  vectorStoreIds: Array<string>;
41
45
  };
42
46
  /** @internal */
@@ -95,13 +99,17 @@ export declare const RankingOptions$outboundSchema: z.ZodType<RankingOptions$Out
95
99
  export declare function rankingOptionsToJSON(rankingOptions: RankingOptions): string;
96
100
  export declare function rankingOptionsFromJSON(jsonString: string): SafeParseResult<RankingOptions, SDKValidationError>;
97
101
  /** @internal */
102
+ export declare const TypeFileSearch$inboundSchema: z.ZodEnum<typeof TypeFileSearch>;
103
+ /** @internal */
104
+ export declare const TypeFileSearch$outboundSchema: z.ZodEnum<typeof TypeFileSearch>;
105
+ /** @internal */
98
106
  export declare const FileSearchServerTool$inboundSchema: z.ZodType<FileSearchServerTool, unknown>;
99
107
  /** @internal */
100
108
  export type FileSearchServerTool$Outbound = {
101
109
  filters?: Filters$Outbound | CompoundFilter$Outbound | any | null | undefined;
102
110
  max_num_results?: number | undefined;
103
111
  ranking_options?: RankingOptions$Outbound | undefined;
104
- type: "file_search";
112
+ type: string;
105
113
  vector_store_ids: Array<string>;
106
114
  };
107
115
  /** @internal */
@@ -19,6 +19,9 @@ export const Ranker = {
19
19
  Auto: "auto",
20
20
  Default20241115: "default-2024-11-15",
21
21
  };
22
+ export const TypeFileSearch = {
23
+ FileSearch: "file_search",
24
+ };
22
25
  /** @internal */
23
26
  export const FiltersType$inboundSchema = openEnums.inboundSchema(FiltersType);
24
27
  /** @internal */
@@ -132,6 +135,11 @@ export function rankingOptionsFromJSON(jsonString) {
132
135
  return safeParse(jsonString, (x) => RankingOptions$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RankingOptions' from JSON`);
133
136
  }
134
137
  /** @internal */
138
+ export const TypeFileSearch$inboundSchema = z
139
+ .enum(TypeFileSearch);
140
+ /** @internal */
141
+ export const TypeFileSearch$outboundSchema = TypeFileSearch$inboundSchema;
142
+ /** @internal */
135
143
  export const FileSearchServerTool$inboundSchema = z.object({
136
144
  filters: z.nullable(z.union([
137
145
  z.lazy(() => Filters$inboundSchema),
@@ -140,7 +148,7 @@ export const FileSearchServerTool$inboundSchema = z.object({
140
148
  ])).optional(),
141
149
  max_num_results: z.int().optional(),
142
150
  ranking_options: z.lazy(() => RankingOptions$inboundSchema).optional(),
143
- type: z.literal("file_search"),
151
+ type: TypeFileSearch$inboundSchema,
144
152
  vector_store_ids: z.array(z.string()),
145
153
  }).transform((v) => {
146
154
  return remap$(v, {
@@ -158,7 +166,7 @@ export const FileSearchServerTool$outboundSchema = z.object({
158
166
  ])).optional(),
159
167
  maxNumResults: z.int().optional(),
160
168
  rankingOptions: z.lazy(() => RankingOptions$outboundSchema).optional(),
161
- type: z.literal("file_search"),
169
+ type: TypeFileSearch$outboundSchema,
162
170
  vectorStoreIds: z.array(z.string()),
163
171
  }).transform((v) => {
164
172
  return remap$(v, {
@@ -352,7 +352,7 @@ export type ImageGenerationRequestOptions = {
352
352
  replicate?: {
353
353
  [k: string]: any | null;
354
354
  } | undefined;
355
- sakanaAi?: {
355
+ sakana?: {
356
356
  [k: string]: any | null;
357
357
  } | undefined;
358
358
  sambanova?: {
@@ -814,7 +814,7 @@ export type ImageGenerationRequestOptions$Outbound = {
814
814
  replicate?: {
815
815
  [k: string]: any | null;
816
816
  } | undefined;
817
- "sakana-ai"?: {
817
+ sakana?: {
818
818
  [k: string]: any | null;
819
819
  } | undefined;
820
820
  sambanova?: {
@@ -173,7 +173,7 @@ export const ImageGenerationRequestOptions$outboundSchema = z.object({
173
173
  reka: z.record(z.string(), z.nullable(z.any())).optional(),
174
174
  relace: z.record(z.string(), z.nullable(z.any())).optional(),
175
175
  replicate: z.record(z.string(), z.nullable(z.any())).optional(),
176
- sakanaAi: z.record(z.string(), z.nullable(z.any())).optional(),
176
+ sakana: z.record(z.string(), z.nullable(z.any())).optional(),
177
177
  sambanova: z.record(z.string(), z.nullable(z.any())).optional(),
178
178
  sambanovaCloaked: z.record(z.string(), z.nullable(z.any())).optional(),
179
179
  seed: z.record(z.string(), z.nullable(z.any())).optional(),
@@ -216,7 +216,6 @@ export const ImageGenerationRequestOptions$outboundSchema = z.object({
216
216
  mancerOld: "mancer-old",
217
217
  nexAgi: "nex-agi",
218
218
  openInference: "open-inference",
219
- sakanaAi: "sakana-ai",
220
219
  sambanovaCloaked: "sambanova-cloaked",
221
220
  sfCompute: "sf-compute",
222
221
  togetherLite: "together-lite",
@@ -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 ImageGenerationServerToolBackground: {
@@ -35,6 +35,10 @@ export declare const ImageGenerationServerToolQuality: {
35
35
  readonly Auto: "auto";
36
36
  };
37
37
  export type ImageGenerationServerToolQuality = OpenEnum<typeof ImageGenerationServerToolQuality>;
38
+ export declare const ImageGenerationServerToolType: {
39
+ readonly ImageGeneration: "image_generation";
40
+ };
41
+ export type ImageGenerationServerToolType = ClosedEnum<typeof ImageGenerationServerToolType>;
38
42
  /**
39
43
  * Image generation tool configuration
40
44
  */
@@ -49,7 +53,7 @@ export type ImageGenerationServerTool = {
49
53
  partialImages?: number | undefined;
50
54
  quality?: ImageGenerationServerToolQuality | undefined;
51
55
  size?: string | undefined;
52
- type: "image_generation";
56
+ type: ImageGenerationServerToolType;
53
57
  };
54
58
  /** @internal */
55
59
  export declare const ImageGenerationServerToolBackground$inboundSchema: z.ZodType<ImageGenerationServerToolBackground, unknown>;
@@ -83,6 +87,10 @@ export declare const ImageGenerationServerToolQuality$inboundSchema: z.ZodType<I
83
87
  /** @internal */
84
88
  export declare const ImageGenerationServerToolQuality$outboundSchema: z.ZodType<string, ImageGenerationServerToolQuality>;
85
89
  /** @internal */
90
+ export declare const ImageGenerationServerToolType$inboundSchema: z.ZodEnum<typeof ImageGenerationServerToolType>;
91
+ /** @internal */
92
+ export declare const ImageGenerationServerToolType$outboundSchema: z.ZodEnum<typeof ImageGenerationServerToolType>;
93
+ /** @internal */
86
94
  export declare const ImageGenerationServerTool$inboundSchema: z.ZodType<ImageGenerationServerTool, unknown>;
87
95
  /** @internal */
88
96
  export type ImageGenerationServerTool$Outbound = {
@@ -96,7 +104,7 @@ export type ImageGenerationServerTool$Outbound = {
96
104
  partial_images?: number | undefined;
97
105
  quality?: string | undefined;
98
106
  size?: string | undefined;
99
- type: "image_generation";
107
+ type: string;
100
108
  };
101
109
  /** @internal */
102
110
  export declare const ImageGenerationServerTool$outboundSchema: z.ZodType<ImageGenerationServerTool$Outbound, ImageGenerationServerTool>;
@@ -30,6 +30,9 @@ export const ImageGenerationServerToolQuality = {
30
30
  High: "high",
31
31
  Auto: "auto",
32
32
  };
33
+ export const ImageGenerationServerToolType = {
34
+ ImageGeneration: "image_generation",
35
+ };
33
36
  /** @internal */
34
37
  export const ImageGenerationServerToolBackground$inboundSchema = openEnums.inboundSchema(ImageGenerationServerToolBackground);
35
38
  /** @internal */
@@ -77,6 +80,10 @@ export const ImageGenerationServerToolQuality$inboundSchema = openEnums.inboundS
77
80
  /** @internal */
78
81
  export const ImageGenerationServerToolQuality$outboundSchema = openEnums.outboundSchema(ImageGenerationServerToolQuality);
79
82
  /** @internal */
83
+ export const ImageGenerationServerToolType$inboundSchema = z.enum(ImageGenerationServerToolType);
84
+ /** @internal */
85
+ export const ImageGenerationServerToolType$outboundSchema = ImageGenerationServerToolType$inboundSchema;
86
+ /** @internal */
80
87
  export const ImageGenerationServerTool$inboundSchema = z.object({
81
88
  background: ImageGenerationServerToolBackground$inboundSchema.optional(),
82
89
  input_fidelity: z.nullable(InputFidelity$inboundSchema).optional(),
@@ -88,7 +95,7 @@ export const ImageGenerationServerTool$inboundSchema = z.object({
88
95
  partial_images: z.int().optional(),
89
96
  quality: ImageGenerationServerToolQuality$inboundSchema.optional(),
90
97
  size: z.string().optional(),
91
- type: z.literal("image_generation"),
98
+ type: ImageGenerationServerToolType$inboundSchema,
92
99
  }).transform((v) => {
93
100
  return remap$(v, {
94
101
  "input_fidelity": "inputFidelity",
@@ -110,7 +117,7 @@ export const ImageGenerationServerTool$outboundSchema = z.object({
110
117
  partialImages: z.int().optional(),
111
118
  quality: ImageGenerationServerToolQuality$outboundSchema.optional(),
112
119
  size: z.string().optional(),
113
- type: z.literal("image_generation"),
120
+ type: ImageGenerationServerToolType$outboundSchema,
114
121
  }).transform((v) => {
115
122
  return remap$(v, {
116
123
  inputFidelity: "input_fidelity",
@@ -1,6 +1,7 @@
1
1
  export * from "./aabenchmarkentry.js";
2
2
  export * from "./activityitem.js";
3
3
  export * from "./activityresponse.js";
4
+ export * from "./additionaltoolsitem.js";
4
5
  export * from "./advisornestedtool.js";
5
6
  export * from "./advisorreasoning.js";
6
7
  export * from "./advisorservertoolconfig.js";
@@ -481,6 +482,8 @@ export * from "./subagentnestedtool.js";
481
482
  export * from "./subagentreasoning.js";
482
483
  export * from "./subagentservertoolconfig.js";
483
484
  export * from "./subagentservertoolopenrouter.js";
485
+ export * from "./submitgenerationfeedbackrequest.js";
486
+ export * from "./submitgenerationfeedbackresponse.js";
484
487
  export * from "./taskclassificationitem.js";
485
488
  export * from "./taskclassificationmacrocategory.js";
486
489
  export * from "./taskclassificationmodel.js";
@@ -5,6 +5,7 @@
5
5
  export * from "./aabenchmarkentry.js";
6
6
  export * from "./activityitem.js";
7
7
  export * from "./activityresponse.js";
8
+ export * from "./additionaltoolsitem.js";
8
9
  export * from "./advisornestedtool.js";
9
10
  export * from "./advisorreasoning.js";
10
11
  export * from "./advisorservertoolconfig.js";
@@ -485,6 +486,8 @@ export * from "./subagentnestedtool.js";
485
486
  export * from "./subagentreasoning.js";
486
487
  export * from "./subagentservertoolconfig.js";
487
488
  export * from "./subagentservertoolopenrouter.js";
489
+ export * from "./submitgenerationfeedbackrequest.js";
490
+ export * from "./submitgenerationfeedbackresponse.js";
488
491
  export * from "./taskclassificationitem.js";
489
492
  export * from "./taskclassificationmacrocategory.js";
490
493
  export * from "./taskclassificationmodel.js";
@@ -1,5 +1,6 @@
1
1
  import * as z from "zod/v4";
2
2
  import { ClosedEnum } from "../types/enums.js";
3
+ import { AdditionalToolsItem, AdditionalToolsItem$Outbound } from "./additionaltoolsitem.js";
3
4
  import { ApplyPatchCallItem, ApplyPatchCallItem$Outbound } from "./applypatchcallitem.js";
4
5
  import { ApplyPatchCallOutputItem, ApplyPatchCallOutputItem$Outbound } from "./applypatchcalloutputitem.js";
5
6
  import { CompactionItem, CompactionItem$Outbound } from "./compactionitem.js";
@@ -131,11 +132,11 @@ export type InputsMessage = {
131
132
  status?: InputsStatusCompleted1 | InputsStatusIncomplete1 | InputsStatusInProgress1 | undefined;
132
133
  type: InputsTypeMessage;
133
134
  };
134
- export type InputsUnion1 = OutputCodeInterpreterCallItem | FunctionCallItem | LocalShellCallItem | McpApprovalRequestItem | McpCallItem | ApplyPatchCallItem | InputsMessage | OutputFunctionCallItem | OutputCustomToolCallItem | OutputFileSearchCallItem | OutputComputerCallItem | OutputDatetimeItem | McpListToolsItem | CustomToolCallItem | ReasoningItem | FunctionCallOutputItem | ApplyPatchCallOutputItem | InputsReasoning | OutputWebSearchCallItem | OutputImageGenerationCallItem | LocalShellCallOutputItem | ShellCallItem | ShellCallOutputItem | McpApprovalResponseItem | CustomToolCallOutputItem | OutputWebSearchServerToolItem | OutputCodeInterpreterServerToolItem | OutputFileSearchServerToolItem | OutputImageGenerationServerToolItem | OutputBrowserUseServerToolItem | OutputBashServerToolItem | OutputTextEditorServerToolItem | OutputApplyPatchServerToolItem | OutputWebFetchServerToolItem | OutputToolSearchServerToolItem | OutputMemoryServerToolItem | OutputMcpServerToolItem | OutputSearchModelsServerToolItem | OutputFusionServerToolItem | OutputAdvisorServerToolItem | OutputSubagentServerToolItem | OutputFilesServerToolItem | CompactionItem | ItemReferenceItem | EasyInputMessage | InputMessageItem;
135
+ export type InputsUnion1 = OutputCodeInterpreterCallItem | FunctionCallItem | LocalShellCallItem | McpApprovalRequestItem | McpCallItem | ApplyPatchCallItem | InputsMessage | OutputFunctionCallItem | OutputCustomToolCallItem | OutputFileSearchCallItem | OutputComputerCallItem | OutputDatetimeItem | McpListToolsItem | CustomToolCallItem | ReasoningItem | FunctionCallOutputItem | ApplyPatchCallOutputItem | InputsReasoning | OutputWebSearchCallItem | OutputImageGenerationCallItem | LocalShellCallOutputItem | ShellCallItem | ShellCallOutputItem | McpApprovalResponseItem | CustomToolCallOutputItem | AdditionalToolsItem | OutputWebSearchServerToolItem | OutputCodeInterpreterServerToolItem | OutputFileSearchServerToolItem | OutputImageGenerationServerToolItem | OutputBrowserUseServerToolItem | OutputBashServerToolItem | OutputTextEditorServerToolItem | OutputApplyPatchServerToolItem | OutputWebFetchServerToolItem | OutputToolSearchServerToolItem | OutputMemoryServerToolItem | OutputMcpServerToolItem | OutputSearchModelsServerToolItem | OutputFusionServerToolItem | OutputAdvisorServerToolItem | OutputSubagentServerToolItem | OutputFilesServerToolItem | CompactionItem | ItemReferenceItem | EasyInputMessage | InputMessageItem;
135
136
  /**
136
137
  * Input for a response request - can be a string or array of items
137
138
  */
138
- export type InputsUnion = string | Array<OutputCodeInterpreterCallItem | FunctionCallItem | LocalShellCallItem | McpApprovalRequestItem | McpCallItem | ApplyPatchCallItem | InputsMessage | OutputFunctionCallItem | OutputCustomToolCallItem | OutputFileSearchCallItem | OutputComputerCallItem | OutputDatetimeItem | McpListToolsItem | CustomToolCallItem | ReasoningItem | FunctionCallOutputItem | ApplyPatchCallOutputItem | InputsReasoning | OutputWebSearchCallItem | OutputImageGenerationCallItem | LocalShellCallOutputItem | ShellCallItem | ShellCallOutputItem | McpApprovalResponseItem | CustomToolCallOutputItem | OutputWebSearchServerToolItem | OutputCodeInterpreterServerToolItem | OutputFileSearchServerToolItem | OutputImageGenerationServerToolItem | OutputBrowserUseServerToolItem | OutputBashServerToolItem | OutputTextEditorServerToolItem | OutputApplyPatchServerToolItem | OutputWebFetchServerToolItem | OutputToolSearchServerToolItem | OutputMemoryServerToolItem | OutputMcpServerToolItem | OutputSearchModelsServerToolItem | OutputFusionServerToolItem | OutputAdvisorServerToolItem | OutputSubagentServerToolItem | OutputFilesServerToolItem | CompactionItem | ItemReferenceItem | EasyInputMessage | InputMessageItem>;
139
+ export type InputsUnion = string | Array<OutputCodeInterpreterCallItem | FunctionCallItem | LocalShellCallItem | McpApprovalRequestItem | McpCallItem | ApplyPatchCallItem | InputsMessage | OutputFunctionCallItem | OutputCustomToolCallItem | OutputFileSearchCallItem | OutputComputerCallItem | OutputDatetimeItem | McpListToolsItem | CustomToolCallItem | ReasoningItem | FunctionCallOutputItem | ApplyPatchCallOutputItem | InputsReasoning | OutputWebSearchCallItem | OutputImageGenerationCallItem | LocalShellCallOutputItem | ShellCallItem | ShellCallOutputItem | McpApprovalResponseItem | CustomToolCallOutputItem | AdditionalToolsItem | OutputWebSearchServerToolItem | OutputCodeInterpreterServerToolItem | OutputFileSearchServerToolItem | OutputImageGenerationServerToolItem | OutputBrowserUseServerToolItem | OutputBashServerToolItem | OutputTextEditorServerToolItem | OutputApplyPatchServerToolItem | OutputWebFetchServerToolItem | OutputToolSearchServerToolItem | OutputMemoryServerToolItem | OutputMcpServerToolItem | OutputSearchModelsServerToolItem | OutputFusionServerToolItem | OutputAdvisorServerToolItem | OutputSubagentServerToolItem | OutputFilesServerToolItem | CompactionItem | ItemReferenceItem | EasyInputMessage | InputMessageItem>;
139
140
  /** @internal */
140
141
  export declare const InputsStatusInProgress2$outboundSchema: z.ZodEnum<typeof InputsStatusInProgress2>;
141
142
  /** @internal */
@@ -210,12 +211,12 @@ export type InputsMessage$Outbound = {
210
211
  export declare const InputsMessage$outboundSchema: z.ZodType<InputsMessage$Outbound, InputsMessage>;
211
212
  export declare function inputsMessageToJSON(inputsMessage: InputsMessage): string;
212
213
  /** @internal */
213
- export type InputsUnion1$Outbound = OutputCodeInterpreterCallItem$Outbound | FunctionCallItem$Outbound | LocalShellCallItem$Outbound | McpApprovalRequestItem$Outbound | McpCallItem$Outbound | ApplyPatchCallItem$Outbound | InputsMessage$Outbound | OutputFunctionCallItem$Outbound | OutputCustomToolCallItem$Outbound | OutputFileSearchCallItem$Outbound | OutputComputerCallItem$Outbound | OutputDatetimeItem$Outbound | McpListToolsItem$Outbound | CustomToolCallItem$Outbound | ReasoningItem$Outbound | FunctionCallOutputItem$Outbound | ApplyPatchCallOutputItem$Outbound | InputsReasoning$Outbound | OutputWebSearchCallItem$Outbound | OutputImageGenerationCallItem$Outbound | LocalShellCallOutputItem$Outbound | ShellCallItem$Outbound | ShellCallOutputItem$Outbound | McpApprovalResponseItem$Outbound | CustomToolCallOutputItem$Outbound | OutputWebSearchServerToolItem$Outbound | OutputCodeInterpreterServerToolItem$Outbound | OutputFileSearchServerToolItem$Outbound | OutputImageGenerationServerToolItem$Outbound | OutputBrowserUseServerToolItem$Outbound | OutputBashServerToolItem$Outbound | OutputTextEditorServerToolItem$Outbound | OutputApplyPatchServerToolItem$Outbound | OutputWebFetchServerToolItem$Outbound | OutputToolSearchServerToolItem$Outbound | OutputMemoryServerToolItem$Outbound | OutputMcpServerToolItem$Outbound | OutputSearchModelsServerToolItem$Outbound | OutputFusionServerToolItem$Outbound | OutputAdvisorServerToolItem$Outbound | OutputSubagentServerToolItem$Outbound | OutputFilesServerToolItem$Outbound | CompactionItem$Outbound | ItemReferenceItem$Outbound | EasyInputMessage$Outbound | InputMessageItem$Outbound;
214
+ export type InputsUnion1$Outbound = OutputCodeInterpreterCallItem$Outbound | FunctionCallItem$Outbound | LocalShellCallItem$Outbound | McpApprovalRequestItem$Outbound | McpCallItem$Outbound | ApplyPatchCallItem$Outbound | InputsMessage$Outbound | OutputFunctionCallItem$Outbound | OutputCustomToolCallItem$Outbound | OutputFileSearchCallItem$Outbound | OutputComputerCallItem$Outbound | OutputDatetimeItem$Outbound | McpListToolsItem$Outbound | CustomToolCallItem$Outbound | ReasoningItem$Outbound | FunctionCallOutputItem$Outbound | ApplyPatchCallOutputItem$Outbound | InputsReasoning$Outbound | OutputWebSearchCallItem$Outbound | OutputImageGenerationCallItem$Outbound | LocalShellCallOutputItem$Outbound | ShellCallItem$Outbound | ShellCallOutputItem$Outbound | McpApprovalResponseItem$Outbound | CustomToolCallOutputItem$Outbound | AdditionalToolsItem$Outbound | OutputWebSearchServerToolItem$Outbound | OutputCodeInterpreterServerToolItem$Outbound | OutputFileSearchServerToolItem$Outbound | OutputImageGenerationServerToolItem$Outbound | OutputBrowserUseServerToolItem$Outbound | OutputBashServerToolItem$Outbound | OutputTextEditorServerToolItem$Outbound | OutputApplyPatchServerToolItem$Outbound | OutputWebFetchServerToolItem$Outbound | OutputToolSearchServerToolItem$Outbound | OutputMemoryServerToolItem$Outbound | OutputMcpServerToolItem$Outbound | OutputSearchModelsServerToolItem$Outbound | OutputFusionServerToolItem$Outbound | OutputAdvisorServerToolItem$Outbound | OutputSubagentServerToolItem$Outbound | OutputFilesServerToolItem$Outbound | CompactionItem$Outbound | ItemReferenceItem$Outbound | EasyInputMessage$Outbound | InputMessageItem$Outbound;
214
215
  /** @internal */
215
216
  export declare const InputsUnion1$outboundSchema: z.ZodType<InputsUnion1$Outbound, InputsUnion1>;
216
217
  export declare function inputsUnion1ToJSON(inputsUnion1: InputsUnion1): string;
217
218
  /** @internal */
218
- export type InputsUnion$Outbound = string | Array<OutputCodeInterpreterCallItem$Outbound | FunctionCallItem$Outbound | LocalShellCallItem$Outbound | McpApprovalRequestItem$Outbound | McpCallItem$Outbound | ApplyPatchCallItem$Outbound | InputsMessage$Outbound | OutputFunctionCallItem$Outbound | OutputCustomToolCallItem$Outbound | OutputFileSearchCallItem$Outbound | OutputComputerCallItem$Outbound | OutputDatetimeItem$Outbound | McpListToolsItem$Outbound | CustomToolCallItem$Outbound | ReasoningItem$Outbound | FunctionCallOutputItem$Outbound | ApplyPatchCallOutputItem$Outbound | InputsReasoning$Outbound | OutputWebSearchCallItem$Outbound | OutputImageGenerationCallItem$Outbound | LocalShellCallOutputItem$Outbound | ShellCallItem$Outbound | ShellCallOutputItem$Outbound | McpApprovalResponseItem$Outbound | CustomToolCallOutputItem$Outbound | OutputWebSearchServerToolItem$Outbound | OutputCodeInterpreterServerToolItem$Outbound | OutputFileSearchServerToolItem$Outbound | OutputImageGenerationServerToolItem$Outbound | OutputBrowserUseServerToolItem$Outbound | OutputBashServerToolItem$Outbound | OutputTextEditorServerToolItem$Outbound | OutputApplyPatchServerToolItem$Outbound | OutputWebFetchServerToolItem$Outbound | OutputToolSearchServerToolItem$Outbound | OutputMemoryServerToolItem$Outbound | OutputMcpServerToolItem$Outbound | OutputSearchModelsServerToolItem$Outbound | OutputFusionServerToolItem$Outbound | OutputAdvisorServerToolItem$Outbound | OutputSubagentServerToolItem$Outbound | OutputFilesServerToolItem$Outbound | CompactionItem$Outbound | ItemReferenceItem$Outbound | EasyInputMessage$Outbound | InputMessageItem$Outbound>;
219
+ export type InputsUnion$Outbound = string | Array<OutputCodeInterpreterCallItem$Outbound | FunctionCallItem$Outbound | LocalShellCallItem$Outbound | McpApprovalRequestItem$Outbound | McpCallItem$Outbound | ApplyPatchCallItem$Outbound | InputsMessage$Outbound | OutputFunctionCallItem$Outbound | OutputCustomToolCallItem$Outbound | OutputFileSearchCallItem$Outbound | OutputComputerCallItem$Outbound | OutputDatetimeItem$Outbound | McpListToolsItem$Outbound | CustomToolCallItem$Outbound | ReasoningItem$Outbound | FunctionCallOutputItem$Outbound | ApplyPatchCallOutputItem$Outbound | InputsReasoning$Outbound | OutputWebSearchCallItem$Outbound | OutputImageGenerationCallItem$Outbound | LocalShellCallOutputItem$Outbound | ShellCallItem$Outbound | ShellCallOutputItem$Outbound | McpApprovalResponseItem$Outbound | CustomToolCallOutputItem$Outbound | AdditionalToolsItem$Outbound | OutputWebSearchServerToolItem$Outbound | OutputCodeInterpreterServerToolItem$Outbound | OutputFileSearchServerToolItem$Outbound | OutputImageGenerationServerToolItem$Outbound | OutputBrowserUseServerToolItem$Outbound | OutputBashServerToolItem$Outbound | OutputTextEditorServerToolItem$Outbound | OutputApplyPatchServerToolItem$Outbound | OutputWebFetchServerToolItem$Outbound | OutputToolSearchServerToolItem$Outbound | OutputMemoryServerToolItem$Outbound | OutputMcpServerToolItem$Outbound | OutputSearchModelsServerToolItem$Outbound | OutputFusionServerToolItem$Outbound | OutputAdvisorServerToolItem$Outbound | OutputSubagentServerToolItem$Outbound | OutputFilesServerToolItem$Outbound | CompactionItem$Outbound | ItemReferenceItem$Outbound | EasyInputMessage$Outbound | InputMessageItem$Outbound>;
219
220
  /** @internal */
220
221
  export declare const InputsUnion$outboundSchema: z.ZodType<InputsUnion$Outbound, InputsUnion>;
221
222
  export declare function inputsUnionToJSON(inputsUnion: InputsUnion): string;
@@ -4,6 +4,7 @@
4
4
  */
5
5
  import * as z from "zod/v4";
6
6
  import { remap as remap$ } from "../lib/primitives.js";
7
+ import { AdditionalToolsItem$outboundSchema, } from "./additionaltoolsitem.js";
7
8
  import { ApplyPatchCallItem$outboundSchema, } from "./applypatchcallitem.js";
8
9
  import { ApplyPatchCallOutputItem$outboundSchema, } from "./applypatchcalloutputitem.js";
9
10
  import { CompactionItem$outboundSchema, } from "./compactionitem.js";
@@ -231,6 +232,7 @@ export const InputsUnion1$outboundSchema = z.union([
231
232
  ShellCallOutputItem$outboundSchema,
232
233
  McpApprovalResponseItem$outboundSchema,
233
234
  CustomToolCallOutputItem$outboundSchema,
235
+ AdditionalToolsItem$outboundSchema,
234
236
  OutputWebSearchServerToolItem$outboundSchema,
235
237
  OutputCodeInterpreterServerToolItem$outboundSchema,
236
238
  OutputFileSearchServerToolItem$outboundSchema,
@@ -285,6 +287,7 @@ export const InputsUnion$outboundSchema = z.union([
285
287
  ShellCallOutputItem$outboundSchema,
286
288
  McpApprovalResponseItem$outboundSchema,
287
289
  CustomToolCallOutputItem$outboundSchema,
290
+ AdditionalToolsItem$outboundSchema,
288
291
  OutputWebSearchServerToolItem$outboundSchema,
289
292
  OutputCodeInterpreterServerToolItem$outboundSchema,
290
293
  OutputFileSearchServerToolItem$outboundSchema,
@@ -1,10 +1,15 @@
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";
4
5
  import { SearchContextSizeEnum } from "./searchcontextsizeenum.js";
5
6
  import { WebSearchDomainFilter, WebSearchDomainFilter$Outbound } from "./websearchdomainfilter.js";
6
7
  import { WebSearchEngineEnum } from "./websearchengineenum.js";
7
8
  import { WebSearchUserLocation, WebSearchUserLocation$Outbound } from "./websearchuserlocation.js";
9
+ export declare const LegacyWebSearchServerToolType: {
10
+ readonly WebSearch: "web_search";
11
+ };
12
+ export type LegacyWebSearchServerToolType = ClosedEnum<typeof LegacyWebSearchServerToolType>;
8
13
  /**
9
14
  * Web search tool configuration
10
15
  */
@@ -22,13 +27,17 @@ export type LegacyWebSearchServerTool = {
22
27
  * Size of the search context for web search tools
23
28
  */
24
29
  searchContextSize?: SearchContextSizeEnum | undefined;
25
- type: "web_search";
30
+ type: LegacyWebSearchServerToolType;
26
31
  /**
27
32
  * User location information for web search
28
33
  */
29
34
  userLocation?: WebSearchUserLocation | null | undefined;
30
35
  };
31
36
  /** @internal */
37
+ export declare const LegacyWebSearchServerToolType$inboundSchema: z.ZodEnum<typeof LegacyWebSearchServerToolType>;
38
+ /** @internal */
39
+ export declare const LegacyWebSearchServerToolType$outboundSchema: z.ZodEnum<typeof LegacyWebSearchServerToolType>;
40
+ /** @internal */
32
41
  export declare const LegacyWebSearchServerTool$inboundSchema: z.ZodType<LegacyWebSearchServerTool, unknown>;
33
42
  /** @internal */
34
43
  export type LegacyWebSearchServerTool$Outbound = {
@@ -36,7 +45,7 @@ export type LegacyWebSearchServerTool$Outbound = {
36
45
  filters?: WebSearchDomainFilter$Outbound | null | undefined;
37
46
  max_results?: number | undefined;
38
47
  search_context_size?: string | undefined;
39
- type: "web_search";
48
+ type: string;
40
49
  user_location?: WebSearchUserLocation$Outbound | null | undefined;
41
50
  };
42
51
  /** @internal */
@@ -9,13 +9,20 @@ import { SearchContextSizeEnum$inboundSchema, SearchContextSizeEnum$outboundSche
9
9
  import { WebSearchDomainFilter$inboundSchema, WebSearchDomainFilter$outboundSchema, } from "./websearchdomainfilter.js";
10
10
  import { WebSearchEngineEnum$inboundSchema, WebSearchEngineEnum$outboundSchema, } from "./websearchengineenum.js";
11
11
  import { WebSearchUserLocation$inboundSchema, WebSearchUserLocation$outboundSchema, } from "./websearchuserlocation.js";
12
+ export const LegacyWebSearchServerToolType = {
13
+ WebSearch: "web_search",
14
+ };
15
+ /** @internal */
16
+ export const LegacyWebSearchServerToolType$inboundSchema = z.enum(LegacyWebSearchServerToolType);
17
+ /** @internal */
18
+ export const LegacyWebSearchServerToolType$outboundSchema = LegacyWebSearchServerToolType$inboundSchema;
12
19
  /** @internal */
13
20
  export const LegacyWebSearchServerTool$inboundSchema = z.object({
14
21
  engine: WebSearchEngineEnum$inboundSchema.optional(),
15
22
  filters: z.nullable(WebSearchDomainFilter$inboundSchema).optional(),
16
23
  max_results: z.int().optional(),
17
24
  search_context_size: SearchContextSizeEnum$inboundSchema.optional(),
18
- type: z.literal("web_search"),
25
+ type: LegacyWebSearchServerToolType$inboundSchema,
19
26
  user_location: z.nullable(WebSearchUserLocation$inboundSchema).optional(),
20
27
  }).transform((v) => {
21
28
  return remap$(v, {
@@ -30,7 +37,7 @@ export const LegacyWebSearchServerTool$outboundSchema = z.object({
30
37
  filters: z.nullable(WebSearchDomainFilter$outboundSchema).optional(),
31
38
  maxResults: z.int().optional(),
32
39
  searchContextSize: SearchContextSizeEnum$outboundSchema.optional(),
33
- type: z.literal("web_search"),
40
+ type: LegacyWebSearchServerToolType$outboundSchema,
34
41
  userLocation: z.nullable(WebSearchUserLocation$outboundSchema).optional(),
35
42
  }).transform((v) => {
36
43
  return remap$(v, {