@openrouter/sdk 0.0.1-beta.6 → 0.0.1-beta.7

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 (251) hide show
  1. package/jsr.json +1 -1
  2. package/lib/base64.d.ts +3 -3
  3. package/lib/base64.js +1 -1
  4. package/lib/config.d.ts +3 -3
  5. package/lib/config.js +3 -3
  6. package/lib/env.d.ts +2 -2
  7. package/lib/env.js +1 -1
  8. package/lib/schemas.d.ts +6 -4
  9. package/lib/schemas.js +1 -1
  10. package/models/activityitem.d.ts +5 -5
  11. package/models/activityitem.js +3 -2
  12. package/models/assistantmessage.d.ts +9 -9
  13. package/models/assistantmessage.js +1 -1
  14. package/models/chatcompletionfinishreason.d.ts +5 -5
  15. package/models/chatcompletionfinishreason.js +3 -3
  16. package/models/chaterror.d.ts +9 -9
  17. package/models/chaterror.js +9 -4
  18. package/models/chatgenerationparams.d.ts +33 -33
  19. package/models/chatgenerationparams.js +7 -7
  20. package/models/chatgenerationtokenusage.d.ts +13 -13
  21. package/models/chatgenerationtokenusage.js +1 -1
  22. package/models/chatmessagecontentitem.d.ts +5 -5
  23. package/models/chatmessagecontentitem.js +1 -1
  24. package/models/chatmessagecontentitemaudio.d.ts +13 -13
  25. package/models/chatmessagecontentitemaudio.js +5 -4
  26. package/models/chatmessagecontentitemimage.d.ts +13 -13
  27. package/models/chatmessagecontentitemimage.js +5 -4
  28. package/models/chatmessagecontentitemtext.d.ts +5 -5
  29. package/models/chatmessagecontentitemtext.js +1 -1
  30. package/models/chatmessagetokenlogprob.d.ts +9 -9
  31. package/models/chatmessagetokenlogprob.js +1 -1
  32. package/models/chatmessagetokenlogprobs.d.ts +5 -5
  33. package/models/chatmessagetokenlogprobs.js +1 -1
  34. package/models/chatmessagetoolcall.d.ts +9 -9
  35. package/models/chatmessagetoolcall.js +1 -1
  36. package/models/chatresponse.d.ts +5 -5
  37. package/models/chatresponse.js +3 -2
  38. package/models/chatresponsechoice.d.ts +5 -5
  39. package/models/chatresponsechoice.js +1 -1
  40. package/models/chatstreamingchoice.d.ts +5 -5
  41. package/models/chatstreamingchoice.js +1 -1
  42. package/models/chatstreamingmessagechunk.d.ts +9 -9
  43. package/models/chatstreamingmessagechunk.js +2 -2
  44. package/models/chatstreamingmessagetoolcall.d.ts +9 -9
  45. package/models/chatstreamingmessagetoolcall.js +1 -1
  46. package/models/chatstreamingresponsechunk.d.ts +13 -13
  47. package/models/chatstreamingresponsechunk.js +3 -5
  48. package/models/chatstreamoptions.d.ts +5 -5
  49. package/models/chatstreamoptions.js +1 -1
  50. package/models/completionchoice.d.ts +9 -9
  51. package/models/completionchoice.js +3 -3
  52. package/models/completioncreateparams.d.ts +33 -33
  53. package/models/completioncreateparams.js +10 -9
  54. package/models/completionlogprobs.d.ts +5 -5
  55. package/models/completionlogprobs.js +3 -3
  56. package/models/completionresponse.d.ts +5 -5
  57. package/models/completionresponse.js +1 -1
  58. package/models/completionusage.d.ts +5 -5
  59. package/models/completionusage.js +1 -1
  60. package/models/createchargerequest.d.ts +5 -5
  61. package/models/createchargerequest.js +1 -1
  62. package/models/errorresponse.d.ts +13 -13
  63. package/models/errorresponse.js +7 -6
  64. package/models/errors/chaterror.d.ts +5 -5
  65. package/models/errors/chaterror.js +4 -4
  66. package/models/errors/errorresponse.d.ts +5 -5
  67. package/models/errors/errorresponse.js +6 -5
  68. package/models/errors/listproviders.d.ts +5 -5
  69. package/models/errors/listproviders.js +4 -4
  70. package/models/errors/responsevalidationerror.js +1 -1
  71. package/models/errors/sdkvalidationerror.d.ts +2 -2
  72. package/models/errors/sdkvalidationerror.js +3 -50
  73. package/models/filecitationannotation.d.ts +9 -9
  74. package/models/filecitationannotation.js +2 -2
  75. package/models/filepathannotation.d.ts +9 -9
  76. package/models/filepathannotation.js +2 -2
  77. package/models/imagegenerationstatus.d.ts +5 -5
  78. package/models/imagegenerationstatus.js +3 -3
  79. package/models/jsonschemaconfig.d.ts +5 -5
  80. package/models/jsonschemaconfig.js +3 -3
  81. package/models/listendpointsresponse.d.ts +5 -5
  82. package/models/listendpointsresponse.js +1 -1
  83. package/models/message.d.ts +13 -13
  84. package/models/message.js +3 -2
  85. package/models/modelscountresponse.d.ts +5 -5
  86. package/models/modelscountresponse.js +1 -1
  87. package/models/modelslistresponse.d.ts +5 -5
  88. package/models/modelslistresponse.js +1 -1
  89. package/models/namedtoolchoice.d.ts +9 -9
  90. package/models/namedtoolchoice.js +1 -1
  91. package/models/openresponseseasyinputmessage.d.ts +33 -33
  92. package/models/openresponseseasyinputmessage.js +6 -9
  93. package/models/openresponsesformatjsonobject.d.ts +9 -9
  94. package/models/openresponsesformatjsonobject.js +2 -2
  95. package/models/openresponsesformatjsonschema.d.ts +9 -9
  96. package/models/openresponsesformatjsonschema.js +4 -4
  97. package/models/openresponsesformattext.d.ts +9 -9
  98. package/models/openresponsesformattext.js +2 -2
  99. package/models/openresponsesformattextconfig.d.ts +5 -5
  100. package/models/openresponsesformattextconfig.js +1 -1
  101. package/models/openresponsesfunctioncalloutput.d.ts +9 -9
  102. package/models/openresponsesfunctioncalloutput.js +2 -2
  103. package/models/openresponsesfunctiontoolcall.d.ts +9 -9
  104. package/models/openresponsesfunctiontoolcall.js +2 -2
  105. package/models/openresponsesinput.d.ts +5 -5
  106. package/models/openresponsesinput.js +1 -1
  107. package/models/openresponsesinputcontent.d.ts +5 -5
  108. package/models/openresponsesinputcontent.js +1 -1
  109. package/models/openresponsesinputfile.d.ts +9 -9
  110. package/models/openresponsesinputfile.js +2 -2
  111. package/models/openresponsesinputimage.d.ts +13 -13
  112. package/models/openresponsesinputimage.js +4 -4
  113. package/models/openresponsesinputitem.d.ts +5 -5
  114. package/models/openresponsesinputitem.js +1 -1
  115. package/models/openresponsesinputmessageitem.d.ts +25 -25
  116. package/models/openresponsesinputmessageitem.js +5 -7
  117. package/models/openresponsesinputtext.d.ts +9 -9
  118. package/models/openresponsesinputtext.js +2 -2
  119. package/models/openresponseslogprobs.d.ts +9 -9
  120. package/models/openresponseslogprobs.js +1 -1
  121. package/models/openresponsesnonstreamingresponse.d.ts +29 -29
  122. package/models/openresponsesnonstreamingresponse.js +17 -17
  123. package/models/openresponsesoutputtext.d.ts +13 -13
  124. package/models/openresponsesoutputtext.js +2 -2
  125. package/models/openresponsesprompt.d.ts +5 -5
  126. package/models/openresponsesprompt.js +3 -5
  127. package/models/openresponsesreasoning.d.ts +13 -13
  128. package/models/openresponsesreasoning.js +4 -4
  129. package/models/openresponsesreasoningconfig.d.ts +9 -9
  130. package/models/openresponsesreasoningconfig.js +3 -3
  131. package/models/openresponsesrefusalcontent.d.ts +9 -9
  132. package/models/openresponsesrefusalcontent.js +2 -2
  133. package/models/openresponsesrequest.d.ts +5 -5
  134. package/models/openresponsesrequest.js +1 -1
  135. package/models/openresponsesstreamevent.d.ts +233 -233
  136. package/models/openresponsesstreamevent.js +42 -43
  137. package/models/openresponsestextconfig.d.ts +9 -9
  138. package/models/openresponsestextconfig.js +5 -4
  139. package/models/openresponsestoolchoice.d.ts +25 -25
  140. package/models/openresponsestoolchoice.js +5 -5
  141. package/models/openresponsestoolunion.d.ts +13 -13
  142. package/models/openresponsestoolunion.js +4 -4
  143. package/models/openresponseswebsearch20250826tool.d.ts +13 -13
  144. package/models/openresponseswebsearch20250826tool.js +2 -2
  145. package/models/openresponseswebsearchpreview20250311tool.d.ts +9 -9
  146. package/models/openresponseswebsearchpreview20250311tool.js +2 -3
  147. package/models/openresponseswebsearchpreviewtool.d.ts +9 -9
  148. package/models/openresponseswebsearchpreviewtool.js +2 -2
  149. package/models/openresponseswebsearchtool.d.ts +13 -13
  150. package/models/openresponseswebsearchtool.js +2 -2
  151. package/models/operations/createapialpharesponses.d.ts +9 -9
  152. package/models/operations/createapialpharesponses.js +2 -3
  153. package/models/operations/createcoinbasecharge.d.ts +29 -29
  154. package/models/operations/createcoinbasecharge.js +7 -4
  155. package/models/operations/createkeys.d.ts +17 -17
  156. package/models/operations/createkeys.js +3 -3
  157. package/models/operations/deletekeys.d.ts +9 -9
  158. package/models/operations/deletekeys.js +1 -1
  159. package/models/operations/getcredits.d.ts +5 -5
  160. package/models/operations/getcredits.js +1 -1
  161. package/models/operations/getcurrentkey.d.ts +13 -13
  162. package/models/operations/getcurrentkey.js +1 -1
  163. package/models/operations/getgeneration.d.ts +17 -17
  164. package/models/operations/getgeneration.js +3 -3
  165. package/models/operations/getkey.d.ts +13 -13
  166. package/models/operations/getkey.js +5 -3
  167. package/models/operations/getmodels.d.ts +9 -9
  168. package/models/operations/getmodels.js +1 -1
  169. package/models/operations/getparameters.d.ts +25 -25
  170. package/models/operations/getparameters.js +5 -5
  171. package/models/operations/getuseractivity.d.ts +9 -9
  172. package/models/operations/getuseractivity.js +1 -1
  173. package/models/operations/list.d.ts +13 -13
  174. package/models/operations/list.js +7 -4
  175. package/models/operations/listendpoints.d.ts +9 -9
  176. package/models/operations/listendpoints.js +1 -1
  177. package/models/operations/listendpointszdr.d.ts +9 -9
  178. package/models/operations/listendpointszdr.js +1 -1
  179. package/models/operations/listmodelscount.d.ts +5 -5
  180. package/models/operations/listmodelscount.js +1 -1
  181. package/models/operations/listmodelsuser.d.ts +9 -9
  182. package/models/operations/listmodelsuser.js +1 -1
  183. package/models/operations/listproviders.d.ts +13 -13
  184. package/models/operations/listproviders.js +4 -4
  185. package/models/operations/sendchatcompletionrequest.d.ts +5 -5
  186. package/models/operations/sendchatcompletionrequest.js +2 -3
  187. package/models/operations/updatekeys.d.ts +21 -21
  188. package/models/operations/updatekeys.js +3 -3
  189. package/models/outputtextcontent.d.ts +13 -13
  190. package/models/outputtextcontent.js +2 -2
  191. package/models/publicendpoint.d.ts +5 -5
  192. package/models/publicendpoint.js +1 -1
  193. package/models/reasoningsummarytext.d.ts +9 -9
  194. package/models/reasoningsummarytext.js +2 -2
  195. package/models/reasoningsummaryverbosity.d.ts +5 -5
  196. package/models/reasoningsummaryverbosity.js +3 -3
  197. package/models/reasoningtextcontent.d.ts +9 -9
  198. package/models/reasoningtextcontent.js +2 -2
  199. package/models/refusalcontent.d.ts +9 -9
  200. package/models/refusalcontent.js +2 -2
  201. package/models/responseformatjsonschema.d.ts +5 -5
  202. package/models/responseformatjsonschema.js +1 -1
  203. package/models/responseformattextgrammar.d.ts +5 -5
  204. package/models/responseformattextgrammar.js +1 -1
  205. package/models/responseserrorfield.d.ts +9 -9
  206. package/models/responseserrorfield.js +3 -3
  207. package/models/responsesimagegenerationcall.d.ts +9 -9
  208. package/models/responsesimagegenerationcall.js +2 -2
  209. package/models/responsesoutputitem.d.ts +5 -5
  210. package/models/responsesoutputitem.js +1 -1
  211. package/models/responsesoutputitemfilesearchcall.d.ts +9 -9
  212. package/models/responsesoutputitemfilesearchcall.js +2 -2
  213. package/models/responsesoutputitemfunctioncall.d.ts +9 -9
  214. package/models/responsesoutputitemfunctioncall.js +2 -2
  215. package/models/responsesoutputitemreasoning.d.ts +9 -9
  216. package/models/responsesoutputitemreasoning.js +2 -2
  217. package/models/responsesoutputmessage.d.ts +33 -33
  218. package/models/responsesoutputmessage.js +9 -9
  219. package/models/responsessearchcontextsize.d.ts +5 -5
  220. package/models/responsessearchcontextsize.js +3 -3
  221. package/models/responsesusage.d.ts +17 -17
  222. package/models/responsesusage.js +3 -2
  223. package/models/responseswebsearchcalloutput.d.ts +9 -9
  224. package/models/responseswebsearchcalloutput.js +2 -2
  225. package/models/responseswebsearchuserlocation.d.ts +9 -9
  226. package/models/responseswebsearchuserlocation.js +2 -2
  227. package/models/security.d.ts +5 -5
  228. package/models/security.js +3 -2
  229. package/models/systemmessage.d.ts +9 -9
  230. package/models/systemmessage.js +3 -2
  231. package/models/tool.d.ts +9 -9
  232. package/models/tool.js +6 -6
  233. package/models/toolcallstatus.d.ts +5 -5
  234. package/models/toolcallstatus.js +3 -3
  235. package/models/toolchoicetypes.d.ts +29 -29
  236. package/models/toolchoicetypes.js +8 -9
  237. package/models/toolresponsemessage.d.ts +9 -9
  238. package/models/toolresponsemessage.js +1 -1
  239. package/models/urlcitationannotation.d.ts +9 -9
  240. package/models/urlcitationannotation.js +2 -2
  241. package/models/usermessage.d.ts +9 -9
  242. package/models/usermessage.js +7 -3
  243. package/models/websearchpreviewtooluserlocation.d.ts +9 -9
  244. package/models/websearchpreviewtooluserlocation.js +2 -2
  245. package/models/websearchstatus.d.ts +5 -5
  246. package/models/websearchstatus.js +3 -3
  247. package/package.json +1 -1
  248. package/types/blobs.d.ts +2 -2
  249. package/types/blobs.js +2 -2
  250. package/types/constdatetime.d.ts +2 -2
  251. package/types/constdatetime.js +1 -1
