Fix app-server realtime CI expectation

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
Ahmed Ibrahim
2026-04-07 12:17:57 -07:00
parent f1c03132b2
commit 6c19762b09

View File

@@ -480,52 +480,7 @@ async fn realtime_webrtc_start_emits_sdp_notification() -> Result<()> {
assert_eq!(request.url.path(), "/v1/realtime/calls");
assert_eq!(request.url.query(), None);
let body = String::from_utf8(request.body).context("multipart body should be utf-8")?;
let session = json!({
"type": "realtime",
"instructions": "backend prompt\n\nstartup context",
"output_modalities": ["audio"],
"audio": {
"input": {
"format": {
"type": "audio/pcm",
"rate": 24_000,
},
"noise_reduction": {
"type": "near_field",
},
"turn_detection": {
"type": "server_vad",
"interrupt_response": true,
"create_response": true,
},
},
"output": {
"format": {
"type": "audio/pcm",
"rate": 24_000,
},
"voice": "marin",
},
},
"tools": [{
"type": "function",
"name": "codex",
"description": "Delegate a request to Codex and return the final result to the user. Use this as the default action. If the user asks to do something next, later, after this, or once current work finishes, call this tool so the work is actually queued instead of merely promising to do it later.",
"parameters": {
"type": "object",
"properties": {
"prompt": {
"type": "string",
"description": "The user request to delegate to Codex.",
},
},
"required": ["prompt"],
"additionalProperties": false,
},
}],
"tool_choice": "auto",
})
.to_string();
let session = r#"{"tool_choice":"auto","type":"realtime","instructions":"backend prompt\n\nstartup context","output_modalities":["audio"],"audio":{"input":{"format":{"type":"audio/pcm","rate":24000},"noise_reduction":{"type":"near_field"},"turn_detection":{"type":"server_vad","interrupt_response":true,"create_response":true}},"output":{"format":{"type":"audio/pcm","rate":24000},"voice":"marin"}},"tools":[{"type":"function","name":"codex","description":"Delegate a request to Codex and return the final result to the user. Use this as the default action. If the user asks to do something next, later, after this, or once current work finishes, call this tool so the work is actually queued instead of merely promising to do it later.","parameters":{"type":"object","properties":{"prompt":{"type":"string","description":"The user request to delegate to Codex."}},"required":["prompt"],"additionalProperties":false}}]}"#;
assert_eq!(
body,
format!(