1use super::stream::{
2 ResponseAudioDeltaEvent, ResponseAudioDoneEvent, ResponseAudioTranscriptDeltaEvent,
3 ResponseAudioTranscriptDoneEvent, ResponseCodeInterpreterCallCodeDeltaEvent,
4 ResponseCodeInterpreterCallCodeDoneEvent, ResponseCodeInterpreterCallCompletedEvent,
5 ResponseCodeInterpreterCallInProgressEvent, ResponseCodeInterpreterCallInterpretingEvent,
6 ResponseCompletedEvent, ResponseContentPartAddedEvent, ResponseContentPartDoneEvent,
7 ResponseCreatedEvent, ResponseCustomToolCallInputDeltaEvent,
8 ResponseCustomToolCallInputDoneEvent, ResponseFailedEvent,
9 ResponseFileSearchCallCompletedEvent, ResponseFileSearchCallInProgressEvent,
10 ResponseFileSearchCallSearchingEvent, ResponseFunctionCallArgumentsDeltaEvent,
11 ResponseFunctionCallArgumentsDoneEvent, ResponseImageGenCallCompletedEvent,
12 ResponseImageGenCallGeneratingEvent, ResponseImageGenCallInProgressEvent,
13 ResponseImageGenCallPartialImageEvent, ResponseInProgressEvent, ResponseIncompleteEvent,
14 ResponseMCPCallArgumentsDeltaEvent, ResponseMCPCallArgumentsDoneEvent,
15 ResponseMCPCallCompletedEvent, ResponseMCPCallFailedEvent, ResponseMCPCallInProgressEvent,
16 ResponseMCPListToolsCompletedEvent, ResponseMCPListToolsFailedEvent,
17 ResponseMCPListToolsInProgressEvent, ResponseOutputItemAddedEvent, ResponseOutputItemDoneEvent,
18 ResponseOutputTextAnnotationAddedEvent, ResponseQueuedEvent,
19 ResponseReasoningSummaryPartAddedEvent, ResponseReasoningSummaryPartDoneEvent,
20 ResponseReasoningSummaryTextDeltaEvent, ResponseReasoningSummaryTextDoneEvent,
21 ResponseReasoningTextDeltaEvent, ResponseReasoningTextDoneEvent, ResponseRefusalDeltaEvent,
22 ResponseRefusalDoneEvent, ResponseShellCallCommandAddedStreamingEvent,
23 ResponseShellCallCommandDeltaStreamingEvent, ResponseShellCallCommandDoneStreamingEvent,
24 ResponseShellCallOutputContentDeltaStreamingEvent,
25 ResponseShellCallOutputContentDoneStreamingEvent, ResponseTextDeltaEvent,
26 ResponseTextDoneEvent, ResponseWebSearchCallCompletedEvent,
27 ResponseWebSearchCallInProgressEvent, ResponseWebSearchCallSearchingEvent,
28};
29use super::{CreateResponse, FunctionCallOutputItemParam, MisalignmentErrorDetailsResource};
30use serde::{Deserialize, Serialize};
31
32#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
34#[serde(tag = "type")]
35pub enum ResponsesClientEvent {
36 #[serde(rename = "response.create")]
37 Create(Box<ResponsesClientEventResponseCreate>),
38 #[serde(rename = "response.steer")]
39 Steer(ResponseSteerEvent),
40}
41
42#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
50pub struct ResponsesClientEventResponseCreate {
51 #[serde(skip_serializing_if = "Option::is_none")]
58 pub stream_id: Option<String>,
59 #[serde(flatten)]
60 pub response: CreateResponse,
61 #[serde(skip_serializing_if = "Option::is_none")]
65 pub generate: Option<bool>,
66}
67
68#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
70#[serde(tag = "type")]
71pub enum ResponsesServerEvent {
72 #[serde(rename = "response.compaction.compacting")]
73 CompactionCompacting(ResponseCompactionWsCompacting),
74 #[serde(rename = "response.audio.delta")]
76 ResponseAudioDelta(ResponseAudioWsDelta),
77 #[serde(rename = "response.audio.done")]
79 ResponseAudioDone(ResponseAudioWsDone),
80 #[serde(rename = "response.audio.transcript.delta")]
82 ResponseAudioTranscriptDelta(ResponseAudioTranscriptWsDelta),
83 #[serde(rename = "response.audio.transcript.done")]
85 ResponseAudioTranscriptDone(ResponseAudioTranscriptWsDone),
86 #[serde(rename = "response.code_interpreter_call_code.delta")]
88 ResponseCodeInterpreterCallCodeDelta(ResponseCodeInterpreterCallCodeWsDelta),
89 #[serde(rename = "response.code_interpreter_call_code.done")]
91 ResponseCodeInterpreterCallCodeDone(ResponseCodeInterpreterCallCodeWsDone),
92 #[serde(rename = "response.code_interpreter_call.completed")]
94 ResponseCodeInterpreterCallCompleted(ResponseCodeInterpreterCallWsCompleted),
95 #[serde(rename = "response.code_interpreter_call.in_progress")]
97 ResponseCodeInterpreterCallInProgress(ResponseCodeInterpreterCallInWsProgress),
98 #[serde(rename = "response.code_interpreter_call.interpreting")]
100 ResponseCodeInterpreterCallInterpreting(ResponseCodeInterpreterCallWsInterpreting),
101 #[serde(rename = "response.completed")]
103 ResponseCompleted(ResponseWsCompleted),
104 #[serde(rename = "response.content_part.added")]
106 ResponseContentPartAdded(ResponseContentPartWsAdded),
107 #[serde(rename = "response.content_part.done")]
109 ResponseContentPartDone(ResponseContentPartWsDone),
110 #[serde(rename = "response.created")]
112 ResponseCreated(ResponseWsCreated),
113 #[serde(rename = "response.file_search_call.completed")]
115 ResponseFileSearchCallCompleted(ResponseFileSearchCallWsCompleted),
116 #[serde(rename = "response.file_search_call.in_progress")]
118 ResponseFileSearchCallInProgress(ResponseFileSearchCallInWsProgress),
119 #[serde(rename = "response.file_search_call.searching")]
121 ResponseFileSearchCallSearching(ResponseFileSearchCallWsSearching),
122 #[serde(rename = "response.function_call_arguments.delta")]
124 ResponseFunctionCallArgumentsDelta(ResponseFunctionCallArgumentsWsDelta),
125 #[serde(rename = "response.function_call_arguments.done")]
127 ResponseFunctionCallArgumentsDone(ResponseFunctionCallArgumentsWsDone),
128 #[serde(rename = "response.shell_call_command.added")]
130 ResponseShellCallCommandAdded(ResponseShellCallCommandWsAdded),
131 #[serde(rename = "response.shell_call_command.delta")]
133 ResponseShellCallCommandDelta(ResponseShellCallCommandWsDelta),
134 #[serde(rename = "response.shell_call_command.done")]
136 ResponseShellCallCommandDone(ResponseShellCallCommandWsDone),
137 #[serde(rename = "response.shell_call_output_content.delta")]
139 ResponseShellCallOutputContentDelta(ResponseShellCallOutputContentWsDelta),
140 #[serde(rename = "response.shell_call_output_content.done")]
142 ResponseShellCallOutputContentDone(ResponseShellCallOutputContentWsDone),
143 #[serde(rename = "response.in_progress")]
145 ResponseInProgress(ResponseInWsProgress),
146 #[serde(rename = "response.failed")]
148 ResponseFailed(ResponseWsFailed),
149 #[serde(rename = "response.incomplete")]
155 ResponseIncomplete(ResponseWsIncomplete),
156 #[serde(rename = "response.output_item.added")]
158 ResponseOutputItemAdded(ResponseOutputItemWsAdded),
159 #[serde(rename = "response.output_item.done")]
161 ResponseOutputItemDone(ResponseOutputItemWsDone),
162 #[serde(rename = "response.reasoning_summary_part.added")]
164 ResponseReasoningSummaryPartAdded(ResponseReasoningSummaryPartWsAdded),
165 #[serde(rename = "response.reasoning_summary_part.done")]
167 ResponseReasoningSummaryPartDone(ResponseReasoningSummaryPartWsDone),
168 #[serde(rename = "response.reasoning_summary_text.delta")]
170 ResponseReasoningSummaryTextDelta(ResponseReasoningSummaryTextWsDelta),
171 #[serde(rename = "response.reasoning_summary_text.done")]
173 ResponseReasoningSummaryTextDone(ResponseReasoningSummaryTextWsDone),
174 #[serde(rename = "response.reasoning_text.delta")]
176 ResponseReasoningTextDelta(ResponseReasoningTextWsDelta),
177 #[serde(rename = "response.reasoning_text.done")]
179 ResponseReasoningTextDone(ResponseReasoningTextWsDone),
180 #[serde(rename = "response.refusal.delta")]
182 ResponseRefusalDelta(ResponseRefusalWsDelta),
183 #[serde(rename = "response.refusal.done")]
185 ResponseRefusalDone(ResponseRefusalWsDone),
186 #[serde(rename = "response.output_text.delta")]
188 ResponseOutputTextDelta(ResponseTextWsDelta),
189 #[serde(rename = "response.output_text.done")]
191 ResponseOutputTextDone(ResponseTextWsDone),
192 #[serde(rename = "response.web_search_call.completed")]
194 ResponseWebSearchCallCompleted(ResponseWebSearchCallWsCompleted),
195 #[serde(rename = "response.web_search_call.in_progress")]
197 ResponseWebSearchCallInProgress(ResponseWebSearchCallInWsProgress),
198 #[serde(rename = "response.web_search_call.searching")]
200 ResponseWebSearchCallSearching(ResponseWebSearchCallWsSearching),
201 #[serde(rename = "response.image_generation_call.completed")]
203 ResponseImageGenerationCallCompleted(ResponseImageGenCallWsCompleted),
204 #[serde(rename = "response.image_generation_call.generating")]
207 ResponseImageGenerationCallGenerating(ResponseImageGenCallWsGenerating),
208 #[serde(rename = "response.image_generation_call.in_progress")]
210 ResponseImageGenerationCallInProgress(ResponseImageGenCallInWsProgress),
211 #[serde(rename = "response.image_generation_call.partial_image")]
213 ResponseImageGenerationCallPartialImage(ResponseImageGenCallPartialWsImage),
214 #[serde(rename = "response.mcp_call_arguments.delta")]
216 ResponseMCPCallArgumentsDelta(ResponseMcpCallArgumentsWsDelta),
217 #[serde(rename = "response.mcp_call_arguments.done")]
219 ResponseMCPCallArgumentsDone(ResponseMcpCallArgumentsWsDone),
220 #[serde(rename = "response.mcp_call.completed")]
222 ResponseMCPCallCompleted(ResponseMcpCallWsCompleted),
223 #[serde(rename = "response.mcp_call.failed")]
225 ResponseMCPCallFailed(ResponseMcpCallWsFailed),
226 #[serde(rename = "response.mcp_call.in_progress")]
228 ResponseMCPCallInProgress(ResponseMcpCallInWsProgress),
229 #[serde(rename = "response.mcp_list_tools.completed")]
231 ResponseMCPListToolsCompleted(ResponseMcpListToolsWsCompleted),
232 #[serde(rename = "response.mcp_list_tools.failed")]
234 ResponseMCPListToolsFailed(ResponseMcpListToolsWsFailed),
235 #[serde(rename = "response.mcp_list_tools.in_progress")]
237 ResponseMCPListToolsInProgress(ResponseMcpListToolsInWsProgress),
238 #[serde(rename = "response.output_text.annotation.added")]
240 ResponseOutputTextAnnotationAdded(ResponseOutputTextAnnotationWsAdded),
241 #[serde(rename = "response.queued")]
243 ResponseQueued(ResponseWsQueued),
244 #[serde(rename = "response.custom_tool_call_input.delta")]
246 ResponseCustomToolCallInputDelta(ResponseCustomToolCallInputWsDelta),
247 #[serde(rename = "response.custom_tool_call_input.done")]
249 ResponseCustomToolCallInputDone(ResponseCustomToolCallInputWsDone),
250 #[serde(rename = "error")]
251 Error(ResponseWsError),
252 #[serde(rename = "response.steer.accepted")]
253 SteerAccepted(ResponseSteerAcceptedEvent),
254 #[serde(rename = "response.steer.pending")]
255 SteerPending(ResponseSteerPendingEvent),
256 #[serde(rename = "response.steer.failed")]
257 SteerFailed(ResponseSteerFailedEvent),
258}
259
260#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
262pub struct ResponseAudioWsDelta {
263 #[serde(flatten)]
264 pub event: ResponseAudioDeltaEvent,
265 #[serde(skip_serializing_if = "Option::is_none")]
268 pub stream_id: Option<String>,
269}
270
271#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
273pub struct ResponseAudioWsDone {
274 #[serde(flatten)]
275 pub event: ResponseAudioDoneEvent,
276 #[serde(skip_serializing_if = "Option::is_none")]
279 pub stream_id: Option<String>,
280}
281
282#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
284pub struct ResponseAudioTranscriptWsDelta {
285 #[serde(flatten)]
286 pub event: ResponseAudioTranscriptDeltaEvent,
287 #[serde(skip_serializing_if = "Option::is_none")]
290 pub stream_id: Option<String>,
291}
292
293#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
295pub struct ResponseAudioTranscriptWsDone {
296 #[serde(flatten)]
297 pub event: ResponseAudioTranscriptDoneEvent,
298 #[serde(skip_serializing_if = "Option::is_none")]
301 pub stream_id: Option<String>,
302}
303
304#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
306pub struct ResponseCodeInterpreterCallCodeWsDelta {
307 #[serde(flatten)]
308 pub event: ResponseCodeInterpreterCallCodeDeltaEvent,
309 #[serde(skip_serializing_if = "Option::is_none")]
312 pub stream_id: Option<String>,
313}
314
315#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
317pub struct ResponseCodeInterpreterCallCodeWsDone {
318 #[serde(flatten)]
319 pub event: ResponseCodeInterpreterCallCodeDoneEvent,
320 #[serde(skip_serializing_if = "Option::is_none")]
323 pub stream_id: Option<String>,
324}
325
326#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
328pub struct ResponseCodeInterpreterCallWsCompleted {
329 #[serde(flatten)]
330 pub event: ResponseCodeInterpreterCallCompletedEvent,
331 #[serde(skip_serializing_if = "Option::is_none")]
334 pub stream_id: Option<String>,
335}
336
337#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
339pub struct ResponseCodeInterpreterCallInWsProgress {
340 #[serde(flatten)]
341 pub event: ResponseCodeInterpreterCallInProgressEvent,
342 #[serde(skip_serializing_if = "Option::is_none")]
345 pub stream_id: Option<String>,
346}
347
348#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
350pub struct ResponseCodeInterpreterCallWsInterpreting {
351 #[serde(flatten)]
352 pub event: ResponseCodeInterpreterCallInterpretingEvent,
353 #[serde(skip_serializing_if = "Option::is_none")]
356 pub stream_id: Option<String>,
357}
358
359#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
361pub struct ResponseWsCompleted {
362 #[serde(flatten)]
363 pub event: ResponseCompletedEvent,
364 #[serde(skip_serializing_if = "Option::is_none")]
367 pub stream_id: Option<String>,
368}
369
370#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
372pub struct ResponseContentPartWsAdded {
373 #[serde(flatten)]
374 pub event: ResponseContentPartAddedEvent,
375 #[serde(skip_serializing_if = "Option::is_none")]
378 pub stream_id: Option<String>,
379}
380
381#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
383pub struct ResponseContentPartWsDone {
384 #[serde(flatten)]
385 pub event: ResponseContentPartDoneEvent,
386 #[serde(skip_serializing_if = "Option::is_none")]
389 pub stream_id: Option<String>,
390}
391
392#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
394pub struct ResponseWsCreated {
395 #[serde(flatten)]
396 pub event: ResponseCreatedEvent,
397 #[serde(skip_serializing_if = "Option::is_none")]
400 pub stream_id: Option<String>,
401}
402
403#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
405pub struct ResponseFileSearchCallWsCompleted {
406 #[serde(flatten)]
407 pub event: ResponseFileSearchCallCompletedEvent,
408 #[serde(skip_serializing_if = "Option::is_none")]
411 pub stream_id: Option<String>,
412}
413
414#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
416pub struct ResponseFileSearchCallInWsProgress {
417 #[serde(flatten)]
418 pub event: ResponseFileSearchCallInProgressEvent,
419 #[serde(skip_serializing_if = "Option::is_none")]
422 pub stream_id: Option<String>,
423}
424
425#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
427pub struct ResponseFileSearchCallWsSearching {
428 #[serde(flatten)]
429 pub event: ResponseFileSearchCallSearchingEvent,
430 #[serde(skip_serializing_if = "Option::is_none")]
433 pub stream_id: Option<String>,
434}
435
436#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
438pub struct ResponseFunctionCallArgumentsWsDelta {
439 #[serde(flatten)]
440 pub event: ResponseFunctionCallArgumentsDeltaEvent,
441 #[serde(skip_serializing_if = "Option::is_none")]
444 pub stream_id: Option<String>,
445}
446
447#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
449pub struct ResponseFunctionCallArgumentsWsDone {
450 #[serde(flatten)]
451 pub event: ResponseFunctionCallArgumentsDoneEvent,
452 #[serde(skip_serializing_if = "Option::is_none")]
455 pub stream_id: Option<String>,
456}
457
458#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
460pub struct ResponseShellCallCommandWsAdded {
461 #[serde(flatten)]
462 pub event: ResponseShellCallCommandAddedStreamingEvent,
463 #[serde(skip_serializing_if = "Option::is_none")]
466 pub stream_id: Option<String>,
467}
468
469#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
471pub struct ResponseShellCallCommandWsDelta {
472 #[serde(flatten)]
473 pub event: ResponseShellCallCommandDeltaStreamingEvent,
474 #[serde(skip_serializing_if = "Option::is_none")]
477 pub stream_id: Option<String>,
478}
479
480#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
482pub struct ResponseShellCallCommandWsDone {
483 #[serde(flatten)]
484 pub event: ResponseShellCallCommandDoneStreamingEvent,
485 #[serde(skip_serializing_if = "Option::is_none")]
488 pub stream_id: Option<String>,
489}
490
491#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
493pub struct ResponseShellCallOutputContentWsDelta {
494 #[serde(flatten)]
495 pub event: ResponseShellCallOutputContentDeltaStreamingEvent,
496 #[serde(skip_serializing_if = "Option::is_none")]
499 pub stream_id: Option<String>,
500}
501
502#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
504pub struct ResponseShellCallOutputContentWsDone {
505 #[serde(flatten)]
506 pub event: ResponseShellCallOutputContentDoneStreamingEvent,
507 #[serde(skip_serializing_if = "Option::is_none")]
510 pub stream_id: Option<String>,
511}
512
513#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
515pub struct ResponseInWsProgress {
516 #[serde(flatten)]
517 pub event: ResponseInProgressEvent,
518 #[serde(skip_serializing_if = "Option::is_none")]
521 pub stream_id: Option<String>,
522}
523
524#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
526pub struct ResponseWsFailed {
527 #[serde(flatten)]
528 pub event: ResponseFailedEvent,
529 #[serde(skip_serializing_if = "Option::is_none")]
532 pub stream_id: Option<String>,
533}
534
535#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
541pub struct ResponseWsIncomplete {
542 #[serde(flatten)]
543 pub event: ResponseIncompleteEvent,
544 #[serde(skip_serializing_if = "Option::is_none")]
547 pub stream_id: Option<String>,
548}
549
550#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
552pub struct ResponseOutputItemWsAdded {
553 #[serde(flatten)]
554 pub event: ResponseOutputItemAddedEvent,
555 #[serde(skip_serializing_if = "Option::is_none")]
558 pub stream_id: Option<String>,
559}
560
561#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
563pub struct ResponseOutputItemWsDone {
564 #[serde(flatten)]
565 pub event: ResponseOutputItemDoneEvent,
566 #[serde(skip_serializing_if = "Option::is_none")]
569 pub stream_id: Option<String>,
570}
571
572#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
574pub struct ResponseReasoningSummaryPartWsAdded {
575 #[serde(flatten)]
576 pub event: ResponseReasoningSummaryPartAddedEvent,
577 #[serde(skip_serializing_if = "Option::is_none")]
580 pub stream_id: Option<String>,
581}
582
583#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
585pub struct ResponseReasoningSummaryPartWsDone {
586 #[serde(flatten)]
587 pub event: ResponseReasoningSummaryPartDoneEvent,
588 #[serde(skip_serializing_if = "Option::is_none")]
591 pub stream_id: Option<String>,
592}
593
594#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
596pub struct ResponseReasoningSummaryTextWsDelta {
597 #[serde(flatten)]
598 pub event: ResponseReasoningSummaryTextDeltaEvent,
599 #[serde(skip_serializing_if = "Option::is_none")]
602 pub stream_id: Option<String>,
603}
604
605#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
607pub struct ResponseReasoningSummaryTextWsDone {
608 #[serde(flatten)]
609 pub event: ResponseReasoningSummaryTextDoneEvent,
610 #[serde(skip_serializing_if = "Option::is_none")]
613 pub stream_id: Option<String>,
614}
615
616#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
618pub struct ResponseReasoningTextWsDelta {
619 #[serde(flatten)]
620 pub event: ResponseReasoningTextDeltaEvent,
621 #[serde(skip_serializing_if = "Option::is_none")]
624 pub stream_id: Option<String>,
625}
626
627#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
629pub struct ResponseReasoningTextWsDone {
630 #[serde(flatten)]
631 pub event: ResponseReasoningTextDoneEvent,
632 #[serde(skip_serializing_if = "Option::is_none")]
635 pub stream_id: Option<String>,
636}
637
638#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
640pub struct ResponseRefusalWsDelta {
641 #[serde(flatten)]
642 pub event: ResponseRefusalDeltaEvent,
643 #[serde(skip_serializing_if = "Option::is_none")]
646 pub stream_id: Option<String>,
647}
648
649#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
651pub struct ResponseRefusalWsDone {
652 #[serde(flatten)]
653 pub event: ResponseRefusalDoneEvent,
654 #[serde(skip_serializing_if = "Option::is_none")]
657 pub stream_id: Option<String>,
658}
659
660#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
662pub struct ResponseTextWsDelta {
663 #[serde(flatten)]
664 pub event: ResponseTextDeltaEvent,
665 #[serde(skip_serializing_if = "Option::is_none")]
668 pub stream_id: Option<String>,
669}
670
671#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
673pub struct ResponseTextWsDone {
674 #[serde(flatten)]
675 pub event: ResponseTextDoneEvent,
676 #[serde(skip_serializing_if = "Option::is_none")]
679 pub stream_id: Option<String>,
680}
681
682#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
684pub struct ResponseWebSearchCallWsCompleted {
685 #[serde(flatten)]
686 pub event: ResponseWebSearchCallCompletedEvent,
687 #[serde(skip_serializing_if = "Option::is_none")]
690 pub stream_id: Option<String>,
691}
692
693#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
695pub struct ResponseWebSearchCallInWsProgress {
696 #[serde(flatten)]
697 pub event: ResponseWebSearchCallInProgressEvent,
698 #[serde(skip_serializing_if = "Option::is_none")]
701 pub stream_id: Option<String>,
702}
703
704#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
706pub struct ResponseWebSearchCallWsSearching {
707 #[serde(flatten)]
708 pub event: ResponseWebSearchCallSearchingEvent,
709 #[serde(skip_serializing_if = "Option::is_none")]
712 pub stream_id: Option<String>,
713}
714
715#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
717pub struct ResponseImageGenCallWsCompleted {
718 #[serde(flatten)]
719 pub event: ResponseImageGenCallCompletedEvent,
720 #[serde(skip_serializing_if = "Option::is_none")]
723 pub stream_id: Option<String>,
724}
725
726#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
729pub struct ResponseImageGenCallWsGenerating {
730 #[serde(flatten)]
731 pub event: ResponseImageGenCallGeneratingEvent,
732 #[serde(skip_serializing_if = "Option::is_none")]
735 pub stream_id: Option<String>,
736}
737
738#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
740pub struct ResponseImageGenCallInWsProgress {
741 #[serde(flatten)]
742 pub event: ResponseImageGenCallInProgressEvent,
743 #[serde(skip_serializing_if = "Option::is_none")]
746 pub stream_id: Option<String>,
747}
748
749#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
751pub struct ResponseImageGenCallPartialWsImage {
752 #[serde(flatten)]
753 pub event: ResponseImageGenCallPartialImageEvent,
754 #[serde(skip_serializing_if = "Option::is_none")]
757 pub stream_id: Option<String>,
758}
759
760#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
762pub struct ResponseMcpCallArgumentsWsDelta {
763 #[serde(flatten)]
764 pub event: ResponseMCPCallArgumentsDeltaEvent,
765 #[serde(skip_serializing_if = "Option::is_none")]
768 pub stream_id: Option<String>,
769}
770
771#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
773pub struct ResponseMcpCallArgumentsWsDone {
774 #[serde(flatten)]
775 pub event: ResponseMCPCallArgumentsDoneEvent,
776 #[serde(skip_serializing_if = "Option::is_none")]
779 pub stream_id: Option<String>,
780}
781
782#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
784pub struct ResponseMcpCallWsCompleted {
785 #[serde(flatten)]
786 pub event: ResponseMCPCallCompletedEvent,
787 #[serde(skip_serializing_if = "Option::is_none")]
790 pub stream_id: Option<String>,
791}
792
793#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
795pub struct ResponseMcpCallWsFailed {
796 #[serde(flatten)]
797 pub event: ResponseMCPCallFailedEvent,
798 #[serde(skip_serializing_if = "Option::is_none")]
801 pub stream_id: Option<String>,
802}
803
804#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
806pub struct ResponseMcpCallInWsProgress {
807 #[serde(flatten)]
808 pub event: ResponseMCPCallInProgressEvent,
809 #[serde(skip_serializing_if = "Option::is_none")]
812 pub stream_id: Option<String>,
813}
814
815#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
817pub struct ResponseMcpListToolsWsCompleted {
818 #[serde(flatten)]
819 pub event: ResponseMCPListToolsCompletedEvent,
820 #[serde(skip_serializing_if = "Option::is_none")]
823 pub stream_id: Option<String>,
824}
825
826#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
828pub struct ResponseMcpListToolsWsFailed {
829 #[serde(flatten)]
830 pub event: ResponseMCPListToolsFailedEvent,
831 #[serde(skip_serializing_if = "Option::is_none")]
834 pub stream_id: Option<String>,
835}
836
837#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
839pub struct ResponseMcpListToolsInWsProgress {
840 #[serde(flatten)]
841 pub event: ResponseMCPListToolsInProgressEvent,
842 #[serde(skip_serializing_if = "Option::is_none")]
845 pub stream_id: Option<String>,
846}
847
848#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
850pub struct ResponseOutputTextAnnotationWsAdded {
851 #[serde(flatten)]
852 pub event: ResponseOutputTextAnnotationAddedEvent,
853 #[serde(skip_serializing_if = "Option::is_none")]
856 pub stream_id: Option<String>,
857}
858
859#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
861pub struct ResponseWsQueued {
862 #[serde(flatten)]
863 pub event: ResponseQueuedEvent,
864 #[serde(skip_serializing_if = "Option::is_none")]
867 pub stream_id: Option<String>,
868}
869
870#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
872pub struct ResponseCustomToolCallInputWsDelta {
873 #[serde(flatten)]
874 pub event: ResponseCustomToolCallInputDeltaEvent,
875 #[serde(skip_serializing_if = "Option::is_none")]
878 pub stream_id: Option<String>,
879}
880
881#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
883pub struct ResponseCustomToolCallInputWsDone {
884 #[serde(flatten)]
885 pub event: ResponseCustomToolCallInputDoneEvent,
886 #[serde(skip_serializing_if = "Option::is_none")]
889 pub stream_id: Option<String>,
890}
891
892#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
894pub struct ErrorPayload {
895 #[serde(skip_serializing_if = "Option::is_none")]
897 pub r#type: Option<String>,
898 #[serde(skip_serializing_if = "Option::is_none")]
899 pub code: Option<String>,
900 pub message: String,
902 #[serde(skip_serializing_if = "Option::is_none")]
903 pub param: Option<String>,
904 #[serde(skip_serializing_if = "Option::is_none")]
906 pub headers: Option<std::collections::HashMap<String, String>>,
907 #[serde(skip_serializing_if = "Option::is_none")]
908 pub misalignment: Option<MisalignmentErrorDetailsResource>,
909}
910
911#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
922pub struct ResponseSteerAcceptedEvent {
923 pub sequence_number: u64,
925 pub steer: ResponseSteerAcceptedEventSteer,
927 #[serde(skip_serializing_if = "Option::is_none")]
930 pub stream_id: Option<String>,
931}
932
933#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
935pub struct ResponseSteerAcceptedEventSteer {
936 pub id: String,
938 pub previous_response_id: String,
940}
941
942pub type ResponseSteerErrorCode = String;
952
953#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
982pub struct ResponseSteerEvent {
983 pub previous_response_id: String,
985 pub input: ResponseSteerInput,
986}
987
988#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
997pub struct ResponseSteerFailedEvent {
998 pub sequence_number: i64,
1000 pub steer: ResponseSteerFailedEventSteer,
1002 pub error: ResponseSteerFailedEventError,
1004 #[serde(skip_serializing_if = "Option::is_none")]
1007 pub stream_id: Option<String>,
1008}
1009
1010#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
1012pub struct ResponseSteerFailedEventError {
1013 pub r#type: ResponseSteerFailedEventErrorType,
1015 pub code: ResponseSteerErrorCode,
1016 pub message: String,
1018}
1019
1020#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
1022#[serde(rename_all = "snake_case")]
1023pub enum ResponseSteerFailedEventErrorType {
1024 InvalidRequestError,
1025}
1026
1027#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
1029pub struct ResponseSteerFailedEventSteer {
1030 #[serde(skip_serializing_if = "Option::is_none")]
1032 pub id: Option<String>,
1033 pub previous_response_id: String,
1035 pub input: ResponseSteerInput,
1036}
1037
1038#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
1057#[serde(untagged)]
1058pub enum ResponseSteerInput {
1059 Text(String),
1060 List(Vec<ResponseSteerInputItem>),
1061}
1062
1063#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
1064#[serde(tag = "type", rename_all = "snake_case")]
1065pub enum ResponseSteerInputItem {
1066 Message(UserMessageItemParam),
1067 FunctionCallOutput(FunctionCallOutputItemParam),
1068}
1069
1070#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
1087pub struct ResponseSteerPendingEvent {
1088 pub sequence_number: u64,
1090 pub steer: ResponseSteerPendingEventSteer,
1092 pub reason: ResponseSteerPendingReason,
1093 pub required_input: Vec<ResponseSteerRequiredInput>,
1097 #[serde(skip_serializing_if = "Option::is_none")]
1100 pub stream_id: Option<String>,
1101}
1102
1103#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
1105pub struct ResponseSteerPendingEventSteer {
1106 pub id: String,
1108 pub previous_response_id: String,
1110}
1111
1112#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
1118#[serde(rename_all = "snake_case")]
1119pub enum ResponseSteerPendingReason {
1120 WaitingForRequiredInput,
1121 #[serde(untagged)]
1122 Other(String),
1123}
1124
1125#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
1131#[serde(tag = "type", rename_all = "snake_case")]
1132pub enum ResponseSteerRequiredInput {
1133 FunctionCallOutput(ResponseSteerRequiredInputFunctionCallOutput),
1135 CustomToolCallOutput(ResponseSteerRequiredInputCustomToolCallOutput),
1138 ComputerCallOutput(ResponseSteerRequiredInputComputerCallOutput),
1141 ShellCallOutput(ResponseSteerRequiredInputShellCallOutput),
1144 ApplyPatchCallOutput(ResponseSteerRequiredInputApplyPatchCallOutput),
1147 ToolSearchOutput(ResponseSteerRequiredInputToolSearchOutput),
1150 McpApprovalResponse(ResponseSteerRequiredInputMcpApprovalResponse),
1154}
1155
1156#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
1158pub struct ResponseSteerRequiredInputFunctionCallOutput {
1159 pub call_id: String,
1160 pub name: String,
1161}
1162
1163#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
1166pub struct ResponseSteerRequiredInputCustomToolCallOutput {
1167 pub call_id: String,
1168}
1169
1170#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
1173pub struct ResponseSteerRequiredInputComputerCallOutput {
1174 pub call_id: String,
1175}
1176
1177#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
1180pub struct ResponseSteerRequiredInputShellCallOutput {
1181 pub call_id: String,
1182}
1183
1184#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
1187pub struct ResponseSteerRequiredInputApplyPatchCallOutput {
1188 pub call_id: String,
1189}
1190
1191#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
1194pub struct ResponseSteerRequiredInputToolSearchOutput {
1195 pub call_id: String,
1196 pub execution: ResponseSteerRequiredInputToolSearchOutputExecution,
1197}
1198
1199#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
1200#[serde(rename_all = "lowercase")]
1201pub enum ResponseSteerRequiredInputToolSearchOutputExecution {
1202 Client,
1203}
1204
1205#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
1209pub struct ResponseSteerRequiredInputMcpApprovalResponse {
1210 pub approval_request_id: String,
1211}
1212
1213#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
1215pub struct ResponseWsError {
1216 #[serde(skip_serializing_if = "Option::is_none")]
1218 pub status: Option<u32>,
1219 #[serde(skip_serializing_if = "Option::is_none")]
1221 pub sequence_number: Option<u64>,
1222 pub error: ErrorPayload,
1224 #[serde(skip_serializing_if = "Option::is_none")]
1227 pub stream_id: Option<String>,
1228}
1229
1230#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
1231pub struct ResponsesWebSocketStreamEvent {
1232 #[serde(skip_serializing_if = "Option::is_none")]
1236 pub stream_id: Option<String>,
1237}
1238
1239#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
1240pub struct UserMessageItemParam {
1241 #[serde(skip_serializing_if = "Option::is_none")]
1242 pub id: Option<String>,
1243 pub role: UserMessageItemParamRole,
1245 pub content: crate::types::responses::EasyInputContent,
1247 #[serde(skip_serializing_if = "Option::is_none")]
1248 pub status: Option<String>,
1249}
1250
1251#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
1253#[serde(rename_all = "lowercase")]
1254pub enum UserMessageItemParamRole {
1255 User,
1256}
1257
1258#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
1260pub struct ResponseCompactionWsCompacting {
1261 #[serde(flatten)]
1262 pub event: crate::types::responses::ResponseCompactionCompactingEvent,
1263 #[serde(skip_serializing_if = "Option::is_none")]
1264 pub stream_id: Option<String>,
1265}