@@ -1,4 +1,4 @@
1
- import * as z from "zod/v3";
1
+ import * as z from "zod/v4";
2
2
  import { Result as SafeParseResult } from "../types/fp.js";
3
3
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
4
  import { ResponseFormatJSONSchema, ResponseFormatJSONSchema$Outbound } from "./responseformatjsonschema.js";
@@ -45,155 +45,155 @@ export type CompletionCreateParams = {
45
45
  responseFormat?: ResponseFormatJSONSchema | ResponseFormatTextGrammar | CompletionCreateParamsResponseFormatText | CompletionCreateParamsResponseFormatJSONObject | CompletionCreateParamsResponseFormatPython | null | undefined;
46
46
  };
47
47
  /** @internal */
48
- export declare const Prompt$inboundSchema: z.ZodType<Prompt, z.ZodTypeDef, unknown>;
48
+ export declare const Prompt$inboundSchema: z.ZodType<Prompt, unknown>;
49
49
  /** @internal */
50
50
  export type Prompt$Outbound = string | Array<string> | Array<number> | Array<Array<number>>;
51
51
  /** @internal */
52
- export declare const Prompt$outboundSchema: z.ZodType<Prompt$Outbound, z.ZodTypeDef, Prompt>;
52
+ export declare const Prompt$outboundSchema: z.ZodType<Prompt$Outbound, Prompt>;
53
53
  /**
54
54
  * @internal
55
55
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
56
56
  */
