@openrouter/sdk 0.13.59 → 0.13.61

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 (193) 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 +7 -7
  4. package/esm/models/additionaltoolsitem.js +5 -5
  5. package/esm/models/advisornestedtool.d.ts +3 -3
  6. package/esm/models/advisornestedtool.js +2 -2
  7. package/esm/models/agentmessageitem.d.ts +3 -3
  8. package/esm/models/agentmessageitem.js +3 -3
  9. package/esm/models/autobetarouterplugin.d.ts +27 -0
  10. package/esm/models/autobetarouterplugin.js +22 -0
  11. package/esm/models/badgatewayresponseerrordata.d.ts +1 -1
  12. package/esm/models/badgatewayresponseerrordata.js +1 -1
  13. package/esm/models/badrequestresponseerrordata.d.ts +1 -1
  14. package/esm/models/badrequestresponseerrordata.js +1 -1
  15. package/esm/models/baseinputsunion.d.ts +3 -3
  16. package/esm/models/baseinputsunion.js +0 -3
  17. package/esm/models/byokproviderslug.d.ts +1 -0
  18. package/esm/models/byokproviderslug.js +1 -0
  19. package/esm/models/chatassistantmessage.d.ts +4 -4
  20. package/esm/models/chatassistantmessage.js +4 -4
  21. package/esm/models/chatfunctiontool.d.ts +2 -2
  22. package/esm/models/chatfunctiontool.js +1 -1
  23. package/esm/models/chatjsonschemaconfig.d.ts +2 -2
  24. package/esm/models/chatjsonschemaconfig.js +1 -1
  25. package/esm/models/chatrequest.d.ts +9 -8
  26. package/esm/models/chatrequest.js +4 -3
  27. package/esm/models/compactionitem.d.ts +1 -1
  28. package/esm/models/compactionitem.js +1 -1
  29. package/esm/models/compoundfilter.d.ts +2 -2
  30. package/esm/models/compoundfilter.js +2 -2
  31. package/esm/models/conflictresponseerrordata.d.ts +1 -1
  32. package/esm/models/conflictresponseerrordata.js +1 -1
  33. package/esm/models/contextcompactionitem.d.ts +1 -1
  34. package/esm/models/contextcompactionitem.js +1 -1
  35. package/esm/models/createobservabilitydestinationrequest.d.ts +2 -2
  36. package/esm/models/createobservabilitydestinationrequest.js +1 -1
  37. package/esm/models/debugevent.d.ts +1 -1
  38. package/esm/models/debugevent.js +1 -1
  39. package/esm/models/easyinputmessage.d.ts +8 -8
  40. package/esm/models/easyinputmessage.js +0 -4
  41. package/esm/models/edgenetworktimeoutresponseerrordata.d.ts +1 -1
  42. package/esm/models/edgenetworktimeoutresponseerrordata.js +1 -1
  43. package/esm/models/errors/badgatewayresponseerror.d.ts +2 -2
  44. package/esm/models/errors/badgatewayresponseerror.js +1 -2
  45. package/esm/models/errors/badrequestresponseerror.d.ts +2 -2
  46. package/esm/models/errors/badrequestresponseerror.js +1 -2
  47. package/esm/models/errors/conflictresponseerror.d.ts +2 -2
  48. package/esm/models/errors/conflictresponseerror.js +1 -2
  49. package/esm/models/errors/edgenetworktimeoutresponseerror.d.ts +2 -2
  50. package/esm/models/errors/edgenetworktimeoutresponseerror.js +1 -2
  51. package/esm/models/errors/forbiddenresponseerror.d.ts +2 -2
  52. package/esm/models/errors/forbiddenresponseerror.js +1 -2
  53. package/esm/models/errors/internalserverresponseerror.d.ts +2 -2
  54. package/esm/models/errors/internalserverresponseerror.js +1 -2
  55. package/esm/models/errors/notfoundresponseerror.d.ts +2 -2
  56. package/esm/models/errors/notfoundresponseerror.js +1 -2
  57. package/esm/models/errors/payloadtoolargeresponseerror.d.ts +2 -2
  58. package/esm/models/errors/payloadtoolargeresponseerror.js +1 -2
  59. package/esm/models/errors/paymentrequiredresponseerror.d.ts +2 -2
  60. package/esm/models/errors/paymentrequiredresponseerror.js +1 -2
  61. package/esm/models/errors/provideroverloadedresponseerror.d.ts +2 -2
  62. package/esm/models/errors/provideroverloadedresponseerror.js +1 -2
  63. package/esm/models/errors/requesttimeoutresponseerror.d.ts +2 -2
  64. package/esm/models/errors/requesttimeoutresponseerror.js +1 -2
  65. package/esm/models/errors/serviceunavailableresponseerror.d.ts +2 -2
  66. package/esm/models/errors/serviceunavailableresponseerror.js +1 -2
  67. package/esm/models/errors/toomanyrequestsresponseerror.d.ts +2 -2
  68. package/esm/models/errors/toomanyrequestsresponseerror.js +1 -2
  69. package/esm/models/errors/unauthorizedresponseerror.d.ts +2 -2
  70. package/esm/models/errors/unauthorizedresponseerror.js +1 -2
  71. package/esm/models/errors/unprocessableentityresponseerror.d.ts +2 -2
  72. package/esm/models/errors/unprocessableentityresponseerror.js +1 -2
  73. package/esm/models/filesearchservertool.d.ts +4 -4
  74. package/esm/models/filesearchservertool.js +1 -8
  75. package/esm/models/forbiddenresponseerrordata.d.ts +1 -1
  76. package/esm/models/forbiddenresponseerrordata.js +1 -1
  77. package/esm/models/formatjsonschemaconfig.d.ts +2 -2
  78. package/esm/models/formatjsonschemaconfig.js +2 -2
  79. package/esm/models/functioncalloutputitem.d.ts +2 -9
  80. package/esm/models/functioncalloutputitem.js +2 -8
  81. package/esm/models/fusionplugin.d.ts +28 -2
  82. package/esm/models/fusionplugin.js +28 -1
  83. package/esm/models/fusionservertoolconfig.d.ts +2 -2
  84. package/esm/models/fusionservertoolconfig.js +1 -1
  85. package/esm/models/generationcontentdata.d.ts +1 -1
  86. package/esm/models/generationcontentdata.js +1 -1
  87. package/esm/models/imageconfig.d.ts +2 -2
  88. package/esm/models/imageconfig.js +1 -1
  89. package/esm/models/imagegenerationproviderpreferences.d.ts +256 -250
  90. package/esm/models/imagegenerationproviderpreferences.js +126 -133
  91. package/esm/models/imagegenerationservertoolconfigunion.d.ts +2 -2
  92. package/esm/models/imagegenerationservertoolconfigunion.js +1 -1
  93. package/esm/models/index.d.ts +1 -2
  94. package/esm/models/index.js +1 -2
  95. package/esm/models/inputsunion.d.ts +8 -8
  96. package/esm/models/inputsunion.js +0 -4
  97. package/esm/models/internalserverresponseerrordata.d.ts +1 -1
  98. package/esm/models/internalserverresponseerrordata.js +1 -1
  99. package/esm/models/listendpointsresponse.d.ts +2 -33
  100. package/esm/models/listendpointsresponse.js +2 -30
  101. package/esm/models/localshellcalloutputitem.d.ts +3 -10
  102. package/esm/models/localshellcalloutputitem.js +2 -9
  103. package/esm/models/mcplisttoolsitem.d.ts +4 -4
  104. package/esm/models/mcplisttoolsitem.js +2 -2
  105. package/esm/models/mcpservertool.d.ts +8 -8
  106. package/esm/models/mcpservertool.js +4 -24
  107. package/esm/models/messagesadvisortoolresultblock.d.ts +2 -2
  108. package/esm/models/messagesadvisortoolresultblock.js +1 -1
  109. package/esm/models/messagesfallbackparam.d.ts +1 -1
  110. package/esm/models/messagesfallbackparam.js +1 -1
  111. package/esm/models/messagesmessageparam.d.ts +4 -4
  112. package/esm/models/messagesmessageparam.js +2 -2
  113. package/esm/models/messagesoutputconfig.d.ts +2 -2
  114. package/esm/models/messagesoutputconfig.js +1 -1
  115. package/esm/models/messagesrequest.d.ts +15 -36
  116. package/esm/models/messagesrequest.js +10 -21
  117. package/esm/models/namespacefunctiontool.d.ts +4 -4
  118. package/esm/models/namespacefunctiontool.js +4 -6
  119. package/esm/models/notfoundresponseerrordata.d.ts +1 -1
  120. package/esm/models/notfoundresponseerrordata.js +1 -1
  121. package/esm/models/openairesponsefunctiontoolcalloutput.d.ts +3 -10
  122. package/esm/models/openairesponsefunctiontoolcalloutput.js +2 -11
  123. package/esm/models/openresponsesresult.d.ts +46 -2
  124. package/esm/models/openresponsesresult.js +69 -3
  125. package/esm/models/operations/listbyokkeys.d.ts +1 -0
  126. package/esm/models/operations/listbyokkeys.js +1 -0
  127. package/esm/models/outputcomputercallitem.d.ts +2 -2
  128. package/esm/models/outputcomputercallitem.js +2 -2
  129. package/esm/models/outputmemoryservertoolitem.d.ts +2 -2
  130. package/esm/models/outputmemoryservertoolitem.js +2 -2
  131. package/esm/models/outputmessage.d.ts +2 -2
  132. package/esm/models/outputmessage.js +0 -2
  133. package/esm/models/outputmessageitem.d.ts +2 -2
  134. package/esm/models/outputmessageitem.js +0 -2
  135. package/esm/models/payloadtoolargeresponseerrordata.d.ts +1 -1
  136. package/esm/models/payloadtoolargeresponseerrordata.js +1 -1
  137. package/esm/models/paymentrequiredresponseerrordata.d.ts +1 -1
  138. package/esm/models/paymentrequiredresponseerrordata.js +1 -1
  139. package/esm/models/pipelinestage.d.ts +1 -1
  140. package/esm/models/pipelinestage.js +1 -1
  141. package/esm/models/preferredmaxlatency.d.ts +2 -2
  142. package/esm/models/preferredmaxlatency.js +1 -1
  143. package/esm/models/preferredminthroughput.d.ts +2 -2
  144. package/esm/models/preferredminthroughput.js +1 -1
  145. package/esm/models/presetdesignatedversion.d.ts +1 -1
  146. package/esm/models/presetdesignatedversion.js +1 -1
  147. package/esm/models/providername.d.ts +2 -1
  148. package/esm/models/providername.js +2 -1
  149. package/esm/models/provideroptions.d.ts +252 -246
  150. package/esm/models/provideroptions.js +124 -123
  151. package/esm/models/provideroverloadedresponseerrordata.d.ts +1 -1
  152. package/esm/models/provideroverloadedresponseerrordata.js +1 -1
  153. package/esm/models/providerpreferences.d.ts +4 -4
  154. package/esm/models/providerpreferences.js +2 -10
  155. package/esm/models/providerresponse.d.ts +2 -1
  156. package/esm/models/providerresponse.js +2 -1
  157. package/esm/models/publicendpoint.d.ts +2 -16
  158. package/esm/models/publicendpoint.js +2 -15
  159. package/esm/models/quantization.d.ts +2 -0
  160. package/esm/models/quantization.js +2 -0
  161. package/esm/models/requesttimeoutresponseerrordata.d.ts +1 -1
  162. package/esm/models/requesttimeoutresponseerrordata.js +1 -1
  163. package/esm/models/responsesrequest.d.ts +39 -9
  164. package/esm/models/responsesrequest.js +27 -4
  165. package/esm/models/routerparams.d.ts +1 -1
  166. package/esm/models/serviceunavailableresponseerrordata.d.ts +1 -1
  167. package/esm/models/serviceunavailableresponseerrordata.js +1 -1
  168. package/esm/models/shellcallitem.d.ts +5 -12
  169. package/esm/models/shellcallitem.js +3 -10
  170. package/esm/models/shellcalloutputitem.d.ts +4 -11
  171. package/esm/models/shellcalloutputitem.js +3 -10
  172. package/esm/models/subagentnestedtool.d.ts +3 -3
  173. package/esm/models/subagentnestedtool.js +2 -2
  174. package/esm/models/toolchoiceallowed.d.ts +2 -2
  175. package/esm/models/toolchoiceallowed.js +2 -2
  176. package/esm/models/toomanyrequestsresponseerrordata.d.ts +1 -1
  177. package/esm/models/toomanyrequestsresponseerrordata.js +1 -1
  178. package/esm/models/traceconfig.d.ts +1 -1
  179. package/esm/models/traceconfig.js +1 -1
  180. package/esm/models/unauthorizedresponseerrordata.d.ts +1 -1
  181. package/esm/models/unauthorizedresponseerrordata.js +1 -1
  182. package/esm/models/unprocessableentityresponseerrordata.d.ts +1 -1
  183. package/esm/models/unprocessableentityresponseerrordata.js +1 -1
  184. package/esm/models/updateobservabilitydestinationrequest.d.ts +2 -2
  185. package/esm/models/updateobservabilitydestinationrequest.js +1 -1
  186. package/esm/models/videogenerationrequest.d.ts +252 -246
  187. package/esm/models/videogenerationrequest.js +124 -123
  188. package/jsr.json +1 -1
  189. package/package.json +6 -6
  190. package/esm/models/reasoningconfig.d.ts +0 -35
  191. package/esm/models/reasoningconfig.js +0 -27
  192. package/esm/models/usage.d.ts +0 -52
  193. package/esm/models/usage.js +0 -75
