diff --git a/codex-rs/app-server/tests/suite/v2/realtime_conversation.rs b/codex-rs/app-server/tests/suite/v2/realtime_conversation.rs index bb1b5bf175..38684e79d4 100644 --- a/codex-rs/app-server/tests/suite/v2/realtime_conversation.rs +++ b/codex-rs/app-server/tests/suite/v2/realtime_conversation.rs @@ -1907,7 +1907,7 @@ async fn webrtc_v3_start_posts_live_session_and_joins_without_session_update() - assert_call_create_multipart( harness.call_capture.single_request(), "v=offer\r\n", - r#"{"audio":{"output":{"voice":"cove"}},"delegation":{"ack_filler":false,"type":"client"},"instructions":"backend prompt\n\nstartup context","model":"gpt-live-1-boulder-alpha"}"#, + r#"{"audio":{"output":{"voice":"cove"}},"delegation":{"ack_filler":false,"type":"client"},"instructions":"backend prompt\n\nstartup context","model":"gpt-live-1-codex"}"#, "/v1/live", )?; assert!( diff --git a/codex-rs/core/src/realtime_conversation.rs b/codex-rs/core/src/realtime_conversation.rs index dc6056d5aa..879c2117d8 100644 --- a/codex-rs/core/src/realtime_conversation.rs +++ b/codex-rs/core/src/realtime_conversation.rs @@ -102,7 +102,7 @@ const HANDOFF_STREAM_TRUNCATION_MARKER: &str = "\n…output truncated…\n"; const AGENT_FINAL_MESSAGE_PREFIX: &str = "\"Agent Final Message\":\n\n"; const STANDALONE_HANDOFF_ID: &str = "codex"; const DEFAULT_REALTIME_MODEL: &str = "gpt-realtime-1.5"; -const DEFAULT_FRAMELESS_REALTIME_MODEL: &str = "gpt-live-1-boulder-alpha"; +const DEFAULT_FRAMELESS_REALTIME_MODEL: &str = "gpt-live-1-codex"; pub(crate) const REALTIME_USER_TEXT_PREFIX: &str = "[USER] "; pub(crate) const REALTIME_BACKEND_TEXT_PREFIX: &str = "[BACKEND] "; const REALTIME_V2_HANDOFF_COMPLETE_ACKNOWLEDGEMENT: &str = diff --git a/codex-rs/core/tests/suite/realtime_conversation.rs b/codex-rs/core/tests/suite/realtime_conversation.rs index d4bdb73ab2..7df6a447bf 100644 --- a/codex-rs/core/tests/suite/realtime_conversation.rs +++ b/codex-rs/core/tests/suite/realtime_conversation.rs @@ -588,8 +588,13 @@ async fn conversation_existing_call_attaches_without_creating_another_call() -> Ok(()) } +#[test_case(None, "gpt-live-1-codex"; "default model")] +#[test_case(Some("session-override-model"), "session-override-model"; "explicit model")] #[tokio::test(flavor = "multi_thread", worker_threads = 2)] -async fn conversation_webrtc_frameless_chatgpt_sends_codex_headers_to_backend() -> Result<()> { +async fn conversation_webrtc_frameless_chatgpt_sends_codex_headers_to_backend( + model: Option<&str>, + expected_model: &str, +) -> Result<()> { skip_if_no_network!(Ok(())); let server = start_mock_server().await; @@ -619,7 +624,7 @@ async fn conversation_webrtc_frameless_chatgpt_sends_codex_headers_to_backend() config.experimental_realtime_ws_backend_prompt = Some("backend prompt".to_string()); config.experimental_realtime_ws_base_url = Some(realtime_ws_base_url); }); - let test = builder.build(&server).await?; + let test = builder.build_with_auto_env(&server).await?; test.codex .submit(Op::RealtimeConversationStart(ConversationStartParams { @@ -631,7 +636,7 @@ async fn conversation_webrtc_frameless_chatgpt_sends_codex_headers_to_backend() codex_response_handoff_mode: codex_protocol::protocol::CodexResponseHandoffMode::Thinking, codex_response_handoff_channel_prefixes: None, - model: Some("session-override-model".to_string()), + model: model.map(str::to_string), output_modality: RealtimeOutputModality::Audio, include_startup_context: false, initial_items: Vec::new(), @@ -690,10 +695,12 @@ async fn conversation_webrtc_frameless_chatgpt_sends_codex_headers_to_backend() json!({ "sdp": body["sdp"], "delegation": body["session"]["delegation"]["type"], + "model": body["session"]["model"], }), json!({ "sdp": "v=offer\r\n", "delegation": "client", + "model": expected_model, }) );