57
57
  export declare namespace Prompt$ {
58
58
  /** @deprecated use `Prompt$inboundSchema` instead. */
59
- const inboundSchema: z.ZodType<Prompt, z.ZodTypeDef, unknown>;
59
+ const inboundSchema: z.ZodType<Prompt, unknown, z.core.$ZodTypeInternals<Prompt, unknown>>;
60
60
  /** @deprecated use `Prompt$outboundSchema` instead. */
61
- const outboundSchema: z.ZodType<Prompt$Outbound, z.ZodTypeDef, Prompt>;
61
+ const outboundSchema: z.ZodType<Prompt$Outbound, Prompt, z.core.$ZodTypeInternals<Prompt$Outbound, Prompt>>;
62
62
  /** @deprecated use `Prompt$Outbound` instead. */
63
63
  type Outbound = Prompt$Outbound;
64
64
  }
65
65
  export declare function promptToJSON(prompt: Prompt): string;
66
66
  export declare function promptFromJSON(jsonString: string): SafeParseResult<Prompt, SDKValidationError>;
67
67
  /** @internal */
68
- export declare const CompletionCreateParamsStop$inboundSchema: z.ZodType<CompletionCreateParamsStop, z.ZodTypeDef, unknown>;
68
+ export declare const CompletionCreateParamsStop$inboundSchema: z.ZodType<CompletionCreateParamsStop, unknown>;
69
69
  /** @internal */
70
70
  export type CompletionCreateParamsStop$Outbound = string | Array<string>;
71
71
  /** @internal */
72
- export declare const CompletionCreateParamsStop$outboundSchema: z.ZodType<CompletionCreateParamsStop$Outbound, z.ZodTypeDef, CompletionCreateParamsStop>;
72
+ export declare const CompletionCreateParamsStop$outboundSchema: z.ZodType<CompletionCreateParamsStop$Outbound, CompletionCreateParamsStop>;
73
73
  /**
74
74
  * @internal
75
75
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
76
76
  */
77
77
  export declare namespace CompletionCreateParamsStop$ {
78
78
  /** @deprecated use `CompletionCreateParamsStop$inboundSchema` instead. */
79
- const inboundSchema: z.ZodType<CompletionCreateParamsStop, z.ZodTypeDef, unknown>;
79
+ const inboundSchema: z.ZodType<CompletionCreateParamsStop, unknown, z.core.$ZodTypeInternals<CompletionCreateParamsStop, unknown>>;
80
80
  /** @deprecated use `CompletionCreateParamsStop$outboundSchema` instead. */
81
- const outboundSchema: z.ZodType<CompletionCreateParamsStop$Outbound, z.ZodTypeDef, CompletionCreateParamsStop>;
81
+ const outboundSchema: z.ZodType<CompletionCreateParamsStop$Outbound, CompletionCreateParamsStop, z.core.$ZodTypeInternals<CompletionCreateParamsStop$Outbound, CompletionCreateParamsStop>>;
82
82
  /** @deprecated use `CompletionCreateParamsStop$Outbound` instead. */
83
83
  type Outbound = CompletionCreateParamsStop$Outbound;
84
84
  }
85
85
  export declare function completionCreateParamsStopToJSON(completionCreateParamsStop: CompletionCreateParamsStop): string;
86
86
  export declare function completionCreateParamsStopFromJSON(jsonString: string): SafeParseResult<CompletionCreateParamsStop, SDKValidationError>;
87
87
  /** @internal */
88
- export declare const StreamOptions$inboundSchema: z.ZodType<StreamOptions, z.ZodTypeDef, unknown>;
88
+ export declare const StreamOptions$inboundSchema: z.ZodType<StreamOptions, unknown>;
89
89
  /** @internal */
90
90
  export type StreamOptions$Outbound = {
91
91
  include_usage?: boolean | null | undefined;
92
92
  };
93
93
  /** @internal */
94
- export declare const StreamOptions$outboundSchema: z.ZodType<StreamOptions$Outbound, z.ZodTypeDef, StreamOptions>;
94
+ export declare const StreamOptions$outboundSchema: z.ZodType<StreamOptions$Outbound, StreamOptions>;
95
95
  /**
96
96
  * @internal
97
97
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
98
98
  */
99
99
  export declare namespace StreamOptions$ {
100
100
  /** @deprecated use `StreamOptions$inboundSchema` instead. */
101
- const inboundSchema: z.ZodType<StreamOptions, z.ZodTypeDef, unknown>;
101
+ const inboundSchema: z.ZodType<StreamOptions, unknown, z.core.$ZodTypeInternals<StreamOptions, unknown>>;
102
102
  /** @deprecated use `StreamOptions$outboundSchema` instead. */
103
- const outboundSchema: z.ZodType<StreamOptions$Outbound, z.ZodTypeDef, StreamOptions>;
103
+ const outboundSchema: z.ZodType<StreamOptions$Outbound, StreamOptions, z.core.$ZodTypeInternals<StreamOptions$Outbound, StreamOptions>>;
104
104
  /** @deprecated use `StreamOptions$Outbound` instead. */
105
105
  type Outbound = StreamOptions$Outbound;
106
106
  }
107
107
  export declare function streamOptionsToJSON(streamOptions: StreamOptions): string;
108
108
  export declare function streamOptionsFromJSON(jsonString: string): SafeParseResult<StreamOptions, SDKValidationError>;
109
109
  /** @internal */
