mirror of
https://github.com/openai/codex.git
synced 2026-11-13 14:46:14 +00:00
Add a realtime delegation acknowledgement control (#36413)
## What changed - Add the optional `delegationAckFiller` field to `thread/realtime/start`. - Forward explicit `true` or `false` values to V3 Frameless Bidi session payloads as `delegation.ack_filler`; leave the field absent when unspecified so the Realtime API default is preserved. - Document that V1 and V2 ignore this setting. ## Testing - Cover both boolean values in Frameless Bidi serialization and verify the WebRTC V3 session creation payload. GitOrigin-RevId: 9fe8efd14e42738c3e86e3e9a8af81d0f4521244
This commit is contained in:
1 parent
4c219fdb1a
commit
6751b54cae
21 files changed
+162
-7
No files matched your search
@@ -384,6 +384,7 @@ impl RealtimeWebsocketWriter {
|
||||
session_mode: RealtimeSessionMode,
|
||||
output_modality: RealtimeOutputModality,
|
||||
voice: RealtimeVoice,
|
||||
delegation_ack_filler: Option<bool>,
|
||||
) -> Result<(), ApiError> {
|
||||
let session_mode = normalized_session_mode(self.event_parser, session_mode);
|
||||
let message = session_update_message(
|
||||
@@ -393,6 +394,7 @@ impl RealtimeWebsocketWriter {
|
||||
session_mode,
|
||||
output_modality,
|
||||
voice,
|
||||
delegation_ack_filler,
|
||||
);
|
||||
self.send_json(&message).await
|
||||
}
|
||||
@@ -868,6 +870,7 @@ impl RealtimeWebsocketClient {
|
||||
config.session_mode,
|
||||
config.output_modality,
|
||||
config.voice,
|
||||
config.delegation_ack_filler,
|
||||
)
|
||||
.await?;
|
||||
}
|
||||
@@ -2019,6 +2022,7 @@ mod tests {
|
||||
RealtimeSessionConfig {
|
||||
instructions: "backend prompt".to_string(),
|
||||
initial_items: Vec::new(),
|
||||
delegation_ack_filler: None,
|
||||
model: Some("realtime-test-model".to_string()),
|
||||
session_id: Some("conv_1".to_string()),
|
||||
event_parser: RealtimeEventParser::V1,
|
||||
@@ -2344,6 +2348,7 @@ mod tests {
|
||||
RealtimeSessionConfig {
|
||||
instructions: "backend prompt".to_string(),
|
||||
initial_items: Vec::new(),
|
||||
delegation_ack_filler: None,
|
||||
model: Some("realtime-test-model".to_string()),
|
||||
session_id: Some("conv_1".to_string()),
|
||||
event_parser: RealtimeEventParser::RealtimeV2,
|
||||
@@ -2470,6 +2475,7 @@ mod tests {
|
||||
RealtimeSessionConfig {
|
||||
instructions: "backend prompt".to_string(),
|
||||
initial_items: Vec::new(),
|
||||
delegation_ack_filler: None,
|
||||
model: Some("realtime-test-model".to_string()),
|
||||
session_id: Some("conv_1".to_string()),
|
||||
event_parser: RealtimeEventParser::RealtimeV2,
|
||||
@@ -2575,6 +2581,7 @@ mod tests {
|
||||
RealtimeSessionConfig {
|
||||
instructions: "backend prompt".to_string(),
|
||||
initial_items: Vec::new(),
|
||||
delegation_ack_filler: None,
|
||||
model: Some("realtime-test-model".to_string()),
|
||||
session_id: Some("conv_1".to_string()),
|
||||
event_parser: RealtimeEventParser::V1,
|
||||
@@ -2666,6 +2673,7 @@ mod tests {
|
||||
RealtimeSessionConfig {
|
||||
instructions: "backend prompt".to_string(),
|
||||
initial_items: Vec::new(),
|
||||
delegation_ack_filler: None,
|
||||
model: Some("realtime-test-model".to_string()),
|
||||
session_id: Some("conv_1".to_string()),
|
||||
event_parser: RealtimeEventParser::V1,
|
||||
|
||||
Reference in new issue
Block a user