@meetkai/mka1 0.54.14 → 0.54.16

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 (212) hide show
  1. package/README.md +288 -287
  2. package/bin/mcp-server.js +996 -1395
  3. package/bin/mcp-server.js.map +20 -22
  4. package/dist/commonjs/funcs/llmModelsPutOrgAutoModel.d.ts +3 -4
  5. package/dist/commonjs/funcs/llmModelsPutOrgAutoModel.d.ts.map +1 -1
  6. package/dist/commonjs/funcs/llmModelsPutOrgAutoModel.js +3 -4
  7. package/dist/commonjs/funcs/llmModelsPutOrgAutoModel.js.map +1 -1
  8. package/dist/commonjs/lib/config.d.ts +3 -3
  9. package/dist/commonjs/lib/config.js +3 -3
  10. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  11. package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
  12. package/dist/commonjs/mcp-server/server.js +1 -3
  13. package/dist/commonjs/mcp-server/server.js.map +1 -1
  14. package/dist/commonjs/mcp-server/tools/llmModelsPutOrgAutoModel.js +2 -2
  15. package/dist/commonjs/mcp-server/tools/llmModelsPutOrgAutoModel.js.map +1 -1
  16. package/dist/commonjs/models/components/addcatalogmodelrequest.d.ts +2 -0
  17. package/dist/commonjs/models/components/addcatalogmodelrequest.d.ts.map +1 -1
  18. package/dist/commonjs/models/components/addcatalogmodelrequest.js +2 -0
  19. package/dist/commonjs/models/components/addcatalogmodelrequest.js.map +1 -1
  20. package/dist/commonjs/models/components/balancedorgautomodel.d.ts +32 -0
  21. package/dist/commonjs/models/components/balancedorgautomodel.d.ts.map +1 -0
  22. package/dist/commonjs/models/components/balancedorgautomodel.js +92 -0
  23. package/dist/commonjs/models/components/balancedorgautomodel.js.map +1 -0
  24. package/dist/commonjs/models/components/directorgautomodel.d.ts +28 -0
  25. package/dist/commonjs/models/components/directorgautomodel.d.ts.map +1 -0
  26. package/dist/commonjs/models/components/directorgautomodel.js +82 -0
  27. package/dist/commonjs/models/components/directorgautomodel.js.map +1 -0
  28. package/dist/commonjs/models/components/index.d.ts +2 -1
  29. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  30. package/dist/commonjs/models/components/index.js +2 -1
  31. package/dist/commonjs/models/components/index.js.map +1 -1
  32. package/dist/commonjs/models/components/openaichatcompletionrequestparams.d.ts +0 -5
  33. package/dist/commonjs/models/components/openaichatcompletionrequestparams.d.ts.map +1 -1
  34. package/dist/commonjs/models/components/openaichatcompletionrequestparams.js +0 -4
  35. package/dist/commonjs/models/components/openaichatcompletionrequestparams.js.map +1 -1
  36. package/dist/commonjs/models/components/orgautomodel.d.ts +5 -15
  37. package/dist/commonjs/models/components/orgautomodel.d.ts.map +1 -1
  38. package/dist/commonjs/models/components/orgautomodel.js +10 -27
  39. package/dist/commonjs/models/components/orgautomodel.js.map +1 -1
  40. package/dist/commonjs/models/components/putorgautomodelrequest.d.ts +36 -4
  41. package/dist/commonjs/models/components/putorgautomodelrequest.d.ts.map +1 -1
  42. package/dist/commonjs/models/components/putorgautomodelrequest.js +41 -3
  43. package/dist/commonjs/models/components/putorgautomodelrequest.js.map +1 -1
  44. package/dist/commonjs/models/components/responseobject.d.ts +5 -0
  45. package/dist/commonjs/models/components/responseobject.d.ts.map +1 -1
  46. package/dist/commonjs/models/components/responseobject.js +4 -0
  47. package/dist/commonjs/models/components/responseobject.js.map +1 -1
  48. package/dist/commonjs/models/components/updatecatalogmodelrequest.d.ts +2 -0
  49. package/dist/commonjs/models/components/updatecatalogmodelrequest.d.ts.map +1 -1
  50. package/dist/commonjs/models/components/updatecatalogmodelrequest.js +2 -0
  51. package/dist/commonjs/models/components/updatecatalogmodelrequest.js.map +1 -1
  52. package/dist/commonjs/models/operations/index.d.ts +0 -1
  53. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  54. package/dist/commonjs/models/operations/index.js +0 -1
  55. package/dist/commonjs/models/operations/index.js.map +1 -1
  56. package/dist/commonjs/models/operations/putorgautomodel.d.ts +13 -0
  57. package/dist/commonjs/models/operations/putorgautomodel.d.ts.map +1 -1
  58. package/dist/commonjs/models/operations/putorgautomodel.js +20 -1
  59. package/dist/commonjs/models/operations/putorgautomodel.js.map +1 -1
  60. package/dist/commonjs/react-query/index.d.ts +0 -1
  61. package/dist/commonjs/react-query/index.d.ts.map +1 -1
  62. package/dist/commonjs/react-query/index.js +0 -1
  63. package/dist/commonjs/react-query/index.js.map +1 -1
  64. package/dist/commonjs/react-query/llmModelsPutOrgAutoModel.d.ts +3 -4
  65. package/dist/commonjs/react-query/llmModelsPutOrgAutoModel.d.ts.map +1 -1
  66. package/dist/commonjs/react-query/llmModelsPutOrgAutoModel.js +2 -2
  67. package/dist/commonjs/react-query/llmModelsPutOrgAutoModel.js.map +1 -1
  68. package/dist/commonjs/sdk/models.d.ts +3 -3
  69. package/dist/commonjs/sdk/models.d.ts.map +1 -1
  70. package/dist/commonjs/sdk/models.js +2 -2
  71. package/dist/commonjs/sdk/responses.d.ts +0 -11
  72. package/dist/commonjs/sdk/responses.d.ts.map +1 -1
  73. package/dist/commonjs/sdk/responses.js +1 -13
  74. package/dist/commonjs/sdk/responses.js.map +1 -1
  75. package/dist/esm/funcs/llmModelsPutOrgAutoModel.d.ts +3 -4
  76. package/dist/esm/funcs/llmModelsPutOrgAutoModel.d.ts.map +1 -1
  77. package/dist/esm/funcs/llmModelsPutOrgAutoModel.js +3 -4
  78. package/dist/esm/funcs/llmModelsPutOrgAutoModel.js.map +1 -1
  79. package/dist/esm/lib/config.d.ts +3 -3
  80. package/dist/esm/lib/config.js +3 -3
  81. package/dist/esm/mcp-server/mcp-server.js +1 -1
  82. package/dist/esm/mcp-server/server.d.ts.map +1 -1
  83. package/dist/esm/mcp-server/server.js +1 -3
  84. package/dist/esm/mcp-server/server.js.map +1 -1
  85. package/dist/esm/mcp-server/tools/llmModelsPutOrgAutoModel.js +2 -2
  86. package/dist/esm/mcp-server/tools/llmModelsPutOrgAutoModel.js.map +1 -1
  87. package/dist/esm/models/components/addcatalogmodelrequest.d.ts +2 -0
  88. package/dist/esm/models/components/addcatalogmodelrequest.d.ts.map +1 -1
  89. package/dist/esm/models/components/addcatalogmodelrequest.js +2 -0
  90. package/dist/esm/models/components/addcatalogmodelrequest.js.map +1 -1
  91. package/dist/esm/models/components/balancedorgautomodel.d.ts +32 -0
  92. package/dist/esm/models/components/balancedorgautomodel.d.ts.map +1 -0
  93. package/dist/esm/models/components/balancedorgautomodel.js +54 -0
  94. package/dist/esm/models/components/balancedorgautomodel.js.map +1 -0
  95. package/dist/esm/models/components/directorgautomodel.d.ts +28 -0
  96. package/dist/esm/models/components/directorgautomodel.d.ts.map +1 -0
  97. package/dist/esm/models/components/directorgautomodel.js +44 -0
  98. package/dist/esm/models/components/directorgautomodel.js.map +1 -0
  99. package/dist/esm/models/components/index.d.ts +2 -1
  100. package/dist/esm/models/components/index.d.ts.map +1 -1
  101. package/dist/esm/models/components/index.js +2 -1
  102. package/dist/esm/models/components/index.js.map +1 -1
  103. package/dist/esm/models/components/openaichatcompletionrequestparams.d.ts +0 -5
  104. package/dist/esm/models/components/openaichatcompletionrequestparams.d.ts.map +1 -1
  105. package/dist/esm/models/components/openaichatcompletionrequestparams.js +0 -4
  106. package/dist/esm/models/components/openaichatcompletionrequestparams.js.map +1 -1
  107. package/dist/esm/models/components/orgautomodel.d.ts +5 -15
  108. package/dist/esm/models/components/orgautomodel.d.ts.map +1 -1
  109. package/dist/esm/models/components/orgautomodel.js +10 -27
  110. package/dist/esm/models/components/orgautomodel.js.map +1 -1
  111. package/dist/esm/models/components/putorgautomodelrequest.d.ts +36 -4
  112. package/dist/esm/models/components/putorgautomodelrequest.d.ts.map +1 -1
  113. package/dist/esm/models/components/putorgautomodelrequest.js +36 -2
  114. package/dist/esm/models/components/putorgautomodelrequest.js.map +1 -1
  115. package/dist/esm/models/components/responseobject.d.ts +5 -0
  116. package/dist/esm/models/components/responseobject.d.ts.map +1 -1
  117. package/dist/esm/models/components/responseobject.js +4 -0
  118. package/dist/esm/models/components/responseobject.js.map +1 -1
  119. package/dist/esm/models/components/updatecatalogmodelrequest.d.ts +2 -0
  120. package/dist/esm/models/components/updatecatalogmodelrequest.d.ts.map +1 -1
  121. package/dist/esm/models/components/updatecatalogmodelrequest.js +2 -0
  122. package/dist/esm/models/components/updatecatalogmodelrequest.js.map +1 -1
  123. package/dist/esm/models/operations/index.d.ts +0 -1
  124. package/dist/esm/models/operations/index.d.ts.map +1 -1
  125. package/dist/esm/models/operations/index.js +0 -1
  126. package/dist/esm/models/operations/index.js.map +1 -1
  127. package/dist/esm/models/operations/putorgautomodel.d.ts +13 -0
  128. package/dist/esm/models/operations/putorgautomodel.d.ts.map +1 -1
  129. package/dist/esm/models/operations/putorgautomodel.js +17 -0
  130. package/dist/esm/models/operations/putorgautomodel.js.map +1 -1
  131. package/dist/esm/react-query/index.d.ts +0 -1
  132. package/dist/esm/react-query/index.d.ts.map +1 -1
  133. package/dist/esm/react-query/index.js +0 -1
  134. package/dist/esm/react-query/index.js.map +1 -1
  135. package/dist/esm/react-query/llmModelsPutOrgAutoModel.d.ts +3 -4
  136. package/dist/esm/react-query/llmModelsPutOrgAutoModel.d.ts.map +1 -1
  137. package/dist/esm/react-query/llmModelsPutOrgAutoModel.js +2 -2
  138. package/dist/esm/react-query/llmModelsPutOrgAutoModel.js.map +1 -1
  139. package/dist/esm/sdk/models.d.ts +3 -3
  140. package/dist/esm/sdk/models.d.ts.map +1 -1
  141. package/dist/esm/sdk/models.js +2 -2
  142. package/dist/esm/sdk/responses.d.ts +0 -11
  143. package/dist/esm/sdk/responses.d.ts.map +1 -1
  144. package/dist/esm/sdk/responses.js +0 -11
  145. package/dist/esm/sdk/responses.js.map +1 -1
  146. package/jsr.json +1 -1
  147. package/package.json +1 -1
  148. package/src/funcs/llmModelsPutOrgAutoModel.ts +6 -7
  149. package/src/lib/config.ts +3 -3
  150. package/src/mcp-server/mcp-server.ts +1 -1
  151. package/src/mcp-server/server.ts +1 -3
  152. package/src/mcp-server/tools/llmModelsPutOrgAutoModel.ts +2 -2
  153. package/src/models/components/addcatalogmodelrequest.ts +4 -0
  154. package/src/models/components/balancedorgautomodel.ts +103 -0
  155. package/src/models/components/directorgautomodel.ts +89 -0
  156. package/src/models/components/index.ts +2 -1
  157. package/src/models/components/openaichatcompletionrequestparams.ts +0 -9
  158. package/src/models/components/orgautomodel.ts +27 -44
  159. package/src/models/components/putorgautomodelrequest.ts +110 -8
  160. package/src/models/components/responseobject.ts +9 -0
  161. package/src/models/components/updatecatalogmodelrequest.ts +4 -0
  162. package/src/models/operations/index.ts +0 -1
  163. package/src/models/operations/putorgautomodel.ts +53 -0
  164. package/src/react-query/index.ts +0 -1
  165. package/src/react-query/llmModelsPutOrgAutoModel.ts +4 -4
  166. package/src/sdk/models.ts +3 -3
  167. package/src/sdk/responses.ts +0 -23
  168. package/dist/commonjs/funcs/llmResponsesCreate.d.ts +0 -25
  169. package/dist/commonjs/funcs/llmResponsesCreate.d.ts.map +0 -1
  170. package/dist/commonjs/funcs/llmResponsesCreate.js +0 -137
  171. package/dist/commonjs/funcs/llmResponsesCreate.js.map +0 -1
  172. package/dist/commonjs/mcp-server/tools/llmResponsesCreate.d.ts +0 -8
  173. package/dist/commonjs/mcp-server/tools/llmResponsesCreate.d.ts.map +0 -1
  174. package/dist/commonjs/mcp-server/tools/llmResponsesCreate.js +0 -64
  175. package/dist/commonjs/mcp-server/tools/llmResponsesCreate.js.map +0 -1
  176. package/dist/commonjs/models/components/responsescreaterequest.d.ts +0 -442
  177. package/dist/commonjs/models/components/responsescreaterequest.d.ts.map +0 -1
  178. package/dist/commonjs/models/components/responsescreaterequest.js +0 -463
  179. package/dist/commonjs/models/components/responsescreaterequest.js.map +0 -1
  180. package/dist/commonjs/models/operations/createresponse.d.ts +0 -64
  181. package/dist/commonjs/models/operations/createresponse.d.ts.map +0 -1
  182. package/dist/commonjs/models/operations/createresponse.js +0 -128
  183. package/dist/commonjs/models/operations/createresponse.js.map +0 -1
  184. package/dist/commonjs/react-query/llmResponsesCreate.d.ts +0 -34
  185. package/dist/commonjs/react-query/llmResponsesCreate.d.ts.map +0 -1
  186. package/dist/commonjs/react-query/llmResponsesCreate.js +0 -50
  187. package/dist/commonjs/react-query/llmResponsesCreate.js.map +0 -1
  188. package/dist/esm/funcs/llmResponsesCreate.d.ts +0 -25
  189. package/dist/esm/funcs/llmResponsesCreate.d.ts.map +0 -1
  190. package/dist/esm/funcs/llmResponsesCreate.js +0 -100
  191. package/dist/esm/funcs/llmResponsesCreate.js.map +0 -1
  192. package/dist/esm/mcp-server/tools/llmResponsesCreate.d.ts +0 -8
  193. package/dist/esm/mcp-server/tools/llmResponsesCreate.d.ts.map +0 -1
  194. package/dist/esm/mcp-server/tools/llmResponsesCreate.js +0 -28
  195. package/dist/esm/mcp-server/tools/llmResponsesCreate.js.map +0 -1
  196. package/dist/esm/models/components/responsescreaterequest.d.ts +0 -442
  197. package/dist/esm/models/components/responsescreaterequest.d.ts.map +0 -1
  198. package/dist/esm/models/components/responsescreaterequest.js +0 -411
  199. package/dist/esm/models/components/responsescreaterequest.js.map +0 -1
  200. package/dist/esm/models/operations/createresponse.d.ts +0 -64
  201. package/dist/esm/models/operations/createresponse.d.ts.map +0 -1
  202. package/dist/esm/models/operations/createresponse.js +0 -86
  203. package/dist/esm/models/operations/createresponse.js.map +0 -1
  204. package/dist/esm/react-query/llmResponsesCreate.d.ts +0 -34
  205. package/dist/esm/react-query/llmResponsesCreate.d.ts.map +0 -1
  206. package/dist/esm/react-query/llmResponsesCreate.js +0 -43
  207. package/dist/esm/react-query/llmResponsesCreate.js.map +0 -1
  208. package/src/funcs/llmResponsesCreate.ts +0 -188
  209. package/src/mcp-server/tools/llmResponsesCreate.ts +0 -37
  210. package/src/models/components/responsescreaterequest.ts +0 -1094
  211. package/src/models/operations/createresponse.ts +0 -198
  212. package/src/react-query/llmResponsesCreate.ts +0 -113