110
- export declare const CompletionCreateParamsResponseFormatPython$inboundSchema: z.ZodType<CompletionCreateParamsResponseFormatPython, z.ZodTypeDef, unknown>;
110
+ export declare const CompletionCreateParamsResponseFormatPython$inboundSchema: z.ZodType<CompletionCreateParamsResponseFormatPython, unknown>;
111
111
  /** @internal */
112
112
  export type CompletionCreateParamsResponseFormatPython$Outbound = {
113
113
  type: "python";
114
114
  };
115
115
  /** @internal */
116
- export declare const CompletionCreateParamsResponseFormatPython$outboundSchema: z.ZodType<CompletionCreateParamsResponseFormatPython$Outbound, z.ZodTypeDef, CompletionCreateParamsResponseFormatPython>;
116
+ export declare const CompletionCreateParamsResponseFormatPython$outboundSchema: z.ZodType<CompletionCreateParamsResponseFormatPython$Outbound, CompletionCreateParamsResponseFormatPython>;
117
117
  /**
118
118
  * @internal
119
119
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
120
120
  */
121
121
  export declare namespace CompletionCreateParamsResponseFormatPython$ {
122
122
  /** @deprecated use `CompletionCreateParamsResponseFormatPython$inboundSchema` instead. */
123
- const inboundSchema: z.ZodType<CompletionCreateParamsResponseFormatPython, z.ZodTypeDef, unknown>;
123
+ const inboundSchema: z.ZodType<CompletionCreateParamsResponseFormatPython, unknown, z.core.$ZodTypeInternals<CompletionCreateParamsResponseFormatPython, unknown>>;
124
124
  /** @deprecated use `CompletionCreateParamsResponseFormatPython$outboundSchema` instead. */
125
- const outboundSchema: z.ZodType<CompletionCreateParamsResponseFormatPython$Outbound, z.ZodTypeDef, CompletionCreateParamsResponseFormatPython>;
125
+ const outboundSchema: z.ZodType<CompletionCreateParamsResponseFormatPython$Outbound, CompletionCreateParamsResponseFormatPython, z.core.$ZodTypeInternals<CompletionCreateParamsResponseFormatPython$Outbound, CompletionCreateParamsResponseFormatPython>>;
126
126
  /** @deprecated use `CompletionCreateParamsResponseFormatPython$Outbound` instead. */
127
127
  type Outbound = CompletionCreateParamsResponseFormatPython$Outbound;
128
128
  }
129
129
  export declare function completionCreateParamsResponseFormatPythonToJSON(completionCreateParamsResponseFormatPython: CompletionCreateParamsResponseFormatPython): string;
130
130
  export declare function completionCreateParamsResponseFormatPythonFromJSON(jsonString: string): SafeParseResult<CompletionCreateParamsResponseFormatPython, SDKValidationError>;
131
131
  /** @internal */
132
- export declare const CompletionCreateParamsResponseFormatJSONObject$inboundSchema: z.ZodType<CompletionCreateParamsResponseFormatJSONObject, z.ZodTypeDef, unknown>;
132
+ export declare const CompletionCreateParamsResponseFormatJSONObject$inboundSchema: z.ZodType<CompletionCreateParamsResponseFormatJSONObject, unknown>;
133
133
  /** @internal */
134
134
  export type CompletionCreateParamsResponseFormatJSONObject$Outbound = {
135
135
  type: "json_object";
136
136
  };
137
137
  /** @internal */
138
- export declare const CompletionCreateParamsResponseFormatJSONObject$outboundSchema: z.ZodType<CompletionCreateParamsResponseFormatJSONObject$Outbound, z.ZodTypeDef, CompletionCreateParamsResponseFormatJSONObject>;
138
+ export declare const CompletionCreateParamsResponseFormatJSONObject$outboundSchema: z.ZodType<CompletionCreateParamsResponseFormatJSONObject$Outbound, CompletionCreateParamsResponseFormatJSONObject>;
139
139
  /**
140
140
  * @internal
141
141
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
142
142
  */
143
143
  export declare namespace CompletionCreateParamsResponseFormatJSONObject$ {
144
144
  /** @deprecated use `CompletionCreateParamsResponseFormatJSONObject$inboundSchema` instead. */
145
- const inboundSchema: z.ZodType<CompletionCreateParamsResponseFormatJSONObject, z.ZodTypeDef, unknown>;
145
+ const inboundSchema: z.ZodType<CompletionCreateParamsResponseFormatJSONObject, unknown, z.core.$ZodTypeInternals<CompletionCreateParamsResponseFormatJSONObject, unknown>>;
146
146
  /** @deprecated use `CompletionCreateParamsResponseFormatJSONObject$outboundSchema` instead. */
147
- const outboundSchema: z.ZodType<CompletionCreateParamsResponseFormatJSONObject$Outbound, z.ZodTypeDef, CompletionCreateParamsResponseFormatJSONObject>;
147
+ const outboundSchema: z.ZodType<CompletionCreateParamsResponseFormatJSONObject$Outbound, CompletionCreateParamsResponseFormatJSONObject, z.core.$ZodTypeInternals<CompletionCreateParamsResponseFormatJSONObject$Outbound, CompletionCreateParamsResponseFormatJSONObject>>;
148
148
  /** @deprecated use `CompletionCreateParamsResponseFormatJSONObject$Outbound` instead. */
149
149
  type Outbound = CompletionCreateParamsResponseFormatJSONObject$Outbound;
150
150
  }
151
151
  export declare function completionCreateParamsResponseFormatJSONObjectToJSON(completionCreateParamsResponseFormatJSONObject: CompletionCreateParamsResponseFormatJSONObject): string;
152
152
  export declare function completionCreateParamsResponseFormatJSONObjectFromJSON(jsonString: string): SafeParseResult<CompletionCreateParamsResponseFormatJSONObject, SDKValidationError>;
153
153
  /** @internal */
154
- export declare const CompletionCreateParamsResponseFormatText$inboundSchema: z.ZodType<CompletionCreateParamsResponseFormatText, z.ZodTypeDef, unknown>;
154
+ export declare const CompletionCreateParamsResponseFormatText$inboundSchema: z.ZodType<CompletionCreateParamsResponseFormatText, unknown>;
155
155
  /** @internal */
156
156
  export type CompletionCreateParamsResponseFormatText$Outbound = {
157
157
  type: "text";
158
158
  };
159
159
  /** @internal */
160
- export declare const CompletionCreateParamsResponseFormatText$outboundSchema: z.ZodType<CompletionCreateParamsResponseFormatText$Outbound, z.ZodTypeDef, CompletionCreateParamsResponseFormatText>;
160
+ export declare const CompletionCreateParamsResponseFormatText$outboundSchema: z.ZodType<CompletionCreateParamsResponseFormatText$Outbound, CompletionCreateParamsResponseFormatText>;
161
161
  /**
162
162
  * @internal
163
163
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
164
164
  */
165
165
  export declare namespace CompletionCreateParamsResponseFormatText$ {
166
166
  /** @deprecated use `CompletionCreateParamsResponseFormatText$inboundSchema` instead. */
167
- const inboundSchema: z.ZodType<CompletionCreateParamsResponseFormatText, z.ZodTypeDef, unknown>;
167
+ const inboundSchema: z.ZodType<CompletionCreateParamsResponseFormatText, unknown, z.core.$ZodTypeInternals<CompletionCreateParamsResponseFormatText, unknown>>;
168
168
  /** @deprecated use `CompletionCreateParamsResponseFormatText$outboundSchema` instead. */
169
- const outboundSchema: z.ZodType<CompletionCreateParamsResponseFormatText$Outbound, z.ZodTypeDef, CompletionCreateParamsResponseFormatText>;
169
+ const outboundSchema: z.ZodType<CompletionCreateParamsResponseFormatText$Outbound, CompletionCreateParamsResponseFormatText, z.core.$ZodTypeInternals<CompletionCreateParamsResponseFormatText$Outbound, CompletionCreateParamsResponseFormatText>>;
170
170
  /** @deprecated use `CompletionCreateParamsResponseFormatText$Outbound` instead. */
171
171
  type Outbound = CompletionCreateParamsResponseFormatText$Outbound;
172
172
  }