@@ -9,6 +9,7 @@ import { AdvisorServerToolOpenRouter$outboundSchema, } from "./advisorservertool
9
9
  import { AnthropicCacheControlDirective$outboundSchema, } from "./anthropiccachecontroldirective.js";
10
10
  import { ApplyPatchServerTool$outboundSchema, } from "./applypatchservertool.js";
11
11
  import { ApplyPatchServerToolOpenRouter$outboundSchema, } from "./applypatchservertoolopenrouter.js";
12
+ import { AutoBetaRouterPlugin$outboundSchema, } from "./autobetarouterplugin.js";
12
13
  import { AutoRouterPlugin$outboundSchema, } from "./autorouterplugin.js";
13
14
  import { BashServerTool$outboundSchema, } from "./bashservertool.js";
14
15
  import { ChatDebugOptions$outboundSchema, } from "./chatdebugoptions.js";
@@ -39,7 +40,10 @@ import { Preview20250311WebSearchServerTool$outboundSchema, } from "./preview202
39
40
  import { PreviewWebSearchServerTool$outboundSchema, } from "./previewwebsearchservertool.js";
40
41
  import { PromptCacheOptions$outboundSchema, } from "./promptcacheoptions.js";
41
42
  import { ProviderPreferences$outboundSchema, } from "./providerpreferences.js";
