1use crate::Rest;
7use serde::{Deserialize, Serialize};
8use std::collections::BTreeMap;
9
10#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
11#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
12#[derive(gproxy_protocol_macros::DeclaredFields)]
13#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
14pub struct ClientAdditionalTools {
15 #[serde(default, skip_serializing_if = "Option::is_none")]
16 pub id: Option<String>,
17 pub role: String,
18 pub tools: Vec<serde_json::Value>,
19
20 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
21 pub rest: Rest,
22}
23
24#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
25#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
26#[derive(gproxy_protocol_macros::DeclaredFields)]
27#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
28pub struct ClientMessage {
29 #[serde(default, skip_serializing_if = "Option::is_none")]
30 pub id: Option<String>,
31 pub role: String,
32 pub content: Vec<ContentItem>,
33
34 #[serde(default, skip_serializing_if = "Option::is_none")]
35 pub phase: Option<MessagePhase>,
36 #[serde(default, skip_serializing_if = "Option::is_none")]
37 pub internal_chat_message_metadata_passthrough: Option<InternalChatMessageMetadataPassthrough>,
38
39 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
40 pub rest: Rest,
41}
42
43#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
44#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
45#[derive(gproxy_protocol_macros::DeclaredFields)]
46#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
47pub struct ClientAgentMessage {
48 #[serde(default, skip_serializing_if = "Option::is_none")]
49 pub id: Option<String>,
50 pub author: String,
51 pub recipient: String,
52 pub content: Vec<AgentMessageInputContent>,
53 #[serde(default, skip_serializing_if = "Option::is_none")]
54 pub internal_chat_message_metadata_passthrough: Option<InternalChatMessageMetadataPassthrough>,
55
56 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
57 pub rest: Rest,
58}
59
60#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
61#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
62#[derive(gproxy_protocol_macros::DeclaredFields)]
63#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
64pub struct ClientReasoning {
65 #[serde(default, skip_serializing_if = "Option::is_none")]
66 pub id: Option<String>,
67 pub summary: Vec<ReasoningItemReasoningSummary>,
68 #[serde(
69 default,
70 deserialize_with = "super::super::responses::input::present_nullable",
71 skip_serializing_if = "Option::is_none"
72 )]
73 pub content: Option<Option<Vec<ReasoningItemContent>>>,
74 #[wire(required)]
75 #[cfg_attr(feature = "schema", schemars(extend("x-gproxy-required" = true)))]
76 #[serde(deserialize_with = "super::super::responses::input::required_nullable")]
77 pub encrypted_content: Option<String>,
78 #[serde(default, skip_serializing_if = "Option::is_none")]
79 pub internal_chat_message_metadata_passthrough: Option<InternalChatMessageMetadataPassthrough>,
80
81 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
82 pub rest: Rest,
83}
84
85#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
86#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
87#[derive(gproxy_protocol_macros::DeclaredFields)]
88#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
89pub struct ClientLocalShellCall {
90 #[serde(default, skip_serializing_if = "Option::is_none")]
91 pub id: Option<String>,
92
93 #[wire(required)]
94 #[cfg_attr(feature = "schema", schemars(extend("x-gproxy-required" = true)))]
95 #[serde(deserialize_with = "super::super::responses::input::required_nullable")]
96 pub call_id: Option<String>,
97 pub status: LocalShellStatus,
98 pub action: LocalShellAction,
99 #[serde(default, skip_serializing_if = "Option::is_none")]
100 pub internal_chat_message_metadata_passthrough: Option<InternalChatMessageMetadataPassthrough>,
101
102 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
103 pub rest: Rest,
104}
105
106#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
107#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
108#[derive(gproxy_protocol_macros::DeclaredFields)]
109#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
110pub struct ClientFunctionCall {
111 #[serde(default, skip_serializing_if = "Option::is_none")]
112 pub id: Option<String>,
113 pub name: String,
114 #[serde(default, skip_serializing_if = "Option::is_none")]
115 pub namespace: Option<String>,
116
117 pub arguments: String,
118 #[serde(default, skip_serializing_if = "Option::is_none")]
119 pub encrypted_function_args: Option<Vec<String>>,
120 pub call_id: String,
121 #[serde(default, skip_serializing_if = "Option::is_none")]
122 pub internal_chat_message_metadata_passthrough: Option<InternalChatMessageMetadataPassthrough>,
123
124 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
125 pub rest: Rest,
126}
127
128#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
129#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
130#[derive(gproxy_protocol_macros::DeclaredFields)]
131#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
132pub struct ClientToolSearchCall {
133 #[serde(default, skip_serializing_if = "Option::is_none")]
134 pub id: Option<String>,
135 #[wire(required)]
136 #[cfg_attr(feature = "schema", schemars(extend("x-gproxy-required" = true)))]
137 #[serde(deserialize_with = "super::super::responses::input::required_nullable")]
138 pub call_id: Option<String>,
139 #[serde(default, skip_serializing_if = "Option::is_none")]
140 pub status: Option<String>,
141 pub execution: String,
142 pub arguments: serde_json::Value,
143 #[serde(default, skip_serializing_if = "Option::is_none")]
144 pub internal_chat_message_metadata_passthrough: Option<InternalChatMessageMetadataPassthrough>,
145
146 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
147 pub rest: Rest,
148}
149
150#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
151#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
152#[derive(gproxy_protocol_macros::DeclaredFields)]
153#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
154pub struct ClientFunctionCallOutput {
155 #[serde(default, skip_serializing_if = "Option::is_none")]
156 pub id: Option<String>,
157 #[serde(default, skip_serializing_if = "Option::is_none")]
158 pub call_id: Option<String>,
159 #[serde(default, skip_serializing_if = "Option::is_none")]
160 pub name: Option<String>,
161 #[serde(default, skip_serializing_if = "Option::is_none")]
162 pub namespace: Option<String>,
163 pub output: FunctionCallOutputBody,
164 #[serde(default, skip_serializing_if = "Option::is_none")]
165 pub internal_chat_message_metadata_passthrough: Option<InternalChatMessageMetadataPassthrough>,
166
167 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
168 pub rest: Rest,
169}
170
171#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
172#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
173#[derive(gproxy_protocol_macros::DeclaredFields)]
174#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
175pub struct ClientCustomToolCall {
176 #[serde(default, skip_serializing_if = "Option::is_none")]
177 pub id: Option<String>,
178 #[serde(default, skip_serializing_if = "Option::is_none")]
179 pub status: Option<String>,
180
181 pub call_id: String,
182 pub name: String,
183 #[serde(default, skip_serializing_if = "Option::is_none")]
184 pub namespace: Option<String>,
185 pub input: String,
186 #[serde(default, skip_serializing_if = "Option::is_none")]
187 pub internal_chat_message_metadata_passthrough: Option<InternalChatMessageMetadataPassthrough>,
188
189 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
190 pub rest: Rest,
191}
192
193#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
194#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
195#[derive(gproxy_protocol_macros::DeclaredFields)]
196#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
197pub struct ClientCustomToolCallOutput {
198 #[serde(default, skip_serializing_if = "Option::is_none")]
199 pub id: Option<String>,
200 pub call_id: String,
201 #[serde(default, skip_serializing_if = "Option::is_none")]
202 pub name: Option<String>,
203 pub output: FunctionCallOutputBody,
204 #[serde(default, skip_serializing_if = "Option::is_none")]
205 pub internal_chat_message_metadata_passthrough: Option<InternalChatMessageMetadataPassthrough>,
206
207 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
208 pub rest: Rest,
209}
210
211#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
212#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
213#[derive(gproxy_protocol_macros::DeclaredFields)]
214#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
215pub struct ClientToolSearchOutput {
216 #[serde(default, skip_serializing_if = "Option::is_none")]
217 pub id: Option<String>,
218 #[wire(required)]
219 #[cfg_attr(feature = "schema", schemars(extend("x-gproxy-required" = true)))]
220 #[serde(deserialize_with = "super::super::responses::input::required_nullable")]
221 pub call_id: Option<String>,
222 pub status: String,
223 pub execution: String,
224 pub tools: Vec<serde_json::Value>,
225 #[serde(default, skip_serializing_if = "Option::is_none")]
226 pub internal_chat_message_metadata_passthrough: Option<InternalChatMessageMetadataPassthrough>,
227
228 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
229 pub rest: Rest,
230}
231
232#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
233#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
234#[derive(gproxy_protocol_macros::DeclaredFields)]
235#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
236pub struct ClientWebSearchCall {
237 #[serde(default, skip_serializing_if = "Option::is_none")]
238 pub id: Option<String>,
239 #[serde(default, skip_serializing_if = "Option::is_none")]
240 pub status: Option<String>,
241 #[serde(default, skip_serializing_if = "Option::is_none")]
242 pub action: Option<WebSearchAction>,
243 #[serde(default, skip_serializing_if = "Option::is_none")]
244 pub internal_chat_message_metadata_passthrough: Option<InternalChatMessageMetadataPassthrough>,
245
246 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
247 pub rest: Rest,
248}
249
250#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
251#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
252#[derive(gproxy_protocol_macros::DeclaredFields)]
253#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
254pub struct ClientImageGenerationCall {
255 #[serde(default, skip_serializing_if = "Option::is_none")]
256 pub id: Option<String>,
257 pub status: String,
258 #[serde(default, skip_serializing_if = "Option::is_none")]
259 pub revised_prompt: Option<String>,
260 pub result: String,
261 #[serde(default, skip_serializing_if = "Option::is_none")]
262 pub internal_chat_message_metadata_passthrough: Option<InternalChatMessageMetadataPassthrough>,
263
264 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
265 pub rest: Rest,
266}
267
268#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
269#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
270#[derive(gproxy_protocol_macros::DeclaredFields)]
271#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
272pub struct ClientCompaction {
273 #[serde(default, skip_serializing_if = "Option::is_none")]
274 pub id: Option<String>,
275 pub encrypted_content: String,
276 #[serde(default, skip_serializing_if = "Option::is_none")]
277 pub internal_chat_message_metadata_passthrough: Option<InternalChatMessageMetadataPassthrough>,
278
279 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
280 pub rest: Rest,
281}
282
283#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
284#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
285#[derive(gproxy_protocol_macros::DeclaredFields)]
286#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
287pub struct ClientConfigurationUpdate {
288 pub reasoning: ConfigurationReasoning,
289
290 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
291 pub rest: Rest,
292}
293
294#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
295#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
296#[derive(gproxy_protocol_macros::DeclaredFields)]
297#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
298pub struct ClientCompactionTrigger {
299 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
300 pub rest: Rest,
301}
302
303#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
304#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
305#[derive(gproxy_protocol_macros::DeclaredFields)]
306#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
307pub struct ClientContextCompaction {
308 #[serde(default, skip_serializing_if = "Option::is_none")]
309 pub id: Option<String>,
310 #[serde(default, skip_serializing_if = "Option::is_none")]
311 pub encrypted_content: Option<String>,
312 #[serde(default, skip_serializing_if = "Option::is_none")]
313 pub internal_chat_message_metadata_passthrough: Option<InternalChatMessageMetadataPassthrough>,
314
315 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
316 pub rest: Rest,
317}
318
319#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
320#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
321#[derive(gproxy_protocol_macros::DeclaredFields)]
322#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
323pub struct ResponseItemOther {
324 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
325 pub rest: Rest,
326}
327
328#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
329#[serde(tag = "type", rename_all = "snake_case")]
330#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
331#[derive(gproxy_protocol_macros::DeclaredFields)]
332#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
333pub enum ClientResponseItem {
334 AdditionalTools(ClientAdditionalTools),
335 Message(ClientMessage),
336 AgentMessage(ClientAgentMessage),
337 Reasoning(ClientReasoning),
338 LocalShellCall(ClientLocalShellCall),
339 FunctionCall(ClientFunctionCall),
340 ToolSearchCall(ClientToolSearchCall),
341 FunctionCallOutput(ClientFunctionCallOutput),
342 CustomToolCall(ClientCustomToolCall),
343 CustomToolCallOutput(ClientCustomToolCallOutput),
344 ToolSearchOutput(ClientToolSearchOutput),
345 WebSearchCall(ClientWebSearchCall),
346 ImageGenerationCall(ClientImageGenerationCall),
347 #[serde(alias = "compaction_summary")]
348 Compaction(ClientCompaction),
349 ConfigurationUpdate(ClientConfigurationUpdate),
350 CompactionTrigger(ClientCompactionTrigger),
351 ContextCompaction(ClientContextCompaction),
352 Other(ResponseItemOther),
353}
354
355#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
356#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
357#[derive(gproxy_protocol_macros::DeclaredFields)]
358#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
359pub struct ContentItemInputText {
360 pub text: String,
361
362 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
363 pub rest: Rest,
364}
365
366#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
367#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
368#[derive(gproxy_protocol_macros::DeclaredFields)]
369#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
370pub struct ContentItemInputImage {
371 pub image_url: String,
372 #[serde(default, skip_serializing_if = "Option::is_none")]
373 pub detail: Option<ImageDetail>,
374
375 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
376 pub rest: Rest,
377}
378
379#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
380#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
381#[derive(gproxy_protocol_macros::DeclaredFields)]
382#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
383pub struct ContentItemInputAudio {
384 pub audio_url: String,
385
386 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
387 pub rest: Rest,
388}
389
390#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
391#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
392#[derive(gproxy_protocol_macros::DeclaredFields)]
393#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
394pub struct ContentItemOutputText {
395 pub text: String,
396
397 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
398 pub rest: Rest,
399}
400
401#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
402#[serde(tag = "type", rename_all = "snake_case")]
403#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
404#[derive(gproxy_protocol_macros::DeclaredFields)]
405#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
406pub enum ContentItem {
407 InputText(ContentItemInputText),
408 InputImage(ContentItemInputImage),
409 InputAudio(ContentItemInputAudio),
410 OutputText(ContentItemOutputText),
411}
412
413#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
414#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
415#[derive(gproxy_protocol_macros::DeclaredFields)]
416#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
417pub struct AgentMessageInputContentInputText {
418 pub text: String,
419 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
420 pub rest: Rest,
421}
422
423#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
424#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
425#[derive(gproxy_protocol_macros::DeclaredFields)]
426#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
427pub struct AgentMessageInputContentEncryptedContent {
428 pub encrypted_content: String,
429 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
430 pub rest: Rest,
431}
432
433#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
434#[serde(tag = "type", rename_all = "snake_case")]
435#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
436#[derive(gproxy_protocol_macros::DeclaredFields)]
437#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
438pub enum AgentMessageInputContent {
439 InputText(AgentMessageInputContentInputText),
440 EncryptedContent(AgentMessageInputContentEncryptedContent),
441}
442
443#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
444#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
445#[derive(gproxy_protocol_macros::DeclaredFields)]
446#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
447pub struct WebSearchActionSearch {
448 #[serde(default, skip_serializing_if = "Option::is_none")]
449 pub query: Option<String>,
450 #[serde(default, skip_serializing_if = "Option::is_none")]
451 pub queries: Option<Vec<String>>,
452
453 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
454 pub rest: Rest,
455}
456
457#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
458#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
459#[derive(gproxy_protocol_macros::DeclaredFields)]
460#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
461pub struct WebSearchActionOpenPage {
462 #[serde(default, skip_serializing_if = "Option::is_none")]
463 pub url: Option<String>,
464
465 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
466 pub rest: Rest,
467}
468
469#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
470#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
471#[derive(gproxy_protocol_macros::DeclaredFields)]
472#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
473pub struct WebSearchActionFindInPage {
474 #[serde(default, skip_serializing_if = "Option::is_none")]
475 pub url: Option<String>,
476 #[serde(default, skip_serializing_if = "Option::is_none")]
477 pub pattern: Option<String>,
478
479 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
480 pub rest: Rest,
481}
482
483#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
484#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
485#[derive(gproxy_protocol_macros::DeclaredFields)]
486#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
487pub struct WebSearchActionOther {
488 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
489 pub rest: Rest,
490}
491
492#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
493#[serde(tag = "type", rename_all = "snake_case")]
494#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
495#[derive(gproxy_protocol_macros::DeclaredFields)]
496#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
497pub enum WebSearchAction {
498 Search(WebSearchActionSearch),
499 OpenPage(WebSearchActionOpenPage),
500 FindInPage(WebSearchActionFindInPage),
501 Other(WebSearchActionOther),
502}
503
504#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
505#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
506#[derive(gproxy_protocol_macros::DeclaredFields)]
507#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
508pub struct ReasoningItemReasoningSummarySummaryText {
509 pub text: String,
510 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
511 pub rest: Rest,
512}
513
514#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
515#[serde(tag = "type", rename_all = "snake_case")]
516#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
517#[derive(gproxy_protocol_macros::DeclaredFields)]
518#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
519pub enum ReasoningItemReasoningSummary {
520 SummaryText(ReasoningItemReasoningSummarySummaryText),
521}
522
523#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
524#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
525#[derive(gproxy_protocol_macros::DeclaredFields)]
526#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
527pub struct ReasoningItemContentReasoningText {
528 pub text: String,
529 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
530 pub rest: Rest,
531}
532
533#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
534#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
535#[derive(gproxy_protocol_macros::DeclaredFields)]
536#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
537pub struct ReasoningItemContentText {
538 pub text: String,
539 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
540 pub rest: Rest,
541}
542
543#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
544#[serde(tag = "type", rename_all = "snake_case")]
545#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
546#[derive(gproxy_protocol_macros::DeclaredFields)]
547#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
548pub enum ReasoningItemContent {
549 ReasoningText(ReasoningItemContentReasoningText),
550 Text(ReasoningItemContentText),
551}
552
553#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
554#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
555#[derive(gproxy_protocol_macros::DeclaredFields)]
556#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
557pub struct FunctionCallOutputContentItemInputText {
558 pub text: String,
559
560 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
561 pub rest: Rest,
562}
563
564#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
565#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
566#[derive(gproxy_protocol_macros::DeclaredFields)]
567#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
568pub struct FunctionCallOutputContentItemInputImage {
569 pub image_url: String,
570 #[serde(default, skip_serializing_if = "Option::is_none")]
571 pub detail: Option<ImageDetail>,
572
573 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
574 pub rest: Rest,
575}
576
577#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
578#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
579#[derive(gproxy_protocol_macros::DeclaredFields)]
580#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
581pub struct FunctionCallOutputContentItemInputAudio {
582 pub audio_url: String,
583
584 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
585 pub rest: Rest,
586}
587
588#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
589#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
590#[derive(gproxy_protocol_macros::DeclaredFields)]
591#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
592pub struct FunctionCallOutputContentItemEncryptedContent {
593 pub encrypted_content: String,
594
595 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
596 pub rest: Rest,
597}
598
599#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
600#[serde(tag = "type", rename_all = "snake_case")]
601#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
602#[derive(gproxy_protocol_macros::DeclaredFields)]
603#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
604pub enum FunctionCallOutputContentItem {
605 InputText(FunctionCallOutputContentItemInputText),
606 InputImage(FunctionCallOutputContentItemInputImage),
607 InputAudio(FunctionCallOutputContentItemInputAudio),
608 EncryptedContent(FunctionCallOutputContentItemEncryptedContent),
609}
610
611#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
612#[serde(rename_all = "snake_case")]
613#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
614#[derive(gproxy_protocol_macros::DeclaredFields)]
615#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
616pub enum ImageDetail {
617 Auto,
618 Low,
619 High,
620 Original,
621}
622
623#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
624#[serde(rename_all = "snake_case")]
625#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
626#[derive(gproxy_protocol_macros::DeclaredFields)]
627#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
628pub enum MessagePhase {
629 Commentary,
630
631 FinalAnswer,
632}
633
634#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
635#[serde(rename_all = "snake_case")]
636#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
637#[derive(gproxy_protocol_macros::DeclaredFields)]
638#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
639pub enum LocalShellStatus {
640 Completed,
641 InProgress,
642 Incomplete,
643}
644
645#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
646#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
647#[derive(gproxy_protocol_macros::DeclaredFields)]
648#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
649pub struct LocalShellExecAction {
650 pub command: Vec<String>,
651 #[wire(required)]
652 #[cfg_attr(feature = "schema", schemars(extend("x-gproxy-required" = true)))]
653 #[serde(deserialize_with = "super::super::responses::input::required_nullable")]
654 pub timeout_ms: Option<u64>,
655 #[wire(required)]
656 #[cfg_attr(feature = "schema", schemars(extend("x-gproxy-required" = true)))]
657 #[serde(deserialize_with = "super::super::responses::input::required_nullable")]
658 pub working_directory: Option<String>,
659 #[wire(required)]
660 #[cfg_attr(feature = "schema", schemars(extend("x-gproxy-required" = true)))]
661 #[serde(deserialize_with = "super::super::responses::input::required_nullable")]
662 pub env: Option<BTreeMap<String, String>>,
663 #[wire(required)]
664 #[cfg_attr(feature = "schema", schemars(extend("x-gproxy-required" = true)))]
665 #[serde(deserialize_with = "super::super::responses::input::required_nullable")]
666 pub user: Option<String>,
667
668 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
669 pub rest: Rest,
670}
671
672#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
673#[serde(tag = "type", rename_all = "snake_case")]
674#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
675#[derive(gproxy_protocol_macros::DeclaredFields)]
676#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
677pub enum LocalShellAction {
678 Exec(LocalShellExecAction),
679}
680
681#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
682#[serde(untagged)]
683#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
684#[derive(gproxy_protocol_macros::DeclaredFields)]
685#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
686pub enum FunctionCallOutputBody {
687 Text(String),
688 ContentItems(Vec<FunctionCallOutputContentItem>),
689}
690
691#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
692#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
693#[derive(gproxy_protocol_macros::DeclaredFields)]
694#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
695pub struct ConfigurationReasoning {
696 pub effort: String,
697 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
698 pub rest: Rest,
699}
700
701#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
702#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
703#[derive(gproxy_protocol_macros::DeclaredFields)]
704#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
705pub struct InternalChatMessageMetadataPassthrough {
706 #[serde(skip_serializing_if = "Option::is_none")]
707 pub turn_id: Option<String>,
708 #[serde(skip_serializing_if = "Option::is_none")]
709 pub create_time: Option<serde_json::Number>,
710 #[serde(skip_serializing_if = "Option::is_none")]
711 pub content_item_kinds: Option<Vec<String>>,
712 #[serde(skip_serializing_if = "Option::is_none")]
713 pub cell_id: Option<String>,
714 #[serde(skip_serializing_if = "Option::is_none")]
715 pub executed_tool_calls: Option<Vec<ExecutedToolCall>>,
716 #[serde(skip_serializing_if = "Option::is_none")]
717 pub tool_calls_complete: Option<bool>,
718 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
719 pub rest: Rest,
720}
721
722#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
723#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
724#[derive(gproxy_protocol_macros::DeclaredFields)]
725#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
726pub struct ExecutedToolCall {
727 pub name: String,
728 pub arguments: serde_json::Value,
729 #[serde(skip_serializing_if = "Option::is_none")]
730 pub tool_result_sources: Option<ToolResultSources>,
731 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
732 pub rest: Rest,
733}
734
735#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
736#[serde(untagged)]
737#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
738#[derive(gproxy_protocol_macros::DeclaredFields)]
739#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
740pub enum ToolResultSources {
741 Sources(Vec<ToolResultSource>),
742 ParseFailed(ParseFailed),
743}
744
745#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
746#[serde(rename_all = "snake_case")]
747#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
748#[derive(gproxy_protocol_macros::DeclaredFields)]
749#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
750pub enum ParseFailed {
751 ParseFailed,
752}
753
754#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
755#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
756#[derive(gproxy_protocol_macros::DeclaredFields)]
757#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
758pub struct ToolResultSource {
759 #[serde(rename = "type")]
760 pub type_: String,
761 pub id: String,
762 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
763 pub rest: Rest,
764}
765
766#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
767#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
768#[derive(gproxy_protocol_macros::DeclaredFields)]
769#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
770pub struct Reasoning {
771 #[serde(skip_serializing_if = "Option::is_none")]
772 pub effort: Option<String>,
773 #[serde(skip_serializing_if = "Option::is_none")]
774 pub summary: Option<ReasoningSummary>,
775 #[serde(skip_serializing_if = "Option::is_none")]
776 pub context: Option<ReasoningContext>,
777 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
778 pub rest: Rest,
779}
780
781#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
782#[serde(rename_all = "snake_case")]
783#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
784#[derive(gproxy_protocol_macros::DeclaredFields)]
785#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
786pub enum ReasoningSummary {
787 Auto,
788 Concise,
789 Detailed,
790 None,
791}
792
793#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
794#[serde(rename_all = "snake_case")]
795#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
796#[derive(gproxy_protocol_macros::DeclaredFields)]
797#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
798pub enum ReasoningContext {
799 Auto,
800 CurrentTurn,
801 AllTurns,
802}
803
804#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
805#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
806#[derive(gproxy_protocol_macros::DeclaredFields)]
807#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
808pub struct ClientTextControls {
809 #[serde(skip_serializing_if = "Option::is_none")]
810 pub verbosity: Option<ClientVerbosity>,
811 #[serde(skip_serializing_if = "Option::is_none")]
812 pub format: Option<ClientTextFormat>,
813 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
814 pub rest: Rest,
815}
816
817#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
818#[serde(rename_all = "snake_case")]
819#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
820#[derive(gproxy_protocol_macros::DeclaredFields)]
821#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
822pub enum ClientVerbosity {
823 Low,
824 Medium,
825 High,
826}
827
828#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
829#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
830#[derive(gproxy_protocol_macros::DeclaredFields)]
831#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
832pub struct ClientTextFormat {
833 #[serde(rename = "type")]
834 pub type_: ClientTextFormatType,
835 pub strict: bool,
836 pub schema: serde_json::Value,
837 pub name: String,
838 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
839 pub rest: Rest,
840}
841
842#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
843#[serde(rename_all = "snake_case")]
844#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
845#[derive(gproxy_protocol_macros::DeclaredFields)]
846#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
847pub enum ClientTextFormatType {
848 JsonSchema,
849}
850
851#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
852#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
853#[derive(gproxy_protocol_macros::DeclaredFields)]
854#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
855pub struct AccessPrograms {
856 pub cyber: CyberAccessProgram,
857 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
858 pub rest: Rest,
859}
860
861pub use super::super::responses::CyberAccessProgram;