Add realtime transport config (#17097)

Adds realtime.transport config with websocket as the default and webrtc
wired through the effective config.

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
Ahmed Ibrahim
2026-04-08 09:53:53 -07:00
committed by GitHub
Unverified
parent 18171b1931
commit 06d88b7e81
4 changed files with 26 additions and 0 deletions
+4
View File
@@ -12,6 +12,7 @@ use codex_config::config_toml::ProjectConfig;
use codex_config::config_toml::RealtimeAudioConfig;
use codex_config::config_toml::RealtimeConfig;
use codex_config::config_toml::RealtimeToml;
use codex_config::config_toml::RealtimeTransport;
use codex_config::config_toml::RealtimeWsMode;
use codex_config::config_toml::RealtimeWsVersion;
use codex_config::config_toml::ToolsToml;
@@ -6487,6 +6488,7 @@ fn realtime_loads_from_config_toml() -> std::io::Result<()> {
[realtime]
version = "v2"
type = "transcription"
transport = "webrtc"
"#,
)
.expect("TOML deserialization should succeed");
@@ -6496,6 +6498,7 @@ type = "transcription"
Some(RealtimeToml {
version: Some(RealtimeWsVersion::V2),
session_type: Some(RealtimeWsMode::Transcription),
transport: Some(RealtimeTransport::WebRtc),
})
);
@@ -6511,6 +6514,7 @@ type = "transcription"
RealtimeConfig {
version: RealtimeWsVersion::V2,
session_type: RealtimeWsMode::Transcription,
transport: RealtimeTransport::WebRtc,
}
);
Ok(())
+1
View File
@@ -2095,6 +2095,7 @@ impl Config {
.map_or_else(RealtimeConfig::default, |realtime| RealtimeConfig {
version: realtime.version.unwrap_or_default(),
session_type: realtime.session_type.unwrap_or_default(),
transport: realtime.transport.unwrap_or_default(),
}),
experimental_realtime_ws_backend_prompt: cfg.experimental_realtime_ws_backend_prompt,
experimental_realtime_ws_startup_context: cfg.experimental_realtime_ws_startup_context,