173
173
  export declare function completionCreateParamsResponseFormatTextToJSON(completionCreateParamsResponseFormatText: CompletionCreateParamsResponseFormatText): string;
174
174
  export declare function completionCreateParamsResponseFormatTextFromJSON(jsonString: string): SafeParseResult<CompletionCreateParamsResponseFormatText, SDKValidationError>;
175
175
  /** @internal */
176
- export declare const CompletionCreateParamsResponseFormatUnion$inboundSchema: z.ZodType<CompletionCreateParamsResponseFormatUnion, z.ZodTypeDef, unknown>;
176
+ export declare const CompletionCreateParamsResponseFormatUnion$inboundSchema: z.ZodType<CompletionCreateParamsResponseFormatUnion, unknown>;
177
177
  /** @internal */
178
178
  export type CompletionCreateParamsResponseFormatUnion$Outbound = ResponseFormatJSONSchema$Outbound | ResponseFormatTextGrammar$Outbound | CompletionCreateParamsResponseFormatText$Outbound | CompletionCreateParamsResponseFormatJSONObject$Outbound | CompletionCreateParamsResponseFormatPython$Outbound;
179
179
  /** @internal */
180
- export declare const CompletionCreateParamsResponseFormatUnion$outboundSchema: z.ZodType<CompletionCreateParamsResponseFormatUnion$Outbound, z.ZodTypeDef, CompletionCreateParamsResponseFormatUnion>;
180
+ export declare const CompletionCreateParamsResponseFormatUnion$outboundSchema: z.ZodType<CompletionCreateParamsResponseFormatUnion$Outbound, CompletionCreateParamsResponseFormatUnion>;
181
181
  /**
182
182
  * @internal
183
183
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
184
184
  */
185
185
  export declare namespace CompletionCreateParamsResponseFormatUnion$ {
186
186
  /** @deprecated use `CompletionCreateParamsResponseFormatUnion$inboundSchema` instead. */
187
- const inboundSchema: z.ZodType<CompletionCreateParamsResponseFormatUnion, z.ZodTypeDef, unknown>;
187
+ const inboundSchema: z.ZodType<CompletionCreateParamsResponseFormatUnion, unknown, z.core.$ZodTypeInternals<CompletionCreateParamsResponseFormatUnion, unknown>>;
188
188
  /** @deprecated use `CompletionCreateParamsResponseFormatUnion$outboundSchema` instead. */
189
- const outboundSchema: z.ZodType<CompletionCreateParamsResponseFormatUnion$Outbound, z.ZodTypeDef, CompletionCreateParamsResponseFormatUnion>;
189
+ const outboundSchema: z.ZodType<CompletionCreateParamsResponseFormatUnion$Outbound, CompletionCreateParamsResponseFormatUnion, z.core.$ZodTypeInternals<CompletionCreateParamsResponseFormatUnion$Outbound, CompletionCreateParamsResponseFormatUnion>>;
190
190
  /** @deprecated use `CompletionCreateParamsResponseFormatUnion$Outbound` instead. */
191
191
  type Outbound = CompletionCreateParamsResponseFormatUnion$Outbound;
192
192
  }
193
193
  export declare function completionCreateParamsResponseFormatUnionToJSON(completionCreateParamsResponseFormatUnion: CompletionCreateParamsResponseFormatUnion): string;
194
194
  export declare function completionCreateParamsResponseFormatUnionFromJSON(jsonString: string): SafeParseResult<CompletionCreateParamsResponseFormatUnion, SDKValidationError>;
195
195
  /** @internal */
196
- export declare const CompletionCreateParams$inboundSchema: z.ZodType<CompletionCreateParams, z.ZodTypeDef, unknown>;
196
+ export declare const CompletionCreateParams$inboundSchema: z.ZodType<CompletionCreateParams, unknown>;
197
197
  /** @internal */
