1use super::wire::present_nullable;
6use super::{ToolChoiceFunction, ToolChoiceMcp, ToolChoiceOptions};
7use crate::Rest;
8use serde::{Deserialize, Serialize};
9
10#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
12#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
13#[derive(gproxy_protocol_macros::DeclaredFields)]
14pub struct RealtimeReasoning {
15 #[serde(
16 default,
17 deserialize_with = "present_nullable",
18 skip_serializing_if = "Option::is_none"
19 )]
20 pub effort: Option<Option<RealtimeReasoningEffort>>,
21 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
22 pub rest: Rest,
23}
24
25#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
27#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
28#[serde(untagged)]
29#[derive(gproxy_protocol_macros::DeclaredFields)]
30pub enum RealtimeToolChoiceConfig {
31 ToolChoiceOptions(ToolChoiceOptions),
32 ToolChoiceFunction(ToolChoiceFunction),
33 ToolChoiceMcp(ToolChoiceMcp),
34}
35
36#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
38#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
39#[serde(untagged)]
40#[derive(gproxy_protocol_macros::DeclaredFields)]
41pub enum RealtimeTracingConfig {
42 Literal(RealtimeTracingConfigVariant1),
43 RealtimeTracingConfigTracingConfiguration(RealtimeTracingConfigTracingConfiguration),
44 Variant3(()),
45}
46
47#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
49#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
50#[serde(untagged)]
51#[derive(gproxy_protocol_macros::DeclaredFields)]
52pub enum RealtimeTruncation {
53 Literal(RealtimeTruncationVariant1),
54 RealtimeTruncationRetentionRatio(RealtimeTruncationRetentionRatio),
55}
56
57#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
59#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
60#[derive(gproxy_protocol_macros::DeclaredFields)]
61pub struct RealtimeError {
62 pub message: String,
63 #[serde(rename = "type")]
64 pub type_: String,
65 #[serde(
66 default,
67 deserialize_with = "present_nullable",
68 skip_serializing_if = "Option::is_none"
69 )]
70 pub code: Option<Option<String>>,
71 #[serde(
72 default,
73 deserialize_with = "present_nullable",
74 skip_serializing_if = "Option::is_none"
75 )]
76 pub event_id: Option<Option<String>>,
77 #[serde(
78 default,
79 deserialize_with = "present_nullable",
80 skip_serializing_if = "Option::is_none"
81 )]
82 pub param: Option<Option<String>>,
83 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
84 pub rest: Rest,
85}
86
87#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
89#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
90#[derive(gproxy_protocol_macros::DeclaredFields)]
91pub enum RealtimeReasoningEffort {
92 #[serde(rename = "minimal")]
93 Minimal,
94 #[serde(rename = "low")]
95 Low,
96 #[serde(rename = "medium")]
97 Medium,
98 #[serde(rename = "high")]
99 High,
100 #[serde(rename = "xhigh")]
101 Xhigh,
102}
103
104#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
106#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
107#[derive(gproxy_protocol_macros::DeclaredFields)]
108pub struct RealtimeTracingConfigTracingConfiguration {
109 #[serde(
110 default,
111 deserialize_with = "present_nullable",
112 skip_serializing_if = "Option::is_none"
113 )]
114 pub group_id: Option<Option<String>>,
115 #[serde(
116 default,
117 deserialize_with = "present_nullable",
118 skip_serializing_if = "Option::is_none"
119 )]
120 pub metadata: Option<Option<serde_json::Value>>,
121 #[serde(
122 default,
123 deserialize_with = "present_nullable",
124 skip_serializing_if = "Option::is_none"
125 )]
126 pub workflow_name: Option<Option<String>>,
127 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
128 pub rest: Rest,
129}
130
131#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
133#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
134#[derive(gproxy_protocol_macros::DeclaredFields)]
135pub struct RealtimeTruncationRetentionRatio {
136 pub retention_ratio: serde_json::Number,
137 #[serde(rename = "type")]
138 pub type_: RealtimeTruncationRetentionRatioType,
139 #[serde(
140 default,
141 deserialize_with = "present_nullable",
142 skip_serializing_if = "Option::is_none"
143 )]
144 pub token_limits: Option<Option<RealtimeTruncationRetentionRatioTokenLimits>>,
145 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
146 pub rest: Rest,
147}
148
149#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
151#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
152#[derive(gproxy_protocol_macros::DeclaredFields)]
153pub struct RealtimeFunctionTool {
154 #[serde(
155 default,
156 deserialize_with = "present_nullable",
157 skip_serializing_if = "Option::is_none"
158 )]
159 pub description: Option<Option<String>>,
160 #[serde(
161 default,
162 deserialize_with = "present_nullable",
163 skip_serializing_if = "Option::is_none"
164 )]
165 pub name: Option<Option<String>>,
166 #[serde(
167 default,
168 deserialize_with = "present_nullable",
169 skip_serializing_if = "Option::is_none"
170 )]
171 pub parameters: Option<Option<serde_json::Value>>,
172 #[serde(rename = "type")]
173 #[serde(
174 default,
175 deserialize_with = "present_nullable",
176 skip_serializing_if = "Option::is_none"
177 )]
178 pub type_: Option<Option<RealtimeFunctionToolType>>,
179 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
180 pub rest: Rest,
181}
182
183#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
185#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
186#[derive(gproxy_protocol_macros::DeclaredFields)]
187pub struct RealtimeTruncationRetentionRatioTokenLimits {
188 #[serde(
189 default,
190 deserialize_with = "present_nullable",
191 skip_serializing_if = "Option::is_none"
192 )]
193 pub post_instructions: Option<Option<i64>>,
194 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
195 pub rest: Rest,
196}
197
198#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
200#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
201#[derive(gproxy_protocol_macros::DeclaredFields)]
202pub struct RealtimeMcphttpError {
203 pub code: i64,
204 pub message: String,
205 #[serde(rename = "type")]
206 pub type_: RealtimeMcphttpErrorType,
207 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
208 pub rest: Rest,
209}
210
211#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
212#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
213#[derive(gproxy_protocol_macros::DeclaredFields)]
214pub enum RealtimeTracingConfigVariant1 {
215 #[serde(rename = "auto")]
216 Auto,
217}
218
219#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
220#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
221#[derive(gproxy_protocol_macros::DeclaredFields)]
222pub enum RealtimeTruncationVariant1 {
223 #[serde(rename = "auto")]
224 Auto,
225 #[serde(rename = "disabled")]
226 Disabled,
227}
228
229#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
230#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
231#[derive(gproxy_protocol_macros::DeclaredFields)]
232pub enum RealtimeTruncationRetentionRatioType {
233 #[serde(rename = "retention_ratio")]
234 RetentionRatio,
235}
236
237#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
238#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
239#[derive(gproxy_protocol_macros::DeclaredFields)]
240pub enum RealtimeFunctionToolType {
241 #[serde(rename = "function")]
242 Function,
243}
244
245#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
246#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
247#[derive(gproxy_protocol_macros::DeclaredFields)]
248pub enum RealtimeMcphttpErrorType {
249 #[serde(rename = "http_error")]
250 HttpError,
251}