@@ -1,1094 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod/v3";
6
- import { remap as remap$ } from "../../lib/primitives.js";
7
- import { safeParse } from "../../lib/schemas.js";
8
- import { ClosedEnum } from "../../types/enums.js";
9
- import { Result as SafeParseResult } from "../../types/fp.js";
10
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
- import {
12
- CodeInterpreterToolDefinition,
13
- CodeInterpreterToolDefinition$inboundSchema,
14
- CodeInterpreterToolDefinition$Outbound,
15
- CodeInterpreterToolDefinition$outboundSchema,
16
- } from "./codeinterpretertooldefinition.js";
17
- import {
18
- CompactionContextManagement,
19
- CompactionContextManagement$inboundSchema,
20
- CompactionContextManagement$Outbound,
21
- CompactionContextManagement$outboundSchema,
22
- } from "./compactioncontextmanagement.js";
23
- import {
24
- ComputerUseToolDefinition,
25
- ComputerUseToolDefinition$inboundSchema,
26
- ComputerUseToolDefinition$Outbound,
27
- ComputerUseToolDefinition$outboundSchema,
28
- } from "./computerusetooldefinition.js";
29
- import {
30
- Conversation,
31
- Conversation$inboundSchema,
32
- Conversation$Outbound,
33
- Conversation$outboundSchema,
34
- } from "./conversation.js";
35
- import {
36
- CustomToolDefinition,
37
- CustomToolDefinition$inboundSchema,
38
- CustomToolDefinition$Outbound,
39
- CustomToolDefinition$outboundSchema,
40
- } from "./customtooldefinition.js";
41
- import {
42
- FileSearchToolDefinition,
43
- FileSearchToolDefinition$inboundSchema,
44
- FileSearchToolDefinition$Outbound,
45
- FileSearchToolDefinition$outboundSchema,
46
- } from "./filesearchtooldefinition.js";
47
- import {
48
- FunctionToolDefinition,
49
- FunctionToolDefinition$inboundSchema,
50
- FunctionToolDefinition$Outbound,
51
- FunctionToolDefinition$outboundSchema,
52
- } from "./functiontooldefinition.js";
53
- import {
54
- HistoryToolDefinition,
55
- HistoryToolDefinition$inboundSchema,
56
- HistoryToolDefinition$Outbound,
57
- HistoryToolDefinition$outboundSchema,
58
- } from "./historytooldefinition.js";
59
- import {
60
- HostedToolDefinition,
61
- HostedToolDefinition$inboundSchema,
62
- HostedToolDefinition$Outbound,
63
- HostedToolDefinition$outboundSchema,
64
- } from "./hostedtooldefinition.js";
65
- import {
66
- ImageGenerationToolDefinition,
67
- ImageGenerationToolDefinition$inboundSchema,
68
- ImageGenerationToolDefinition$Outbound,
69
- ImageGenerationToolDefinition$outboundSchema,
70
- } from "./imagegenerationtooldefinition.js";
71
- import {
72
- Item,
73
- Item$inboundSchema,
74
- Item$Outbound,
75
- Item$outboundSchema,
76
- } from "./item.js";
77
- import {
78
- LocalShellToolDefinition,
79
- LocalShellToolDefinition$inboundSchema,
80
- LocalShellToolDefinition$Outbound,
81
- LocalShellToolDefinition$outboundSchema,
82
- } from "./localshelltooldefinition.js";
83
- import {
84
- MCPToolDefinition,
85
- MCPToolDefinition$inboundSchema,
86
- MCPToolDefinition$Outbound,
87
- MCPToolDefinition$outboundSchema,
88
- } from "./mcptooldefinition.js";
89
- import {
90
- PromptTemplate,
91
- PromptTemplate$inboundSchema,
92
- PromptTemplate$Outbound,
93
- PromptTemplate$outboundSchema,
94
- } from "./prompttemplate.js";
95
- import {
96
- ReasoningConfiguration,
97
- ReasoningConfiguration$inboundSchema,
98
- ReasoningConfiguration$Outbound,
99
- ReasoningConfiguration$outboundSchema,
100
- } from "./reasoningconfiguration.js";
101
- import {
102
- ShellToolDefinition,
103
- ShellToolDefinition$inboundSchema,
104
- ShellToolDefinition$Outbound,
105
- ShellToolDefinition$outboundSchema,
106
- } from "./shelltooldefinition.js";
107
- import {
108
- SleepToolDefinition,
109
- SleepToolDefinition$inboundSchema,
110
- SleepToolDefinition$Outbound,
111
- SleepToolDefinition$outboundSchema,
112
- } from "./sleeptooldefinition.js";
113
- import {
114
- TextConfiguration,
115
- TextConfiguration$inboundSchema,
116
- TextConfiguration$Outbound,
117
- TextConfiguration$outboundSchema,
118
- } from "./textconfiguration.js";
119
- import {
120
- ToolChoice,
121
- ToolChoice$inboundSchema,
122
- ToolChoice$Outbound,
123
- ToolChoice$outboundSchema,
124
- } from "./toolchoice.js";
125
- import {
126
- WebSearchPreviewToolDefinition,
127
- WebSearchPreviewToolDefinition$inboundSchema,
128
- WebSearchPreviewToolDefinition$Outbound,
129
- WebSearchPreviewToolDefinition$outboundSchema,
130
- } from "./websearchpreviewtooldefinition.js";
131
- import {
132
- WebSearchToolDefinition,
133
- WebSearchToolDefinition$inboundSchema,
134
- WebSearchToolDefinition$Outbound,
135
- WebSearchToolDefinition$outboundSchema,
136
- } from "./websearchtooldefinition.js";
137
-
138
- /**
139
- * The user input to send to the agent. Can be a simple text string for basic queries, or an array of item objects containing text, images, files, or audio for multimodal interactions. This is the main content the agent will respond to.
140
- */
141
- export type ResponsesCreateRequestInput = string | Array<Item>;
142
-
143
- export type ResponsesCreateRequestConversation = Conversation | string;
144
-
145
- export const Include = {
146
- WebSearchCallActionSources: "web_search_call.action.sources",
147
- CodeInterpreterCallOutputs: "code_interpreter_call.outputs",
148
- ComputerCallOutputOutputImageUrl: "computer_call_output.output.image_url",
149
- FileSearchCallResults: "file_search_call.results",
150
- MessageInputImageImageUrl: "message.input_image.image_url",
151
- MessageOutputTextLogprobs: "message.output_text.logprobs",
152
- ReasoningEncryptedContent: "reasoning.encrypted_content",
153
- } as const;
154
- export type Include = ClosedEnum<typeof Include>;
155
-
156
- export type ResponsesCreateRequestStreamOptions = {
157
- /**
158
- * Whether to include token usage statistics in the stream. Useful for monitoring costs in real-time.
159
- */
160
- includeUsage?: boolean | undefined;
161
- /**
162
- * Whether to enable stream obfuscation for privacy and security purposes during streaming.
163
- */
164
- includeObfuscation?: boolean | undefined;
165
- };
166
-
167
- export type Tools =
168
- | FunctionToolDefinition
169
- | ComputerUseToolDefinition
170
- | FileSearchToolDefinition
171
- | CodeInterpreterToolDefinition
172
- | CustomToolDefinition
173
- | WebSearchToolDefinition
174
- | MCPToolDefinition
175
- | ImageGenerationToolDefinition
176
- | LocalShellToolDefinition
177
- | ShellToolDefinition
178
- | WebSearchPreviewToolDefinition
179
- | HostedToolDefinition
180
- | SleepToolDefinition
181
- | HistoryToolDefinition;
182
-
183
- /**
184
- * Gateway extension. Stop sequence(s) where compatible upstream providers should stop generation. Eval runs also enforce this as a post-processing guard.
185
- */
186
- export type ResponsesCreateRequestStop = string | Array<string>;
187
-
188
- /**
189
- * Gateway extension. Provider-specific thinking prefill toggle or prefill text.
190
- */
191
- export type ResponsesCreateRequestPrefillThink = boolean | string;
192
-
193
- /**
194
- * The truncation strategy for handling inputs that exceed the model's context window. 'auto' automatically truncates old messages to fit, 'disabled' returns an error if context is too long. Defaults to 'auto'.
195
- */
196
- export const ResponsesCreateRequestTruncation = {
197
- Auto: "auto",
198
- Disabled: "disabled",
199
- } as const;
200
- /**
201
- * The truncation strategy for handling inputs that exceed the model's context window. 'auto' automatically truncates old messages to fit, 'disabled' returns an error if context is too long. Defaults to 'auto'.
202
- */
203
- export type ResponsesCreateRequestTruncation = ClosedEnum<
204
- typeof ResponsesCreateRequestTruncation
205
- >;
206
-
207
- /**
208
- * Specifies the processing tier for serving the request. 'auto' lets the system choose, 'default' uses standard processing, 'flex' allows flexible scheduling for lower priority, 'priority' provides faster processing. Defaults to 'auto'.
209
- */
210
- export const ResponsesCreateRequestServiceTier = {
211
- Auto: "auto",
212
- Default: "default",
213
- Flex: "flex",
214
- Priority: "priority",
215
- } as const;
216
- /**
217
- * Specifies the processing tier for serving the request. 'auto' lets the system choose, 'default' uses standard processing, 'flex' allows flexible scheduling for lower priority, 'priority' provides faster processing. Defaults to 'auto'.
218
- */
219
- export type ResponsesCreateRequestServiceTier = ClosedEnum<
220
- typeof ResponsesCreateRequestServiceTier
221
- >;
222
-
223
- export const Modalities = {
224
- Text: "text",
225
- Audio: "audio",
226
- } as const;
227
- export type Modalities = ClosedEnum<typeof Modalities>;
228
-
229
- /**
230
- * The audio format for the output. Defaults to 'wav'.
231
- */
232
- export const ResponsesCreateRequestFormat = {
233
- Wav: "wav",
234
- Mp3: "mp3",
235
- Flac: "flac",
236
- Opus: "opus",
237
- Pcm16: "pcm16",
238
- } as const;
239
- /**
240
- * The audio format for the output. Defaults to 'wav'.
241
- */
242
- export type ResponsesCreateRequestFormat = ClosedEnum<
243
- typeof ResponsesCreateRequestFormat
244
- >;
245
-
246
- /**
247
- * Audio output configuration. Optional when modalities includes 'audio'; defaults are applied if omitted.
248
- */
249
- export type Audio = {
250
- /**
251
- * The voice to use for audio output synthesis. Defaults to 'alloy'.
252
- */
253
- voice?: string | undefined;
254
- /**
255
- * The audio format for the output. Defaults to 'wav'.
256
- */
257
- format?: ResponsesCreateRequestFormat | undefined;
258
- };
259
-
260
- /**
261
- * Request schema for creating a new agent response. Configures the agent's model, input, tools, output format, and behavior. Supports both foreground (blocking) and background (asynchronous) execution with optional streaming.
262
- */
263
- export type ResponsesCreateRequest = {
264
- /**
265
- * The ID of the model to use for generating the response.
266
- */
267
- model: string;
268
- /**
269
- * The user input to send to the agent. Can be a simple text string for basic queries, or an array of item objects containing text, images, files, or audio for multimodal interactions. This is the main content the agent will respond to.
270
- */
271
- input?: string | Array<Item> | undefined;
272
- /**
273
- * System or developer instructions inserted into the model's context before user input. Use this to guide the agent's behavior, set personality, define constraints, or provide domain-specific knowledge. Acts as a persistent system message for this response.
274
- */
275
- instructions?: string | undefined;
276
- /**
277
- * The conversation that this response belongs to. Can be a conversation ID string or a conversation object. Used to maintain context and history across multiple agent interactions. Optional - omit for one-off interactions.
278
- */
279
- conversation?: Conversation | string | null | undefined;
280
- /**
281
- * The unique ID of a previous response to continue from. Used for multi-turn conversations to maintain context and history. The agent will have access to all previous interactions in the chain.
282
- */
283
- previousResponseId?: string | undefined;
284
- prompt?: PromptTemplate | undefined;
285
- /**
286
- * Additional fields to include in the response output. Allows requesting specific nested data like web search sources, code interpreter outputs, computer screenshots, file search results, input images, output logprobs, or reasoning content. These fields may have performance or cost implications.
287
- */
288
- include?: Array<Include> | undefined;
289
- text?: TextConfiguration | undefined;
290
- /**
291
- * If set to true, the response data will be streamed using Server-Sent Events (SSE) for real-time updates as the agent generates the response. When false, the response is returned as a single complete object. Defaults to false.
292
- */
293
- stream?: boolean | undefined;
294
- /**
295
- * Additional options for configuring streaming behavior when stream is enabled.
296
- */
297
- streamOptions?: ResponsesCreateRequestStreamOptions | null | undefined;
298
- /**
299
- * Gateway extension. When true, provider calls are streamed even when `stream` is false, so per-token delta events are published to the response's event channel and visible via GET /responses/{id}?stream=true. Does not change the shape of this endpoint's HTTP response. Only valid when background=true; foreground requests are rejected. Defaults to false.
300
- */
301
- streamEvents?: boolean | undefined;
302
- /**
303
- * Whether to store the generated response for later retrieval. When true, the response is saved and can be retrieved via GET /responses/{id}. When false, the response is not persisted after generation. Defaults to true.
304
- */
305
- store?: boolean | undefined;
306
- /**
307
- * Whether to run the model response in the background asynchronously. When true, the request returns immediately with a response ID while the agent processes in the background. Use GET /responses/{id} to retrieve results later. When false, the request blocks until completion. Defaults to false.
308
- */
309
- background?: boolean | undefined;
310
- /**
311
- * URL to receive webhook notifications for status changes (queued, in_progress, completed, failed, incomplete). Only valid when background=true. If provided without background=true, the request will be rejected.
312
- */
313
- webhookUrl?: string | undefined;
314
- /**
315
- * Optional secret for HMAC-SHA256 signing of webhook payloads. When provided, webhooks include an X-Webhook-Signature header with the signature. Requires webhook_url to be set.
316
- */
317
- webhookSecret?: string | undefined;
318
- /**
319
- * Array of tool definitions that the agent can use during response generation. Supports built-in tools (web search, file search, code interpreter, computer use, image generation) and custom tools (functions, MCP, local shell). Each tool definition specifies its type and configuration.
320
- */
321
- tools?:
322
- | Array<
323
- | FunctionToolDefinition
324
- | ComputerUseToolDefinition
325
- | FileSearchToolDefinition
326
- | CodeInterpreterToolDefinition
327
- | CustomToolDefinition
328
- | WebSearchToolDefinition
329
- | MCPToolDefinition
330
- | ImageGenerationToolDefinition
331
- | LocalShellToolDefinition
332
- | ShellToolDefinition
333
- | WebSearchPreviewToolDefinition
334
- | HostedToolDefinition
335
- | SleepToolDefinition
336
- | HistoryToolDefinition
337
- >
338
- | undefined;
339
- toolChoice?: ToolChoice | undefined;
340
- /**
341
- * Whether to allow the agent to execute multiple tool calls in parallel. When true, the agent can make concurrent tool calls for efficiency. When false, tools are called sequentially. Defaults to true for better performance.
342
- */
343
- parallelToolCalls?: boolean | undefined;
344
- /**
345
- * The maximum total number of tool calls the agent can make during this response. Useful for controlling execution time and preventing infinite loops. Applies to all built-in tools like web search, file search, code interpreter, etc. Must be a positive integer between 1 and 300. Defaults to 64.
346
- */
347
- maxToolCalls?: number | undefined;
348
- reasoning?: ReasoningConfiguration | undefined;
349
- /**
350
- * When true, the gateway inspects request complexity and automatically routes between quantized, MoE, and dense variants within the requested model family.
351
- */
352
- autoRouting?: boolean | undefined;
353
- /**
354
- * Gateway extension. When true alongside auto_routing, the response metadata includes a compact serialized routing decision so you can inspect the inferred target tier even when no compatible sibling variant is available.
355
- */
356
- autoRoutingDebug?: boolean | undefined;
357
- /**
358
- * The maximum number of tokens the model can generate in its output. Sets an upper bound to control costs and response length. The actual output may be shorter if the model finishes naturally. Must be a positive integer.
359
- */
360
- maxOutputTokens?: number | undefined;
361
- /**
362
- * Controls randomness in the model's output. Higher values (e.g., 1.5-2.0) make output more random and creative, lower values (e.g., 0.0-0.5) make it more focused and deterministic. Must be between 0 and 2.
363
- */
364
- temperature?: number | undefined;
365
- /**
366
- * Nucleus sampling parameter. The model considers only the tokens with top_p cumulative probability. Lower values (e.g., 0.1) make output more focused, higher values (e.g., 0.9) allow more diversity. Must be between 0 and 1. Alternative to temperature.
367
- */
368
- topP?: number | undefined;
369
- /**
370
- * Gateway extension. Stop sequence(s) where compatible upstream providers should stop generation. Eval runs also enforce this as a post-processing guard.
371
- */
372
- stop?: string | Array<string> | undefined;
373
- /**
374
- * Gateway extension. Provider-specific top-k sampling parameter.
375
- */
376
- topK?: number | undefined;
377
- /**
378
- * Gateway extension. Provider-specific min-p sampling parameter.
379
- */
380
- minP?: number | undefined;
381
- /**
382
- * Gateway extension. Provider-specific repetition penalty.
383
- */
384
- repetitionPenalty?: number | undefined;
385
- /**
386
- * Gateway extension. Provider-specific sampling toggle.
387
- */
388
- doSample?: boolean | undefined;
389
- /**
390
- * Gateway extension. Controlled provider-specific request body passthrough.
391
- */
392
- extraBody?: { [k: string]: any } | undefined;
393
- /**
394
- * Gateway extension. Provider-specific chat template options, such as enable_thinking=false.
395
- */
396
- chatTemplateKwargs?: { [k: string]: any } | undefined;
397
- /**
398
- * Gateway extension. Provider-specific thinking prefill toggle or prefill text.
399
- */
400
- prefillThink?: boolean | string | undefined;
401
- /**
402
- * Gateway extension. Provider-specific cache toggle where supported.
403
- */
404
- useCache?: boolean | undefined;
405
- /**
406
- * The number of most likely tokens to return at each position along with their log probabilities. Must be between 0 and 20. Useful for understanding model confidence and exploring alternative outputs.
407
- */
408
- topLogprobs?: number | undefined;
409
- /**
410
- * The truncation strategy for handling inputs that exceed the model's context window. 'auto' automatically truncates old messages to fit, 'disabled' returns an error if context is too long. Defaults to 'auto'.
411
- */
412
- truncation?: ResponsesCreateRequestTruncation | undefined;
413
- /**
414
- * Array of context management strategies to apply during response generation.
415
- */
416
- contextManagement?: Array<CompactionContextManagement> | undefined;
417
- /**
418
- * Penalizes new tokens based on whether they appear in the text so far. Higher values increase the model's likelihood to talk about new topics.
419
- */
420
- presencePenalty?: number | undefined;
421
- /**
422
- * Penalizes new tokens based on their frequency in the text so far. Higher values decrease the model's likelihood to repeat the same line verbatim.
423
- */
424
- frequencyPenalty?: number | undefined;
425
- /**
426
- * Specifies the processing tier for serving the request. 'auto' lets the system choose, 'default' uses standard processing, 'flex' allows flexible scheduling for lower priority, 'priority' provides faster processing. Defaults to 'auto'.
427
- */
428
- serviceTier?: ResponsesCreateRequestServiceTier | undefined;
429
- /**
430
- * A stable identifier used for caching prompts and context. Helps reduce costs and latency by reusing cached prompt processing. Useful for prompts that are used repeatedly with minor variations.
431
- */
432
- promptCacheKey?: string | undefined;
433
- /**
434
- * A stable identifier used to help detect and prevent policy violations across multiple requests. Helps the system identify patterns of abuse or misuse. Useful for compliance tracking and safety monitoring.
435
- */
436
- safetyIdentifier?: string | undefined;
437
- /**
438
- * Custom metadata to attach to this response as key-value pairs. Keys must be strings up to 64 characters, values must be strings up to 512 characters. Maximum 16 pairs. Useful for tracking, categorization, or passing custom identifiers through your system.
439
- */
440
- metadata?: { [k: string]: string } | undefined;
441
- /**
442
- * Output types that the model should generate. Defaults to ['text']. Include 'audio' to receive an audio rendering of the text response via TTS.
443
- */
444
- modalities?: Array<Modalities> | undefined;
445
- /**
446
- * Audio output configuration. Optional when modalities includes 'audio'; defaults are applied if omitted.
447
- */
448
- audio?: Audio | undefined;
449
- /**
450
- * DEPRECATED: A unique identifier for the end-user. Use safety_identifier for policy violation detection and prompt_cache_key for caching instead. This field is maintained for backwards compatibility.
451
- */
452
- user?: string | undefined;
453
- };
454
-
455
- /** @internal */
456
- export const ResponsesCreateRequestInput$inboundSchema: z.ZodType<
457
- ResponsesCreateRequestInput,
458
- z.ZodTypeDef,
459
- unknown
460
- > = z.union([z.string(), z.array(Item$inboundSchema)]);
461
- /** @internal */
462
- export type ResponsesCreateRequestInput$Outbound =
463
- | string
464
- | Array<Item$Outbound>;
465
-
466
- /** @internal */
467
- export const ResponsesCreateRequestInput$outboundSchema: z.ZodType<
468
- ResponsesCreateRequestInput$Outbound,
469
- z.ZodTypeDef,
470
- ResponsesCreateRequestInput
471
- > = z.union([z.string(), z.array(Item$outboundSchema)]);
472
-
473
- export function responsesCreateRequestInputToJSON(
474
- responsesCreateRequestInput: ResponsesCreateRequestInput,
475
- ): string {
476
- return JSON.stringify(
477
- ResponsesCreateRequestInput$outboundSchema.parse(
478
- responsesCreateRequestInput,
479
- ),
480
- );
481
- }
482
- export function responsesCreateRequestInputFromJSON(
483
- jsonString: string,
484
- ): SafeParseResult<ResponsesCreateRequestInput, SDKValidationError> {
485
- return safeParse(
486
- jsonString,
487
- (x) => ResponsesCreateRequestInput$inboundSchema.parse(JSON.parse(x)),
488
- `Failed to parse 'ResponsesCreateRequestInput' from JSON`,
489
- );
490
- }
491
-
492
- /** @internal */
493
- export const ResponsesCreateRequestConversation$inboundSchema: z.ZodType<
494
- ResponsesCreateRequestConversation,
495
- z.ZodTypeDef,
496
- unknown
497
- > = z.union([Conversation$inboundSchema, z.string()]);
498
- /** @internal */
499
- export type ResponsesCreateRequestConversation$Outbound =
500
- | Conversation$Outbound
501
- | string;
502
-
503
- /** @internal */
504
- export const ResponsesCreateRequestConversation$outboundSchema: z.ZodType<
505
- ResponsesCreateRequestConversation$Outbound,
506
- z.ZodTypeDef,
507
- ResponsesCreateRequestConversation
508
- > = z.union([Conversation$outboundSchema, z.string()]);
509
-
510
- export function responsesCreateRequestConversationToJSON(
511
- responsesCreateRequestConversation: ResponsesCreateRequestConversation,
512
- ): string {
513
- return JSON.stringify(
514
- ResponsesCreateRequestConversation$outboundSchema.parse(
515
- responsesCreateRequestConversation,
516
- ),
517
- );
518
- }
519
- export function responsesCreateRequestConversationFromJSON(
520
- jsonString: string,
521
- ): SafeParseResult<ResponsesCreateRequestConversation, SDKValidationError> {
522
- return safeParse(
523
- jsonString,
524
- (x) =>
525
- ResponsesCreateRequestConversation$inboundSchema.parse(JSON.parse(x)),
526
- `Failed to parse 'ResponsesCreateRequestConversation' from JSON`,
527
- );
528
- }
529
-
530
- /** @internal */
531
- export const Include$inboundSchema: z.ZodNativeEnum<typeof Include> = z
532
- .nativeEnum(Include);
533
- /** @internal */
534
- export const Include$outboundSchema: z.ZodNativeEnum<typeof Include> =
535
- Include$inboundSchema;
536
-
537
- /** @internal */
538
- export const ResponsesCreateRequestStreamOptions$inboundSchema: z.ZodType<
539
- ResponsesCreateRequestStreamOptions,
540
- z.ZodTypeDef,
541
- unknown
542
- > = z.object({
543
- include_usage: z.boolean().optional(),
544
- include_obfuscation: z.boolean().optional(),
545
- }).transform((v) => {
546
- return remap$(v, {
547
- "include_usage": "includeUsage",
548
- "include_obfuscation": "includeObfuscation",
549
- });
550
- });
551
- /** @internal */
552
- export type ResponsesCreateRequestStreamOptions$Outbound = {
553
- include_usage?: boolean | undefined;
554
- include_obfuscation?: boolean | undefined;
555
- };
556
-
557
- /** @internal */
558
- export const ResponsesCreateRequestStreamOptions$outboundSchema: z.ZodType<
559
- ResponsesCreateRequestStreamOptions$Outbound,
560
- z.ZodTypeDef,
561
- ResponsesCreateRequestStreamOptions
562
- > = z.object({
563
- includeUsage: z.boolean().optional(),
564
- includeObfuscation: z.boolean().optional(),
565
- }).transform((v) => {
566
- return remap$(v, {
567
- includeUsage: "include_usage",
568
- includeObfuscation: "include_obfuscation",
569
- });
570
- });
571
-
572
- export function responsesCreateRequestStreamOptionsToJSON(
573
- responsesCreateRequestStreamOptions: ResponsesCreateRequestStreamOptions,
574
- ): string {
575
- return JSON.stringify(
576
- ResponsesCreateRequestStreamOptions$outboundSchema.parse(
577
- responsesCreateRequestStreamOptions,
578
- ),
579
- );
580
- }
581
- export function responsesCreateRequestStreamOptionsFromJSON(
582
- jsonString: string,
583
- ): SafeParseResult<ResponsesCreateRequestStreamOptions, SDKValidationError> {
584
- return safeParse(
585
- jsonString,
586
- (x) =>
587
- ResponsesCreateRequestStreamOptions$inboundSchema.parse(JSON.parse(x)),
588
- `Failed to parse 'ResponsesCreateRequestStreamOptions' from JSON`,
589
- );
590
- }
591
-
592
- /** @internal */
593
- export const Tools$inboundSchema: z.ZodType<Tools, z.ZodTypeDef, unknown> = z
594
- .union([
595
- FunctionToolDefinition$inboundSchema,
596
- ComputerUseToolDefinition$inboundSchema,
597
- FileSearchToolDefinition$inboundSchema,
598
- CodeInterpreterToolDefinition$inboundSchema,
599
- CustomToolDefinition$inboundSchema,
600
- WebSearchToolDefinition$inboundSchema,
601
- MCPToolDefinition$inboundSchema,
602
- ImageGenerationToolDefinition$inboundSchema,
603
- LocalShellToolDefinition$inboundSchema,
604
- ShellToolDefinition$inboundSchema,
605
- WebSearchPreviewToolDefinition$inboundSchema,
606
- HostedToolDefinition$inboundSchema,
607
- SleepToolDefinition$inboundSchema,
608
- HistoryToolDefinition$inboundSchema,
609
- ]);
610
- /** @internal */
611
- export type Tools$Outbound =
612
- | FunctionToolDefinition$Outbound
613
- | ComputerUseToolDefinition$Outbound
614
- | FileSearchToolDefinition$Outbound
615
- | CodeInterpreterToolDefinition$Outbound
616
- | CustomToolDefinition$Outbound
617
- | WebSearchToolDefinition$Outbound
618
- | MCPToolDefinition$Outbound
619
- | ImageGenerationToolDefinition$Outbound
620
- | LocalShellToolDefinition$Outbound
621
- | ShellToolDefinition$Outbound
622
- | WebSearchPreviewToolDefinition$Outbound
623
- | HostedToolDefinition$Outbound
624
- | SleepToolDefinition$Outbound
625
- | HistoryToolDefinition$Outbound;
626
-
627
- /** @internal */
628
- export const Tools$outboundSchema: z.ZodType<
629
- Tools$Outbound,
630
- z.ZodTypeDef,
631
- Tools
632
- > = z.union([
633
- FunctionToolDefinition$outboundSchema,
634
- ComputerUseToolDefinition$outboundSchema,
635
- FileSearchToolDefinition$outboundSchema,
636
- CodeInterpreterToolDefinition$outboundSchema,
637
- CustomToolDefinition$outboundSchema,
638
- WebSearchToolDefinition$outboundSchema,
639
- MCPToolDefinition$outboundSchema,
640
- ImageGenerationToolDefinition$outboundSchema,
641
- LocalShellToolDefinition$outboundSchema,
642
- ShellToolDefinition$outboundSchema,
643
- WebSearchPreviewToolDefinition$outboundSchema,
644
- HostedToolDefinition$outboundSchema,
645
- SleepToolDefinition$outboundSchema,
646
- HistoryToolDefinition$outboundSchema,
647
- ]);
648
-
649
- export function toolsToJSON(tools: Tools): string {
650
- return JSON.stringify(Tools$outboundSchema.parse(tools));
651
- }
652
- export function toolsFromJSON(
653
- jsonString: string,
654
- ): SafeParseResult<Tools, SDKValidationError> {
655
- return safeParse(
656
- jsonString,
657
- (x) => Tools$inboundSchema.parse(JSON.parse(x)),
658
- `Failed to parse 'Tools' from JSON`,
659
- );
660
- }
661
-
662
- /** @internal */
663
- export const ResponsesCreateRequestStop$inboundSchema: z.ZodType<
664
- ResponsesCreateRequestStop,
665
- z.ZodTypeDef,
666
- unknown
667
- > = z.union([z.string(), z.array(z.string())]);
668
- /** @internal */
669
- export type ResponsesCreateRequestStop$Outbound = string | Array<string>;
670
-
671
- /** @internal */
672
- export const ResponsesCreateRequestStop$outboundSchema: z.ZodType<
673
- ResponsesCreateRequestStop$Outbound,
674
- z.ZodTypeDef,
675
- ResponsesCreateRequestStop
676
- > = z.union([z.string(), z.array(z.string())]);
677
-
678
- export function responsesCreateRequestStopToJSON(
679
- responsesCreateRequestStop: ResponsesCreateRequestStop,
680
- ): string {
681
- return JSON.stringify(
682
- ResponsesCreateRequestStop$outboundSchema.parse(responsesCreateRequestStop),
683
- );
684
- }
685
- export function responsesCreateRequestStopFromJSON(
686
- jsonString: string,
687
- ): SafeParseResult<ResponsesCreateRequestStop, SDKValidationError> {
688
- return safeParse(
689
- jsonString,
690
- (x) => ResponsesCreateRequestStop$inboundSchema.parse(JSON.parse(x)),
691
- `Failed to parse 'ResponsesCreateRequestStop' from JSON`,
692
- );
693
- }
694
-
695
- /** @internal */
696
- export const ResponsesCreateRequestPrefillThink$inboundSchema: z.ZodType<
697
- ResponsesCreateRequestPrefillThink,
698
- z.ZodTypeDef,
699
- unknown
700
- > = z.union([z.boolean(), z.string()]);
701
- /** @internal */
702
- export type ResponsesCreateRequestPrefillThink$Outbound = boolean | string;
703
-
704
- /** @internal */
705
- export const ResponsesCreateRequestPrefillThink$outboundSchema: z.ZodType<
706
- ResponsesCreateRequestPrefillThink$Outbound,
707
- z.ZodTypeDef,
708
- ResponsesCreateRequestPrefillThink
709
- > = z.union([z.boolean(), z.string()]);
710
-
711
- export function responsesCreateRequestPrefillThinkToJSON(
712
- responsesCreateRequestPrefillThink: ResponsesCreateRequestPrefillThink,
713
- ): string {
714
- return JSON.stringify(
715
- ResponsesCreateRequestPrefillThink$outboundSchema.parse(
716
- responsesCreateRequestPrefillThink,
717
- ),
718
- );
719
- }
720
- export function responsesCreateRequestPrefillThinkFromJSON(
721
- jsonString: string,
722
- ): SafeParseResult<ResponsesCreateRequestPrefillThink, SDKValidationError> {
723
- return safeParse(
724
- jsonString,
725
- (x) =>
726
- ResponsesCreateRequestPrefillThink$inboundSchema.parse(JSON.parse(x)),
727
- `Failed to parse 'ResponsesCreateRequestPrefillThink' from JSON`,
728
- );
729
- }
730
-
731
- /** @internal */
732
- export const ResponsesCreateRequestTruncation$inboundSchema: z.ZodNativeEnum<
733
- typeof ResponsesCreateRequestTruncation
734
- > = z.nativeEnum(ResponsesCreateRequestTruncation);
735
- /** @internal */
736
- export const ResponsesCreateRequestTruncation$outboundSchema: z.ZodNativeEnum<
737
- typeof ResponsesCreateRequestTruncation
738
- > = ResponsesCreateRequestTruncation$inboundSchema;
739
-
740
- /** @internal */
741
- export const ResponsesCreateRequestServiceTier$inboundSchema: z.ZodNativeEnum<
742
- typeof ResponsesCreateRequestServiceTier
743
- > = z.nativeEnum(ResponsesCreateRequestServiceTier);
744
- /** @internal */
745
- export const ResponsesCreateRequestServiceTier$outboundSchema: z.ZodNativeEnum<
746
- typeof ResponsesCreateRequestServiceTier
747
- > = ResponsesCreateRequestServiceTier$inboundSchema;
748
-
749
- /** @internal */
750
- export const Modalities$inboundSchema: z.ZodNativeEnum<typeof Modalities> = z
751
- .nativeEnum(Modalities);
752
- /** @internal */
753
- export const Modalities$outboundSchema: z.ZodNativeEnum<typeof Modalities> =
754
- Modalities$inboundSchema;
755
-
756
- /** @internal */
757
- export const ResponsesCreateRequestFormat$inboundSchema: z.ZodNativeEnum<
758
- typeof ResponsesCreateRequestFormat
759
- > = z.nativeEnum(ResponsesCreateRequestFormat);
760
- /** @internal */
761
- export const ResponsesCreateRequestFormat$outboundSchema: z.ZodNativeEnum<
762
- typeof ResponsesCreateRequestFormat
763
- > = ResponsesCreateRequestFormat$inboundSchema;
764
-
765
- /** @internal */
766
- export const Audio$inboundSchema: z.ZodType<Audio, z.ZodTypeDef, unknown> = z
767
- .object({
768
- voice: z.string().default("alloy"),
769
- format: ResponsesCreateRequestFormat$inboundSchema.default("wav"),
770
- });
771
- /** @internal */
772
- export type Audio$Outbound = {
773
- voice: string;
774
- format: string;
775
- };
776
-
777
- /** @internal */
778
- export const Audio$outboundSchema: z.ZodType<
779
- Audio$Outbound,
780
- z.ZodTypeDef,
781
- Audio
782
- > = z.object({
783
- voice: z.string().default("alloy"),
784
- format: ResponsesCreateRequestFormat$outboundSchema.default("wav"),
785
- });
786
-
787
- export function audioToJSON(audio: Audio): string {
788
- return JSON.stringify(Audio$outboundSchema.parse(audio));
789
- }
790
- export function audioFromJSON(
791
- jsonString: string,
792
- ): SafeParseResult<Audio, SDKValidationError> {
793
- return safeParse(
794
- jsonString,
795
- (x) => Audio$inboundSchema.parse(JSON.parse(x)),
796
- `Failed to parse 'Audio' from JSON`,
797
- );
798
- }
799
-
800
- /** @internal */
801
- export const ResponsesCreateRequest$inboundSchema: z.ZodType<
802
- ResponsesCreateRequest,
803
- z.ZodTypeDef,
804
- unknown
805
- > = z.object({
806
- model: z.string(),
807
- input: z.union([z.string(), z.array(Item$inboundSchema)]).optional(),
808
- instructions: z.string().optional(),
809
- conversation: z.nullable(z.union([Conversation$inboundSchema, z.string()]))
810
- .optional(),
811
- previous_response_id: z.string().optional(),
812
- prompt: PromptTemplate$inboundSchema.optional(),
813
- include: z.array(Include$inboundSchema).optional(),
814
- text: TextConfiguration$inboundSchema.optional(),
815
- stream: z.boolean().default(false),
816
- stream_options: z.nullable(
817
- z.lazy(() => ResponsesCreateRequestStreamOptions$inboundSchema),
818
- ).optional(),
819
- stream_events: z.boolean().optional(),
820
- store: z.boolean().default(true),
821
- background: z.boolean().default(false),
822
- webhook_url: z.string().optional(),
823
- webhook_secret: z.string().optional(),
824
- tools: z.array(
825
- z.union([
826
- FunctionToolDefinition$inboundSchema,
827
- ComputerUseToolDefinition$inboundSchema,
828
- FileSearchToolDefinition$inboundSchema,
829
- CodeInterpreterToolDefinition$inboundSchema,
830
- CustomToolDefinition$inboundSchema,
831
- WebSearchToolDefinition$inboundSchema,
832
- MCPToolDefinition$inboundSchema,
833
- ImageGenerationToolDefinition$inboundSchema,
834
- LocalShellToolDefinition$inboundSchema,
835
- ShellToolDefinition$inboundSchema,
836
- WebSearchPreviewToolDefinition$inboundSchema,
837
- HostedToolDefinition$inboundSchema,
838
- SleepToolDefinition$inboundSchema,
839
- HistoryToolDefinition$inboundSchema,
840
- ]),
841
- ).optional(),
842
- tool_choice: ToolChoice$inboundSchema.optional(),
843
- parallel_tool_calls: z.boolean().default(true),
844
- max_tool_calls: z.number().int().default(64),
845
- reasoning: ReasoningConfiguration$inboundSchema.optional(),
846
- auto_routing: z.boolean().optional(),
847
- auto_routing_debug: z.boolean().optional(),
848
- max_output_tokens: z.number().int().optional(),
849
- temperature: z.number().optional(),
850
- top_p: z.number().optional(),
851
- stop: z.union([z.string(), z.array(z.string())]).optional(),
852
- top_k: z.number().int().optional(),
853
- min_p: z.number().optional(),
854
- repetition_penalty: z.number().optional(),
855
- do_sample: z.boolean().optional(),
856
- extra_body: z.record(z.any()).optional(),
857
- chat_template_kwargs: z.record(z.any()).optional(),
858
- prefill_think: z.union([z.boolean(), z.string()]).optional(),
859
- use_cache: z.boolean().optional(),
860
- top_logprobs: z.number().int().optional(),
861
- truncation: ResponsesCreateRequestTruncation$inboundSchema.default("auto"),
862
- context_management: z.array(CompactionContextManagement$inboundSchema)
863
- .optional(),
864
- presence_penalty: z.number().optional(),
865
- frequency_penalty: z.number().optional(),
866
- service_tier: ResponsesCreateRequestServiceTier$inboundSchema.default("auto"),
867
- prompt_cache_key: z.string().optional(),
868
- safety_identifier: z.string().optional(),
869
- metadata: z.record(z.string()).optional(),
870
- modalities: z.array(Modalities$inboundSchema).optional(),
871
- audio: z.lazy(() => Audio$inboundSchema).optional(),
872
- user: z.string().optional(),
873
- }).transform((v) => {
874
- return remap$(v, {
875
- "previous_response_id": "previousResponseId",
876
- "stream_options": "streamOptions",
877
- "stream_events": "streamEvents",
878
- "webhook_url": "webhookUrl",
879
- "webhook_secret": "webhookSecret",
880
- "tool_choice": "toolChoice",
881
- "parallel_tool_calls": "parallelToolCalls",
882
- "max_tool_calls": "maxToolCalls",
883
- "auto_routing": "autoRouting",
884
- "auto_routing_debug": "autoRoutingDebug",
885
- "max_output_tokens": "maxOutputTokens",
886
- "top_p": "topP",
887
- "top_k": "topK",
888
- "min_p": "minP",
889
- "repetition_penalty": "repetitionPenalty",
890
- "do_sample": "doSample",
891
- "extra_body": "extraBody",
892
- "chat_template_kwargs": "chatTemplateKwargs",
893
- "prefill_think": "prefillThink",
894
- "use_cache": "useCache",
895
- "top_logprobs": "topLogprobs",
896
- "context_management": "contextManagement",
897
- "presence_penalty": "presencePenalty",
898
- "frequency_penalty": "frequencyPenalty",
899
- "service_tier": "serviceTier",
900
- "prompt_cache_key": "promptCacheKey",
901
- "safety_identifier": "safetyIdentifier",
902
- });
903
- });
904
- /** @internal */
905
- export type ResponsesCreateRequest$Outbound = {
906
- model: string;
907
- input?: string | Array<Item$Outbound> | undefined;
908
- instructions?: string | undefined;
909
- conversation?: Conversation$Outbound | string | null | undefined;
910
- previous_response_id?: string | undefined;
911
- prompt?: PromptTemplate$Outbound | undefined;
912
- include?: Array<string> | undefined;
913
- text?: TextConfiguration$Outbound | undefined;
914
- stream: boolean;
915
- stream_options?:
916
- | ResponsesCreateRequestStreamOptions$Outbound
917
- | null
918
- | undefined;
919
- stream_events?: boolean | undefined;
920
- store: boolean;
921
- background: boolean;
922
- webhook_url?: string | undefined;
923
- webhook_secret?: string | undefined;
924
- tools?:
925
- | Array<
926
- | FunctionToolDefinition$Outbound
927
- | ComputerUseToolDefinition$Outbound
928
- | FileSearchToolDefinition$Outbound
929
- | CodeInterpreterToolDefinition$Outbound
930
- | CustomToolDefinition$Outbound
931
- | WebSearchToolDefinition$Outbound
932
- | MCPToolDefinition$Outbound
933
- | ImageGenerationToolDefinition$Outbound
934
- | LocalShellToolDefinition$Outbound
935
- | ShellToolDefinition$Outbound
936
- | WebSearchPreviewToolDefinition$Outbound
937
- | HostedToolDefinition$Outbound
938
- | SleepToolDefinition$Outbound
939
- | HistoryToolDefinition$Outbound
940
- >
941
- | undefined;
942
- tool_choice?: ToolChoice$Outbound | undefined;
943
- parallel_tool_calls: boolean;
944
- max_tool_calls: number;
945
- reasoning?: ReasoningConfiguration$Outbound | undefined;
946
- auto_routing?: boolean | undefined;
947
- auto_routing_debug?: boolean | undefined;
948
- max_output_tokens?: number | undefined;
949
- temperature?: number | undefined;
950
- top_p?: number | undefined;
951
- stop?: string | Array<string> | undefined;
952
- top_k?: number | undefined;
953
- min_p?: number | undefined;
954
- repetition_penalty?: number | undefined;
955
- do_sample?: boolean | undefined;
956
- extra_body?: { [k: string]: any } | undefined;
957
- chat_template_kwargs?: { [k: string]: any } | undefined;
958
- prefill_think?: boolean | string | undefined;
959
- use_cache?: boolean | undefined;
960
- top_logprobs?: number | undefined;
961
- truncation: string;
962
- context_management?: Array<CompactionContextManagement$Outbound> | undefined;
963
- presence_penalty?: number | undefined;
964
- frequency_penalty?: number | undefined;
965
- service_tier: string;
966
- prompt_cache_key?: string | undefined;
967
- safety_identifier?: string | undefined;
968
- metadata?: { [k: string]: string } | undefined;
969
- modalities?: Array<string> | undefined;
970
- audio?: Audio$Outbound | undefined;
971
- user?: string | undefined;
972
- };
973
-
974
- /** @internal */
975
- export const ResponsesCreateRequest$outboundSchema: z.ZodType<
976
- ResponsesCreateRequest$Outbound,
977
- z.ZodTypeDef,
978
- ResponsesCreateRequest
979
- > = z.object({
980
- model: z.string(),
981
- input: z.union([z.string(), z.array(Item$outboundSchema)]).optional(),
982
- instructions: z.string().optional(),
983
- conversation: z.nullable(z.union([Conversation$outboundSchema, z.string()]))
984
- .optional(),
985
- previousResponseId: z.string().optional(),
986
- prompt: PromptTemplate$outboundSchema.optional(),
987
- include: z.array(Include$outboundSchema).optional(),
988
- text: TextConfiguration$outboundSchema.optional(),
989
- stream: z.boolean().default(false),
990
- streamOptions: z.nullable(
991
- z.lazy(() => ResponsesCreateRequestStreamOptions$outboundSchema),
992
- ).optional(),
993
- streamEvents: z.boolean().optional(),
994
- store: z.boolean().default(true),
995
- background: z.boolean().default(false),
996
- webhookUrl: z.string().optional(),
997
- webhookSecret: z.string().optional(),
998
- tools: z.array(
999
- z.union([
1000
- FunctionToolDefinition$outboundSchema,
1001
- ComputerUseToolDefinition$outboundSchema,
1002
- FileSearchToolDefinition$outboundSchema,
1003
- CodeInterpreterToolDefinition$outboundSchema,
1004
- CustomToolDefinition$outboundSchema,
1005
- WebSearchToolDefinition$outboundSchema,
1006
- MCPToolDefinition$outboundSchema,
1007
- ImageGenerationToolDefinition$outboundSchema,
1008
- LocalShellToolDefinition$outboundSchema,
1009
- ShellToolDefinition$outboundSchema,
1010
- WebSearchPreviewToolDefinition$outboundSchema,
1011
- HostedToolDefinition$outboundSchema,
1012
- SleepToolDefinition$outboundSchema,
1013
- HistoryToolDefinition$outboundSchema,
1014
- ]),
1015
- ).optional(),
1016
- toolChoice: ToolChoice$outboundSchema.optional(),
1017
- parallelToolCalls: z.boolean().default(true),
1018
- maxToolCalls: z.number().int().default(64),
1019
- reasoning: ReasoningConfiguration$outboundSchema.optional(),
1020
- autoRouting: z.boolean().optional(),
1021
- autoRoutingDebug: z.boolean().optional(),
1022
- maxOutputTokens: z.number().int().optional(),
1023
- temperature: z.number().optional(),
1024
- topP: z.number().optional(),
1025
- stop: z.union([z.string(), z.array(z.string())]).optional(),
1026
- topK: z.number().int().optional(),
1027
- minP: z.number().optional(),
1028
- repetitionPenalty: z.number().optional(),
1029
- doSample: z.boolean().optional(),
1030
- extraBody: z.record(z.any()).optional(),
1031
- chatTemplateKwargs: z.record(z.any()).optional(),
1032
- prefillThink: z.union([z.boolean(), z.string()]).optional(),
1033
- useCache: z.boolean().optional(),
1034
- topLogprobs: z.number().int().optional(),
1035
- truncation: ResponsesCreateRequestTruncation$outboundSchema.default("auto"),
1036
- contextManagement: z.array(CompactionContextManagement$outboundSchema)
1037
- .optional(),
1038
- presencePenalty: z.number().optional(),
1039
- frequencyPenalty: z.number().optional(),
1040
- serviceTier: ResponsesCreateRequestServiceTier$outboundSchema.default("auto"),
1041
- promptCacheKey: z.string().optional(),
1042
- safetyIdentifier: z.string().optional(),
1043
- metadata: z.record(z.string()).optional(),
1044
- modalities: z.array(Modalities$outboundSchema).optional(),
1045
- audio: z.lazy(() => Audio$outboundSchema).optional(),
1046
- user: z.string().optional(),
1047
- }).transform((v) => {
1048
- return remap$(v, {
1049
- previousResponseId: "previous_response_id",
1050
- streamOptions: "stream_options",
1051
- streamEvents: "stream_events",
1052
- webhookUrl: "webhook_url",
1053
- webhookSecret: "webhook_secret",
1054
- toolChoice: "tool_choice",
1055
- parallelToolCalls: "parallel_tool_calls",
1056
- maxToolCalls: "max_tool_calls",
1057
- autoRouting: "auto_routing",
1058
- autoRoutingDebug: "auto_routing_debug",
1059
- maxOutputTokens: "max_output_tokens",
1060
- topP: "top_p",
1061
- topK: "top_k",
1062
- minP: "min_p",
1063
- repetitionPenalty: "repetition_penalty",
1064
- doSample: "do_sample",
1065
- extraBody: "extra_body",
1066
- chatTemplateKwargs: "chat_template_kwargs",
1067
- prefillThink: "prefill_think",
1068
- useCache: "use_cache",
1069
- topLogprobs: "top_logprobs",
1070
- contextManagement: "context_management",
1071
- presencePenalty: "presence_penalty",
1072
- frequencyPenalty: "frequency_penalty",
1073
- serviceTier: "service_tier",
1074
- promptCacheKey: "prompt_cache_key",
1075
- safetyIdentifier: "safety_identifier",
1076
- });
1077
- });
1078
-
1079
- export function responsesCreateRequestToJSON(
1080
- responsesCreateRequest: ResponsesCreateRequest,
1081
- ): string {
1082
- return JSON.stringify(
1083
- ResponsesCreateRequest$outboundSchema.parse(responsesCreateRequest),
1084
- );
1085
- }
1086
- export function responsesCreateRequestFromJSON(
1087
- jsonString: string,
1088
- ): SafeParseResult<ResponsesCreateRequest, SDKValidationError> {
1089
- return safeParse(
1090
- jsonString,
1091
- (x) => ResponsesCreateRequest$inboundSchema.parse(JSON.parse(x)),
1092
- `Failed to parse 'ResponsesCreateRequest' from JSON`,
1093
- );
1094
- }