198
198
  export type CompletionCreateParams$Outbound = {
199
199
  model: string;
@@ -222,16 +222,16 @@ export type CompletionCreateParams$Outbound = {
222
222
  response_format?: ResponseFormatJSONSchema$Outbound | ResponseFormatTextGrammar$Outbound | CompletionCreateParamsResponseFormatText$Outbound | CompletionCreateParamsResponseFormatJSONObject$Outbound | CompletionCreateParamsResponseFormatPython$Outbound | null | undefined;
223
223
  };
224
224
  /** @internal */
225
- export declare const CompletionCreateParams$outboundSchema: z.ZodType<CompletionCreateParams$Outbound, z.ZodTypeDef, CompletionCreateParams>;
225
+ export declare const CompletionCreateParams$outboundSchema: z.ZodType<CompletionCreateParams$Outbound, CompletionCreateParams>;
226
226
  /**
227
227
  * @internal
228
228
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
229
229
  */
230
230
  export declare namespace CompletionCreateParams$ {
231
231
  /** @deprecated use `CompletionCreateParams$inboundSchema` instead. */
232
- const inboundSchema: z.ZodType<CompletionCreateParams, z.ZodTypeDef, unknown>;
232
+ const inboundSchema: z.ZodType<CompletionCreateParams, unknown, z.core.$ZodTypeInternals<CompletionCreateParams, unknown>>;
233
233
  /** @deprecated use `CompletionCreateParams$outboundSchema` instead. */
234
- const outboundSchema: z.ZodType<CompletionCreateParams$Outbound, z.ZodTypeDef, CompletionCreateParams>;
234
+ const outboundSchema: z.ZodType<CompletionCreateParams$Outbound, CompletionCreateParams, z.core.$ZodTypeInternals<CompletionCreateParams$Outbound, CompletionCreateParams>>;
235
235
  /** @deprecated use `CompletionCreateParams$Outbound` instead. */
236
236
  type Outbound = CompletionCreateParams$Outbound;
237
237
  }
@@ -1,21 +1,21 @@
1
1
  /*
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
- import * as z from "zod/v3";
4
+ import * as z from "zod/v4";
5
5
  import { remap as remap$ } from "../lib/primitives.js";
6
6
  import { safeParse } from "../lib/schemas.js";
7
7
  import { ResponseFormatJSONSchema$inboundSchema, ResponseFormatJSONSchema$outboundSchema, } from "./responseformatjsonschema.js";
8
8
  import { ResponseFormatTextGrammar$inboundSchema, ResponseFormatTextGrammar$outboundSchema, } from "./responseformattextgrammar.js";
9
9
  /** @internal */
10
- export const Prompt$inboundSchema = z
11
- .union([
10
+ export const Prompt$inboundSchema = z.union([
12
11
  z.string(),
13
12
  z.array(z.string()),
14
13
  z.array(z.number()),
15
14
  z.array(z.array(z.number())),
16
15
  ]);
17
16
  /** @internal */
18
- export const Prompt$outboundSchema = z.union([
17
+ export const Prompt$outboundSchema = z
18
+ .union([
19
19
  z.string(),
20
20
  z.array(z.string()),
21
21
  z.array(z.number()),
@@ -60,7 +60,8 @@ export function completionCreateParamsStopFromJSON(jsonString) {
60
60
  return safeParse(jsonString, (x) => CompletionCreateParamsStop$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CompletionCreateParamsStop' from JSON`);
61
61
  }
62
62
  /** @internal */
63
- export const StreamOptions$inboundSchema = z.object({
63
+ export const StreamOptions$inboundSchema = z
64
+ .object({
64
65
  include_usage: z.nullable(z.boolean()).optional(),
65
66
  }).transform((v) => {
66
67
  return remap$(v, {
@@ -212,7 +213,7 @@ export const CompletionCreateParams$inboundSchema = z.object({
212
213
  best_of: z.nullable(z.number().int()).optional(),
213
214
  echo: z.nullable(z.boolean()).optional(),
214
215
  frequency_penalty: z.nullable(z.number()).optional(),
215
- logit_bias: z.nullable(z.record(z.number())).optional(),
216
+ logit_bias: z.nullable(z.record(z.string(), z.number())).optional(),
216
217
  logprobs: z.nullable(z.number().int()).optional(),
217
218
  max_tokens: z.nullable(z.number().int()).optional(),
218
219
  n: z.nullable(z.number().int()).optional(),
@@ -226,7 +227,7 @@ export const CompletionCreateParams$inboundSchema = z.object({
226
227
  temperature: z.nullable(z.number()).optional(),
227
228
  top_p: z.nullable(z.number()).optional(),
228
229
  user: z.string().optional(),
229
- metadata: z.nullable(z.record(z.string())).optional(),
230
+ metadata: z.nullable(z.record(z.string(), z.string())).optional(),
230
231
  response_format: z.nullable(z.union([
231
232
  ResponseFormatJSONSchema$inboundSchema,
232
233
  ResponseFormatTextGrammar$inboundSchema,
@@ -258,7 +259,7 @@ export const CompletionCreateParams$outboundSchema = z.object({
258
259
  bestOf: z.nullable(z.number().int()).optional(),
259
260
  echo: z.nullable(z.boolean()).optional(),
260
261
  frequencyPenalty: z.nullable(z.number()).optional(),
261
- logitBias: z.nullable(z.record(z.number())).optional(),
262
+ logitBias: z.nullable(z.record(z.string(), z.number())).optional(),
262
263
  logprobs: z.nullable(z.number().int()).optional(),
263
264
  maxTokens: z.nullable(z.number().int()).optional(),
264
265
  n: z.nullable(z.number().int()).optional(),
@@ -272,7 +273,7 @@ export const CompletionCreateParams$outboundSchema = z.object({
272
273
  temperature: z.nullable(z.number()).optional(),
273
274
  topP: z.nullable(z.number()).optional(),
274
275
  user: z.string().optional(),
275
- metadata: z.nullable(z.record(z.string())).optional(),
276
+ metadata: z.nullable(z.record(z.string(), z.string())).optional(),
276
277
  responseFormat: z.nullable(z.union([
277
278
  ResponseFormatJSONSchema$outboundSchema,
278
279
  ResponseFormatTextGrammar$outboundSchema,
@@ -1,4 +1,4 @@
1
- import * as z from "zod/v3";
1
+ import * as z from "zod/v4";
2
2
  import { Result as SafeParseResult } from "../types/fp.js";
3
3
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
4
  export type CompletionLogprobs = {
@@ -10,7 +10,7 @@ export type CompletionLogprobs = {
10
10
  textOffset: Array<number>;
11
11
  };
12
12
  /** @internal */
13
- export declare const CompletionLogprobs$inboundSchema: z.ZodType<CompletionLogprobs, z.ZodTypeDef, unknown>;
13
+ export declare const CompletionLogprobs$inboundSchema: z.ZodType<CompletionLogprobs, unknown>;
14
14
  /** @internal */
15
15
  export type CompletionLogprobs$Outbound = {
16
16
  tokens: Array<string>;
@@ -21,16 +21,16 @@ export type CompletionLogprobs$Outbound = {
21
21
  text_offset: Array<number>;
22
22
  };
23
23
  /** @internal */
24
- export declare const CompletionLogprobs$outboundSchema: z.ZodType<CompletionLogprobs$Outbound, z.ZodTypeDef, CompletionLogprobs>;
24
+ export declare const CompletionLogprobs$outboundSchema: z.ZodType<CompletionLogprobs$Outbound, CompletionLogprobs>;
25
25
  /**
26
26
  * @internal
27
27
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
28
28
  */
29
29
  export declare namespace CompletionLogprobs$ {
30
30
  /** @deprecated use `CompletionLogprobs$inboundSchema` instead. */
31
- const inboundSchema: z.ZodType<CompletionLogprobs, z.ZodTypeDef, unknown>;
31
+ const inboundSchema: z.ZodType<CompletionLogprobs, unknown, z.core.$ZodTypeInternals<CompletionLogprobs, unknown>>;
32
32
  /** @deprecated use `CompletionLogprobs$outboundSchema` instead. */
33
- const outboundSchema: z.ZodType<CompletionLogprobs$Outbound, z.ZodTypeDef, CompletionLogprobs>;
33
+ const outboundSchema: z.ZodType<CompletionLogprobs$Outbound, CompletionLogprobs, z.core.$ZodTypeInternals<CompletionLogprobs$Outbound, CompletionLogprobs>>;
34
34
  /** @deprecated use `CompletionLogprobs$Outbound` instead. */
35
35
  type Outbound = CompletionLogprobs$Outbound;
36
36
  }
@@ -1,14 +1,14 @@
1
1
  /*
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
- import * as z from "zod/v3";
4
+ import * as z from "zod/v4";
5
5
  import { remap as remap$ } from "../lib/primitives.js";
6
6
  import { safeParse } from "../lib/schemas.js";
7
7
  /** @internal */
8
8
  export const CompletionLogprobs$inboundSchema = z.object({
9
9
  tokens: z.array(z.string()),
10
10
  token_logprobs: z.array(z.number()),
11
- top_logprobs: z.nullable(z.array(z.record(z.number()))),
11
+ top_logprobs: z.nullable(z.array(z.record(z.string(), z.number()))),
12
12
  text_offset: z.array(z.number()),
13
13
  }).transform((v) => {
14
14
  return remap$(v, {
@@ -21,7 +21,7 @@ export const CompletionLogprobs$inboundSchema = z.object({
21
21
  export const CompletionLogprobs$outboundSchema = z.object({
22
22
  tokens: z.array(z.string()),
23
23
  tokenLogprobs: z.array(z.number()),
24
- topLogprobs: z.nullable(z.array(z.record(z.number()))),
24
+ topLogprobs: z.nullable(z.array(z.record(z.string(), z.number()))),
25
25
  textOffset: z.array(z.number()),
26
26
  }).transform((v) => {
27
27
  return remap$(v, {
@@ -1,4 +1,4 @@
1
- import * as z from "zod/v3";
1
+ import * as z from "zod/v4";
2
2
  import { Result as SafeParseResult } from "../types/fp.js";
3
3
  import { CompletionChoice, CompletionChoice$Outbound } from "./completionchoice.js";
4
4
  import { CompletionUsage, CompletionUsage$Outbound } from "./completionusage.js";
@@ -13,7 +13,7 @@ export type CompletionResponse = {
13
13
  usage?: CompletionUsage | undefined;
14
14
  };
15
15
  /** @internal */
16
- export declare const CompletionResponse$inboundSchema: z.ZodType<CompletionResponse, z.ZodTypeDef, unknown>;
16
+ export declare const CompletionResponse$inboundSchema: z.ZodType<CompletionResponse, unknown>;
17
17
  /** @internal */
18
18
  export type CompletionResponse$Outbound = {
19
19
  id: string;
@@ -25,16 +25,16 @@ export type CompletionResponse$Outbound = {
25
25
  usage?: CompletionUsage$Outbound | undefined;
26
26
  };
27
27
  /** @internal */
28
- export declare const CompletionResponse$outboundSchema: z.ZodType<CompletionResponse$Outbound, z.ZodTypeDef, CompletionResponse>;
28
+ export declare const CompletionResponse$outboundSchema: z.ZodType<CompletionResponse$Outbound, CompletionResponse>;
29
29
  /**
30
30
  * @internal
31
31
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
32
32
  */
33
33
  export declare namespace CompletionResponse$ {
34
34
  /** @deprecated use `CompletionResponse$inboundSchema` instead. */
35
- const inboundSchema: z.ZodType<CompletionResponse, z.ZodTypeDef, unknown>;
35
+ const inboundSchema: z.ZodType<CompletionResponse, unknown, z.core.$ZodTypeInternals<CompletionResponse, unknown>>;
36
36
  /** @deprecated use `CompletionResponse$outboundSchema` instead. */
37
- const outboundSchema: z.ZodType<CompletionResponse$Outbound, z.ZodTypeDef, CompletionResponse>;
37
+ const outboundSchema: z.ZodType<CompletionResponse$Outbound, CompletionResponse, z.core.$ZodTypeInternals<CompletionResponse$Outbound, CompletionResponse>>;
38
38
  /** @deprecated use `CompletionResponse$Outbound` instead. */
39
39
  type Outbound = CompletionResponse$Outbound;
40
40
  }
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
- import * as z from "zod/v3";
4
+ import * as z from "zod/v4";
5
5
  import { remap as remap$ } from "../lib/primitives.js";
6
6
  import { safeParse } from "../lib/schemas.js";
7
7
  import { CompletionChoice$inboundSchema, CompletionChoice$outboundSchema, } from "./completionchoice.js";
@@ -1,4 +1,4 @@
1
- import * as z from "zod/v3";
1
+ import * as z from "zod/v4";
2
2
  import { Result as SafeParseResult } from "../types/fp.js";
3
3
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
4
  export type CompletionUsage = {
@@ -7,7 +7,7 @@ export type CompletionUsage = {
7
7
  totalTokens: number;
8
8
  };
9
9
  /** @internal */
10
- export declare const CompletionUsage$inboundSchema: z.ZodType<CompletionUsage, z.ZodTypeDef, unknown>;
10
+ export declare const CompletionUsage$inboundSchema: z.ZodType<CompletionUsage, unknown>;
11
11
  /** @internal */
12
12
  export type CompletionUsage$Outbound = {
13
13
  prompt_tokens: number;
@@ -15,16 +15,16 @@ export type CompletionUsage$Outbound = {
15
15
  total_tokens: number;
16
16
  };
17
17
  /** @internal */
18
- export declare const CompletionUsage$outboundSchema: z.ZodType<CompletionUsage$Outbound, z.ZodTypeDef, CompletionUsage>;
18
+ export declare const CompletionUsage$outboundSchema: z.ZodType<CompletionUsage$Outbound, CompletionUsage>;
19
19
  /**
20
20
  * @internal
21
21
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
22
22
  */
23
23
  export declare namespace CompletionUsage$ {
24
24
  /** @deprecated use `CompletionUsage$inboundSchema` instead. */
25
- const inboundSchema: z.ZodType<CompletionUsage, z.ZodTypeDef, unknown>;
25
+ const inboundSchema: z.ZodType<CompletionUsage, unknown, z.core.$ZodTypeInternals<CompletionUsage, unknown>>;
26
26
  /** @deprecated use `CompletionUsage$outboundSchema` instead. */
27
- const outboundSchema: z.ZodType<CompletionUsage$Outbound, z.ZodTypeDef, CompletionUsage>;
27
+ const outboundSchema: z.ZodType<CompletionUsage$Outbound, CompletionUsage, z.core.$ZodTypeInternals<CompletionUsage$Outbound, CompletionUsage>>;
28
28
  /** @deprecated use `CompletionUsage$Outbound` instead. */
29
29
  type Outbound = CompletionUsage$Outbound;
30
30
  }
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
- import * as z from "zod/v3";
4
+ import * as z from "zod/v4";
5
5
  import { remap as remap$ } from "../lib/primitives.js";
6
6
  import { safeParse } from "../lib/schemas.js";
7
7
  /** @internal */
@@ -1,4 +1,4 @@
1
- import * as z from "zod/v3";
1
+ import * as z from "zod/v4";
2
2
  import { Result as SafeParseResult } from "../types/fp.js";
3
3
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
4
  /**
@@ -6,20 +6,20 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
6
6
  */
7
7
  export type CreateChargeRequest = {};
8
8
  /** @internal */
9
- export declare const CreateChargeRequest$inboundSchema: z.ZodType<CreateChargeRequest, z.ZodTypeDef, unknown>;
9
+ export declare const CreateChargeRequest$inboundSchema: z.ZodType<CreateChargeRequest, unknown>;
10
10
  /** @internal */
11
11
  export type CreateChargeRequest$Outbound = {};
12
12
  /** @internal */
13
- export declare const CreateChargeRequest$outboundSchema: z.ZodType<CreateChargeRequest$Outbound, z.ZodTypeDef, CreateChargeRequest>;
13
+ export declare const CreateChargeRequest$outboundSchema: z.ZodType<CreateChargeRequest$Outbound, CreateChargeRequest>;
14
14
  /**
15
15
  * @internal
16
16
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
17
17
  */
18
18
  export declare namespace CreateChargeRequest$ {
19
19
  /** @deprecated use `CreateChargeRequest$inboundSchema` instead. */
20
- const inboundSchema: z.ZodType<CreateChargeRequest, z.ZodTypeDef, unknown>;
20
+ const inboundSchema: z.ZodType<CreateChargeRequest, unknown, z.core.$ZodTypeInternals<CreateChargeRequest, unknown>>;
21
21
  /** @deprecated use `CreateChargeRequest$outboundSchema` instead. */
22
- const outboundSchema: z.ZodType<CreateChargeRequest$Outbound, z.ZodTypeDef, CreateChargeRequest>;
22
+ const outboundSchema: z.ZodType<CreateChargeRequest$Outbound, CreateChargeRequest, z.core.$ZodTypeInternals<CreateChargeRequest$Outbound, CreateChargeRequest>>;
23
23
  /** @deprecated use `CreateChargeRequest$Outbound` instead. */
24
24
  type Outbound = CreateChargeRequest$Outbound;
25
25
  }
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
- import * as z from "zod/v3";
4
+ import * as z from "zod/v4";
5
5
  import { safeParse } from "../lib/schemas.js";
6
6
  /** @internal */
7
7
  export const CreateChargeRequest$inboundSchema = z.object({});
@@ -1,4 +1,4 @@
1
- import * as z from "zod/v3";
1
+ import * as z from "zod/v4";
2
2
  import { OpenEnum } from "../types/enums.js";
3
3
  import { Result as SafeParseResult } from "../types/fp.js";
4
4
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
@@ -90,21 +90,21 @@ export type ErrorResponse = {
90
90
  userId?: string | null | undefined;
91
91
  };
92
92
  /** @internal */
93
- export declare const ErrorResponseCode$inboundSchema: z.ZodType<ErrorResponseCode, z.ZodTypeDef, unknown>;
93
+ export declare const ErrorResponseCode$inboundSchema: z.ZodType<ErrorResponseCode, unknown>;
94
94
  /** @internal */
95
- export declare const ErrorResponseCode$outboundSchema: z.ZodType<ErrorResponseCode, z.ZodTypeDef, ErrorResponseCode>;
95
+ export declare const ErrorResponseCode$outboundSchema: z.ZodType<ErrorResponseCode, ErrorResponseCode>;
96
96
  /**
97
97
  * @internal
98
98
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
99
99
  */
100
100
  export declare namespace ErrorResponseCode$ {
101
101
  /** @deprecated use `ErrorResponseCode$inboundSchema` instead. */
102
- const inboundSchema: z.ZodType<ErrorResponseCode, z.ZodTypeDef, unknown>;
102
+ const inboundSchema: z.ZodType<ErrorResponseCode, unknown, z.core.$ZodTypeInternals<ErrorResponseCode, unknown>>;
103
103
  /** @deprecated use `ErrorResponseCode$outboundSchema` instead. */
104
- const outboundSchema: z.ZodType<ErrorResponseCode, z.ZodTypeDef, ErrorResponseCode>;
104
+ const outboundSchema: z.ZodType<ErrorResponseCode, ErrorResponseCode, z.core.$ZodTypeInternals<ErrorResponseCode, ErrorResponseCode>>;
105
105
  }
106
106
  /** @internal */
107
- export declare const ErrorResponseError$inboundSchema: z.ZodType<ErrorResponseError, z.ZodTypeDef, unknown>;
107
+ export declare const ErrorResponseError$inboundSchema: z.ZodType<ErrorResponseError, unknown>;
108
108
  /** @internal */
109
109
  export type ErrorResponseError$Outbound = {
110
110
  code: number;
@@ -114,39 +114,39 @@ export type ErrorResponseError$Outbound = {
114
114
  } | null | undefined;
115
115
  };
116
116
  /** @internal */
117
- export declare const ErrorResponseError$outboundSchema: z.ZodType<ErrorResponseError$Outbound, z.ZodTypeDef, ErrorResponseError>;
117
+ export declare const ErrorResponseError$outboundSchema: z.ZodType<ErrorResponseError$Outbound, ErrorResponseError>;
118
118
  /**
119
119
  * @internal
120
120
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
121
121
  */
122
122
  export declare namespace ErrorResponseError$ {
123
123
  /** @deprecated use `ErrorResponseError$inboundSchema` instead. */
124
- const inboundSchema: z.ZodType<ErrorResponseError, z.ZodTypeDef, unknown>;
124
+ const inboundSchema: z.ZodType<ErrorResponseError, unknown, z.core.$ZodTypeInternals<ErrorResponseError, unknown>>;
125
125
  /** @deprecated use `ErrorResponseError$outboundSchema` instead. */
126
- const outboundSchema: z.ZodType<ErrorResponseError$Outbound, z.ZodTypeDef, ErrorResponseError>;
126
+ const outboundSchema: z.ZodType<ErrorResponseError$Outbound, ErrorResponseError, z.core.$ZodTypeInternals<ErrorResponseError$Outbound, ErrorResponseError>>;
127
127
  /** @deprecated use `ErrorResponseError$Outbound` instead. */
128
128
  type Outbound = ErrorResponseError$Outbound;
129
129
  }
130
130
  export declare function errorResponseErrorToJSON(errorResponseError: ErrorResponseError): string;
131
131
  export declare function errorResponseErrorFromJSON(jsonString: string): SafeParseResult<ErrorResponseError, SDKValidationError>;
132
132
  /** @internal */
133
- export declare const ErrorResponse$inboundSchema: z.ZodType<ErrorResponse, z.ZodTypeDef, unknown>;
133
+ export declare const ErrorResponse$inboundSchema: z.ZodType<ErrorResponse, unknown>;
134
134
  /** @internal */
135
135
  export type ErrorResponse$Outbound = {
136
136
  error: ErrorResponseError$Outbound;
137
137
  user_id?: string | null | undefined;
138
138
  };
139
139
  /** @internal */
140
- export declare const ErrorResponse$outboundSchema: z.ZodType<ErrorResponse$Outbound, z.ZodTypeDef, ErrorResponse>;
140
+ export declare const ErrorResponse$outboundSchema: z.ZodType<ErrorResponse$Outbound, ErrorResponse>;
141
141
  /**
142
142
  * @internal
143
143
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
144
144
  */
145
145
  export declare namespace ErrorResponse$ {
146
146
  /** @deprecated use `ErrorResponse$inboundSchema` instead. */
147
- const inboundSchema: z.ZodType<ErrorResponse, z.ZodTypeDef, unknown>;
147
+ const inboundSchema: z.ZodType<ErrorResponse, unknown, z.core.$ZodTypeInternals<ErrorResponse, unknown>>;
148
148
  /** @deprecated use `ErrorResponse$outboundSchema` instead. */
149
- const outboundSchema: z.ZodType<ErrorResponse$Outbound, z.ZodTypeDef, ErrorResponse>;
149
+ const outboundSchema: z.ZodType<ErrorResponse$Outbound, ErrorResponse, z.core.$ZodTypeInternals<ErrorResponse$Outbound, ErrorResponse>>;
150
150
  /** @deprecated use `ErrorResponse$Outbound` instead. */
151
151
  type Outbound = ErrorResponse$Outbound;
152
152
  }
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
- import * as z from "zod/v3";
4
+ import * as z from "zod/v4";
5
5
  import { remap as remap$ } from "../lib/primitives.js";
6
6
  import { safeParse } from "../lib/schemas.js";
7
7
  import { catchUnrecognizedEnum, } from "../types/enums.js";
@@ -80,12 +80,12 @@ export const ErrorResponseCode = {
80
80
  /** @internal */
81
81
  export const ErrorResponseCode$inboundSchema = z
82
82
  .union([
83
- z.nativeEnum(ErrorResponseCode),
83
+ z.enum(ErrorResponseCode),
84
84
  z.number().transform(catchUnrecognizedEnum),
85
85
  ]);
86
86
  /** @internal */
87
87
  export const ErrorResponseCode$outboundSchema = z.union([
88
- z.nativeEnum(ErrorResponseCode),
88
+ z.enum(ErrorResponseCode),
89
89
  z.number().and(z.custom()),
90
90
  ]);
91
91
  /**
@@ -103,13 +103,13 @@ export var ErrorResponseCode$;
103
103
  export const ErrorResponseError$inboundSchema = z.object({
104
104
  code: ErrorResponseCode$inboundSchema,
105
105
  message: z.string(),
106
- metadata: z.nullable(z.record(z.nullable(z.any()))).optional(),
106
+ metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(),
107
107
  });
108
108
  /** @internal */
109
109
  export const ErrorResponseError$outboundSchema = z.object({
110
110
  code: ErrorResponseCode$outboundSchema,
111
111
  message: z.string(),
112
- metadata: z.nullable(z.record(z.nullable(z.any()))).optional(),
112
+ metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(),
113
113
  });
114
114
  /**
115
115
  * @internal
@@ -129,7 +129,8 @@ export function errorResponseErrorFromJSON(jsonString) {
129
129
  return safeParse(jsonString, (x) => ErrorResponseError$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ErrorResponseError' from JSON`);
130
130
  }
131
131
  /** @internal */
132
- export const ErrorResponse$inboundSchema = z.object({
132
+ export const ErrorResponse$inboundSchema = z
133
+ .object({
133
134
  error: z.lazy(() => ErrorResponseError$inboundSchema),
134
135
  user_id: z.nullable(z.string()).optional(),
135
136
  }).transform((v) => {