42
- import { ReasoningConfig$outboundSchema, } from "./reasoningconfig.js";
43
+ import { ReasoningContext$outboundSchema, } from "./reasoningcontext.js";
44
+ import { ReasoningEffort$outboundSchema, } from "./reasoningeffort.js";
45
+ import { ReasoningMode$outboundSchema, } from "./reasoningmode.js";
46
+ import { ReasoningSummaryVerbosity$outboundSchema, } from "./reasoningsummaryverbosity.js";
43
47
  import { ResponseHealingPlugin$outboundSchema, } from "./responsehealingplugin.js";
44
48
  import { ResponseIncludesEnum$outboundSchema, } from "./responseincludesenum.js";
45
49
  import { SearchModelsServerToolOpenRouter$outboundSchema, } from "./searchmodelsservertoolopenrouter.js";
@@ -64,6 +68,7 @@ export const ResponsesRequestServiceTier = {
64
68
  };
65
69
  /** @internal */
66
70
  export const ResponsesRequestPlugin$outboundSchema = z.union([
71
+ AutoBetaRouterPlugin$outboundSchema,
67
72
  AutoRouterPlugin$outboundSchema,
68
73
  ContextCompressionPlugin$outboundSchema,
69
74
  FileParserPlugin$outboundSchema,
@@ -78,12 +83,28 @@ export function responsesRequestPluginToJSON(responsesRequestPlugin) {
78
83
  return JSON.stringify(ResponsesRequestPlugin$outboundSchema.parse(responsesRequestPlugin));
79
84
  }
80
85
  /** @internal */
86
+ export const ReasoningConfig$outboundSchema = z.object({
87
+ context: z.nullable(ReasoningContext$outboundSchema).optional(),
88
+ effort: z.nullable(ReasoningEffort$outboundSchema).optional(),
89
+ mode: z.nullable(ReasoningMode$outboundSchema).optional(),
90
+ summary: z.nullable(ReasoningSummaryVerbosity$outboundSchema).optional(),
91
+ enabled: z.nullable(z.boolean()).optional(),
92
+ maxTokens: z.nullable(z.int()).optional(),
93
+ }).transform((v) => {
94
+ return remap$(v, {
95
+ maxTokens: "max_tokens",
96
+ });
97
+ });
98
+ export function reasoningConfigToJSON(reasoningConfig) {
99
+ return JSON.stringify(ReasoningConfig$outboundSchema.parse(reasoningConfig));
100
+ }
101
+ /** @internal */
81
102
  export const ResponsesRequestServiceTier$outboundSchema = openEnums.outboundSchema(ResponsesRequestServiceTier);
82
103
  /** @internal */
83
104
  export const ResponsesRequestToolFunction$outboundSchema = z.object({
84
105
  description: z.nullable(z.string()).optional(),
85
106
  name: z.string(),
86
- parameters: z.nullable(z.record(z.string(), z.nullable(z.any()))),
107
+ parameters: z.nullable(z.record(z.string(), z.any())),
87
108
  strict: z.nullable(z.boolean()).optional(),
88
109
  type: z.literal("function"),
89
110
  });
@@ -141,6 +162,7 @@ export const ResponsesRequest$outboundSchema = z.object({
141
162
  models: z.array(z.string()).optional(),
142
163
  parallelToolCalls: z.nullable(z.boolean()).optional(),
143
164
  plugins: z.array(z.union([
165
+ AutoBetaRouterPlugin$outboundSchema,
144
166
  AutoRouterPlugin$outboundSchema,
145
167
  ContextCompressionPlugin$outboundSchema,
146
168
  FileParserPlugin$outboundSchema,
@@ -152,12 +174,13 @@ export const ResponsesRequest$outboundSchema = z.object({
152
174
  WebFetchPlugin$outboundSchema,
153
175
  ])).optional(),
154
176
  presencePenalty: z.nullable(z.number()).optional(),
155
- previousResponseId: z.nullable(z.any()).optional(),
177
+ previousResponseId: z.any().optional(),
156
178
  prompt: z.nullable(StoredPromptTemplate$outboundSchema).optional(),
157
179
  promptCacheKey: z.nullable(z.string()).optional(),
158
180
  promptCacheOptions: z.nullable(PromptCacheOptions$outboundSchema).optional(),
159
181
  provider: z.nullable(ProviderPreferences$outboundSchema).optional(),
160
- reasoning: z.nullable(ReasoningConfig$outboundSchema).optional(),
182
+ reasoning: z.nullable(z.lazy(() => ReasoningConfig$outboundSchema))
183
+ .optional(),
161
184
  safetyIdentifier: z.nullable(z.string()).optional(),
162
185
  serviceTier: z.nullable(ResponsesRequestServiceTier$outboundSchema.default("auto")),
163
186
  sessionId: z.string().optional(),
@@ -6,7 +6,7 @@ export type RouterParams = {
6
6
  throughputFloor?: number | undefined;
7
7
  versionGroup?: string | undefined;
8
8
  additionalProperties?: {
9
- [k: string]: any | null;
9
+ [k: string]: any;
10
10
  } | undefined;
11
11
  };
12
12
  /** @internal */
@@ -8,7 +8,7 @@ export type ServiceUnavailableResponseErrorData = {
8
8
  code: number;
9
9
  message: string;
10
10
  metadata?: {
11
- [k: string]: any | null;
11
+ [k: string]: any;
12
12
  } | null | undefined;
13
13
  };
14
14
  /** @internal */
@@ -8,7 +8,7 @@ import { safeParse } from "../lib/schemas.js";
8
8
  export const ServiceUnavailableResponseErrorData$inboundSchema = z.object({
9
9
  code: z.int(),
10
10
  message: z.string(),
11
- metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(),
11
+ metadata: z.nullable(z.record(z.string(), z.any())).optional(),
12
12
  });
13
13
  export function serviceUnavailableResponseErrorDataFromJSON(jsonString) {
14
14
  return safeParse(jsonString, (x) => ServiceUnavailableResponseErrorData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ServiceUnavailableResponseErrorData' from JSON`);
@@ -1,16 +1,11 @@
1
1
  import * as z from "zod/v4";
2
- import { ClosedEnum, OpenEnum } from "../types/enums.js";
2
+ import { ClosedEnum } from "../types/enums.js";
3
+ import { ToolCallStatus } from "./toolcallstatus.js";
3
4
  export type ShellCallItemAction = {
4
5
  commands: Array<string>;
5
6
  maxOutputLength?: number | null | undefined;
6
7
  timeoutMs?: number | null | undefined;
7
8
  };
8
- export declare const ShellCallItemStatus: {
9
- readonly InProgress: "in_progress";
10
- readonly Completed: "completed";
11
- readonly Incomplete: "incomplete";
12
- };
13
- export type ShellCallItemStatus = OpenEnum<typeof ShellCallItemStatus>;
14
9
  export declare const ShellCallItemType: {
15
10
  readonly ShellCall: "shell_call";
16
11
  };
@@ -21,9 +16,9 @@ export type ShellCallItemType = ClosedEnum<typeof ShellCallItemType>;
21
16
  export type ShellCallItem = {
22
17
  action: ShellCallItemAction;
23
18
  callId: string;
24
- environment?: any | null | undefined;
19
+ environment?: any | undefined;
25
20
  id?: string | null | undefined;
26
- status?: ShellCallItemStatus | null | undefined;
21
+ status?: ToolCallStatus | null | undefined;
27
22
  type: ShellCallItemType;
28
23
  };
29
24
  /** @internal */
@@ -36,14 +31,12 @@ export type ShellCallItemAction$Outbound = {
36
31
  export declare const ShellCallItemAction$outboundSchema: z.ZodType<ShellCallItemAction$Outbound, ShellCallItemAction>;
37
32
  export declare function shellCallItemActionToJSON(shellCallItemAction: ShellCallItemAction): string;
38
33
  /** @internal */
39
- export declare const ShellCallItemStatus$outboundSchema: z.ZodType<string, ShellCallItemStatus>;
40
- /** @internal */
41
34
  export declare const ShellCallItemType$outboundSchema: z.ZodEnum<typeof ShellCallItemType>;
42
35
  /** @internal */
43
36
  export type ShellCallItem$Outbound = {
44
37
  action: ShellCallItemAction$Outbound;
45
38
  call_id: string;
46
- environment?: any | null | undefined;
39
+ environment?: any | undefined;
47
40
  id?: string | null | undefined;
48
41
  status?: string | null | undefined;
49
42
  type: string;
@@ -4,12 +4,7 @@
4
4
  */
5
5
  import * as z from "zod/v4";
6
6
  import { remap as remap$ } from "../lib/primitives.js";
7
- import * as openEnums from "../types/enums.js";
8
- export const ShellCallItemStatus = {
9
- InProgress: "in_progress",
10
- Completed: "completed",
11
- Incomplete: "incomplete",
12
- };
7
+ import { ToolCallStatus$outboundSchema, } from "./toolcallstatus.js";
13
8
  export const ShellCallItemType = {
14
9
  ShellCall: "shell_call",
15
10
  };
@@ -28,16 +23,14 @@ export function shellCallItemActionToJSON(shellCallItemAction) {
28
23
  return JSON.stringify(ShellCallItemAction$outboundSchema.parse(shellCallItemAction));
29
24
  }
30
25
  /** @internal */
31
- export const ShellCallItemStatus$outboundSchema = openEnums.outboundSchema(ShellCallItemStatus);
32
- /** @internal */
33
26
  export const ShellCallItemType$outboundSchema = z.enum(ShellCallItemType);
34
27
  /** @internal */
35
28
  export const ShellCallItem$outboundSchema = z.object({
36
29
  action: z.lazy(() => ShellCallItemAction$outboundSchema),
37
30
  callId: z.string(),
38
- environment: z.nullable(z.any()).optional(),
31
+ environment: z.any().optional(),
39
32
  id: z.nullable(z.string()).optional(),
40
- status: z.nullable(ShellCallItemStatus$outboundSchema).optional(),
33
+ status: z.nullable(ToolCallStatus$outboundSchema).optional(),
41
34
  type: ShellCallItemType$outboundSchema,
42
35
  }).transform((v) => {
43
36
  return remap$(v, {
@@ -1,19 +1,14 @@
1
1
  import * as z from "zod/v4";
2
- import { ClosedEnum, OpenEnum } from "../types/enums.js";
2
+ import { ClosedEnum } from "../types/enums.js";
3
+ import { ToolCallStatus } from "./toolcallstatus.js";
3
4
  export type ShellCallOutputItemOutput = {
4
5
  content?: string | null | undefined;
5
6
  exitCode?: number | null | undefined;
6
7
  type: string;
7
8
  additionalProperties?: {
8
- [k: string]: any | null;
9
+ [k: string]: any;
9
10
  } | undefined;
10
11
  };
11
- export declare const ShellCallOutputItemStatus: {
12
- readonly InProgress: "in_progress";
13
- readonly Completed: "completed";
14
- readonly Incomplete: "incomplete";
15
- };
16
- export type ShellCallOutputItemStatus = OpenEnum<typeof ShellCallOutputItemStatus>;
17
12
  export declare const ShellCallOutputItemType: {
18
13
  readonly ShellCallOutput: "shell_call_output";
19
14
  };
@@ -26,7 +21,7 @@ export type ShellCallOutputItem = {
26
21
  id?: string | null | undefined;
27
22
  maxOutputLength?: number | null | undefined;
28
23
  output: Array<ShellCallOutputItemOutput>;
29
- status?: ShellCallOutputItemStatus | null | undefined;
24
+ status?: ToolCallStatus | null | undefined;
30
25
  type: ShellCallOutputItemType;
31
26
  };
32
27
  /** @internal */
@@ -40,8 +35,6 @@ export type ShellCallOutputItemOutput$Outbound = {
40
35
  export declare const ShellCallOutputItemOutput$outboundSchema: z.ZodType<ShellCallOutputItemOutput$Outbound, ShellCallOutputItemOutput>;
41
36
  export declare function shellCallOutputItemOutputToJSON(shellCallOutputItemOutput: ShellCallOutputItemOutput): string;
42
37
  /** @internal */
43
- export declare const ShellCallOutputItemStatus$outboundSchema: z.ZodType<string, ShellCallOutputItemStatus>;
44
- /** @internal */
45
38
  export declare const ShellCallOutputItemType$outboundSchema: z.ZodEnum<typeof ShellCallOutputItemType>;
46
39
  /** @internal */
47
40
  export type ShellCallOutputItem$Outbound = {
@@ -4,12 +4,7 @@
4
4
  */
5
5
  import * as z from "zod/v4";
6
6
  import { remap as remap$ } from "../lib/primitives.js";
7
- import * as openEnums from "../types/enums.js";
8
- export const ShellCallOutputItemStatus = {
9
- InProgress: "in_progress",
10
- Completed: "completed",
11
- Incomplete: "incomplete",
12
- };
7
+ import { ToolCallStatus$outboundSchema, } from "./toolcallstatus.js";
13
8
  export const ShellCallOutputItemType = {
14
9
  ShellCallOutput: "shell_call_output",
15
10
  };
@@ -18,7 +13,7 @@ export const ShellCallOutputItemOutput$outboundSchema = z.object({
18
13
  content: z.nullable(z.string()).optional(),
19
14
  exitCode: z.nullable(z.int()).optional(),
20
15
  type: z.string(),
21
- additionalProperties: z.record(z.string(), z.nullable(z.any())).optional(),
16
+ additionalProperties: z.record(z.string(), z.any()).optional(),
22
17
  }).transform((v) => {
23
18
  return {
24
19
  ...v.additionalProperties,
@@ -32,8 +27,6 @@ export function shellCallOutputItemOutputToJSON(shellCallOutputItemOutput) {
32
27
  return JSON.stringify(ShellCallOutputItemOutput$outboundSchema.parse(shellCallOutputItemOutput));
33
28
  }
34
29
  /** @internal */
35
- export const ShellCallOutputItemStatus$outboundSchema = openEnums.outboundSchema(ShellCallOutputItemStatus);
36
- /** @internal */
37
30
  export const ShellCallOutputItemType$outboundSchema = z.enum(ShellCallOutputItemType);
38
31
  /** @internal */
39
32
  export const ShellCallOutputItem$outboundSchema = z.object({
@@ -41,7 +34,7 @@ export const ShellCallOutputItem$outboundSchema = z.object({
41
34
  id: z.nullable(z.string()).optional(),
42
35
  maxOutputLength: z.nullable(z.int()).optional(),
43
36
  output: z.array(z.lazy(() => ShellCallOutputItemOutput$outboundSchema)),
44
- status: z.nullable(ShellCallOutputItemStatus$outboundSchema).optional(),
37
+ status: z.nullable(ToolCallStatus$outboundSchema).optional(),
45
38
  type: ShellCallOutputItemType$outboundSchema,
46
39
  }).transform((v) => {
47
40
  return remap$(v, {
@@ -4,17 +4,17 @@ import * as z from "zod/v4";
4
4
  */
5
5
  export type SubagentNestedTool = {
6
6
  parameters?: {
7
- [k: string]: any | null;
7
+ [k: string]: any;
8
8
  } | undefined;
9
9
  type: string;
10
10
  additionalProperties?: {
11
- [k: string]: any | null;
11
+ [k: string]: any;
12
12
  } | undefined;
13
13
  };
14
14
  /** @internal */
15
15
  export type SubagentNestedTool$Outbound = {
16
16
  parameters?: {
17
- [k: string]: any | null;
17
+ [k: string]: any;
18
18
  } | undefined;
19
19
  type: string;
20
20
  [additionalProperties: string]: unknown;
@@ -6,9 +6,9 @@ import * as z from "zod/v4";
6
6
  import { remap as remap$ } from "../lib/primitives.js";
7
7
  /** @internal */
8
8
  export const SubagentNestedTool$outboundSchema = z.object({
9
- parameters: z.record(z.string(), z.nullable(z.any())).optional(),
9
+ parameters: z.record(z.string(), z.any()).optional(),
10
10
  type: z.string(),
11
- additionalProperties: z.record(z.string(), z.nullable(z.any())).optional(),
11
+ additionalProperties: z.record(z.string(), z.any()).optional(),
12
12
  }).transform((v) => {
13
13
  return {
14
14
  ...v.additionalProperties,
@@ -21,7 +21,7 @@ export type ToolChoiceAllowedType = ClosedEnum<typeof ToolChoiceAllowedType>;
21
21
  export type ToolChoiceAllowed = {
22
22
  mode: ModeAuto | ModeRequired;
23
23
  tools: Array<{
24
- [k: string]: any | null;
24
+ [k: string]: any;
25
25
  }>;
26
26
  type: ToolChoiceAllowedType;
27
27
  };
@@ -51,7 +51,7 @@ export declare const ToolChoiceAllowed$inboundSchema: z.ZodType<ToolChoiceAllowe
51
51
  export type ToolChoiceAllowed$Outbound = {
52
52
  mode: string | string;
53
53
  tools: Array<{
54
- [k: string]: any | null;
54
+ [k: string]: any;
55
55
  }>;
56
56
  type: string;
57
57
  };
@@ -45,13 +45,13 @@ export const ToolChoiceAllowedType$outboundSchema = ToolChoiceAllowedType$inboun
45
45
  /** @internal */
46
46
  export const ToolChoiceAllowed$inboundSchema = z.object({
47
47
  mode: z.union([ModeAuto$inboundSchema, ModeRequired$inboundSchema]),
48
- tools: z.array(z.record(z.string(), z.nullable(z.any()))),
48
+ tools: z.array(z.record(z.string(), z.any())),
49
49
  type: ToolChoiceAllowedType$inboundSchema,
50
50
  });
51
51
  /** @internal */
52
52
  export const ToolChoiceAllowed$outboundSchema = z.object({
53
53
  mode: z.union([ModeAuto$outboundSchema, ModeRequired$outboundSchema]),
54
- tools: z.array(z.record(z.string(), z.nullable(z.any()))),
54
+ tools: z.array(z.record(z.string(), z.any())),
55
55
  type: ToolChoiceAllowedType$outboundSchema,
56
56
  });
57
57
  export function toolChoiceAllowedToJSON(toolChoiceAllowed) {
@@ -8,7 +8,7 @@ export type TooManyRequestsResponseErrorData = {
8
8
  code: number;
9
9
  message: string;
10
10
  metadata?: {
11
- [k: string]: any | null;
11
+ [k: string]: any;
12
12
  } | null | undefined;
13
13
  };
14
14
  /** @internal */
@@ -8,7 +8,7 @@ import { safeParse } from "../lib/schemas.js";
8
8
  export const TooManyRequestsResponseErrorData$inboundSchema = z.object({
9
9
  code: z.int(),
10
10
  message: z.string(),
11
- metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(),
11
+ metadata: z.nullable(z.record(z.string(), z.any())).optional(),
12
12
  });
13
13
  export function tooManyRequestsResponseErrorDataFromJSON(jsonString) {
14
14
  return safeParse(jsonString, (x) => TooManyRequestsResponseErrorData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TooManyRequestsResponseErrorData' from JSON`);
@@ -9,7 +9,7 @@ export type TraceConfig = {
9
9
  traceId?: string | undefined;
10
10
  traceName?: string | undefined;
11
11
  additionalProperties?: {
12
- [k: string]: any | null;
12
+ [k: string]: any;
13
13
  } | undefined;
14
14
  };
15
15
  /** @internal */
@@ -11,7 +11,7 @@ export const TraceConfig$outboundSchema = z.object({
11
11
  spanName: z.string().optional(),
12
12
  traceId: z.string().optional(),
13
13
  traceName: z.string().optional(),
14
- additionalProperties: z.record(z.string(), z.nullable(z.any())).optional(),
14
+ additionalProperties: z.record(z.string(), z.any()).optional(),
15
15
  }).transform((v) => {
16
16
  return {
17
17
  ...v.additionalProperties,
@@ -8,7 +8,7 @@ export type UnauthorizedResponseErrorData = {
8
8
  code: number;
9
9
  message: string;
10
10
  metadata?: {
11
- [k: string]: any | null;
11
+ [k: string]: any;
12
12
  } | null | undefined;
13
13
  };
14
14
  /** @internal */
@@ -8,7 +8,7 @@ import { safeParse } from "../lib/schemas.js";
8
8
  export const UnauthorizedResponseErrorData$inboundSchema = z.object({
9
9
  code: z.int(),
10
10
  message: z.string(),
11
- metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(),
11
+ metadata: z.nullable(z.record(z.string(), z.any())).optional(),
12
12
  });
13
13
  export function unauthorizedResponseErrorDataFromJSON(jsonString) {
14
14
  return safeParse(jsonString, (x) => UnauthorizedResponseErrorData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UnauthorizedResponseErrorData' from JSON`);
@@ -8,7 +8,7 @@ export type UnprocessableEntityResponseErrorData = {
8
8
  code: number;
9
9
  message: string;
10
10
  metadata?: {
11
- [k: string]: any | null;
11
+ [k: string]: any;
12
12
  } | null | undefined;
13
13
  };
14
14
  /** @internal */
@@ -8,7 +8,7 @@ import { safeParse } from "../lib/schemas.js";
8
8
  export const UnprocessableEntityResponseErrorData$inboundSchema = z.object({
9
9
  code: z.int(),
10
10
  message: z.string(),
11
- metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(),
11
+ metadata: z.nullable(z.record(z.string(), z.any())).optional(),
12
12
  });
13
13
  export function unprocessableEntityResponseErrorDataFromJSON(jsonString) {
14
14
  return safeParse(jsonString, (x) => UnprocessableEntityResponseErrorData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UnprocessableEntityResponseErrorData' from JSON`);
@@ -9,7 +9,7 @@ export type UpdateObservabilityDestinationRequest = {
9
9
  * Provider-specific configuration fields to update. Masked values are ignored; unset fields keep their current value.
10
10
  */
11
11
  config?: {
12
- [k: string]: any | null;
12
+ [k: string]: any;
13
13
  } | undefined;
14
14
  /**
15
15
  * Whether the destination is enabled.
@@ -33,7 +33,7 @@ export type UpdateObservabilityDestinationRequest = {
33
33
  export type UpdateObservabilityDestinationRequest$Outbound = {
34
34
  api_key_hashes?: Array<string> | null | undefined;
35
35
  config?: {
36
- [k: string]: any | null;
36
+ [k: string]: any;
37
37
  } | undefined;
38
38
  enabled?: boolean | undefined;
39
39
  filter_rules?: ObservabilityFilterRulesConfigNullable$Outbound | null | undefined;
@@ -8,7 +8,7 @@ import { ObservabilityFilterRulesConfigNullable$outboundSchema, } from "./observ
8
8
  /** @internal */
9
9
  export const UpdateObservabilityDestinationRequest$outboundSchema = z.object({
10
10
  apiKeyHashes: z.nullable(z.array(z.string())).optional(),
11
- config: z.record(z.string(), z.nullable(z.any())).optional(),
11
+ config: z.record(z.string(), z.any()).optional(),
12
12
  enabled: z.boolean().optional(),
13
13
  filterRules: z.nullable(ObservabilityFilterRulesConfigNullable$outboundSchema)
14
14
  .optional(),